import type { ToolSession } from "../tools"; export interface FileReadSnapshot { /** 1-indexed line number → exact line content as observed by `read`/`search`. */ lines: Map; recordedAt: number; } export declare class FileReadCache { #private; /** Look up the most recent snapshot for `absPath`, or `null` if absent. */ get(absPath: string): FileReadSnapshot | null; /** Record a contiguous run of lines (e.g. from a `read` tool). `startLine` is 1-indexed. */ recordContiguous(absPath: string, startLine: number, lines: readonly string[]): void; /** Record sparse `(lineNumber, content)` pairs (e.g. `search` matches plus context). */ recordSparse(absPath: string, entries: Iterable): void; /** Drop the snapshot for a single path. */ invalidate(absPath: string): void; /** Drop every snapshot. */ clear(): void; } /** * Look up (or lazily create) the file-read cache attached to a session. The * cache is stored as `session.fileReadCache` so it lives exactly as long as * the session itself. */ export declare function getFileReadCache(session: ToolSession): FileReadCache;