import type { AIProviderName, ToolUtilities } from "../../types/index.js"; import type { NeuroLink } from "../../neurolink.js"; import type { Tool } from "../../types/index.js"; /** * ToolsManager class - Handles all tool management operations */ export declare class ToolsManager { private readonly providerName; private readonly directTools; private readonly neurolink?; private readonly utilities?; protected mcpTools?: Record; protected customTools?: Map; protected toolExecutor?: (toolName: string, params: unknown, options?: Record) => Promise; protected sessionId?: string; protected userId?: string; constructor(providerName: AIProviderName, directTools: Record, neurolink?: NeuroLink | undefined, utilities?: ToolUtilities | undefined); /** * BZ-666: Wrap tool execute with output truncation to prevent * context overflow when large results flow into the AI SDK accumulator. */ private wrapExecuteWithTruncation; /** * BZ-666: Apply generateToolOutputPreview to tool results to prevent * context overflow when large results flow into the AI SDK accumulator. */ private truncateToolResult; /** * Set session context for MCP tools */ setSessionContext(sessionId?: string, userId?: string): void; private emitToolEvent; /** * Set up tool executor for a provider to enable actual tool execution * @param sdk - The NeuroLinkSDK instance for tool execution * @param functionTag - Function name for logging */ setupToolExecutor(sdk: { customTools: Map; executeTool: (toolName: string, params: unknown) => Promise; }, functionTag: string): void; /** * Get all available tools - direct tools are ALWAYS available * MCP tools are added when available (without blocking) */ getAllTools(): Promise>; /** * Get direct tools (built-in agent tools) */ getDirectTools(): Record; /** * Get MCP tools */ getMCPTools(): Record | undefined; /** * Get custom tools */ getCustomTools(): Map | undefined; /** * Process direct tools with event emission wrapping */ private processDirectTools; /** * Process custom tools from setupToolExecutor */ private processCustomTools; /** * Process MCP tools integration */ private processMCPTools; /** * Process external MCP tools */ private processExternalMCPTools; /** * Create a custom tool from tool definition */ private createCustomToolFromDefinition; /** * Create an external MCP tool */ private createExternalMCPTool; }