export type WatchHistoryProvider = "codex" | "claude" | "desktop" | "terminal"; export declare const WATCH_HISTORY_RECEIPTS_DIRECTORY = "watch-history-receipts"; export interface WatchHistoryReceipt { schema: "agent-knock-knock/watch-history-receipt"; version: 1; provider: WatchHistoryProvider; watch_id: string; status: "completed"; settled_at: string; deleted_at: string; record_sha256: string; } export declare class WatchHistoryExpiredError extends Error { readonly receipt: WatchHistoryReceipt; readonly code = "watch_history_expired"; readonly replay_forbidden = true; readonly history_state = "expired"; readonly original_watch_id: string; readonly task_status = "completed"; constructor(receipt: WatchHistoryReceipt); } export declare function watchHistoryReceiptPath(storeDir: string, provider: WatchHistoryProvider, id: string): string; export declare function assertPrivateHistoryPath(file: string, directory: boolean): void; export declare function loadWatchHistoryReceipt(storeDir: string, provider: WatchHistoryProvider, id: string): WatchHistoryReceipt | undefined; export declare function assertWatchHistoryNotExpired(storeDir: string, provider: WatchHistoryProvider, id: string): void; /** Caller holds Store writer + exact record lock; receipt must be durable before unlink. */ export declare function saveWatchHistoryReceipt(storeDir: string, receipt: WatchHistoryReceipt): void;