/**
 * agent_bridge — `opensquid agent-bridge {start|stop|status|restart|run-foreground}` CLI (WAB.7).
 *
 * Authoritative spec: `docs/tasks/T-warm-agent-chat-bridge.md` WAB.7 §"CLI".
 *
 * Shape: start spawns detached `run-foreground`; stop/status read pid file +
 * `kill -0` liveness; restart = stop + wait for pid removal + start;
 * run-foreground is the actual daemon entry (constructs AgentBridgeDaemon,
 * starts it, then awaits a never-resolving promise — signal handlers in
 * daemon.ts call shutdown() + process.exit(0)).
 *
 * Resolution chains:
 *   projectUuid: OPENSQUID_PROJECT_UUID → cwd walk for `.opensquid/project.json` → hard-fail
 *   packRoot:    OPENSQUID_PACK_ROOT → `~/.opensquid/packs/default/` (loadPack throws on missing manifest)
 *
 * Exit codes: 0 = success (including not-running for stop/status), 1 =
 * generic failure, 2 = `start` invoked while another daemon is running.
 *
 * Imports from: node:child_process, node:fs/promises, node:path, commander,
 *   ./daemon.js.
 * Imported by: src/cli.ts (registers `agent-bridge` parent verb).
 */
import type { Command } from 'commander';
import { AgentBridgeDaemon, agentBridgePidPath } from './daemon.js';
export interface AgentBridgeCliDeps {
    /** Test injection — override the daemon class. Defaults to AgentBridgeDaemon. */
    daemonCtor?: typeof AgentBridgeDaemon;
    /** Test injection — override env access. Defaults to `process.env`. */
    env?: NodeJS.ProcessEnv;
    /** Test injection — override cwd. Defaults to `process.cwd()`. */
    cwd?: () => string;
    /** Test injection — capture stdout/stderr writes. Defaults to process streams. */
    out?: (chunk: string) => void;
    err?: (chunk: string) => void;
    /** Test injection — exit code sink. Defaults to setting process.exitCode. */
    exit?: (code: number) => void;
    /** Test injection — override spawn (start verb). Defaults to child_process.spawn. */
    spawnFn?: (cmd: string, args: string[], opts: {
        detached: boolean;
    }) => {
        pid?: number;
        unref: () => void;
    };
    /** Test injection — override `process.kill` (stop/status). Defaults to process.kill. */
    killFn?: (pid: number, sig: NodeJS.Signals | 0) => void;
    /** Test injection — `read-foreground` runs forever in production; tests
     *  pass a finite waiter so the spawn smoke test terminates. */
    waitForever?: () => Promise<void>;
}
/** Register the `agent-bridge` parent verb + every subcommand. */
export declare function registerAgentBridge(parent: Command, deps?: AgentBridgeCliDeps): Command;
/** Re-exported for the parent CLI registration in src/cli.ts. */
export { agentBridgePidPath };
//# sourceMappingURL=cli.d.ts.map