/** * AcpManager, Manages the lifecycle of all subagent ACP connections. * * The TUI orchestrator calls spawn() when it needs to delegate work. * The manager tracks active subagents and provides cancel / waitAll. */ import type { SubagentInfo, SubagentResult, SubagentTask } from './protocol.js'; import type { PermissionRequestHandler } from '../permissions/prompt.js'; import type { RuntimeEventBus } from '../runtime/events/index.js'; import type { HookDispatcher } from '../hooks/index.js'; export declare function getDefaultAcpAgentCommand(): string[]; /** * AcpManager, Manages multiple concurrent subagent connections. * * @example * ```ts * const mgr = new AcpManager({ requestPermission }); * const id = await mgr.spawn({ description: 'Fix the bug', context: '...', tools: ['read'] }); * const results = await mgr.waitAll(); * ``` */ export declare class AcpManager { private connections; private pending; private agentCmd; private readonly requestPermission?; private readonly runtimeBus; private readonly hookDispatcher; constructor(options?: { readonly requestPermission?: PermissionRequestHandler | undefined; readonly runtimeBus?: RuntimeEventBus | null | undefined; readonly hookDispatcher?: Pick | null | undefined; }); /** * Spawn a new subagent and start running the task. * Returns the subagent ID immediately; the task runs in the background. */ spawn(task: SubagentTask): Promise; /** Returns info snapshots for all active subagents. */ getActive(): SubagentInfo[]; /** Cancel a specific subagent by ID. No-op if not found. */ cancel(id: string): Promise; /** Cancel all active subagents. */ cancelAll(): Promise; /** * Wait for all currently active subagents to finish. * Returns results in completion order. */ waitAll(): Promise; } //# sourceMappingURL=manager.d.ts.map