export type CASSchema = { [key: string]: true | CASSchema; }; export type CASResult = { [K in keyof T]: K extends keyof S ? S[K] extends true ? T[K] extends any[] ? string[] : T[K] extends Record ? Record : string : S[K] extends CASSchema ? CASResult : T[K] : T[K]; }; export type Chunk = { hash: string; data: any; }; export declare class ContentAddressableStore { private seenHashes; private chunkData; process(record: T, schema: S): { record: CASResult; chunks: Chunk[]; }; reconstruct(record: any, schema: CASSchema): T; loadChunks(chunks: Record): void; /** * Seed the set of hashes that should be treated as already-emitted, without * loading their chunk data. Used by `TraceWriter` when it scans an existing * trace file at construction time so that subsequent `process()` calls don't * re-emit chunks that prior writers in the same run already wrote. Unlike * `loadChunks`, this does NOT populate `chunkData` (the writer never needs to * reconstruct values, only check whether to emit them), keeping memory low * for long traces. */ seedSeenHashes(hashes: Set): void; private walk; private walkReverse; private hashAndStore; }