export type StepId = 'read' | 'ask' | 'preflight' | 'outage' | 'backup' | 'apply' | 'migrate' | 'health' | 'record'; export declare const STEPS: StepId[]; export declare const OUTAGE_STEPS: StepId[]; export declare function quotePath(p: string): string; export declare const HEARTBEAT_MS = 15000; export declare function runPhase(log: (message: string) => void, label: string, work: () => Promise, { intervalMs }?: { intervalMs?: number | undefined; }): Promise; export declare const FAIL_AT_ENV = "SAIL_PROXY_UPGRADE_FAIL_AT"; export declare class InjectedFailure extends Error { constructor(step: StepId); } export declare class Interrupted extends Error { signal: string; constructor(signal: string); } export interface SignalSource { on(event: string, listener: (signal: string) => void): unknown; removeListener(event: string, listener: (signal: string) => void): unknown; } export type Phase = 'before' | 'outage' | 'rollback' | 'done'; export declare class StepRunner { private readonly options; phase: Phase; current: StepId | null; interrupted: string | null; private readonly controller; private readonly listeners; constructor(options: { signals: SignalSource; env: NodeJS.ProcessEnv; log: (message: string) => void; onEarlySignal: (signal: string) => void; }); start(): void; stop(): void; get signal(): AbortSignal; enterOutage(): void; enterRollback(): void; private handle; step(id: StepId, work: (signal: AbortSignal) => Promise): Promise; } //# sourceMappingURL=steps.d.ts.map