/** * Reading a loop bundle archive back, safely. * * Everything here treats its input as hostile. The archive arrives over the * network, and it is about to be written into a directory whose `scripts/**` * the executor will run — so the extraction gate (path traversal, typeflag, * truncation, caps) and the integrity gate (recomputed digest vs. the manifest) * both run BEFORE any byte reaches the filesystem. */ import { type BundleManifest } from "./manifest.js"; import { type BundleEntry } from "./pack.js"; /** Decompress + untar, refusing anything a loop bundle has no business containing. */ export declare function unpackBundle(archive: Uint8Array): BundleEntry[]; /** * Prove an unpacked entry set is exactly what a manifest describes. * * Set equality on (path, sha256, mode, size) AND digest equality. Either check * alone is insufficient: the digest is derived from the manifest's own list, so * a manifest that agrees with itself but not with the archive would pass a * digest-only check. */ export declare function verifyBundleAgainstManifest(entries: readonly BundleEntry[], manifest: BundleManifest): void; /** Prove the transport bytes are the ones the manifest was written for. */ export declare function verifyArchiveSha256(archive: Uint8Array, expected: string): void;