import type { FilesystemProvider } from "../infra/filesystem-provider.js"; import type { StoredSnapshot } from "./types.js"; /** Snapshot store contract. Implementations may be filesystem, memory, or external. */ export interface SnapshotStore { /** Persist a snapshot and its session. Immutable: existing ids are rejected. */ save(stored: StoredSnapshot): Promise; /** Retrieve a snapshot by id. */ get(snapshotId: string): Promise; /** List snapshots, optionally filtered to a single lineage. */ list(lineageId?: string): Promise; } export declare class InMemorySnapshotStore implements SnapshotStore { private snapshots; save(stored: StoredSnapshot): Promise; get(snapshotId: string): Promise; list(lineageId?: string): Promise; private clone; } export declare function createInMemorySnapshotStore(): SnapshotStore; export declare class FileSystemSnapshotStore implements SnapshotStore { private dir; private readonly fs; constructor(dir: string, fsProvider?: FilesystemProvider); save(stored: StoredSnapshot): Promise; get(snapshotId: string): Promise; list(lineageId?: string): Promise; /** * Parse, migrate, and certify a stored snapshot record. The ancestor * chain is verified first: a snapshot with a lineage parent can only * be certified against its parent's signature, so a tampered ancestor * invalidates every descendant. Tampered or malformed files are * rejected loudly. */ private loadVerified; private fileName; } export declare function createFileSystemSnapshotStore(dir: string): SnapshotStore;