/** * Numbered backup system for CLEO data files. * Maintains a rotating window of recent backups for rollback protection. * @epic T4454 * @task T4457 */ /** * Create a numbered backup of a file. * Rotates existing backups (file.1 -> file.2, etc.) and removes excess. */ export declare function createBackup(filePath: string, backupDir: string, maxBackups?: number): Promise; /** * List existing backups for a file, sorted by number (newest first). */ export declare function listBackups(fileName: string, backupDir: string): Promise; /** * Restore a file from its most recent backup. * Returns the path of the backup that was restored. * * A target under a project's `.cleo/` is guarded against a run from inside a * git worktree (T12680): see {@link assertRestoreTargetConfirmed}. * * @param fileName - File to restore. * @param backupDir - Directory holding its numbered backups. * @param targetPath - Where to write it. * @param opts - Invocation directory (required: core never falls back to * `process.cwd()`), and confirmation to overwrite the owning project's live * store from a worktree. * @returns The backup file restored from. */ export declare function restoreFromBackup(fileName: string, backupDir: string, targetPath: string, opts: { confirmOwnerStore?: boolean | undefined; cwd: string; }): Promise; //# sourceMappingURL=backup.d.ts.map