export type CASSchema = {
    [key: string]: true | CASSchema;
};
export type CASResult<T, S extends CASSchema> = {
    [K in keyof T]: K extends keyof S ? S[K] extends true ? T[K] extends any[] ? string[] : T[K] extends Record<string, any> ? Record<string, string> : string : S[K] extends CASSchema ? CASResult<T[K], S[K]> : T[K] : T[K];
};
export type Chunk = {
    hash: string;
    data: any;
};
export declare class ContentAddressableStore {
    private seenHashes;
    private chunkData;
    process<T, S extends CASSchema>(record: T, schema: S): {
        record: CASResult<T, S>;
        chunks: Chunk[];
    };
    reconstruct<T>(record: any, schema: CASSchema): T;
    loadChunks(chunks: Record<string, any>): 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<string>): void;
    private walk;
    private walkReverse;
    private hashAndStore;
}
