export interface RunTaskState { taskId: string; phaseIndex: number; iterationCounts: Record; halted: boolean; /** Set on cancellation so the resume prompt can say "cancelled" vs "halted". */ status?: "cancelled" | "halted" | "running"; lastError?: string; savedAt: string; } export declare function readState(cwd: string, taskId: string): RunTaskState | null; export declare function writeState(cwd: string, state: RunTaskState): void; export declare function deleteState(cwd: string, taskId: string): void; export declare function isStateStale(state: RunTaskState): boolean;