/** * `--team auto`: discover a team config, spawn a local hooteams server as a * child process, and hand back its URL so the rest of the pipeline behaves * exactly as if `--team http://localhost:` had been passed. * * hooteams is intentionally not bundled — the launcher is resolved from PATH * (`hooteams`, falling back to `bunx hooteams`) and missing pieces fail with * a clear, actionable error. The child is reaped on hoocode exit, clean or * signalled, via a process "exit" hook (the interactive shutdown path calls * process.exit directly, so an async cleanup would never run). */ /** * Walk up from startDir to the filesystem root, returning the first config * found. Both candidates are probed per level (.agents/teams/default.json * wins over hooteams.config.json in the same directory). */ export declare function findTeamConfig(startDir: string): string | undefined; /** Ask the OS for a free port by binding port 0 and reading the assignment. */ export declare function findFreePort(): Promise; /** How to launch hooteams: directly from PATH, or through bunx. */ export declare function resolveHooteamsLauncher(env?: NodeJS.ProcessEnv): { command: string; prefixArgs: string[]; } | undefined; export interface AutoTeam { /** Base URL of the spawned hooteams server. */ url: string; /** Graceful shutdown: POST /stop, then kill the child's process group. */ stop(): Promise; } export interface AutoTeamOptions { /** Startup progress sink (pre-TUI, so console is fine). */ log?: (message: string) => void; /** How long to wait for GET /health (default 15s). */ healthTimeoutMs?: number; env?: NodeJS.ProcessEnv; } /** * Resolve the config, spawn hooteams on a free port, and wait for /health. * Throws (with a message ready for the terminal) when no config is found, no * launcher resolves, or the server never becomes healthy. */ export declare function startAutoTeam(cwd: string, options?: AutoTeamOptions): Promise; //# sourceMappingURL=team-auto.d.ts.map