declare const UPDATE_STEPS: readonly ["stage", "checkpoint", "stop", "snapshot", "install", "launch", "health", "restore"]; type UpdateStep = typeof UPDATE_STEPS[number]; declare const journalSchema: import("./boundaryDecoder").BoundarySchema<{ readonly id: string; readonly host: string; readonly scope: "pane" | "both" | "cli"; readonly version: string; readonly phase: "install" | "failed" | "launch" | "stage" | "checkpoint" | "stop" | "snapshot" | "health" | "restore" | "accepted" | "complete" | "needs-attention"; readonly completed: ("install" | "launch" | "stage" | "checkpoint" | "stop" | "snapshot" | "health" | "restore")[]; readonly helperPid: number | undefined; readonly setupPid: number | undefined; readonly setupExpiresAt: number | undefined; readonly updatedAt: string; readonly appUpdated: boolean; readonly cliUpdated: boolean; readonly hostReachable: boolean; readonly restored: { readonly panelId: string; readonly outcome: string; readonly reason: string; }[]; readonly error: string | undefined; }>; export type UpdateJournal = ReturnType; /** Commit one complete journal image; a crash leaves either the old or new image. */ export declare function writeUpdateJson(file: string, value: T): void; export declare function readUpdateJournal(file: string): UpdateJournal; export interface UpdateSteps { /** Each step reconciles its recorded effect before repeating after a crash. */ run(step: UpdateStep, journal: UpdateJournal): Promise>; } export declare function executeUpdate(file: string, steps: UpdateSteps): Promise; /** No owned installer can still be writing. A needs-attention operation that * stopped before finishing install may have a surviving installer child. */ export declare function updateLockReleasable(journal: UpdateJournal): boolean; /** Publish a fully durable owner directory atomically; never expose an empty lock. */ export declare function claimUpdateLock(directory: string, id: string, statusFile: string): { id: string; statusFile: string; acquired: boolean; }; /** Elect one releaser. A terminal journal plus a dead recorded releaser repairs a crashed cleanup. */ export declare function releaseUpdateLock(directory: string, id: string): void; /** Process disappearance is not proof of a clean shutdown. */ export declare function assertUpdateQuiescence(directory: string, expected: { id: string; bootId: string; pid: number; }): void; export {}; //# sourceMappingURL=updateOperation.d.ts.map