/** * In-memory preview cache for `edit_note` dry-run previews. * * Design notes: * - TTL: 5 minutes. Previews that have not been applied within 5 minutes are * silently evicted on the next `set()` or `get()` call. If a preview * expires the agent must re-run `edit_note` with `dryRun: true`. * - Cap: 50 entries. When the store is full, the oldest entry (by `createdAt`) * is evicted to make room for the new one. * - stdio MCP is one-process-per-client (per modelcontextprotocol.io/docs/learn/architecture). * Process-global state is therefore equivalent to per-session state — no * session-id partitioning is needed. */ export interface PendingEdit { previewId: string; path: string; originalContent: string; proposedContent: string; diff: string; mode: string; createdAt: number; } export declare class PreviewStore { private store; set(preview: PendingEdit): void; get(previewId: string): PendingEdit | undefined; delete(previewId: string): boolean; /** Exposed for tests — returns current store size (after eviction). */ get size(): number; private evictExpired; } /** Process-global singleton. Safe because stdio MCP is single-client per process. */ export declare const previewStore: PreviewStore;