@voltagent/core 2.1.3 → 2.1.4

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.mts CHANGED
@@ -7929,8 +7929,8 @@ declare class MemoryManager {
7929
7929
  shutdown(): Promise<void>;
7930
7930
  }
7931
7931
 
7932
- type OutputSpec = Output.Output<unknown, unknown>;
7933
- type OutputValue<OUTPUT extends OutputSpec> = InferGenerateOutput<OUTPUT>;
7932
+ type OutputSpec$1 = Output.Output<unknown, unknown>;
7933
+ type OutputValue<OUTPUT extends OutputSpec$1> = InferGenerateOutput<OUTPUT>;
7934
7934
  /**
7935
7935
  * Context input type that accepts both Map and plain object
7936
7936
  */
@@ -7977,7 +7977,7 @@ type BaseGenerateTextResult<TOOLS extends ToolSet = Record<string, any>> = Omit<
7977
7977
  experimental_output: unknown;
7978
7978
  output: unknown;
7979
7979
  };
7980
- interface GenerateTextResultWithContext<TOOLS extends ToolSet = Record<string, any>, OUTPUT extends OutputSpec = OutputSpec> extends BaseGenerateTextResult<TOOLS> {
7980
+ interface GenerateTextResultWithContext<TOOLS extends ToolSet = Record<string, any>, OUTPUT extends OutputSpec$1 = OutputSpec$1> extends BaseGenerateTextResult<TOOLS> {
7981
7981
  context: Map<string | symbol, unknown>;
7982
7982
  experimental_output: OutputValue<OUTPUT>;
7983
7983
  output: OutputValue<OUTPUT>;
@@ -8025,7 +8025,7 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8025
8025
  outputMiddlewares?: OutputMiddleware<any>[];
8026
8026
  maxMiddlewareRetries?: number;
8027
8027
  providerOptions?: ProviderOptions$1;
8028
- output?: OutputSpec;
8028
+ output?: OutputSpec$1;
8029
8029
  /**
8030
8030
  * Optional explicit stop sequences to pass through to the underlying provider.
8031
8031
  * Mirrors the `stop` option supported by ai-sdk `generateText/streamText`.
@@ -8036,7 +8036,7 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8036
8036
  */
8037
8037
  toolChoice?: ToolChoice<Record<string, unknown>>;
8038
8038
  }
8039
- type GenerateTextOptions<OUTPUT extends OutputSpec = OutputSpec> = Omit<BaseGenerationOptions, "output"> & {
8039
+ type GenerateTextOptions<OUTPUT extends OutputSpec$1 = OutputSpec$1> = Omit<BaseGenerationOptions, "output"> & {
8040
8040
  output?: OUTPUT;
8041
8041
  };
8042
8042
  type StreamTextOptions = BaseGenerationOptions & {
@@ -8090,7 +8090,7 @@ declare class Agent {
8090
8090
  /**
8091
8091
  * Generate text response
8092
8092
  */
8093
- generateText<OUTPUT extends OutputSpec = OutputSpec>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
8093
+ generateText<OUTPUT extends OutputSpec$1 = OutputSpec$1>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
8094
8094
  /**
8095
8095
  * Stream text response
8096
8096
  */
@@ -9370,10 +9370,13 @@ type ExtractExecuteResult<T> = T extends {
9370
9370
  execute: (...args: any[]) => infer R;
9371
9371
  } ? R extends Promise<infer U> ? U : R : never;
9372
9372
 
9373
- type AgentConfig$1<SCHEMA extends z.ZodTypeAny, INPUT, DATA> = BaseGenerationOptions & {
9373
+ type OutputSpec = Output.Output<unknown, unknown>;
9374
+ type AgentOutputSchema = OutputSpec | z.ZodTypeAny;
9375
+ type InferAgentOutput<SCHEMA extends AgentOutputSchema> = SCHEMA extends OutputSpec ? InferGenerateOutput<SCHEMA> : SCHEMA extends z.ZodTypeAny ? z.infer<SCHEMA> : never;
9376
+ type AgentConfig<SCHEMA extends AgentOutputSchema, INPUT, DATA> = Omit<BaseGenerationOptions, "output"> & {
9374
9377
  schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<INPUT, DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
9375
9378
  };
9376
- type AgentResultMapper<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT> = (output: z.infer<SCHEMA>, context: WorkflowExecuteContext<INPUT, DATA, any, any>) => Promise<RESULT> | RESULT;
9379
+ type AgentResultMapper<INPUT, DATA, SCHEMA extends AgentOutputSchema, RESULT> = (output: InferAgentOutput<SCHEMA>, context: WorkflowExecuteContext<INPUT, DATA, any, any>) => Promise<RESULT> | RESULT;
9377
9380
  /**
9378
9381
  * Creates an agent step for a workflow
9379
9382
  *
@@ -9394,11 +9397,11 @@ type AgentResultMapper<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT> = (outp
9394
9397
  *
9395
9398
  * @param task - The task (prompt) to execute for the agent, can be a string or a function that returns a string
9396
9399
  * @param agent - The agent to execute the task using `generateText`
9397
- * @param config - The config for the agent (schema) `generateText` call
9400
+ * @param config - The config for the agent (schema/output) `generateText` call
9398
9401
  * @param map - Optional mapper to shape or merge the agent output with existing data
9399
9402
  * @returns A workflow step that executes the agent with the task
9400
9403
  */
9401
- declare function andAgent<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT = z.infer<SCHEMA>>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig$1<SCHEMA, INPUT, DATA>, map?: AgentResultMapper<INPUT, DATA, SCHEMA, RESULT>): {
9404
+ declare function andAgent<INPUT, DATA, SCHEMA extends AgentOutputSchema, RESULT = InferAgentOutput<SCHEMA>>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT, DATA>, map?: AgentResultMapper<INPUT, DATA, SCHEMA, RESULT>): {
9402
9405
  type: "agent";
9403
9406
  id: string;
9404
9407
  name: string;
@@ -10046,12 +10049,6 @@ interface SerializedWorkflowStep {
10046
10049
  subStepsCount?: number;
10047
10050
  }
10048
10051
 
10049
- /**
10050
- * Agent configuration for the chain
10051
- */
10052
- type AgentConfig<SCHEMA extends z.ZodTypeAny, INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, CURRENT_DATA> = BaseGenerationOptions & {
10053
- schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
10054
- };
10055
10052
  /**
10056
10053
  * A workflow chain that provides a fluent API for building workflows
10057
10054
  *
@@ -10128,8 +10125,8 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
10128
10125
  * @param map - Optional mapper to shape or merge the agent output with existing data
10129
10126
  * @returns A workflow step that executes the agent with the task
10130
10127
  */
10131
- andAgent<SCHEMA extends z.ZodTypeAny>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT_SCHEMA, CURRENT_DATA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, z.infer<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10132
- andAgent<SCHEMA extends z.ZodTypeAny, NEW_DATA>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT_SCHEMA, CURRENT_DATA>, map: (output: z.infer<SCHEMA>, context: WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>) => Promise<NEW_DATA> | NEW_DATA): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, NEW_DATA, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10128
+ andAgent<SCHEMA extends AgentOutputSchema>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, InferAgentOutput<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10129
+ andAgent<SCHEMA extends AgentOutputSchema, NEW_DATA>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA>, map: (output: InferAgentOutput<SCHEMA>, context: WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>) => Promise<NEW_DATA> | NEW_DATA): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, NEW_DATA, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10133
10130
  /**
10134
10131
  * Add a function step to the workflow with both input and output schemas
10135
10132
  * @param config - Step configuration with schemas
@@ -14482,4 +14479,4 @@ declare class VoltAgent {
14482
14479
  */
14483
14480
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
14484
14481
 
14485
- export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type TriggerHandler, type TriggerHandlerBody, type TriggerHandlerContext, type TriggerHandlerResponse, type TriggerHandlerResult, type TriggerHandlerReturn, type TriggerHttpMethod, TriggerRegistry, type Usage, type UsageInfo, UserInputBridge, type UserInputHandler, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltAgentTriggerConfig, type VoltAgentTriggersConfig, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableCredential, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsDiscordChannelMessageParams, type VoltOpsDiscordChannelType, type VoltOpsDiscordConfig, type VoltOpsDiscordCreateChannelParams, type VoltOpsDiscordCredential, type VoltOpsDiscordDeleteChannelParams, type VoltOpsDiscordGetChannelParams, type VoltOpsDiscordListChannelsParams, type VoltOpsDiscordListMembersParams, type VoltOpsDiscordListMessagesParams, type VoltOpsDiscordMemberRoleParams, type VoltOpsDiscordReactionParams, type VoltOpsDiscordSendMessageParams, type VoltOpsDiscordSendWebhookMessageParams, type VoltOpsDiscordUpdateChannelParams, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackCredential, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, type VoltOpsTriggerDefinition, VoltOpsTriggerDefinitions, type VoltOpsTriggerEnvelope, type VoltOpsTriggerGroupMap, type VoltOpsTriggerName, VoltOpsTriggerNames, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
14482
+ export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec$1 as OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type TriggerHandler, type TriggerHandlerBody, type TriggerHandlerContext, type TriggerHandlerResponse, type TriggerHandlerResult, type TriggerHandlerReturn, type TriggerHttpMethod, TriggerRegistry, type Usage, type UsageInfo, UserInputBridge, type UserInputHandler, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltAgentTriggerConfig, type VoltAgentTriggersConfig, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableCredential, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsDiscordChannelMessageParams, type VoltOpsDiscordChannelType, type VoltOpsDiscordConfig, type VoltOpsDiscordCreateChannelParams, type VoltOpsDiscordCredential, type VoltOpsDiscordDeleteChannelParams, type VoltOpsDiscordGetChannelParams, type VoltOpsDiscordListChannelsParams, type VoltOpsDiscordListMembersParams, type VoltOpsDiscordListMessagesParams, type VoltOpsDiscordMemberRoleParams, type VoltOpsDiscordReactionParams, type VoltOpsDiscordSendMessageParams, type VoltOpsDiscordSendWebhookMessageParams, type VoltOpsDiscordUpdateChannelParams, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackCredential, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, type VoltOpsTriggerDefinition, VoltOpsTriggerDefinitions, type VoltOpsTriggerEnvelope, type VoltOpsTriggerGroupMap, type VoltOpsTriggerName, VoltOpsTriggerNames, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
package/dist/index.d.ts CHANGED
@@ -7929,8 +7929,8 @@ declare class MemoryManager {
7929
7929
  shutdown(): Promise<void>;
7930
7930
  }
7931
7931
 
7932
- type OutputSpec = Output.Output<unknown, unknown>;
7933
- type OutputValue<OUTPUT extends OutputSpec> = InferGenerateOutput<OUTPUT>;
7932
+ type OutputSpec$1 = Output.Output<unknown, unknown>;
7933
+ type OutputValue<OUTPUT extends OutputSpec$1> = InferGenerateOutput<OUTPUT>;
7934
7934
  /**
7935
7935
  * Context input type that accepts both Map and plain object
7936
7936
  */
@@ -7977,7 +7977,7 @@ type BaseGenerateTextResult<TOOLS extends ToolSet = Record<string, any>> = Omit<
7977
7977
  experimental_output: unknown;
7978
7978
  output: unknown;
7979
7979
  };
7980
- interface GenerateTextResultWithContext<TOOLS extends ToolSet = Record<string, any>, OUTPUT extends OutputSpec = OutputSpec> extends BaseGenerateTextResult<TOOLS> {
7980
+ interface GenerateTextResultWithContext<TOOLS extends ToolSet = Record<string, any>, OUTPUT extends OutputSpec$1 = OutputSpec$1> extends BaseGenerateTextResult<TOOLS> {
7981
7981
  context: Map<string | symbol, unknown>;
7982
7982
  experimental_output: OutputValue<OUTPUT>;
7983
7983
  output: OutputValue<OUTPUT>;
@@ -8025,7 +8025,7 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8025
8025
  outputMiddlewares?: OutputMiddleware<any>[];
8026
8026
  maxMiddlewareRetries?: number;
8027
8027
  providerOptions?: ProviderOptions$1;
8028
- output?: OutputSpec;
8028
+ output?: OutputSpec$1;
8029
8029
  /**
8030
8030
  * Optional explicit stop sequences to pass through to the underlying provider.
8031
8031
  * Mirrors the `stop` option supported by ai-sdk `generateText/streamText`.
@@ -8036,7 +8036,7 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8036
8036
  */
8037
8037
  toolChoice?: ToolChoice<Record<string, unknown>>;
8038
8038
  }
8039
- type GenerateTextOptions<OUTPUT extends OutputSpec = OutputSpec> = Omit<BaseGenerationOptions, "output"> & {
8039
+ type GenerateTextOptions<OUTPUT extends OutputSpec$1 = OutputSpec$1> = Omit<BaseGenerationOptions, "output"> & {
8040
8040
  output?: OUTPUT;
8041
8041
  };
8042
8042
  type StreamTextOptions = BaseGenerationOptions & {
@@ -8090,7 +8090,7 @@ declare class Agent {
8090
8090
  /**
8091
8091
  * Generate text response
8092
8092
  */
8093
- generateText<OUTPUT extends OutputSpec = OutputSpec>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
8093
+ generateText<OUTPUT extends OutputSpec$1 = OutputSpec$1>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
8094
8094
  /**
8095
8095
  * Stream text response
8096
8096
  */
@@ -9370,10 +9370,13 @@ type ExtractExecuteResult<T> = T extends {
9370
9370
  execute: (...args: any[]) => infer R;
9371
9371
  } ? R extends Promise<infer U> ? U : R : never;
9372
9372
 
9373
- type AgentConfig$1<SCHEMA extends z.ZodTypeAny, INPUT, DATA> = BaseGenerationOptions & {
9373
+ type OutputSpec = Output.Output<unknown, unknown>;
9374
+ type AgentOutputSchema = OutputSpec | z.ZodTypeAny;
9375
+ type InferAgentOutput<SCHEMA extends AgentOutputSchema> = SCHEMA extends OutputSpec ? InferGenerateOutput<SCHEMA> : SCHEMA extends z.ZodTypeAny ? z.infer<SCHEMA> : never;
9376
+ type AgentConfig<SCHEMA extends AgentOutputSchema, INPUT, DATA> = Omit<BaseGenerationOptions, "output"> & {
9374
9377
  schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<INPUT, DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
9375
9378
  };
9376
- type AgentResultMapper<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT> = (output: z.infer<SCHEMA>, context: WorkflowExecuteContext<INPUT, DATA, any, any>) => Promise<RESULT> | RESULT;
9379
+ type AgentResultMapper<INPUT, DATA, SCHEMA extends AgentOutputSchema, RESULT> = (output: InferAgentOutput<SCHEMA>, context: WorkflowExecuteContext<INPUT, DATA, any, any>) => Promise<RESULT> | RESULT;
9377
9380
  /**
9378
9381
  * Creates an agent step for a workflow
9379
9382
  *
@@ -9394,11 +9397,11 @@ type AgentResultMapper<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT> = (outp
9394
9397
  *
9395
9398
  * @param task - The task (prompt) to execute for the agent, can be a string or a function that returns a string
9396
9399
  * @param agent - The agent to execute the task using `generateText`
9397
- * @param config - The config for the agent (schema) `generateText` call
9400
+ * @param config - The config for the agent (schema/output) `generateText` call
9398
9401
  * @param map - Optional mapper to shape or merge the agent output with existing data
9399
9402
  * @returns A workflow step that executes the agent with the task
9400
9403
  */
9401
- declare function andAgent<INPUT, DATA, SCHEMA extends z.ZodTypeAny, RESULT = z.infer<SCHEMA>>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig$1<SCHEMA, INPUT, DATA>, map?: AgentResultMapper<INPUT, DATA, SCHEMA, RESULT>): {
9404
+ declare function andAgent<INPUT, DATA, SCHEMA extends AgentOutputSchema, RESULT = InferAgentOutput<SCHEMA>>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT, DATA>, map?: AgentResultMapper<INPUT, DATA, SCHEMA, RESULT>): {
9402
9405
  type: "agent";
9403
9406
  id: string;
9404
9407
  name: string;
@@ -10046,12 +10049,6 @@ interface SerializedWorkflowStep {
10046
10049
  subStepsCount?: number;
10047
10050
  }
10048
10051
 
10049
- /**
10050
- * Agent configuration for the chain
10051
- */
10052
- type AgentConfig<SCHEMA extends z.ZodTypeAny, INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, CURRENT_DATA> = BaseGenerationOptions & {
10053
- schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
10054
- };
10055
10052
  /**
10056
10053
  * A workflow chain that provides a fluent API for building workflows
10057
10054
  *
@@ -10128,8 +10125,8 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
10128
10125
  * @param map - Optional mapper to shape or merge the agent output with existing data
10129
10126
  * @returns A workflow step that executes the agent with the task
10130
10127
  */
10131
- andAgent<SCHEMA extends z.ZodTypeAny>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT_SCHEMA, CURRENT_DATA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, z.infer<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10132
- andAgent<SCHEMA extends z.ZodTypeAny, NEW_DATA>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT_SCHEMA, CURRENT_DATA>, map: (output: z.infer<SCHEMA>, context: WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>) => Promise<NEW_DATA> | NEW_DATA): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, NEW_DATA, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10128
+ andAgent<SCHEMA extends AgentOutputSchema>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, InferAgentOutput<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10129
+ andAgent<SCHEMA extends AgentOutputSchema, NEW_DATA>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA>, map: (output: InferAgentOutput<SCHEMA>, context: WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>) => Promise<NEW_DATA> | NEW_DATA): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, NEW_DATA, SUSPEND_SCHEMA, RESUME_SCHEMA>;
10133
10130
  /**
10134
10131
  * Add a function step to the workflow with both input and output schemas
10135
10132
  * @param config - Step configuration with schemas
@@ -14482,4 +14479,4 @@ declare class VoltAgent {
14482
14479
  */
14483
14480
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
14484
14481
 
14485
- export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type TriggerHandler, type TriggerHandlerBody, type TriggerHandlerContext, type TriggerHandlerResponse, type TriggerHandlerResult, type TriggerHandlerReturn, type TriggerHttpMethod, TriggerRegistry, type Usage, type UsageInfo, UserInputBridge, type UserInputHandler, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltAgentTriggerConfig, type VoltAgentTriggersConfig, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableCredential, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsDiscordChannelMessageParams, type VoltOpsDiscordChannelType, type VoltOpsDiscordConfig, type VoltOpsDiscordCreateChannelParams, type VoltOpsDiscordCredential, type VoltOpsDiscordDeleteChannelParams, type VoltOpsDiscordGetChannelParams, type VoltOpsDiscordListChannelsParams, type VoltOpsDiscordListMembersParams, type VoltOpsDiscordListMessagesParams, type VoltOpsDiscordMemberRoleParams, type VoltOpsDiscordReactionParams, type VoltOpsDiscordSendMessageParams, type VoltOpsDiscordSendWebhookMessageParams, type VoltOpsDiscordUpdateChannelParams, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackCredential, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, type VoltOpsTriggerDefinition, VoltOpsTriggerDefinitions, type VoltOpsTriggerEnvelope, type VoltOpsTriggerGroupMap, type VoltOpsTriggerName, VoltOpsTriggerNames, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
14482
+ export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec$1 as OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type TriggerHandler, type TriggerHandlerBody, type TriggerHandlerContext, type TriggerHandlerResponse, type TriggerHandlerResult, type TriggerHandlerReturn, type TriggerHttpMethod, TriggerRegistry, type Usage, type UsageInfo, UserInputBridge, type UserInputHandler, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltAgentTriggerConfig, type VoltAgentTriggersConfig, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableCredential, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsDiscordChannelMessageParams, type VoltOpsDiscordChannelType, type VoltOpsDiscordConfig, type VoltOpsDiscordCreateChannelParams, type VoltOpsDiscordCredential, type VoltOpsDiscordDeleteChannelParams, type VoltOpsDiscordGetChannelParams, type VoltOpsDiscordListChannelsParams, type VoltOpsDiscordListMembersParams, type VoltOpsDiscordListMessagesParams, type VoltOpsDiscordMemberRoleParams, type VoltOpsDiscordReactionParams, type VoltOpsDiscordSendMessageParams, type VoltOpsDiscordSendWebhookMessageParams, type VoltOpsDiscordUpdateChannelParams, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackCredential, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, type VoltOpsTriggerDefinition, VoltOpsTriggerDefinitions, type VoltOpsTriggerEnvelope, type VoltOpsTriggerGroupMap, type VoltOpsTriggerName, VoltOpsTriggerNames, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
package/dist/index.js CHANGED
@@ -403,6 +403,11 @@ function convertUsage(usage) {
403
403
  __name(convertUsage, "convertUsage");
404
404
 
405
405
  // src/workflow/steps/and-agent.ts
406
+ var isOutputSpec = /* @__PURE__ */ __name((value) => {
407
+ if (!value || typeof value !== "object") return false;
408
+ const candidate = value;
409
+ return typeof candidate.parseCompleteOutput === "function" && typeof candidate.parsePartialOutput === "function" && "responseFormat" in candidate;
410
+ }, "isOutputSpec");
406
411
  function andAgent(task, agent, config, map) {
407
412
  return {
408
413
  type: "agent",
@@ -415,7 +420,7 @@ function andAgent(task, agent, config, map) {
415
420
  const { schema, ...restConfig } = config;
416
421
  const finalTask = typeof task === "function" ? await task(context8) : task;
417
422
  const finalSchema = typeof schema === "function" ? await schema(context8) : schema;
418
- const output = import_ai.Output.object({ schema: finalSchema });
423
+ const output = isOutputSpec(finalSchema) ? finalSchema : import_ai.Output.object({ schema: finalSchema });
419
424
  const mapOutput = /* @__PURE__ */ __name(async (outputValue) => {
420
425
  if (map) {
421
426
  return await map(outputValue, context8);