import type { TaskState } from './task-state.js'; export interface PersistedProfileState { id: string; configDir: string; cooldownUntil?: number; failureCount: number; lastFailureReason?: string; } export interface PersistedState { version: 1; tasks: TaskState[]; profiles: PersistedProfileState[]; lastSavedAt: string; } export declare function persistenceDir(root: string, cwd: string): string; export declare function saveState(dir: string, state: PersistedState): Promise; export declare function loadState(dir: string): Promise; export declare function applyRecovery(task: TaskState, hasCrashRecovery: boolean): TaskState;