/** * `cleo doctor sync-journal`: the repair diff of every suspect table (journal spec * §4.4; S3d, T12987). * * Read-only by default: it opens the project `cleo.db` as a snapshot and * plans the repair of each `suspect:` table (the I, U and D ops it would * emit, the rows it would baseline, held and unidentified rows), writing * nothing. `--repair` opens the store like any command and runs * {@link repairSuspectTables}: seal what is pending, emit the repair ops in a * `repair` frame per table, seal them, verify, and clear each suspect key * that verifies. * * @module * @task T12987 */ import { type HoldsReport } from '../store/sync/held.js'; import { type RepairReport } from '../store/sync/repair.js'; import { type UndoBudget } from '../store/sync/sequencing.js'; /** What `cleo doctor sync-journal` reports. */ export interface SyncRepairResult { readonly dbPath: string; readonly storeExists: boolean; readonly report: RepairReport; /** Tables that stay suspect (a plan in a dry run; unverified after a repair). */ readonly suspect: readonly string[]; /** Local writes a sync rebase holds, with the long holds and their reason (§3.5 Rule 5). */ readonly holds: HoldsReport; /** Undo against its budget: warns from 80%, `exceeded` from 100% until a rebind (§3.5 Rule 2, D5). */ readonly undo: UndoBudget; } /** * Plan (default) or run (`repair`) the repair diff of the project store's * suspect tables. * * @param projectRoot - The project root. * @param options - `repair: true` writes; otherwise read-only. */ export declare function runSyncRepair(projectRoot: string, options?: { readonly repair?: boolean; readonly nowMs?: number; /** The undo budget in bytes; defaults to `UNDO_BUDGET_BYTES`. */ readonly undoBudgetBytes?: number; }): Promise; //# sourceMappingURL=sync-repair.d.ts.map