export type BotmuxUpdatePhase = 'updating' | 'restarting'; export interface BotmuxUpdateResult { oldVersion: string; newVersion: string; changed: boolean; restarted: boolean; /** Populated when the update succeeded but the restart handoff failed. */ restartError?: string; /** True when a restart was already in progress (another driver claimed the lease). */ alreadyScheduled?: boolean; /** True when the new binary is installed but a normal restart is refused * because live daemons still run the pre-signal-death-autorestart PM2 policy. * The operator must run the one-time `--bootstrap-shutdown-protocol` upgrade * from a terminal. Distinct from restartError so the UI shows a precise, * actionable message instead of a generic failure. */ bootstrapRequired?: boolean; /** Canonical PM2 names still on the old policy (best-effort, may be empty). */ unsafeDaemons?: string[]; } type FetchLike = (input: string, init?: RequestInit) => Promise; /** * Decide whether a successful `/api/update/run` response requires a restart to * take effect. A restart is needed when the server explicitly says so * (`restartRequired` — set for local-dev, whose build regenerates dist/ even * when HEAD didn't move) OR when the installed version changed (the generic * npm/pnpm/bun path, which sends no `restartRequired`). Pure so the Settings * update flow can be regression-tested without rendering the component. */ export declare function updateResponseNeedsRestart(body: { restartRequired?: unknown; changed?: unknown; }): boolean; /** Install the latest, or atomically roll back to an allow-listed older version. */ export declare function updateAndRestartBotmux(fetchImpl: FetchLike, onPhase?: (phase: BotmuxUpdatePhase) => void, targetVersion?: string): Promise; export {}; //# sourceMappingURL=update-action.d.ts.map