@voltagent/core 1.2.15 → 1.2.17
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 +47 -2
- package/dist/index.d.ts +47 -2
- package/dist/index.js +85 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -895,6 +895,14 @@ interface WorkflowStateEntry {
|
|
|
895
895
|
createdAt: Date;
|
|
896
896
|
updatedAt: Date;
|
|
897
897
|
}
|
|
898
|
+
interface WorkflowRunQuery {
|
|
899
|
+
workflowId?: string;
|
|
900
|
+
status?: WorkflowStateEntry["status"];
|
|
901
|
+
from?: Date;
|
|
902
|
+
to?: Date;
|
|
903
|
+
limit?: number;
|
|
904
|
+
offset?: number;
|
|
905
|
+
}
|
|
898
906
|
/**
|
|
899
907
|
* Working memory scope - conversation or user level
|
|
900
908
|
*/
|
|
@@ -1060,6 +1068,7 @@ interface StorageAdapter {
|
|
|
1060
1068
|
scope: WorkingMemoryScope;
|
|
1061
1069
|
}): Promise<void>;
|
|
1062
1070
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
1071
|
+
queryWorkflowRuns(query: WorkflowRunQuery): Promise<WorkflowStateEntry[]>;
|
|
1063
1072
|
setWorkflowState(executionId: string, state: WorkflowStateEntry): Promise<void>;
|
|
1064
1073
|
updateWorkflowState(executionId: string, updates: Partial<WorkflowStateEntry>): Promise<void>;
|
|
1065
1074
|
getSuspendedWorkflowStates(workflowId: string): Promise<WorkflowStateEntry[]>;
|
|
@@ -1509,6 +1518,10 @@ declare class Memory {
|
|
|
1509
1518
|
* Get workflow state by execution ID
|
|
1510
1519
|
*/
|
|
1511
1520
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Query workflow states with filters
|
|
1523
|
+
*/
|
|
1524
|
+
queryWorkflowRuns(query: WorkflowRunQuery): Promise<WorkflowStateEntry[]>;
|
|
1512
1525
|
/**
|
|
1513
1526
|
* Set workflow state
|
|
1514
1527
|
*/
|
|
@@ -2518,6 +2531,14 @@ interface ManagedMemoryWorkingMemoryInput {
|
|
|
2518
2531
|
interface ManagedMemorySetWorkingMemoryInput extends ManagedMemoryWorkingMemoryInput {
|
|
2519
2532
|
content: string;
|
|
2520
2533
|
}
|
|
2534
|
+
interface ManagedMemoryQueryWorkflowRunsInput {
|
|
2535
|
+
workflowId?: string;
|
|
2536
|
+
status?: WorkflowStateEntry["status"];
|
|
2537
|
+
from?: Date;
|
|
2538
|
+
to?: Date;
|
|
2539
|
+
limit?: number;
|
|
2540
|
+
offset?: number;
|
|
2541
|
+
}
|
|
2521
2542
|
interface ManagedMemoryWorkflowStateUpdateInput {
|
|
2522
2543
|
executionId: string;
|
|
2523
2544
|
updates: Partial<WorkflowStateEntry>;
|
|
@@ -2544,6 +2565,8 @@ interface ManagedMemoryWorkflowStatesClient {
|
|
|
2544
2565
|
get(databaseId: string, executionId: string): Promise<WorkflowStateEntry | null>;
|
|
2545
2566
|
set(databaseId: string, executionId: string, state: WorkflowStateEntry): Promise<void>;
|
|
2546
2567
|
update(databaseId: string, input: ManagedMemoryWorkflowStateUpdateInput): Promise<void>;
|
|
2568
|
+
list(databaseId: string, input: ManagedMemoryQueryWorkflowRunsInput): Promise<WorkflowStateEntry[]>;
|
|
2569
|
+
query(databaseId: string, input: ManagedMemoryQueryWorkflowRunsInput): Promise<WorkflowStateEntry[]>;
|
|
2547
2570
|
listSuspended(databaseId: string, workflowId: string): Promise<WorkflowStateEntry[]>;
|
|
2548
2571
|
}
|
|
2549
2572
|
interface ManagedMemoryStepsClient {
|
|
@@ -2747,7 +2770,7 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
|
|
|
2747
2770
|
private getManagedMemoryWorkflowState;
|
|
2748
2771
|
private setManagedMemoryWorkflowState;
|
|
2749
2772
|
private updateManagedMemoryWorkflowState;
|
|
2750
|
-
private
|
|
2773
|
+
private getManagedMemoryWorkflowStates;
|
|
2751
2774
|
private saveManagedMemoryConversationSteps;
|
|
2752
2775
|
private getManagedMemoryConversationSteps;
|
|
2753
2776
|
/**
|
|
@@ -5697,6 +5720,10 @@ type Workflow<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, RESULT_SCHEM
|
|
|
5697
5720
|
* Input schema for the workflow (for API access)
|
|
5698
5721
|
*/
|
|
5699
5722
|
inputSchema?: INPUT_SCHEMA;
|
|
5723
|
+
/**
|
|
5724
|
+
* Result schema for the workflow (for API access)
|
|
5725
|
+
*/
|
|
5726
|
+
resultSchema?: RESULT_SCHEMA;
|
|
5700
5727
|
/**
|
|
5701
5728
|
* Suspend schema for the workflow (for API access)
|
|
5702
5729
|
*/
|
|
@@ -5724,6 +5751,7 @@ type Workflow<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, RESULT_SCHEM
|
|
|
5724
5751
|
stepsCount: number;
|
|
5725
5752
|
steps: DangerouslyAllowAny[];
|
|
5726
5753
|
inputSchema?: DangerouslyAllowAny;
|
|
5754
|
+
resultSchema?: DangerouslyAllowAny;
|
|
5727
5755
|
suspendSchema?: DangerouslyAllowAny;
|
|
5728
5756
|
resumeSchema?: DangerouslyAllowAny;
|
|
5729
5757
|
};
|
|
@@ -7131,6 +7159,7 @@ interface RegisteredWorkflow {
|
|
|
7131
7159
|
inputSchema?: any;
|
|
7132
7160
|
suspendSchema?: any;
|
|
7133
7161
|
resumeSchema?: any;
|
|
7162
|
+
resultSchema?: any;
|
|
7134
7163
|
}
|
|
7135
7164
|
/**
|
|
7136
7165
|
* Singleton registry for managing workflows and their execution history
|
|
@@ -7219,6 +7248,10 @@ declare class WorkflowRegistry extends SimpleEventEmitter {
|
|
|
7219
7248
|
stepsCount: number;
|
|
7220
7249
|
status: "idle";
|
|
7221
7250
|
steps: SerializedWorkflowStep[];
|
|
7251
|
+
inputSchema: any;
|
|
7252
|
+
resultSchema: any;
|
|
7253
|
+
suspendSchema: any;
|
|
7254
|
+
resumeSchema: any;
|
|
7222
7255
|
} | null;
|
|
7223
7256
|
}
|
|
7224
7257
|
|
|
@@ -8423,6 +8456,7 @@ interface ServerProviderDeps {
|
|
|
8423
8456
|
getWorkflowsForApi(): unknown[];
|
|
8424
8457
|
getWorkflowDetailForApi(id: string): unknown;
|
|
8425
8458
|
getWorkflowCount(): number;
|
|
8459
|
+
getAllWorkflowIds(): string[];
|
|
8426
8460
|
on(event: string, handler: (...args: any[]) => void): void;
|
|
8427
8461
|
off(event: string, handler: (...args: any[]) => void): void;
|
|
8428
8462
|
activeExecutions: Map<string, WorkflowSuspendController>;
|
|
@@ -9176,6 +9210,17 @@ declare class InMemoryStorageAdapter implements StorageAdapter {
|
|
|
9176
9210
|
* Get workflow state by execution ID
|
|
9177
9211
|
*/
|
|
9178
9212
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
9213
|
+
/**
|
|
9214
|
+
* Query workflow states with optional filters
|
|
9215
|
+
*/
|
|
9216
|
+
queryWorkflowRuns(query: {
|
|
9217
|
+
workflowId?: string;
|
|
9218
|
+
status?: WorkflowStateEntry["status"];
|
|
9219
|
+
from?: Date;
|
|
9220
|
+
to?: Date;
|
|
9221
|
+
limit?: number;
|
|
9222
|
+
offset?: number;
|
|
9223
|
+
}): Promise<WorkflowStateEntry[]>;
|
|
9179
9224
|
/**
|
|
9180
9225
|
* Set workflow state
|
|
9181
9226
|
*/
|
|
@@ -10046,4 +10091,4 @@ declare class VoltAgent {
|
|
|
10046
10091
|
*/
|
|
10047
10092
|
declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
|
|
10048
10093
|
|
|
10049
|
-
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, 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, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, 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 LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, 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 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, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, 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 StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, 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, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, 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, 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, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
|
|
10094
|
+
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, 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, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, 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 LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, 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, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, 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 StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, 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, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, 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, 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, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, 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
|
@@ -895,6 +895,14 @@ interface WorkflowStateEntry {
|
|
|
895
895
|
createdAt: Date;
|
|
896
896
|
updatedAt: Date;
|
|
897
897
|
}
|
|
898
|
+
interface WorkflowRunQuery {
|
|
899
|
+
workflowId?: string;
|
|
900
|
+
status?: WorkflowStateEntry["status"];
|
|
901
|
+
from?: Date;
|
|
902
|
+
to?: Date;
|
|
903
|
+
limit?: number;
|
|
904
|
+
offset?: number;
|
|
905
|
+
}
|
|
898
906
|
/**
|
|
899
907
|
* Working memory scope - conversation or user level
|
|
900
908
|
*/
|
|
@@ -1060,6 +1068,7 @@ interface StorageAdapter {
|
|
|
1060
1068
|
scope: WorkingMemoryScope;
|
|
1061
1069
|
}): Promise<void>;
|
|
1062
1070
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
1071
|
+
queryWorkflowRuns(query: WorkflowRunQuery): Promise<WorkflowStateEntry[]>;
|
|
1063
1072
|
setWorkflowState(executionId: string, state: WorkflowStateEntry): Promise<void>;
|
|
1064
1073
|
updateWorkflowState(executionId: string, updates: Partial<WorkflowStateEntry>): Promise<void>;
|
|
1065
1074
|
getSuspendedWorkflowStates(workflowId: string): Promise<WorkflowStateEntry[]>;
|
|
@@ -1509,6 +1518,10 @@ declare class Memory {
|
|
|
1509
1518
|
* Get workflow state by execution ID
|
|
1510
1519
|
*/
|
|
1511
1520
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Query workflow states with filters
|
|
1523
|
+
*/
|
|
1524
|
+
queryWorkflowRuns(query: WorkflowRunQuery): Promise<WorkflowStateEntry[]>;
|
|
1512
1525
|
/**
|
|
1513
1526
|
* Set workflow state
|
|
1514
1527
|
*/
|
|
@@ -2518,6 +2531,14 @@ interface ManagedMemoryWorkingMemoryInput {
|
|
|
2518
2531
|
interface ManagedMemorySetWorkingMemoryInput extends ManagedMemoryWorkingMemoryInput {
|
|
2519
2532
|
content: string;
|
|
2520
2533
|
}
|
|
2534
|
+
interface ManagedMemoryQueryWorkflowRunsInput {
|
|
2535
|
+
workflowId?: string;
|
|
2536
|
+
status?: WorkflowStateEntry["status"];
|
|
2537
|
+
from?: Date;
|
|
2538
|
+
to?: Date;
|
|
2539
|
+
limit?: number;
|
|
2540
|
+
offset?: number;
|
|
2541
|
+
}
|
|
2521
2542
|
interface ManagedMemoryWorkflowStateUpdateInput {
|
|
2522
2543
|
executionId: string;
|
|
2523
2544
|
updates: Partial<WorkflowStateEntry>;
|
|
@@ -2544,6 +2565,8 @@ interface ManagedMemoryWorkflowStatesClient {
|
|
|
2544
2565
|
get(databaseId: string, executionId: string): Promise<WorkflowStateEntry | null>;
|
|
2545
2566
|
set(databaseId: string, executionId: string, state: WorkflowStateEntry): Promise<void>;
|
|
2546
2567
|
update(databaseId: string, input: ManagedMemoryWorkflowStateUpdateInput): Promise<void>;
|
|
2568
|
+
list(databaseId: string, input: ManagedMemoryQueryWorkflowRunsInput): Promise<WorkflowStateEntry[]>;
|
|
2569
|
+
query(databaseId: string, input: ManagedMemoryQueryWorkflowRunsInput): Promise<WorkflowStateEntry[]>;
|
|
2547
2570
|
listSuspended(databaseId: string, workflowId: string): Promise<WorkflowStateEntry[]>;
|
|
2548
2571
|
}
|
|
2549
2572
|
interface ManagedMemoryStepsClient {
|
|
@@ -2747,7 +2770,7 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
|
|
|
2747
2770
|
private getManagedMemoryWorkflowState;
|
|
2748
2771
|
private setManagedMemoryWorkflowState;
|
|
2749
2772
|
private updateManagedMemoryWorkflowState;
|
|
2750
|
-
private
|
|
2773
|
+
private getManagedMemoryWorkflowStates;
|
|
2751
2774
|
private saveManagedMemoryConversationSteps;
|
|
2752
2775
|
private getManagedMemoryConversationSteps;
|
|
2753
2776
|
/**
|
|
@@ -5697,6 +5720,10 @@ type Workflow<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, RESULT_SCHEM
|
|
|
5697
5720
|
* Input schema for the workflow (for API access)
|
|
5698
5721
|
*/
|
|
5699
5722
|
inputSchema?: INPUT_SCHEMA;
|
|
5723
|
+
/**
|
|
5724
|
+
* Result schema for the workflow (for API access)
|
|
5725
|
+
*/
|
|
5726
|
+
resultSchema?: RESULT_SCHEMA;
|
|
5700
5727
|
/**
|
|
5701
5728
|
* Suspend schema for the workflow (for API access)
|
|
5702
5729
|
*/
|
|
@@ -5724,6 +5751,7 @@ type Workflow<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, RESULT_SCHEM
|
|
|
5724
5751
|
stepsCount: number;
|
|
5725
5752
|
steps: DangerouslyAllowAny[];
|
|
5726
5753
|
inputSchema?: DangerouslyAllowAny;
|
|
5754
|
+
resultSchema?: DangerouslyAllowAny;
|
|
5727
5755
|
suspendSchema?: DangerouslyAllowAny;
|
|
5728
5756
|
resumeSchema?: DangerouslyAllowAny;
|
|
5729
5757
|
};
|
|
@@ -7131,6 +7159,7 @@ interface RegisteredWorkflow {
|
|
|
7131
7159
|
inputSchema?: any;
|
|
7132
7160
|
suspendSchema?: any;
|
|
7133
7161
|
resumeSchema?: any;
|
|
7162
|
+
resultSchema?: any;
|
|
7134
7163
|
}
|
|
7135
7164
|
/**
|
|
7136
7165
|
* Singleton registry for managing workflows and their execution history
|
|
@@ -7219,6 +7248,10 @@ declare class WorkflowRegistry extends SimpleEventEmitter {
|
|
|
7219
7248
|
stepsCount: number;
|
|
7220
7249
|
status: "idle";
|
|
7221
7250
|
steps: SerializedWorkflowStep[];
|
|
7251
|
+
inputSchema: any;
|
|
7252
|
+
resultSchema: any;
|
|
7253
|
+
suspendSchema: any;
|
|
7254
|
+
resumeSchema: any;
|
|
7222
7255
|
} | null;
|
|
7223
7256
|
}
|
|
7224
7257
|
|
|
@@ -8423,6 +8456,7 @@ interface ServerProviderDeps {
|
|
|
8423
8456
|
getWorkflowsForApi(): unknown[];
|
|
8424
8457
|
getWorkflowDetailForApi(id: string): unknown;
|
|
8425
8458
|
getWorkflowCount(): number;
|
|
8459
|
+
getAllWorkflowIds(): string[];
|
|
8426
8460
|
on(event: string, handler: (...args: any[]) => void): void;
|
|
8427
8461
|
off(event: string, handler: (...args: any[]) => void): void;
|
|
8428
8462
|
activeExecutions: Map<string, WorkflowSuspendController>;
|
|
@@ -9176,6 +9210,17 @@ declare class InMemoryStorageAdapter implements StorageAdapter {
|
|
|
9176
9210
|
* Get workflow state by execution ID
|
|
9177
9211
|
*/
|
|
9178
9212
|
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
9213
|
+
/**
|
|
9214
|
+
* Query workflow states with optional filters
|
|
9215
|
+
*/
|
|
9216
|
+
queryWorkflowRuns(query: {
|
|
9217
|
+
workflowId?: string;
|
|
9218
|
+
status?: WorkflowStateEntry["status"];
|
|
9219
|
+
from?: Date;
|
|
9220
|
+
to?: Date;
|
|
9221
|
+
limit?: number;
|
|
9222
|
+
offset?: number;
|
|
9223
|
+
}): Promise<WorkflowStateEntry[]>;
|
|
9179
9224
|
/**
|
|
9180
9225
|
* Set workflow state
|
|
9181
9226
|
*/
|
|
@@ -10046,4 +10091,4 @@ declare class VoltAgent {
|
|
|
10046
10091
|
*/
|
|
10047
10092
|
declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
|
|
10048
10093
|
|
|
10049
|
-
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, 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, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, 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 LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, 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 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, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, 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 StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, 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, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, 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, 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, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
|
|
10094
|
+
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, 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, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, 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 LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, 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, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, 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 StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, 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, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, 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, 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, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, 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
|
@@ -2634,6 +2634,12 @@ Remember:
|
|
|
2634
2634
|
async getWorkflowState(executionId) {
|
|
2635
2635
|
return this.storage.getWorkflowState(executionId);
|
|
2636
2636
|
}
|
|
2637
|
+
/**
|
|
2638
|
+
* Query workflow states with filters
|
|
2639
|
+
*/
|
|
2640
|
+
async queryWorkflowRuns(query) {
|
|
2641
|
+
return this.storage.queryWorkflowRuns(query);
|
|
2642
|
+
}
|
|
2637
2643
|
/**
|
|
2638
2644
|
* Set workflow state
|
|
2639
2645
|
*/
|
|
@@ -2970,6 +2976,42 @@ var InMemoryStorageAdapter = class {
|
|
|
2970
2976
|
const state = this.workflowStates.get(executionId);
|
|
2971
2977
|
return state ? (0, import_utils8.deepClone)(state) : null;
|
|
2972
2978
|
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Query workflow states with optional filters
|
|
2981
|
+
*/
|
|
2982
|
+
async queryWorkflowRuns(query) {
|
|
2983
|
+
const states = [];
|
|
2984
|
+
if (query.workflowId) {
|
|
2985
|
+
const executionIds = this.workflowStatesByWorkflow.get(query.workflowId);
|
|
2986
|
+
if (executionIds) {
|
|
2987
|
+
for (const id of executionIds) {
|
|
2988
|
+
const state = this.workflowStates.get(id);
|
|
2989
|
+
if (state) {
|
|
2990
|
+
states.push((0, import_utils8.deepClone)(state));
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
} else {
|
|
2995
|
+
for (const state of this.workflowStates.values()) {
|
|
2996
|
+
states.push((0, import_utils8.deepClone)(state));
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
const filtered = states.filter((state) => {
|
|
3000
|
+
if (query.status && state.status !== query.status) {
|
|
3001
|
+
return false;
|
|
3002
|
+
}
|
|
3003
|
+
if (query.from && state.createdAt < query.from) {
|
|
3004
|
+
return false;
|
|
3005
|
+
}
|
|
3006
|
+
if (query.to && state.createdAt > query.to) {
|
|
3007
|
+
return false;
|
|
3008
|
+
}
|
|
3009
|
+
return true;
|
|
3010
|
+
}).sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
|
3011
|
+
const start = query.offset ?? 0;
|
|
3012
|
+
const end = query.limit ? start + query.limit : void 0;
|
|
3013
|
+
return filtered.slice(start, end);
|
|
3014
|
+
}
|
|
2973
3015
|
/**
|
|
2974
3016
|
* Set workflow state
|
|
2975
3017
|
*/
|
|
@@ -5458,7 +5500,8 @@ var WorkflowRegistry = class _WorkflowRegistry extends SimpleEventEmitter {
|
|
|
5458
5500
|
executionCount: 0,
|
|
5459
5501
|
inputSchema: workflow.inputSchema,
|
|
5460
5502
|
suspendSchema: workflow.suspendSchema,
|
|
5461
|
-
resumeSchema: workflow.resumeSchema
|
|
5503
|
+
resumeSchema: workflow.resumeSchema,
|
|
5504
|
+
resultSchema: workflow.resultSchema
|
|
5462
5505
|
};
|
|
5463
5506
|
this.workflows.set(workflow.id, registeredWorkflow);
|
|
5464
5507
|
this.emit("workflowRegistered", workflow.id, registeredWorkflow);
|
|
@@ -5664,7 +5707,11 @@ var WorkflowRegistry = class _WorkflowRegistry extends SimpleEventEmitter {
|
|
|
5664
5707
|
purpose: workflow.purpose,
|
|
5665
5708
|
stepsCount: workflow.steps.length,
|
|
5666
5709
|
status: "idle",
|
|
5667
|
-
steps: workflow.steps.map((step, index) => serializeWorkflowStep(step, index))
|
|
5710
|
+
steps: workflow.steps.map((step, index) => serializeWorkflowStep(step, index)),
|
|
5711
|
+
inputSchema: registeredWorkflow.inputSchema,
|
|
5712
|
+
resultSchema: registeredWorkflow.resultSchema,
|
|
5713
|
+
suspendSchema: registeredWorkflow.suspendSchema,
|
|
5714
|
+
resumeSchema: registeredWorkflow.resumeSchema
|
|
5668
5715
|
};
|
|
5669
5716
|
}
|
|
5670
5717
|
};
|
|
@@ -5984,6 +6031,7 @@ function createWorkflow({
|
|
|
5984
6031
|
purpose,
|
|
5985
6032
|
hooks,
|
|
5986
6033
|
input,
|
|
6034
|
+
result,
|
|
5987
6035
|
suspendSchema,
|
|
5988
6036
|
resumeSchema,
|
|
5989
6037
|
memory: workflowMemory,
|
|
@@ -6493,7 +6541,7 @@ function createWorkflow({
|
|
|
6493
6541
|
typedSuspendFn,
|
|
6494
6542
|
isResumingThisStep ? resumeInputData : void 0
|
|
6495
6543
|
);
|
|
6496
|
-
const
|
|
6544
|
+
const result2 = await traceContext.withSpan(stepSpan, async () => {
|
|
6497
6545
|
return await executeWithSignalCheck(
|
|
6498
6546
|
() => step.execute(stepContext),
|
|
6499
6547
|
options?.suspendController?.signal,
|
|
@@ -6503,21 +6551,21 @@ function createWorkflow({
|
|
|
6503
6551
|
});
|
|
6504
6552
|
const stepData = executionContext.stepData.get(step.id);
|
|
6505
6553
|
if (stepData) {
|
|
6506
|
-
stepData.output =
|
|
6554
|
+
stepData.output = result2;
|
|
6507
6555
|
}
|
|
6508
|
-
const isSkipped = step.type === "conditional-when" &&
|
|
6556
|
+
const isSkipped = step.type === "conditional-when" && result2 === stateManager.state.data;
|
|
6509
6557
|
stateManager.update({
|
|
6510
|
-
data:
|
|
6511
|
-
result
|
|
6558
|
+
data: result2,
|
|
6559
|
+
result: result2
|
|
6512
6560
|
});
|
|
6513
6561
|
if (isSkipped) {
|
|
6514
6562
|
traceContext.endStepSpan(stepSpan, "skipped", {
|
|
6515
|
-
output:
|
|
6563
|
+
output: result2,
|
|
6516
6564
|
skippedReason: "Condition not met"
|
|
6517
6565
|
});
|
|
6518
6566
|
} else {
|
|
6519
6567
|
traceContext.endStepSpan(stepSpan, "completed", {
|
|
6520
|
-
output:
|
|
6568
|
+
output: result2
|
|
6521
6569
|
});
|
|
6522
6570
|
}
|
|
6523
6571
|
runLogger.debug(
|
|
@@ -6526,7 +6574,7 @@ function createWorkflow({
|
|
|
6526
6574
|
stepIndex: index,
|
|
6527
6575
|
stepType: step.type,
|
|
6528
6576
|
stepName,
|
|
6529
|
-
output:
|
|
6577
|
+
output: result2 !== void 0 ? result2 : null,
|
|
6530
6578
|
skipped: isSkipped
|
|
6531
6579
|
}
|
|
6532
6580
|
);
|
|
@@ -6535,7 +6583,7 @@ function createWorkflow({
|
|
|
6535
6583
|
executionId,
|
|
6536
6584
|
from: stepName,
|
|
6537
6585
|
input: stateManager.state.data,
|
|
6538
|
-
output:
|
|
6586
|
+
output: result2,
|
|
6539
6587
|
status: "success",
|
|
6540
6588
|
context: options?.context,
|
|
6541
6589
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6808,6 +6856,7 @@ function createWorkflow({
|
|
|
6808
6856
|
purpose: purpose ?? "No purpose provided",
|
|
6809
6857
|
steps,
|
|
6810
6858
|
inputSchema: input,
|
|
6859
|
+
resultSchema: result,
|
|
6811
6860
|
suspendSchema: effectiveSuspendSchema,
|
|
6812
6861
|
resumeSchema: effectiveResumeSchema,
|
|
6813
6862
|
// ✅ Always expose memory for registry access
|
|
@@ -6821,6 +6870,7 @@ function createWorkflow({
|
|
|
6821
6870
|
stepsCount: steps.length,
|
|
6822
6871
|
steps: steps.map((step, index) => serializeWorkflowStep(step, index)),
|
|
6823
6872
|
inputSchema: input,
|
|
6873
|
+
resultSchema: result,
|
|
6824
6874
|
suspendSchema: effectiveSuspendSchema,
|
|
6825
6875
|
resumeSchema: effectiveResumeSchema
|
|
6826
6876
|
};
|
|
@@ -6848,15 +6898,15 @@ function createWorkflow({
|
|
|
6848
6898
|
}
|
|
6849
6899
|
);
|
|
6850
6900
|
const executeWithStream = /* @__PURE__ */ __name(async () => {
|
|
6851
|
-
const
|
|
6852
|
-
return
|
|
6901
|
+
const result2 = await executeInternal(input2, executionOptions, streamController);
|
|
6902
|
+
return result2;
|
|
6853
6903
|
}, "executeWithStream");
|
|
6854
6904
|
executeWithStream().then(
|
|
6855
|
-
(
|
|
6856
|
-
if (
|
|
6905
|
+
(result2) => {
|
|
6906
|
+
if (result2.status !== "suspended") {
|
|
6857
6907
|
streamController?.close();
|
|
6858
6908
|
}
|
|
6859
|
-
resultResolve(
|
|
6909
|
+
resultResolve(result2);
|
|
6860
6910
|
},
|
|
6861
6911
|
(error) => {
|
|
6862
6912
|
streamController?.close();
|
|
@@ -6922,11 +6972,11 @@ function createWorkflow({
|
|
|
6922
6972
|
return resumed;
|
|
6923
6973
|
}, "executeResume");
|
|
6924
6974
|
executeResume().then(
|
|
6925
|
-
(
|
|
6926
|
-
if (
|
|
6975
|
+
(result2) => {
|
|
6976
|
+
if (result2.status !== "suspended") {
|
|
6927
6977
|
streamController?.close();
|
|
6928
6978
|
}
|
|
6929
|
-
resumedResolve(
|
|
6979
|
+
resumedResolve(result2);
|
|
6930
6980
|
},
|
|
6931
6981
|
(error) => {
|
|
6932
6982
|
streamController?.close();
|
|
@@ -10624,7 +10674,12 @@ var VoltOpsClient = class {
|
|
|
10624
10674
|
get: /* @__PURE__ */ __name((databaseId, executionId) => this.getManagedMemoryWorkflowState(databaseId, executionId), "get"),
|
|
10625
10675
|
set: /* @__PURE__ */ __name((databaseId, executionId, state) => this.setManagedMemoryWorkflowState(databaseId, executionId, state), "set"),
|
|
10626
10676
|
update: /* @__PURE__ */ __name((databaseId, input) => this.updateManagedMemoryWorkflowState(databaseId, input), "update"),
|
|
10627
|
-
|
|
10677
|
+
list: /* @__PURE__ */ __name((databaseId, input) => this.getManagedMemoryWorkflowStates(databaseId, input), "list"),
|
|
10678
|
+
query: /* @__PURE__ */ __name((databaseId, input) => this.getManagedMemoryWorkflowStates(databaseId, input), "query"),
|
|
10679
|
+
listSuspended: /* @__PURE__ */ __name((databaseId, workflowId) => this.getManagedMemoryWorkflowStates(databaseId, {
|
|
10680
|
+
workflowId,
|
|
10681
|
+
status: "suspended"
|
|
10682
|
+
}), "listSuspended")
|
|
10628
10683
|
},
|
|
10629
10684
|
steps: {
|
|
10630
10685
|
save: /* @__PURE__ */ __name((databaseId, steps) => this.saveManagedMemoryConversationSteps(databaseId, steps), "save"),
|
|
@@ -10892,11 +10947,18 @@ var VoltOpsClient = class {
|
|
|
10892
10947
|
throw new Error("Failed to update managed memory workflow state via VoltOps");
|
|
10893
10948
|
}
|
|
10894
10949
|
}
|
|
10895
|
-
async
|
|
10896
|
-
const query = this.buildQueryString({
|
|
10950
|
+
async getManagedMemoryWorkflowStates(databaseId, input) {
|
|
10951
|
+
const query = this.buildQueryString({
|
|
10952
|
+
workflowId: input.workflowId,
|
|
10953
|
+
status: input.status,
|
|
10954
|
+
from: input.from?.toISOString(),
|
|
10955
|
+
to: input.to?.toISOString(),
|
|
10956
|
+
limit: input.limit,
|
|
10957
|
+
offset: input.offset
|
|
10958
|
+
});
|
|
10897
10959
|
const payload = await this.request("GET", `/managed-memory/projects/databases/${databaseId}/workflow-states${query}`);
|
|
10898
10960
|
if (!payload?.success) {
|
|
10899
|
-
throw new Error("Failed to fetch
|
|
10961
|
+
throw new Error("Failed to fetch managed memory workflow states via VoltOps");
|
|
10900
10962
|
}
|
|
10901
10963
|
return payload.data?.workflowStates ?? [];
|
|
10902
10964
|
}
|