import type { TerminalControlRef } from "./terminal-control-ref.js"; import { type TerminalActivityWatchAnchor, type TerminalWatch } from "./terminal-watch-record.js"; export interface UserExplicitFallbackWatchReceipt { callback_expected: true; callback_mode: "terminal_watch"; watch_id: string; watch_mode?: "exact_task" | "terminal_activity"; confidence?: "exact" | "best_effort"; } /** Native input uncertainty is never permission to fall back and send text. */ export declare function unsafeFallbackWatchPreparation(error: unknown): boolean; export declare function isAutomaticSendWatch(watch: Pick): boolean; /** The same persisted Watch produces identical initial and replay receipts. */ export declare function automaticSendWatchReceipt(watch: TerminalWatch): UserExplicitFallbackWatchReceipt; /** Capture only a stable physical observer, never a native task identity. */ export declare function createAutomaticActivityWatchAnchor(input: { terminalId: string; pid: number; requestHash: string; capturedAt: Date; before: Record; current: Record; previousWorkspace: string; currentWorkspace: string; control: TerminalControlRef; }): TerminalActivityWatchAnchor; /** Missing post-Send data may recover; a proven different process cannot. */ export declare function assertAutomaticActivityWatchIdentity(anchor: TerminalActivityWatchAnchor, observed: Record, actualWorkspace: string, expectedWorkspace: string): void;