import { type JournalRecoveryState } from "@claudexor/journal"; import type { ControlJournalExportReceipt } from "@claudexor/schema"; export declare function recoveryFrom(error: unknown, fallback: string): Extract; export declare function recoveryAt(byteOffset: number, reason: string): Extract; export declare function cloneRecovery(value: JournalRecoveryState): JournalRecoveryState; export declare function safeMessage(value: unknown): string; export interface PartitionFingerprint { fingerprint: string; preparationIdentity: string; exists: boolean; problem: string | null; } /** Observe a recovery tree without throwing. Callers must reject `problem` * before trusting the fingerprint for activation or mutation. */ export declare function fingerprintPartition(path: string, trustedRoot?: string): PartitionFingerprint; export declare function requireStablePreparationIdentity(observed: PartitionFingerprint, context: string): string; export declare function requireStableFingerprint(observed: PartitionFingerprint, context: string): string; export declare function exportPartitionEntries(source: string, destination: string): { name: string; type: string; mode: number; size: number; nlink: number; sha256: string | null; copiedAs: string | null; linkTarget?: string | undefined; }[]; export declare function exportJournalRecovery(input: { rootDir: string; partitionDir: string; partition: string; recovery: JournalRecoveryState; now: () => Date; }): ControlJournalExportReceipt; /** Stream one owned regular file into an exclusive private copy and return its * sha256 hex — bounded buffers, never the whole file in memory (a journal * partition can exceed the 2 GiB `readFileSync` wall). The source must stay * byte-identical across the copy or the export fails. */ export declare function copyOwnedFile(source: string, target: string, mode: number): string; export declare function readOwnedFile(path: string): Buffer; export declare function writeAtomicPrivateJson(path: string, value: unknown, exclusive: boolean): void; export declare function sha256(bytes: Buffer): string; export declare function sha256File(path: string): string; export declare function writeExclusiveFile(path: string, bytes: Buffer, mode: number): void; //# sourceMappingURL=journal-recovery-files.d.ts.map