/** * Durable Mission Graph — atomic durable store, event log, leases and * checkpoints (2.0.0). * * All mission state is persisted atomically (write-temp-then-rename) so a * reboot never leaves a partially written document. Event records are * append-only and replayable with zero effects on creation. Leases are * repository-scoped and expire on a deadline; a reboot that terminates the * holder makes any recorded process `missing` during reconciliation instead of * trusting stale authority. */ import type { MissionEventRecord, MissionGraphDocumentV1, ReconciliationStatus, RecoveryRecord, RepositoryLease } from "./types.js"; export interface MissionStoreOptions { root: string; } export declare class MissionStore { private readonly root; constructor(options: MissionStoreOptions); private resolve; initialize(): Promise; saveGraph(document: MissionGraphDocumentV1): Promise; loadGraph(): Promise; appendEvent(record: MissionEventRecord): Promise; readEvents(missionId: string): Promise; /** * Replay the event log for a mission deterministically. Because events are * only appended (never mutated) and idempotent keys are embedded, replay * has zero effects: it never re-mutates state. */ replayEvents(missionId: string): Promise; saveLeases(leases: RepositoryLease[]): Promise; loadLeases(): Promise; acquireLease(lease: RepositoryLease, nowMs?: number): Promise; releaseLease(leaseId: string): Promise; isLeaseCurrent(lease: RepositoryLease, nowMs?: number): Promise; recordRecovery(record: RecoveryRecord): Promise; loadRecovery(missionId: string): Promise; private readFileSafe; syncExists(name: string): boolean; } /** * Reconcile a recorded process against reality after a reboot. * * If durable state says a process is `running` but it no longer exists, the * record is reclassified as `missing` (never reconciled to still-running), and * cleanup idempotently releases any leases the dead process held. */ export declare function reconcileProcessAfterReboot(store: MissionStore, recordedProcessId: string, processStillExists: boolean, nowMs?: number): Promise<{ status: ReconciliationStatus; actions: string[]; }>; //# sourceMappingURL=store.d.ts.map