@voltagent/core 0.1.17 → 0.1.18

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
@@ -35,6 +35,14 @@ type Toolkit = {
35
35
  */
36
36
  tools: Tool<ToolSchema>[];
37
37
  };
38
+ /**
39
+ * Helper function for creating a new toolkit.
40
+ * Provides default values and ensures the basic structure is met.
41
+ *
42
+ * @param options - The configuration options for the toolkit.
43
+ * @returns A Toolkit object.
44
+ */
45
+ declare const createToolkit: (options: Toolkit) => Toolkit;
38
46
 
39
47
  /**
40
48
  * Status of a tool at any given time
@@ -2985,4 +2993,4 @@ declare class VoltAgent {
2985
2993
  shutdownTelemetry(): Promise<void>;
2986
2994
  }
2987
2995
 
2988
- export { Agent, AgentHistoryEntry, AgentHookOnEnd, AgentHookOnHandoff, AgentHookOnStart, AgentHookOnToolEnd, AgentHookOnToolStart, 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, OnEndHookArgs, OnHandoffHookArgs, OnStartHookArgs, OnToolEndHookArgs, OnToolStartHookArgs, OperationContext, PackageUpdateInfo, PromptCreator, PromptTemplate, ProviderObjectResponse, ProviderObjectStreamResponse, ProviderParams, ProviderResponse, ProviderTextResponse, ProviderTextStreamResponse, ReadableStreamType, ReasoningStep, ReasoningStepSchema, ReasoningToolExecuteOptions, Retriever, RetrieverOptions, RetryConfig, StdioServerConfig, StepChunkCallback, StepFinishCallback, StepWithContent, StreamObjectFinishResult, StreamObjectOnFinishCallback, StreamObjectOptions, StreamTextFinishResult, StreamTextOnFinishCallback, StreamTextOptions, TemplateVariables, TextPart, Tool, ToolCall, ToolErrorInfo, ToolExecuteOptions, ToolExecutionContext, ToolManager, ToolOptions, ToolSchema, ToolStatus, ToolStatusInfo, Toolkit, ToolsetMap, ToolsetWithTools, TransportError, UsageInfo, Voice, VoiceEventData, VoiceEventType, VoiceMetadata, VoiceOptions, VoltAgent, VoltAgentError, checkForUpdates, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createTool, VoltAgent as default, getNodeTypeFromNodeId, serializeValueForDebug, tool, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };
2996
+ export { Agent, AgentHistoryEntry, AgentHookOnEnd, AgentHookOnHandoff, AgentHookOnStart, AgentHookOnToolEnd, AgentHookOnToolStart, 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, OnEndHookArgs, OnHandoffHookArgs, OnStartHookArgs, OnToolEndHookArgs, OnToolStartHookArgs, OperationContext, PackageUpdateInfo, PromptCreator, PromptTemplate, ProviderObjectResponse, ProviderObjectStreamResponse, ProviderParams, ProviderResponse, ProviderTextResponse, ProviderTextStreamResponse, ReadableStreamType, ReasoningStep, ReasoningStepSchema, ReasoningToolExecuteOptions, Retriever, RetrieverOptions, RetryConfig, StdioServerConfig, StepChunkCallback, StepFinishCallback, StepWithContent, StreamObjectFinishResult, StreamObjectOnFinishCallback, StreamObjectOptions, StreamTextFinishResult, StreamTextOnFinishCallback, StreamTextOptions, TemplateVariables, TextPart, Tool, ToolCall, ToolErrorInfo, ToolExecuteOptions, ToolExecutionContext, ToolManager, ToolOptions, ToolSchema, ToolStatus, ToolStatusInfo, Toolkit, ToolsetMap, ToolsetWithTools, TransportError, UsageInfo, Voice, VoiceEventData, VoiceEventType, VoiceMetadata, VoiceOptions, VoltAgent, VoltAgentError, checkForUpdates, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createTool, createToolkit, VoltAgent as default, getNodeTypeFromNodeId, serializeValueForDebug, tool, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };
package/dist/index.js CHANGED
@@ -112,6 +112,7 @@ __export(src_exports, {
112
112
  createReasoningTools: () => createReasoningTools,
113
113
  createRetrieverTool: () => createRetrieverTool,
114
114
  createTool: () => createTool,
115
+ createToolkit: () => createToolkit,
115
116
  default: () => src_default,
116
117
  getNodeTypeFromNodeId: () => getNodeTypeFromNodeId,
117
118
  serializeValueForDebug: () => serializeValueForDebug,
@@ -3959,6 +3960,26 @@ var ToolManager = class {
3959
3960
  };
3960
3961
  __name(ToolManager, "ToolManager");
3961
3962
 
3963
+ // src/tool/toolkit.ts
3964
+ var createToolkit = /* @__PURE__ */ __name((options) => {
3965
+ if (!options.name) {
3966
+ throw new Error("Toolkit name is required");
3967
+ }
3968
+ if (!options.tools || options.tools.length === 0) {
3969
+ console.warn(`Toolkit '${options.name}' created without any tools.`);
3970
+ }
3971
+ return {
3972
+ name: options.name,
3973
+ description: options.description || "",
3974
+ // Default empty description
3975
+ instructions: options.instructions,
3976
+ addInstructions: options.addInstructions || false,
3977
+ // Default to false
3978
+ tools: options.tools || []
3979
+ // Default to empty array if not provided (though warned above)
3980
+ };
3981
+ }, "createToolkit");
3982
+
3962
3983
  // src/tool/index.ts
3963
3984
  var Tool = class {
3964
3985
  /**
@@ -6236,26 +6257,6 @@ var analyzeTool = createTool({
6236
6257
  })
6237
6258
  });
6238
6259
 
6239
- // src/tool/toolkit.ts
6240
- var createToolkit = /* @__PURE__ */ __name((options) => {
6241
- if (!options.name) {
6242
- throw new Error("Toolkit name is required");
6243
- }
6244
- if (!options.tools || options.tools.length === 0) {
6245
- console.warn(`Toolkit '${options.name}' created without any tools.`);
6246
- }
6247
- return {
6248
- name: options.name,
6249
- description: options.description || "",
6250
- // Default empty description
6251
- instructions: options.instructions,
6252
- addInstructions: options.addInstructions || false,
6253
- // Default to false
6254
- tools: options.tools || []
6255
- // Default to empty array if not provided (though warned above)
6256
- };
6257
- }, "createToolkit");
6258
-
6259
6260
  // src/tool/reasoning/index.ts
6260
6261
  var DEFAULT_INSTRUCTIONS = `
6261
6262
  You 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.
@@ -7167,6 +7168,7 @@ if (typeof require !== "undefined" && typeof module !== "undefined" && require.m
7167
7168
  createReasoningTools,
7168
7169
  createRetrieverTool,
7169
7170
  createTool,
7171
+ createToolkit,
7170
7172
  getNodeTypeFromNodeId,
7171
7173
  serializeValueForDebug,
7172
7174
  tool,