UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 1.33 kB
export type CompressMode = null | 'gz'; /** * The tar as one buffer, for a caller that needs bytes (an agents SDK that * stores snapshots as buffers). A blob that is a host path is read through * `regularChunks`, refused if a link has replaced it. */ export declare function writeSnapshotTar(manifest: Record<string, unknown>, blobs: Record<string, Uint8Array | string>, compress?: CompressMode): Promise<Uint8Array>; export declare function readSnapshotTar(data: Uint8Array, compress?: CompressMode, maxBytes?: number): Promise<unknown>; /** * Write manifest + blobs as a tar at `target`, streaming: a blob that is a * host path (a disk mount's file) is read a chunk at a time, opened only * while it is read. Returns the tar's size. */ export declare function writeTar(target: string, manifest: Record<string, unknown>, blobs: Record<string, Uint8Array | string>): Promise<number>; /** * Read a tar written by `writeTar` from the file at `source`, streaming. * Each disk mount's files are extracted under `staging` and come back as * host paths, so a restore copies them into place instead of holding them * in memory; the caller removes the directory once the state is loaded. */ export declare function readTar(source: string, staging: string, maxBytes?: number): Promise<unknown>; //# sourceMappingURL=tar_io.d.ts.map