Expand description
Reading run bundles from disk: manifest discovery, full bundle loads,
and artifact resolution. Malformed bundles are skipped, matching the
TypeScript store’s listRunBundles behavior.
Structs§
Functions§
- artifact_
placeholder - Compact placeholder for an artifact reference, matching the TypeScript
viewer:
«artifact 12.3KB artifacts/sha256/…». - contained_
path - Resolve a bundle file to its canonical path, requiring the target to stay
inside the bundle after following symlinks. The lexical check above
rejects
..and absolute components, but a plain-looking name can still be a symlink pointing outside the bundle. - list_
bundles - List all readable bundles in a runs directory, newest first (by
startedAt, then run id, matching the TypeScript store). - parse_
ndjson - Parse NDJSON, skipping blank lines and a trailing partial line (a writer may be mid-append when we read).
- read_
artifact_ checked - Read an artifact file, refusing paths that escape the bundle directory
and files whose actual size exceeds
max_bytes(the size declared by the reference is untrusted). - read_
bundle - read_
contained - Read a bundle document, refusing targets that resolve outside the bundle.
- read_
declared_ artifact_ checked - Read a remotely requested artifact only when both its declared path and canonical target stay under the artifact directory named by the manifest.
- read_
manifest - read_
manifest_ value - Read and validate the manifest, returning both the raw JSON document (views must carry the manifest verbatim, including fields this build does not know) and the typed projection.
- resolve_
artifacts - Resolve
$artifactreferences in a value by inlining artifact file contents (up tomax_bytesper artifact) from the bundle directory. References that escape the bundle directory or exceed the limit are replaced by placeholders. - with_
artifact_ placeholders - Replace
$artifactreferences with compact placeholders for previews, mirroring the TypeScript viewer’swithArtifactPlaceholders.