/** * [WHO]: Provides ToolRuntimeController, ToolRuntimeBuildOptions, ToolRuntimeBuildResult * [FROM]: Depends on agent-core tool types, extensions-host wrappers, and ToolOrchestrator * [TO]: Consumed by core/runtime/agent-session.ts during runtime rebuilds and tool activation * [HERE]: core/runtime/tool-runtime-controller.ts - tool source merge, wrapping, active resolution * * Extracted from AgentSession (AS05). AgentSession still owns extension lifecycle and prompt * application; this controller owns the tool runtime policy that determines which tools exist * and which tools are active after a rebuild. */ import type { AgentTool } from "@catui/agent-core"; import type { ExtensionRunner } from "../extensions-host/runner.js"; import type { ToolDefinition } from "../extensions-host/types.js"; import type { ToolOrchestrator } from "../tools/orchestrator.js"; export interface ToolRuntimeBuildOptions { baseTools: Map; baseToolsOverride?: Record; customTools: ToolDefinition[]; activeToolNames?: string[]; includeAllExtensionTools?: boolean; extensionRunner?: ExtensionRunner; } export interface ToolRuntimeBuildResult { activeTools: AgentTool[]; systemPromptToolNames: string[]; } export declare class ToolRuntimeController { private readonly orchestrator; constructor(orchestrator: ToolOrchestrator); build(options: ToolRuntimeBuildOptions): ToolRuntimeBuildResult; private _buildExtensionTools; private _resolveActiveToolNames; private _resolveActiveTools; private _systemPromptToolNames; }