@voltagent/core 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2111,8 +2111,8 @@ interface ReasoningToolExecuteOptions extends ToolExecuteOptions {
2111
2111
  historyEntryId: string;
2112
2112
  }
2113
2113
 
2114
- declare const DEFAULT_INSTRUCTIONS = "\nYou have access to the 'think' and 'analyze' tools to work through problems step-by-step and structure your thought process. You should ALWAYS 'think' before making tool calls or generating a response.\n\n1. **Think** (scratchpad):\n * Purpose: Use the 'think' tool as a scratchpad to break down complex problems, outline steps, and decide on immediate actions within your reasoning flow. Use this to structure your internal monologue.\n * Usage: Call 'think' multiple times if needed to break down the problem. Explain your reasoning and specify the intended action (e.g., \"make a tool call\", \"perform calculation\", \"ask clarifying question\").\n\n2. **Analyze** (evaluation):\n * Purpose: Evaluate the result of a think step or a set of tool calls. Assess if the result is expected, sufficient, or requires further investigation.\n * Usage: Call 'analyze' AFTER a set of tool calls or a thought process. Determine the 'next_action' based on your analysis: 'continue' (more reasoning needed), 'validate' (seek external confirmation/validation if possible), or 'final_answer' (ready to conclude).\n * Explain your reasoning highlighting whether the result is correct/sufficient.\n\n## IMPORTANT GUIDELINES\n* **Always Think First:** You MUST use the 'think' tool before making other tool calls or generating a response, unless the request is extremely simple. Use 'think' multiple times to break down complex problems.\n* **Iterate to Solve:** Use the 'think' and 'analyze' tools iteratively to build a clear reasoning path. The typical flow is Think -> [Think -> ...] -> [Tool Calls if needed] -> [Analyze if needed] -> ... -> final_answer. Repeat this cycle until you reach a satisfactory conclusion.\n* **Make multiple tool calls in parallel:** After a 'think' step, you can make multiple tool calls in parallel if needed.\n* **Keep Thoughts Internal:** The reasoning steps (thoughts and analyses) are for your internal process only. Do not share them directly with the user unless asked to explain your reasoning.\n* **Conclude Clearly:** When your analysis determines the 'next_action' is 'final_answer', provide a concise and accurate final answer to the user based on your reasoning steps.\n";
2115
- declare const FEW_SHOT_EXAMPLES = "\n## Examples\n\n**Example 1: Simple Fact Retrieval**\n\n*User Request:* How many continents are there on Earth?\n\n*Agent's Internal Process:*\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Understand Request\",\n \"thought\": \"The user wants to know the standard number of continents on Earth. This is a common piece of knowledge.\",\n \"action\": \"Recall or verify the number of continents.\",\n \"confidence\": 0.95\n }\n }\n}\n```\n*--(Agent internally recalls the fact)--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Evaluate Fact\",\n \"result\": \"Standard geographical models list 7 continents: Africa, Antarctica, Asia, Australia, Europe, North America, South America.\",\n \"analysis\": \"The recalled information directly answers the user's question accurately.\",\n \"next_action\": \"final_answer\",\n \"confidence\": 1.0\n }\n }\n}\n```\n\n*Agent's Final Answer to User:*\nThere are 7 continents on Earth: Africa, Antarctica, Asia, Australia, Europe, North America, and South America.\n\n**Example 2: Multi-Step Information Gathering**\n\n*User Request:* What is the capital of France and its current population?\n\n*Agent's Internal Process:*\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Plan Information Retrieval\",\n \"thought\": \"The user needs two pieces of information: the capital of France and its current population. I should break this down. First, find the capital.\",\n \"action\": \"Search for the capital of France.\",\n \"confidence\": 0.95\n }\n }\n}\n```\n*--(Tool call: search(query=\"capital of France\"))--*\n*--(Tool Result: \"Paris\")--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Analyze Capital Search Result\",\n \"result\": \"The search result indicates Paris is the capital of France.\",\n \"analysis\": \"This provides the first piece of requested information. Now I need to find the population of Paris.\",\n \"next_action\": \"continue\",\n \"confidence\": 1.0\n }\n }\n}\n```\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Plan Population Retrieval\",\n \"thought\": \"The next step is to find the current population of Paris.\",\n \"action\": \"Search for the population of Paris.\",\n \"confidence\": 0.95\n }\n }\n}\n```\n*--(Tool call: search(query=\"population of Paris current\"))--*\n*--(Tool Result: \"Approximately 2.1 million (city proper, estimate for early 2024)\")--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Analyze Population Search Result\",\n \"result\": \"The search provided an estimated population figure for Paris.\",\n \"analysis\": \"I now have both the capital and its estimated population. I can provide the final answer.\",\n \"next_action\": \"final_answer\",\n \"confidence\": 0.9\n }\n }\n}\n```\n\n*Agent's Final Answer to User:*\nThe capital of France is Paris. Its estimated population (city proper) is approximately 2.1 million as of early 2024.\n";
2114
+ declare const DEFAULT_INSTRUCTIONS = "\nYou are equipped with 'think' and 'analyze' capabilities to methodically tackle problems and organize your reasoning process. ALWAYS utilize 'think' before initiating any tool calls or formulating a response.\n\n1. **Think** (Internal Workspace):\n * Objective: Employ the 'think' tool as an internal workspace to dissect complex issues, chart out solution paths, and determine the next steps in your reasoning. Use this to organize your internal thought process.\n * Method: Invoke 'think' repeatedly if necessary for problem decomposition. Articulate your rationale and specify the planned next step (e.g., \"initiate tool call,\" \"compute value,\" \"request clarification\").\n\n2. **Analyze** (Assessment):\n * Objective: Assess the outcome of a thinking phase or a sequence of tool interactions. Determine if the outcome aligns with expectations, is adequate, or necessitates further exploration.\n * Method: Call 'analyze' following a series of tool uses or a completed thought sequence. Define the 'next_action' based on your assessment: 'continue' (further reasoning is required), 'validate' (if possible, seek external verification), or 'final_answer' (prepared to deliver the conclusion).\n * Justify your assessment, indicating whether the result is accurate/sufficient.\n\n## Core Principles\n* **Initiate with Thought:** It is MANDATORY to use the 'think' tool prior to other tool interactions or response generation, except for trivial requests. Use 'think' multiple times for intricate problems.\n* **Iterative Problem Solving:** Employ 'think' and 'analyze' in cycles to construct a transparent reasoning trajectory. The standard sequence is Think -> [Think -> ...] -> [Tool Calls if needed] -> [Analyze if needed] -> ... -> final_answer. Repeat this loop until a satisfactory resolution is achieved.\n* **Parallel Tool Execution:** Following a 'think' step, multiple tool calls can be executed concurrently if required.\n* **Maintain Internal Reasoning:** The steps involving 'think' and 'analyze' constitute your internal cognitive process. Do not expose these steps directly to the user unless specifically asked to elaborate on your reasoning.\n* **Deliver Concise Conclusions:** Once your analysis concludes with 'next_action: final_answer', present a clear and precise final answer to the user, synthesized from your reasoning steps.\n";
2115
+ declare const FEW_SHOT_EXAMPLES = "\n## Illustrations\n\n**Illustration 1: Basic Knowledge Retrieval**\n\n*User Query:* What is the tallest mountain in the world?\n\n*Agent's Internal Processing:*\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Parse Request\",\n \"thought\": \"The user is asking for the name of the world's highest peak. This is well-known geographical data.\",\n \"action\": \"Recall or look up the tallest mountain.\",\n \"confidence\": 0.98\n }\n }\n}\n```\n*--(Agent internally accesses the information)--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Assess Information\",\n \"result\": \"Mount Everest is recognized as the tallest mountain above sea level.\",\n \"analysis\": \"The retrieved data directly answers the user's query accurately.\",\n \"next_action\": \"final_answer\",\n \"confidence\": 1.0\n }\n }\n}\n```\n\n*Agent's Final Response to User:*\nThe tallest mountain in the world is Mount Everest.\n\n**Illustration 2: Sequential Information Gathering**\n\n*User Query:* Who directed the movie 'Inception' and what year was it released?\n\n*Agent's Internal Processing:*\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Outline Information Needs\",\n \"thought\": \"The request asks for two specific details about the movie 'Inception': its director and release year. I'll handle these sequentially. First, find the director.\",\n \"action\": \"Search for the director of 'Inception'.\",\n \"confidence\": 0.95\n }\n }\n}\n```\n*--(Tool interaction: search(query=\"director of Inception\"))--*\n*--(Tool Outcome: \"Christopher Nolan\")--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Evaluate Director Search\",\n \"result\": \"The search identified Christopher Nolan as the director.\",\n \"analysis\": \"This fulfills the first part of the request. Next, I need the release year.\",\n \"next_action\": \"continue\",\n \"confidence\": 1.0\n }\n }\n}\n```\n```json\n{\n \"tool_call\": {\n \"name\": \"think\",\n \"arguments\": {\n \"title\": \"Plan Release Year Retrieval\",\n \"thought\": \"The subsequent step is to determine the release year for 'Inception'.\",\n \"action\": \"Search for the release year of 'Inception'.\",\n \"confidence\": 0.95\n }\n }\n}\n```\n*--(Tool interaction: search(query=\"release year of Inception\"))--*\n*--(Tool Outcome: \"2010\")--*\n```json\n{\n \"tool_call\": {\n \"name\": \"analyze\",\n \"arguments\": {\n \"title\": \"Evaluate Release Year Search\",\n \"result\": \"The search indicated the release year was 2010.\",\n \"analysis\": \"I have now obtained both the director's name and the release year. I am ready to formulate the final response.\",\n \"next_action\": \"final_answer\",\n \"confidence\": 1.0\n }\n }\n}\n```\n\n*Agent's Final Response to User:*\nThe movie 'Inception' was directed by Christopher Nolan and released in 2010.\n";
2116
2116
  type CreateReasoningToolsOptions = {
2117
2117
  addInstructions?: boolean;
2118
2118
  think?: boolean;
@@ -2211,24 +2211,28 @@ declare const getNodeTypeFromNodeId: (nodeId: string) => NodeType | null;
2211
2211
  /**
2212
2212
  * Prompt management utilities for agent prompt tuning
2213
2213
  */
2214
- /**
2215
- * Type for prompt template variables
2216
- */
2217
- type PromptVariables = Record<string, string | number | boolean | undefined>;
2218
- /**
2219
- * Type for prompt template definition
2220
- */
2221
- type PromptTemplate = {
2222
- template: string;
2223
- variables?: PromptVariables;
2214
+ type ExtractVariableNames<T extends string> = T extends `${string}{{${infer Param}}}${infer Rest}` ? Param | ExtractVariableNames<Rest> : never;
2215
+ type AllowedVariableValue = string | number | boolean | undefined | null;
2216
+ type TemplateVariables<T extends string> = {
2217
+ [K in ExtractVariableNames<T>]: AllowedVariableValue;
2218
+ };
2219
+ type PromptTemplate<T extends string> = [ExtractVariableNames<T>] extends [never] ? {
2220
+ template: T;
2221
+ variables?: Record<string, never>;
2222
+ } : {
2223
+ template: T;
2224
+ variables: TemplateVariables<T>;
2224
2225
  };
2226
+ type PromptCreator<T extends string> = (extraVariables?: Partial<TemplateVariables<T>>) => string;
2225
2227
  /**
2226
- * Creates a customizable prompt from a template with variable placeholders
2228
+ * Creates a type-safe, customizable prompt function from a template string.
2229
+ * Variable names are automatically inferred from the template `{{variable}}` syntax.
2227
2230
  *
2228
- * @param options - Template configuration with default variables
2229
- * @returns Function that generates the prompt with provided variables
2231
+ * @param template - The template string with `{{variable}}` placeholders.
2232
+ * @param variables - An object containing the default values for the template variables.
2233
+ * @returns A function that takes optional extra variables and returns the processed prompt string.
2230
2234
  */
2231
- declare const createPrompt: (options: PromptTemplate) => (customVariables?: PromptVariables) => string;
2235
+ declare const createPrompt: <T extends string>({ template, variables, }: PromptTemplate<T>) => PromptCreator<T>;
2232
2236
 
2233
2237
  /**
2234
2238
  * Creates an AgentTool from a retriever, allowing it to be used as a tool in an agent.
@@ -2448,85 +2452,103 @@ type ToolsetWithTools = Record<string, AnyToolConfig> & {
2448
2452
  type AnyToolConfig = Tool<any>;
2449
2453
 
2450
2454
  /**
2451
- * Client for interacting with Model Context Protocol (MCP) servers
2452
- * Implements MCP specification using the official SDK
2455
+ * Client for interacting with Model Context Protocol (MCP) servers.
2456
+ * Wraps the official MCP SDK client to provide a higher-level interface.
2457
+ * Internal implementation differs from original source.
2453
2458
  */
2454
2459
  declare class MCPClient extends EventEmitter {
2455
2460
  /**
2456
- * Underlying MCP client instance from SDK
2461
+ * Underlying MCP client instance from the SDK.
2457
2462
  */
2458
2463
  private client;
2459
2464
  /**
2460
- * Transport layer for MCP communication
2465
+ * Communication channel (transport layer) for MCP interactions.
2461
2466
  */
2462
2467
  private transport;
2463
2468
  /**
2464
- * Whether the client is connected to the server
2469
+ * Tracks the connection status to the server.
2465
2470
  */
2466
2471
  private connected;
2467
2472
  /**
2468
- * Request timeout in milliseconds
2473
+ * Maximum time allowed for requests in milliseconds.
2469
2474
  */
2470
2475
  private readonly timeout;
2471
2476
  /**
2472
- * Client information used for identification
2477
+ * Information identifying this client to the server.
2473
2478
  */
2474
2479
  private readonly clientInfo;
2475
2480
  /**
2476
- * Creates a new MCP client
2481
+ * Creates a new MCP client instance.
2482
+ * @param config Configuration for the client, including server details and client identity.
2477
2483
  */
2478
2484
  constructor(config: MCPClientConfig);
2479
2485
  /**
2480
- * Set up MCP client event handlers
2486
+ * Sets up handlers for events from the underlying SDK client.
2481
2487
  */
2482
2488
  private setupEventHandlers;
2483
2489
  /**
2484
- * Connect to the MCP server
2490
+ * Establishes a connection to the configured MCP server.
2491
+ * Idempotent: does nothing if already connected.
2485
2492
  */
2486
2493
  connect(): Promise<void>;
2487
2494
  /**
2488
- * Disconnect from the MCP server
2495
+ * Closes the connection to the MCP server.
2496
+ * Idempotent: does nothing if not connected.
2489
2497
  */
2490
2498
  disconnect(): Promise<void>;
2491
2499
  /**
2492
- * List available tools from the MCP server
2500
+ * Fetches the definitions of available tools from the server.
2501
+ * @returns A record mapping tool names to their definitions (schema, description).
2493
2502
  */
2494
2503
  listTools(): Promise<Record<string, unknown>>;
2495
2504
  /**
2496
- * Get tools converted to AgentTools with execute functions
2497
- * This method transforms MCP tool definitions into AgentTools that can be used directly by an Agent
2505
+ * Builds executable Tool objects from the server's tool definitions.
2506
+ * These tools include an `execute` method for calling the remote tool.
2507
+ * @returns A record mapping namespaced tool names (`clientName_toolName`) to executable Tool objects.
2498
2508
  */
2499
2509
  getAgentTools(): Promise<Record<string, Tool<any>>>;
2500
2510
  /**
2501
- * Call a tool on the MCP server
2511
+ * Executes a specified tool on the remote MCP server.
2512
+ * @param toolCall Details of the tool to call, including name and arguments.
2513
+ * @returns The result content returned by the tool.
2502
2514
  */
2503
2515
  callTool(toolCall: MCPToolCall): Promise<MCPToolResult>;
2504
2516
  /**
2505
- * Get the list of available resources from the MCP server
2517
+ * Retrieves a list of resource identifiers available on the server.
2518
+ * @returns A promise resolving to an array of resource ID strings.
2506
2519
  */
2507
2520
  listResources(): Promise<string[]>;
2508
2521
  /**
2509
- * Ensure the client is connected before making requests
2522
+ * Ensures the client is connected before proceeding with an operation.
2523
+ * Attempts to connect if not currently connected.
2524
+ * @throws Error if connection attempt fails.
2510
2525
  */
2511
2526
  private ensureConnected;
2512
2527
  /**
2513
- * Convert and emit error events in a type-safe way
2528
+ * Emits an 'error' event, ensuring the payload is always an Error object.
2529
+ * @param error The error encountered, can be of any type.
2514
2530
  */
2515
2531
  private emitError;
2516
2532
  /**
2517
- * Check if the server config is HTTP-based
2533
+ * Type guard to check if a server configuration is for an HTTP server.
2534
+ * @param server The server configuration object.
2535
+ * @returns True if the configuration type is 'http', false otherwise.
2518
2536
  */
2519
2537
  private isHTTPServer;
2520
2538
  /**
2521
- * Type guard to check if the server config is stdio-based
2539
+ * Type guard to check if a server configuration is for a Stdio server.
2540
+ * @param server The server configuration object.
2541
+ * @returns True if the configuration type is 'stdio', false otherwise.
2522
2542
  */
2523
2543
  private isStdioServer;
2524
2544
  /**
2525
- * Override EventEmitter's on method to provide type safety
2545
+ * Overrides EventEmitter's 'on' method for type-safe event listening.
2546
+ * Uses the original `MCPClientEvents` for event types.
2526
2547
  */
2527
2548
  on<E extends keyof MCPClientEvents>(event: E, listener: MCPClientEvents[E]): this;
2528
2549
  /**
2529
- * Override EventEmitter's emit method to provide type safety
2550
+ * Overrides EventEmitter's 'emit' method for type-safe event emission.
2551
+ * Uses the original `MCPClientEvents` for event types.
2530
2552
  */
2531
2553
  emit<E extends keyof MCPClientEvents>(event: E, ...args: Parameters<MCPClientEvents[E]>): boolean;
2532
2554
  }
@@ -2534,96 +2556,65 @@ declare class MCPClient extends EventEmitter {
2534
2556
  /**
2535
2557
  * Configuration manager for Model Context Protocol (MCP).
2536
2558
  * Handles multiple MCP server connections and tool management.
2537
- * Ensures unique configuration instances based on server settings or provided ID.
2559
+ * NOTE: This version does NOT manage singleton instances automatically.
2538
2560
  */
2539
2561
  declare class MCPConfiguration<TServerKeys extends string = string> {
2540
- /**
2541
- * Unique identifier for this configuration, generated based on server configurations.
2542
- */
2543
- private readonly id;
2544
2562
  /**
2545
2563
  * Map of server configurations keyed by server names.
2546
2564
  */
2547
2565
  private readonly serverConfigs;
2548
2566
  /**
2549
- * Map of connected MCP clients keyed by server names.
2567
+ * Map of connected MCP clients keyed by server names (local cache).
2550
2568
  */
2551
2569
  private readonly mcpClientsById;
2552
2570
  /**
2553
- * Creates a new MCP configuration or returns an existing one if configuration matches.
2554
- * @param options Configuration options including server definitions and an optional unique ID.
2555
- * @throws Error if initialized multiple times with the same configuration without a unique ID.
2571
+ * Creates a new, independent MCP configuration instance.
2572
+ * @param options Configuration options including server definitions.
2556
2573
  */
2557
2574
  constructor(options: {
2558
- id?: string;
2559
2575
  servers: Record<TServerKeys, MCPServerConfig>;
2560
2576
  });
2561
2577
  /**
2562
- * Generates a unique ID for the configuration based on server settings.
2563
- * Uses UUIDv5 to create a deterministic ID from the JSON representation of servers.
2564
- * @returns A unique string identifier.
2565
- */
2566
- private generateId;
2567
- /**
2568
- * Adds the current instance to the global cache if not already present.
2578
+ * Type guard to check if an object conforms to the basic structure of AnyToolConfig.
2569
2579
  */
2570
- private addToInstanceCache;
2580
+ private isAnyToolConfigStructure;
2571
2581
  /**
2572
- * Disconnects all associated MCP clients and removes this configuration instance from the cache.
2573
- * Ensures cleanup of resources.
2582
+ * Disconnects all associated MCP clients for THIS instance.
2574
2583
  */
2575
2584
  disconnect(): Promise<void>;
2576
2585
  /**
2577
- * Retrieves agent-ready tools from all configured MCP servers.
2578
- * Tools are namespaced with their server name (e.g., "serverName.toolName").
2579
- * Agent-ready tools include executable functions.
2586
+ * Retrieves agent-ready tools from all configured MCP servers for this instance.
2580
2587
  * @returns A flat array of all agent-ready tools.
2581
2588
  */
2582
2589
  getTools(): Promise<Tool<any>[]>;
2583
2590
  /**
2584
- * Retrieves raw tool definitions (without execute functions) from all configured MCP servers.
2585
- * Tools are namespaced with their server name (e.g., "serverName.toolName").
2591
+ * Retrieves raw tool definitions from all configured MCP servers for this instance.
2586
2592
  * @returns A flat record of all raw tools keyed by their namespaced name.
2587
2593
  */
2588
2594
  getRawTools(): Promise<Record<string, AnyToolConfig>>;
2589
2595
  /**
2590
- * Retrieves agent-ready toolsets grouped by server name.
2591
- * Each toolset contains tools with executable functions for a specific server.
2592
- * @returns A record where keys are server names and values are records of agent-ready tools for that server.
2596
+ * Retrieves agent-ready toolsets grouped by server name for this instance.
2597
+ * @returns A record where keys are server names and values are agent-ready toolsets.
2593
2598
  */
2594
2599
  getToolsets(): Promise<Record<TServerKeys, ToolsetWithTools>>;
2595
2600
  /**
2596
- * Retrieves raw tool definitions (without execute functions) grouped by server name.
2597
- * @returns A record where keys are server names and values are records of raw tools for that server.
2601
+ * Retrieves raw tool definitions grouped by server name for this instance.
2602
+ * @returns A record where keys are server names and values are records of raw tools.
2598
2603
  */
2599
2604
  getRawToolsets(): Promise<Record<TServerKeys, Record<string, AnyToolConfig>>>;
2600
2605
  /**
2601
- * Retrieves a specific connected MCP client by its server name.
2602
- * Connects the client if it's not already connected.
2603
- * @param serverName The name of the server/client to retrieve.
2604
- * @returns The connected MCPClient instance or undefined if the server name is not configured.
2606
+ * Retrieves a specific connected MCP client by its server name for this instance.
2605
2607
  */
2606
2608
  getClient(serverName: TServerKeys): Promise<MCPClient | undefined>;
2607
2609
  /**
2608
- * Retrieves all configured MCP clients, ensuring they are connected.
2609
- * @returns A record of connected MCPClient instances keyed by server name.
2610
+ * Retrieves all configured MCP clients for this instance, ensuring they are connected.
2610
2611
  */
2611
2612
  getClients(): Promise<Record<TServerKeys, MCPClient>>;
2612
2613
  /**
2613
- * Gets or creates an MCP client connection for a given server configuration.
2614
- * Ensures the client is connected before returning. Handles connection errors.
2615
- * @param name The server name (key).
2616
- * @param config The server configuration.
2617
- * @returns A promise resolving to the connected MCPClient.
2618
- * @throws Error if connection fails.
2614
+ * Internal helper to get/create/connect a client for this instance.
2615
+ * Manages the local mcpClientsById cache.
2619
2616
  */
2620
2617
  private getConnectedClient;
2621
- /**
2622
- * Executes a callback for each configured server, providing the raw tools listed by the client.
2623
- * Handles connection and tool listing errors internally.
2624
- * @param callback Async function to execute for each server's raw tools.
2625
- */
2626
- private forEachClientRawTools;
2627
2618
  }
2628
2619
 
2629
2620
  /**
@@ -2783,4 +2774,4 @@ declare class VoltAgent {
2783
2774
  getAgentCount(): number;
2784
2775
  }
2785
2776
 
2786
- export { Agent, AgentHooks, AgentOptions, AgentRegistry, AgentResponse, AgentTool, AnyToolConfig, BaseLLMOptions, BaseMessage, BaseRetriever, BaseTool, BaseToolCall, ClientInfo, Conversation, CreateConversationInput, CreateReasoningToolsOptions, DEFAULT_INSTRUCTIONS, DataContent, FEW_SHOT_EXAMPLES, FilePart, GenerateObjectOptions, GenerateTextOptions, HTTPServerConfig, ImagePart, InMemoryStorage, InferGenerateObjectResponse, InferGenerateTextResponse, InferMessage, InferModel, InferProviderParams, InferStreamResponse, InferTool, LLMProvider, LibSQLStorage, MCPClient, MCPClientConfig, MCPClientEvents, MCPConfiguration, MCPOptions, MCPServerConfig, MCPToolCall, MCPToolResult, Memory, MemoryManager, MemoryMessage, MemoryOptions, MessageContent, MessageFilterOptions, MessageRole, ModelToolCall, NextAction, NodeType, PackageUpdateInfo, PromptTemplate, PromptVariables, ProviderObjectResponse, ProviderObjectStreamResponse, ProviderParams, ProviderResponse, ProviderTextResponse, ProviderTextStreamResponse, ReadableStreamType, ReasoningStep, ReasoningStepSchema, ReasoningToolExecuteOptions, Retriever, RetrieverOptions, RetryConfig, StdioServerConfig, StepChunkCallback, StepFinishCallback, StepWithContent, StreamObjectOptions, StreamTextOptions, TextPart, Tool, ToolCall, ToolExecuteOptions, ToolManager, ToolOptions, ToolSchema, ToolStatus, ToolStatusInfo, Toolkit, ToolsetMap, ToolsetWithTools, TransportError, UsageInfo, Voice, VoiceEventData, VoiceEventType, VoiceMetadata, VoiceOptions, VoltAgent, checkForUpdates, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createTool, VoltAgent as default, getNodeTypeFromNodeId, tool, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };
2777
+ export { Agent, AgentHooks, AgentOptions, AgentRegistry, AgentResponse, AgentTool, AllowedVariableValue, AnyToolConfig, BaseLLMOptions, BaseMessage, BaseRetriever, BaseTool, BaseToolCall, ClientInfo, Conversation, CreateConversationInput, CreateReasoningToolsOptions, DEFAULT_INSTRUCTIONS, DataContent, ExtractVariableNames, FEW_SHOT_EXAMPLES, FilePart, GenerateObjectOptions, GenerateTextOptions, HTTPServerConfig, ImagePart, InMemoryStorage, InferGenerateObjectResponse, InferGenerateTextResponse, InferMessage, InferModel, InferProviderParams, InferStreamResponse, InferTool, LLMProvider, LibSQLStorage, MCPClient, MCPClientConfig, MCPClientEvents, MCPConfiguration, MCPOptions, MCPServerConfig, MCPToolCall, MCPToolResult, Memory, MemoryManager, MemoryMessage, MemoryOptions, MessageContent, MessageFilterOptions, MessageRole, ModelToolCall, NextAction, NodeType, PackageUpdateInfo, PromptCreator, PromptTemplate, ProviderObjectResponse, ProviderObjectStreamResponse, ProviderParams, ProviderResponse, ProviderTextResponse, ProviderTextStreamResponse, ReadableStreamType, ReasoningStep, ReasoningStepSchema, ReasoningToolExecuteOptions, Retriever, RetrieverOptions, RetryConfig, StdioServerConfig, StepChunkCallback, StepFinishCallback, StepWithContent, StreamObjectOptions, StreamTextOptions, TemplateVariables, TextPart, Tool, ToolCall, ToolExecuteOptions, ToolManager, ToolOptions, ToolSchema, ToolStatus, ToolStatusInfo, Toolkit, ToolsetMap, ToolsetWithTools, TransportError, UsageInfo, Voice, VoiceEventData, VoiceEventType, VoiceMetadata, VoiceOptions, VoltAgent, checkForUpdates, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createTool, VoltAgent as default, getNodeTypeFromNodeId, tool, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };