/** * [WHO]: SubAgentRunner class - spawns and manages SubAgents * [FROM]: Depends on node:fs/promises, node:path, core/sub-agent, core/workspace, core/tools, ./subagent-types * [TO]: Consumed by ./index.ts * [HERE]: extensions/builtin/subagent/subagent-runner.ts - SubAgent orchestration logic */ import type { Model } from "@catui/ai/types"; import type { SubAgentRunReport, SubAgentRunState } from "./subagent-types.js"; /** * SubAgent Runner - handles spawning and managing SubAgents. */ export declare class SubAgentRunner { private runtime; private worktreeManager; private currentState; private abortController; private activeWorkspace; private currentBaseCwd; constructor(); /** * Start a new SubAgent run. * @param task The task description * @param options.runRole Worker role: "research" (read-only) or "implement" (can write) * @param options.model Model to use (reuses main session's model and auth) */ run(task: string, options?: { runRole?: "research" | "implement"; model?: Model; cwd?: string; timeoutMs?: number; }): Promise; applyLatest(): Promise; /** * Stop the current run. */ stop(): Promise; /** * Get the current run state. */ getState(): SubAgentRunState | null; /** * Get status text for display. */ getStatusText(): string; private createReadOnlyTools; private createSandboxedTools; private writeReport; private readPatchPreview; }