/** * restart.ts — `mma restart`. * * Stop the daemon, start a replacement, and do not return until the replacement * answers. * * WHY THIS IS ONE COMMAND. Done by hand it is a sequence with two silent * failure modes, and the previously documented form * (`pkill -f "mma serve"; nohup mma serve > /tmp/mma.log 2>&1 &`) hit both: * the kill matched nothing when the daemon was started any other way, and the * start then failed on the bound port with its output redirected into a file * nobody reads. Composing the two steps here means the failure of either is * reported, and "restarted" is asserted against /health rather than assumed. * * WHAT IT DOES NOT DO. It does not preserve in-flight work. Boot reconciliation * marks anything the old daemon was running as `interrupted` with a retryable * reason, and MMA cannot resubmit those tasks because the execution store keeps * no prompt — see `application/execution-store.ts`. The caller retries. */ import { startDaemonDetached, type DaemonControlDeps } from './daemon-control.js'; export interface RestartDeps extends DaemonControlDeps { /** Absolute path to the CLI entry point. */ cliPath: string; /** Where the new daemon's output goes. */ logPath: string; /** Extra argv passed through to `serve`, e.g. ['--config', '/path']. */ serveArgs?: string[]; /** Skip the daemon's drain window. */ now_?: boolean; json?: boolean; stdout?: (s: string) => boolean; stderr?: (s: string) => boolean; healthTimeoutMs?: number; startDaemon?: typeof startDaemonDetached; } export declare const RestartExitCode: { readonly SUCCESS: 0; readonly ERR_NOT_STOPPED: 1; readonly ERR_NOT_HEALTHY: 2; }; export declare function runRestart(deps: RestartDeps): Promise; //# sourceMappingURL=restart.d.ts.map