/**
 * One full-file version observed at a point in time. The tag the model sees is
 * {@link Snapshot.hash}; recovery replays edits against {@link Snapshot.text}.
 */
export interface Snapshot {
    /** Canonical path this version belongs to. */
    readonly path: string;
    /** Full normalized (LF, no BOM) file text as observed. */
    readonly text: string;
    /** Content-derived tag for {@link Snapshot.text} (see {@link computeFileHash}). */
    readonly hash: string;
    /** Timestamp (ms since epoch) the version was recorded. */
    recordedAt: number;
}
/**
 * Storage seam for full-file version snapshots. The patcher calls {@link head}
 * for the latest version of a path and {@link byHash} when it needs the
 * specific historical version a section's stale tag names.
 */
export declare abstract class SnapshotStore {
    /** Most-recently recorded version for `path`, or `null` if none. */
    abstract head(path: string): Snapshot | null;
    /** Recorded unambiguous version for `path` whose tag equals `hash`, or `null`. */
    abstract byHash(path: string, hash: string): Snapshot | null;
    /** Recorded version for `path` whose tag and full text both match, or `null`. */
    byHashAndText(path: string, hash: string, text: string): Snapshot | null;
    /** Record the full normalized text of `path` and return its content tag. */
    abstract record(path: string, fullText: string): string;
    /** Drop the version history for a single path. */
    abstract invalidate(path: string): void;
    /** Drop every version history. */
    abstract clear(): void;
}
export interface InMemorySnapshotStoreOptions {
    /** Maximum number of distinct paths tracked at once (default 30). LRU eviction. */
    maxPaths?: number;
    /** Maximum full-file versions retained per path (default 4). Oldest dropped first. */
    maxVersionsPerPath?: number;
    /**
     * Global ceiling on retained snapshot text summed across every path's
     * version history, measured in UTF-16 code units (default 64 MiB).
     * Least-recently-used path histories are evicted to stay under it.
     */
    maxTotalBytes?: number;
}
/**
 * In-memory {@link SnapshotStore} backed by `lru-cache`. Per-path history is a
 * short ring of full-file versions (oldest dropped first); per-session path
 * tracking is LRU-bounded so cold paths age out automatically.
 *
 * Recording byte-identical content again refreshes recency and reuses the
 * existing tag (read fusion); recording new content unshifts a fresh version
 * onto the front of the path history.
 */
export declare class InMemorySnapshotStore extends SnapshotStore {
    #private;
    constructor(options?: InMemorySnapshotStoreOptions);
    head(path: string): Snapshot | null;
    byHash(path: string, hash: string): Snapshot | null;
    byHashAndText(path: string, hash: string, text: string): Snapshot | null;
    record(path: string, fullText: string): string;
    invalidate(path: string): void;
    clear(): void;
}
//# sourceMappingURL=snapshots.d.ts.map