import { type ChildProcess } from "child_process"; export interface SupervisorOptions { /** Override the heartbeat file location (defaults to the RuntimeDirectory). */ heartbeatPath?: string; /** Override the data dir used to derive the default heartbeat path. */ configDir?: string; /** Test seam: spawn a worker child. Defaults to re-execing this binary. */ spawnWorker?: (env: NodeJS.ProcessEnv) => ChildProcess; /** Test seam: stop after the worker has been (re)spawned this many times. */ maxSpawns?: number; } /** * Thin, long-lived parent that runs the real agent as a WORKER child and * force-restarts it when its heartbeat goes stale (a wedged event loop) or it * exits unexpectedly. The supervisor itself does no WebSocket or command work, * so it virtually cannot wedge; systemd's `Restart=always` covers the rare case * where the supervisor itself dies. */ export declare function runSupervisor(opts?: SupervisorOptions): Promise;