import type { DurableJournal, JournalCompactionOutcome } from "@claudexor/journal"; /** One cancelable maintenance flight under the daemon's existing root writer. * A manager creates a new journal object per generation and closes the old one; * those exact objects are the dedupe keys, never another durable authority. */ export declare class JournalMaintenance { /** One sink for failures, typed declines and `journal.records_retired` * receipts (the daemon log plus startup diagnostics in the composition root). */ private readonly log; private readonly pending; private readonly controller; private flight; private armed; private stopped; private cleaned; private readonly stagingDir; constructor(rootDir: string, /** One sink for failures, typed declines and `journal.records_retired` * receipts (the daemon log plus startup diagnostics in the composition root). */ log: (message: string) => void); /** Request one pass for this generation. Requests coalesce while pending; a * request that arrives during the generation's own flight runs one more pass * after it — the journal's threshold hook is edge-triggered, so that request * means the file crossed the threshold again. */ request: (journal: DurableJournal) => void; /** Called only after normal admission, including recovery-route reopen. */ arm(): void; /** Synchronous prefix revokes new work and aborts bulk I/O. The existing * daemon stop wrapper awaits cleanup before journals/root authority close. */ stop(): Promise; private startFlight; private run; private removeCrashCandidates; private warnFailure; } /** The process footprint as log-line fields (`rssMb=… heapUsedMb=… externalMb=…`, * whole mebibytes). The daemon's retained journal set lives on its heap, so * the lines that already exist — the normal-admission line and every journal * maintenance receipt — carry it, and the memory class stays observable on * every install without a new mechanism. */ export declare function processMemoryFields(usage?: Pick): string; /** One log line per maintenance outcome: the typed decline with its reason and * bounds, or the `journal.records_retired` receipt — compaction-time counts * beside what the fold already retired while replaying this generation at * open (`retiredAtReplay`). Both end with the process memory fields. The quiet * no-ops (below the threshold, an empty journal) produce no line. */ export declare function describeCompactionOutcome(partition: string, outcome: JournalCompactionOutcome, replay?: { count: number; bytes: number; }, memory?: string): string | null; //# sourceMappingURL=journal-maintenance.d.ts.map