import type { EventBus, EventMap } from '@wrongstack/core/kernel'; import type { Logger } from '@wrongstack/core/types'; import type { LSPServer } from './server/lsp-server.js'; import type { ServerLister } from './shared-types.js'; import type { TrackedDocument } from './types.js'; export declare class DocumentTracker { private readonly registry; private readonly log; private readonly events?; private readonly docs; /** * LRU bookkeeping kept beside `docs` so the shared `TrackedDocument` shape * stays untouched. `docs` previously only ever grew — the sole removal was * `forceCloseAll()` — so every file ever read or written stayed resident in * full for the whole session. */ private readonly lastUsed; private clock; private trackedBytes; private cwd; constructor(registry: () => ServerLister, log: Logger, cwd: string, events?: EventBus | undefined); setCwd(cwd: string): void; handleToolExecuted(event: EventMap['tool.executed']): Promise; /** * Read a file for tracking, refusing anything over {@link MAX_DOCUMENT_BYTES}. * The `stat` comes first so an oversized file is never materialized at all. */ private readTrackable; fileWritten(filePath: string): Promise; open(filePath: string, knownText?: string): Promise; reopenForServer(server: LSPServer): Promise; forceCloseAll(): Promise; /** Record a document as most-recently-used. */ private touch; /** Adjust the running byte total when a document's text is replaced. */ private accountText; /** Close and forget one document, keeping servers in sync. */ private evict; /** Drop least-recently-used documents until back inside both budgets. */ private enforceBudget; get(filePath: string): TrackedDocument | null; list(): readonly TrackedDocument[]; private resolve; } //# sourceMappingURL=document-tracker.d.ts.map