import type { OutlineEntry, JumpEntry } from "../parser/types.js"; export declare function hashContent(content: string): string; export interface ObservationSnapshot { readonly contentHash: string; readonly outline: readonly OutlineEntry[]; readonly jumpTable: readonly JumpEntry[]; readonly actual: Readonly<{ lines: number; bytes: number; }>; readonly readCount: number; readonly firstReadAt: string; readonly lastReadAt: string; } export declare class Observation { readonly contentHash: string; readonly outline: readonly OutlineEntry[]; readonly jumpTable: readonly JumpEntry[]; readonly actual: Readonly<{ lines: number; bytes: number; }>; readonly firstReadAt: string; private _readCount; private _lastReadAt; constructor(opts: { contentHash: string; outline: readonly OutlineEntry[]; jumpTable: readonly JumpEntry[]; actual: Readonly<{ lines: number; bytes: number; }>; readCount: number; firstReadAt: string; lastReadAt: string; }); get readCount(): number; get lastReadAt(): string; isStale(currentContentHash: string): boolean; touch(now: string): void; snapshot(): ObservationSnapshot; static fromSnapshot(snapshot: ObservationSnapshot): Observation; } export type CacheResult = { hit: true; obs: Observation; } | { hit: false; stale: Observation | null; }; export declare class ObservationCache { private readonly entries; readonly now: () => string; constructor(now?: () => string); static fromSnapshots(snapshots: Readonly> | undefined, now?: () => string): ObservationCache; record(filePath: string, contentHash: string, outline: readonly OutlineEntry[], jumpTable: readonly JumpEntry[], actual: Readonly<{ lines: number; bytes: number; }>): void; check(filePath: string, currentContent: string): CacheResult; get(filePath: string): Observation | undefined; snapshotEntry(filePath: string): ObservationSnapshot | null; applySnapshot(filePath: string, snapshot: ObservationSnapshot | null): void; /** Iterate all observed file paths and their observations. */ allEntries(): IterableIterator<[string, Observation]>; /** Number of observed files. */ get size(): number; } //# sourceMappingURL=observation-cache.d.ts.map