import { type SpawnOptions } from 'child_process'; export interface ConnectOptions { repo?: string; adapter?: 'claude-code' | 'codex' | 'paste'; acceptVersion?: boolean; /** Spawn the daemon detached, wait for the handshake, then return. */ background?: boolean; /** Stop a running background daemon and clean the pidfile. */ stop?: boolean; version: string; } /** Injectable seams (tests): process spawn, kill, and the handshake wait. */ export interface ConnectDeps { spawnDaemon?: (command: string, args: string[], options: SpawnOptions) => { pid?: number; unref(): void; }; killProcess?: (pid: number, signal: NodeJS.Signals) => void; /** Override the "is this pid actually our daemon" check (tests inject a stub). */ isDaemonProcess?: (pid: number) => boolean; handshakeTimeoutMs?: number; pollIntervalMs?: number; } export declare function engineerConnect(opts: ConnectOptions, deps?: ConnectDeps): Promise; /** * Stop a detached background daemon: signal the pid (SIGTERM, so the daemon * runs its own graceful shutdown) and clear the pidfile. Shared by * `connect --stop` and `disconnect`. Returns what it found. */ export declare function stopBackgroundDaemon(engagementId: string, deps?: { killProcess?: (pid: number, signal: NodeJS.Signals) => void; isDaemonProcess?: (pid: number) => boolean; }): { stopped: boolean; pid: number | null; }; //# sourceMappingURL=connect.d.ts.map