@voltagent/server-core 1.0.31 → 1.0.33

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.
@@ -347,6 +347,32 @@ declare const WORKFLOW_ROUTES: {
347
347
  };
348
348
  };
349
349
  };
350
+ readonly listWorkflowRuns: {
351
+ readonly method: "get";
352
+ readonly path: "/workflows/executions";
353
+ readonly summary: "List workflow executions (query-driven)";
354
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
355
+ readonly tags: readonly ["Workflow Management"];
356
+ readonly operationId: "listWorkflowRuns";
357
+ readonly responses: {
358
+ readonly 200: {
359
+ readonly description: "Successfully retrieved workflow executions";
360
+ readonly contentType: "application/json";
361
+ };
362
+ readonly 400: {
363
+ readonly description: "Invalid query parameters";
364
+ readonly contentType: "application/json";
365
+ };
366
+ readonly 404: {
367
+ readonly description: "Workflow not found";
368
+ readonly contentType: "application/json";
369
+ };
370
+ readonly 500: {
371
+ readonly description: "Failed to retrieve workflow executions due to server error";
372
+ readonly contentType: "application/json";
373
+ };
374
+ };
375
+ };
350
376
  readonly executeWorkflow: {
351
377
  readonly method: "post";
352
378
  readonly path: "/workflows/:id/execute";
@@ -871,6 +897,55 @@ declare const OBSERVABILITY_MEMORY_ROUTES: {
871
897
  };
872
898
  };
873
899
  };
900
+ /**
901
+ * Tool route definitions
902
+ */
903
+ declare const TOOL_ROUTES: {
904
+ readonly listTools: {
905
+ readonly method: "get";
906
+ readonly path: "/tools";
907
+ readonly summary: "List all tools";
908
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
909
+ readonly tags: readonly ["Tools"];
910
+ readonly operationId: "listTools";
911
+ readonly responses: {
912
+ readonly 200: {
913
+ readonly description: "Successfully retrieved list of tools";
914
+ readonly contentType: "application/json";
915
+ };
916
+ readonly 500: {
917
+ readonly description: "Failed to retrieve tools due to server error";
918
+ readonly contentType: "application/json";
919
+ };
920
+ };
921
+ };
922
+ readonly executeTool: {
923
+ readonly method: "post";
924
+ readonly path: "/tools/:name/execute";
925
+ readonly summary: "Execute a tool directly";
926
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
927
+ readonly tags: readonly ["Tools"];
928
+ readonly operationId: "executeTool";
929
+ readonly responses: {
930
+ readonly 200: {
931
+ readonly description: "Successfully executed tool";
932
+ readonly contentType: "application/json";
933
+ };
934
+ readonly 400: {
935
+ readonly description: "Invalid request or tool input";
936
+ readonly contentType: "application/json";
937
+ };
938
+ readonly 404: {
939
+ readonly description: "Tool not found";
940
+ readonly contentType: "application/json";
941
+ };
942
+ readonly 500: {
943
+ readonly description: "Failed to execute tool due to server error";
944
+ readonly contentType: "application/json";
945
+ };
946
+ };
947
+ };
948
+ };
874
949
  /**
875
950
  * All route definitions combined
876
951
  */
@@ -1229,6 +1304,50 @@ declare const ALL_ROUTES: {
1229
1304
  };
1230
1305
  };
1231
1306
  };
1307
+ readonly listTools: {
1308
+ readonly method: "get";
1309
+ readonly path: "/tools";
1310
+ readonly summary: "List all tools";
1311
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
1312
+ readonly tags: readonly ["Tools"];
1313
+ readonly operationId: "listTools";
1314
+ readonly responses: {
1315
+ readonly 200: {
1316
+ readonly description: "Successfully retrieved list of tools";
1317
+ readonly contentType: "application/json";
1318
+ };
1319
+ readonly 500: {
1320
+ readonly description: "Failed to retrieve tools due to server error";
1321
+ readonly contentType: "application/json";
1322
+ };
1323
+ };
1324
+ };
1325
+ readonly executeTool: {
1326
+ readonly method: "post";
1327
+ readonly path: "/tools/:name/execute";
1328
+ readonly summary: "Execute a tool directly";
1329
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
1330
+ readonly tags: readonly ["Tools"];
1331
+ readonly operationId: "executeTool";
1332
+ readonly responses: {
1333
+ readonly 200: {
1334
+ readonly description: "Successfully executed tool";
1335
+ readonly contentType: "application/json";
1336
+ };
1337
+ readonly 400: {
1338
+ readonly description: "Invalid request or tool input";
1339
+ readonly contentType: "application/json";
1340
+ };
1341
+ readonly 404: {
1342
+ readonly description: "Tool not found";
1343
+ readonly contentType: "application/json";
1344
+ };
1345
+ readonly 500: {
1346
+ readonly description: "Failed to execute tool due to server error";
1347
+ readonly contentType: "application/json";
1348
+ };
1349
+ };
1350
+ };
1232
1351
  readonly listWorkflows: {
1233
1352
  readonly method: "get";
1234
1353
  readonly path: "/workflows";
@@ -1269,6 +1388,32 @@ declare const ALL_ROUTES: {
1269
1388
  };
1270
1389
  };
1271
1390
  };
1391
+ readonly listWorkflowRuns: {
1392
+ readonly method: "get";
1393
+ readonly path: "/workflows/executions";
1394
+ readonly summary: "List workflow executions (query-driven)";
1395
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
1396
+ readonly tags: readonly ["Workflow Management"];
1397
+ readonly operationId: "listWorkflowRuns";
1398
+ readonly responses: {
1399
+ readonly 200: {
1400
+ readonly description: "Successfully retrieved workflow executions";
1401
+ readonly contentType: "application/json";
1402
+ };
1403
+ readonly 400: {
1404
+ readonly description: "Invalid query parameters";
1405
+ readonly contentType: "application/json";
1406
+ };
1407
+ readonly 404: {
1408
+ readonly description: "Workflow not found";
1409
+ readonly contentType: "application/json";
1410
+ };
1411
+ readonly 500: {
1412
+ readonly description: "Failed to retrieve workflow executions due to server error";
1413
+ readonly contentType: "application/json";
1414
+ };
1415
+ };
1416
+ };
1272
1417
  readonly executeWorkflow: {
1273
1418
  readonly method: "post";
1274
1419
  readonly path: "/workflows/:id/execute";
@@ -2079,6 +2224,17 @@ declare function handleCancelWorkflow(executionId: string, body: any, deps: Serv
2079
2224
  * Returns resume result
2080
2225
  */
2081
2226
  declare function handleResumeWorkflow(workflowId: string, executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2227
+ /**
2228
+ * Handler for listing workflow execution runs
2229
+ */
2230
+ declare function handleListWorkflowRuns(workflowId: string | undefined, query: {
2231
+ status?: string;
2232
+ from?: string;
2233
+ to?: string;
2234
+ limit?: string;
2235
+ offset?: string;
2236
+ workflowId?: string;
2237
+ } | undefined, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2082
2238
  /**
2083
2239
  * Handler for getting workflow execution state
2084
2240
  * Returns workflow state from Memory V2
@@ -2226,4 +2382,4 @@ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiRe
2226
2382
  */
2227
2383
  declare function getResponseStatus(response: ApiResponse): number;
2228
2384
 
2229
- export { handleGenerateObject as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, isJsonRpcRequest as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleGetAgents as X, handleGenerateText as Y, handleStreamText as Z, handleChatStream as _, type A2AServerLikeWithHandlers as a, handleStreamObject as a0, handleGetAgent as a1, handleGetAgentHistory as a2, handleGetWorkflows as a3, handleGetWorkflow as a4, handleExecuteWorkflow as a5, handleStreamWorkflow as a6, handleSuspendWorkflow as a7, handleCancelWorkflow as a8, handleResumeWorkflow as a9, handleGetWorkflowState as aa, type LogFilterOptions as ab, type LogHandlerResponse as ac, handleGetLogs as ad, listMemoryUsersHandler as ae, listMemoryConversationsHandler as af, getConversationMessagesHandler as ag, getConversationStepsHandler as ah, getWorkingMemoryHandler as ai, mapLogResponse as aj, mapHandlerResponse as ak, getResponseStatus as al, type OpenApiInfo as am, type AppSetupConfig as an, getOrCreateLogger as ao, shouldEnableSwaggerUI as ap, getOpenApiDoc as aq, DEFAULT_CORS_OPTIONS as ar, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
2385
+ export { handleChatStream as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, TOOL_ROUTES as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, isJsonRpcRequest as X, handleGetAgents as Y, handleGenerateText as Z, handleStreamText as _, type A2AServerLikeWithHandlers as a, handleGenerateObject as a0, handleStreamObject as a1, handleGetAgent as a2, handleGetAgentHistory as a3, handleGetWorkflows as a4, handleGetWorkflow as a5, handleExecuteWorkflow as a6, handleStreamWorkflow as a7, handleSuspendWorkflow as a8, handleCancelWorkflow as a9, handleResumeWorkflow as aa, handleListWorkflowRuns as ab, handleGetWorkflowState as ac, type LogFilterOptions as ad, type LogHandlerResponse as ae, handleGetLogs as af, listMemoryUsersHandler as ag, listMemoryConversationsHandler as ah, getConversationMessagesHandler as ai, getConversationStepsHandler as aj, getWorkingMemoryHandler as ak, mapLogResponse as al, mapHandlerResponse as am, getResponseStatus as an, type OpenApiInfo as ao, type AppSetupConfig as ap, getOrCreateLogger as aq, shouldEnableSwaggerUI as ar, getOpenApiDoc as as, DEFAULT_CORS_OPTIONS as at, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
@@ -347,6 +347,32 @@ declare const WORKFLOW_ROUTES: {
347
347
  };
348
348
  };
349
349
  };
350
+ readonly listWorkflowRuns: {
351
+ readonly method: "get";
352
+ readonly path: "/workflows/executions";
353
+ readonly summary: "List workflow executions (query-driven)";
354
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
355
+ readonly tags: readonly ["Workflow Management"];
356
+ readonly operationId: "listWorkflowRuns";
357
+ readonly responses: {
358
+ readonly 200: {
359
+ readonly description: "Successfully retrieved workflow executions";
360
+ readonly contentType: "application/json";
361
+ };
362
+ readonly 400: {
363
+ readonly description: "Invalid query parameters";
364
+ readonly contentType: "application/json";
365
+ };
366
+ readonly 404: {
367
+ readonly description: "Workflow not found";
368
+ readonly contentType: "application/json";
369
+ };
370
+ readonly 500: {
371
+ readonly description: "Failed to retrieve workflow executions due to server error";
372
+ readonly contentType: "application/json";
373
+ };
374
+ };
375
+ };
350
376
  readonly executeWorkflow: {
351
377
  readonly method: "post";
352
378
  readonly path: "/workflows/:id/execute";
@@ -871,6 +897,55 @@ declare const OBSERVABILITY_MEMORY_ROUTES: {
871
897
  };
872
898
  };
873
899
  };
900
+ /**
901
+ * Tool route definitions
902
+ */
903
+ declare const TOOL_ROUTES: {
904
+ readonly listTools: {
905
+ readonly method: "get";
906
+ readonly path: "/tools";
907
+ readonly summary: "List all tools";
908
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
909
+ readonly tags: readonly ["Tools"];
910
+ readonly operationId: "listTools";
911
+ readonly responses: {
912
+ readonly 200: {
913
+ readonly description: "Successfully retrieved list of tools";
914
+ readonly contentType: "application/json";
915
+ };
916
+ readonly 500: {
917
+ readonly description: "Failed to retrieve tools due to server error";
918
+ readonly contentType: "application/json";
919
+ };
920
+ };
921
+ };
922
+ readonly executeTool: {
923
+ readonly method: "post";
924
+ readonly path: "/tools/:name/execute";
925
+ readonly summary: "Execute a tool directly";
926
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
927
+ readonly tags: readonly ["Tools"];
928
+ readonly operationId: "executeTool";
929
+ readonly responses: {
930
+ readonly 200: {
931
+ readonly description: "Successfully executed tool";
932
+ readonly contentType: "application/json";
933
+ };
934
+ readonly 400: {
935
+ readonly description: "Invalid request or tool input";
936
+ readonly contentType: "application/json";
937
+ };
938
+ readonly 404: {
939
+ readonly description: "Tool not found";
940
+ readonly contentType: "application/json";
941
+ };
942
+ readonly 500: {
943
+ readonly description: "Failed to execute tool due to server error";
944
+ readonly contentType: "application/json";
945
+ };
946
+ };
947
+ };
948
+ };
874
949
  /**
875
950
  * All route definitions combined
876
951
  */
@@ -1229,6 +1304,50 @@ declare const ALL_ROUTES: {
1229
1304
  };
1230
1305
  };
1231
1306
  };
1307
+ readonly listTools: {
1308
+ readonly method: "get";
1309
+ readonly path: "/tools";
1310
+ readonly summary: "List all tools";
1311
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
1312
+ readonly tags: readonly ["Tools"];
1313
+ readonly operationId: "listTools";
1314
+ readonly responses: {
1315
+ readonly 200: {
1316
+ readonly description: "Successfully retrieved list of tools";
1317
+ readonly contentType: "application/json";
1318
+ };
1319
+ readonly 500: {
1320
+ readonly description: "Failed to retrieve tools due to server error";
1321
+ readonly contentType: "application/json";
1322
+ };
1323
+ };
1324
+ };
1325
+ readonly executeTool: {
1326
+ readonly method: "post";
1327
+ readonly path: "/tools/:name/execute";
1328
+ readonly summary: "Execute a tool directly";
1329
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
1330
+ readonly tags: readonly ["Tools"];
1331
+ readonly operationId: "executeTool";
1332
+ readonly responses: {
1333
+ readonly 200: {
1334
+ readonly description: "Successfully executed tool";
1335
+ readonly contentType: "application/json";
1336
+ };
1337
+ readonly 400: {
1338
+ readonly description: "Invalid request or tool input";
1339
+ readonly contentType: "application/json";
1340
+ };
1341
+ readonly 404: {
1342
+ readonly description: "Tool not found";
1343
+ readonly contentType: "application/json";
1344
+ };
1345
+ readonly 500: {
1346
+ readonly description: "Failed to execute tool due to server error";
1347
+ readonly contentType: "application/json";
1348
+ };
1349
+ };
1350
+ };
1232
1351
  readonly listWorkflows: {
1233
1352
  readonly method: "get";
1234
1353
  readonly path: "/workflows";
@@ -1269,6 +1388,32 @@ declare const ALL_ROUTES: {
1269
1388
  };
1270
1389
  };
1271
1390
  };
1391
+ readonly listWorkflowRuns: {
1392
+ readonly method: "get";
1393
+ readonly path: "/workflows/executions";
1394
+ readonly summary: "List workflow executions (query-driven)";
1395
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
1396
+ readonly tags: readonly ["Workflow Management"];
1397
+ readonly operationId: "listWorkflowRuns";
1398
+ readonly responses: {
1399
+ readonly 200: {
1400
+ readonly description: "Successfully retrieved workflow executions";
1401
+ readonly contentType: "application/json";
1402
+ };
1403
+ readonly 400: {
1404
+ readonly description: "Invalid query parameters";
1405
+ readonly contentType: "application/json";
1406
+ };
1407
+ readonly 404: {
1408
+ readonly description: "Workflow not found";
1409
+ readonly contentType: "application/json";
1410
+ };
1411
+ readonly 500: {
1412
+ readonly description: "Failed to retrieve workflow executions due to server error";
1413
+ readonly contentType: "application/json";
1414
+ };
1415
+ };
1416
+ };
1272
1417
  readonly executeWorkflow: {
1273
1418
  readonly method: "post";
1274
1419
  readonly path: "/workflows/:id/execute";
@@ -2079,6 +2224,17 @@ declare function handleCancelWorkflow(executionId: string, body: any, deps: Serv
2079
2224
  * Returns resume result
2080
2225
  */
2081
2226
  declare function handleResumeWorkflow(workflowId: string, executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2227
+ /**
2228
+ * Handler for listing workflow execution runs
2229
+ */
2230
+ declare function handleListWorkflowRuns(workflowId: string | undefined, query: {
2231
+ status?: string;
2232
+ from?: string;
2233
+ to?: string;
2234
+ limit?: string;
2235
+ offset?: string;
2236
+ workflowId?: string;
2237
+ } | undefined, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2082
2238
  /**
2083
2239
  * Handler for getting workflow execution state
2084
2240
  * Returns workflow state from Memory V2
@@ -2226,4 +2382,4 @@ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiRe
2226
2382
  */
2227
2383
  declare function getResponseStatus(response: ApiResponse): number;
2228
2384
 
2229
- export { handleGenerateObject as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, isJsonRpcRequest as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleGetAgents as X, handleGenerateText as Y, handleStreamText as Z, handleChatStream as _, type A2AServerLikeWithHandlers as a, handleStreamObject as a0, handleGetAgent as a1, handleGetAgentHistory as a2, handleGetWorkflows as a3, handleGetWorkflow as a4, handleExecuteWorkflow as a5, handleStreamWorkflow as a6, handleSuspendWorkflow as a7, handleCancelWorkflow as a8, handleResumeWorkflow as a9, handleGetWorkflowState as aa, type LogFilterOptions as ab, type LogHandlerResponse as ac, handleGetLogs as ad, listMemoryUsersHandler as ae, listMemoryConversationsHandler as af, getConversationMessagesHandler as ag, getConversationStepsHandler as ah, getWorkingMemoryHandler as ai, mapLogResponse as aj, mapHandlerResponse as ak, getResponseStatus as al, type OpenApiInfo as am, type AppSetupConfig as an, getOrCreateLogger as ao, shouldEnableSwaggerUI as ap, getOpenApiDoc as aq, DEFAULT_CORS_OPTIONS as ar, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
2385
+ export { handleChatStream as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, TOOL_ROUTES as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, isJsonRpcRequest as X, handleGetAgents as Y, handleGenerateText as Z, handleStreamText as _, type A2AServerLikeWithHandlers as a, handleGenerateObject as a0, handleStreamObject as a1, handleGetAgent as a2, handleGetAgentHistory as a3, handleGetWorkflows as a4, handleGetWorkflow as a5, handleExecuteWorkflow as a6, handleStreamWorkflow as a7, handleSuspendWorkflow as a8, handleCancelWorkflow as a9, handleResumeWorkflow as aa, handleListWorkflowRuns as ab, handleGetWorkflowState as ac, type LogFilterOptions as ad, type LogHandlerResponse as ae, handleGetLogs as af, listMemoryUsersHandler as ag, listMemoryConversationsHandler as ah, getConversationMessagesHandler as ai, getConversationStepsHandler as aj, getWorkingMemoryHandler as ak, mapLogResponse as al, mapHandlerResponse as am, getResponseStatus as an, type OpenApiInfo as ao, type AppSetupConfig as ap, getOrCreateLogger as aq, shouldEnableSwaggerUI as ar, getOpenApiDoc as as, DEFAULT_CORS_OPTIONS as at, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
package/dist/edge.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ag as getConversationMessagesHandler, ah as getConversationStepsHandler, ao as getOrCreateLogger, ai as getWorkingMemoryHandler, _ as handleChatStream, a5 as handleExecuteWorkflow, $ as handleGenerateObject, Y as handleGenerateText, a1 as handleGetAgent, a2 as handleGetAgentHistory, X as handleGetAgents, ad as handleGetLogs, a4 as handleGetWorkflow, aa as handleGetWorkflowState, a3 as handleGetWorkflows, a9 as handleResumeWorkflow, a0 as handleStreamObject, Z as handleStreamText, a6 as handleStreamWorkflow, a7 as handleSuspendWorkflow, i as isErrorResponse, af as listMemoryConversationsHandler, ae as listMemoryUsersHandler, aj as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-CtOnFGMl.mjs';
1
+ export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ai as getConversationMessagesHandler, aj as getConversationStepsHandler, aq as getOrCreateLogger, ak as getWorkingMemoryHandler, $ as handleChatStream, a6 as handleExecuteWorkflow, a0 as handleGenerateObject, Z as handleGenerateText, a2 as handleGetAgent, a3 as handleGetAgentHistory, Y as handleGetAgents, af as handleGetLogs, a5 as handleGetWorkflow, ac as handleGetWorkflowState, a4 as handleGetWorkflows, ab as handleListWorkflowRuns, aa as handleResumeWorkflow, a1 as handleStreamObject, _ as handleStreamText, a7 as handleStreamWorkflow, a8 as handleSuspendWorkflow, i as isErrorResponse, ah as listMemoryConversationsHandler, ag as listMemoryUsersHandler, al as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-YtITyx6y.mjs';
2
2
  import '@voltagent/core';
3
3
  import '@voltagent/internal';
4
4
  import 'ai';
package/dist/edge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ag as getConversationMessagesHandler, ah as getConversationStepsHandler, ao as getOrCreateLogger, ai as getWorkingMemoryHandler, _ as handleChatStream, a5 as handleExecuteWorkflow, $ as handleGenerateObject, Y as handleGenerateText, a1 as handleGetAgent, a2 as handleGetAgentHistory, X as handleGetAgents, ad as handleGetLogs, a4 as handleGetWorkflow, aa as handleGetWorkflowState, a3 as handleGetWorkflows, a9 as handleResumeWorkflow, a0 as handleStreamObject, Z as handleStreamText, a6 as handleStreamWorkflow, a7 as handleSuspendWorkflow, i as isErrorResponse, af as listMemoryConversationsHandler, ae as listMemoryUsersHandler, aj as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-CtOnFGMl.js';
1
+ export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ai as getConversationMessagesHandler, aj as getConversationStepsHandler, aq as getOrCreateLogger, ak as getWorkingMemoryHandler, $ as handleChatStream, a6 as handleExecuteWorkflow, a0 as handleGenerateObject, Z as handleGenerateText, a2 as handleGetAgent, a3 as handleGetAgentHistory, Y as handleGetAgents, af as handleGetLogs, a5 as handleGetWorkflow, ac as handleGetWorkflowState, a4 as handleGetWorkflows, ab as handleListWorkflowRuns, aa as handleResumeWorkflow, a1 as handleStreamObject, _ as handleStreamText, a7 as handleStreamWorkflow, a8 as handleSuspendWorkflow, i as isErrorResponse, ah as listMemoryConversationsHandler, ag as listMemoryUsersHandler, al as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-YtITyx6y.js';
2
2
  import '@voltagent/core';
3
3
  import '@voltagent/internal';
4
4
  import 'ai';
package/dist/edge.js CHANGED
@@ -43,6 +43,7 @@ __export(edge_exports, {
43
43
  handleGetWorkflow: () => handleGetWorkflow,
44
44
  handleGetWorkflowState: () => handleGetWorkflowState,
45
45
  handleGetWorkflows: () => handleGetWorkflows,
46
+ handleListWorkflowRuns: () => handleListWorkflowRuns,
46
47
  handleResumeWorkflow: () => handleResumeWorkflow,
47
48
  handleStreamObject: () => handleStreamObject,
48
49
  handleStreamText: () => handleStreamText,
@@ -300,6 +301,32 @@ var WORKFLOW_ROUTES = {
300
301
  }
301
302
  }
302
303
  },
304
+ listWorkflowRuns: {
305
+ method: "get",
306
+ path: "/workflows/executions",
307
+ summary: "List workflow executions (query-driven)",
308
+ description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.",
309
+ tags: ["Workflow Management"],
310
+ operationId: "listWorkflowRuns",
311
+ responses: {
312
+ 200: {
313
+ description: "Successfully retrieved workflow executions",
314
+ contentType: "application/json"
315
+ },
316
+ 400: {
317
+ description: "Invalid query parameters",
318
+ contentType: "application/json"
319
+ },
320
+ 404: {
321
+ description: "Workflow not found",
322
+ contentType: "application/json"
323
+ },
324
+ 500: {
325
+ description: "Failed to retrieve workflow executions due to server error",
326
+ contentType: "application/json"
327
+ }
328
+ }
329
+ },
303
330
  executeWorkflow: {
304
331
  method: "post",
305
332
  path: "/workflows/:id/execute",
@@ -815,9 +842,56 @@ var OBSERVABILITY_MEMORY_ROUTES = {
815
842
  }
816
843
  }
817
844
  };
845
+ var TOOL_ROUTES = {
846
+ listTools: {
847
+ method: "get",
848
+ path: "/tools",
849
+ summary: "List all tools",
850
+ description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.",
851
+ tags: ["Tools"],
852
+ operationId: "listTools",
853
+ responses: {
854
+ 200: {
855
+ description: "Successfully retrieved list of tools",
856
+ contentType: "application/json"
857
+ },
858
+ 500: {
859
+ description: "Failed to retrieve tools due to server error",
860
+ contentType: "application/json"
861
+ }
862
+ }
863
+ },
864
+ executeTool: {
865
+ method: "post",
866
+ path: "/tools/:name/execute",
867
+ summary: "Execute a tool directly",
868
+ description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.",
869
+ tags: ["Tools"],
870
+ operationId: "executeTool",
871
+ responses: {
872
+ 200: {
873
+ description: "Successfully executed tool",
874
+ contentType: "application/json"
875
+ },
876
+ 400: {
877
+ description: "Invalid request or tool input",
878
+ contentType: "application/json"
879
+ },
880
+ 404: {
881
+ description: "Tool not found",
882
+ contentType: "application/json"
883
+ },
884
+ 500: {
885
+ description: "Failed to execute tool due to server error",
886
+ contentType: "application/json"
887
+ }
888
+ }
889
+ }
890
+ };
818
891
  var ALL_ROUTES = {
819
892
  ...AGENT_ROUTES,
820
893
  ...WORKFLOW_ROUTES,
894
+ ...TOOL_ROUTES,
821
895
  ...LOG_ROUTES,
822
896
  ...UPDATE_ROUTES,
823
897
  ...OBSERVABILITY_ROUTES,
@@ -1323,6 +1397,7 @@ async function handleGetWorkflow(workflowId, deps, logger) {
1323
1397
  }
1324
1398
  const registeredWorkflow = deps.workflowRegistry.getWorkflow(workflowId);
1325
1399
  let inputSchema = null;
1400
+ let resultSchema = null;
1326
1401
  let suspendSchema = null;
1327
1402
  let resumeSchema = null;
1328
1403
  if (registeredWorkflow?.inputSchema) {
@@ -1332,6 +1407,13 @@ async function handleGetWorkflow(workflowId, deps, logger) {
1332
1407
  logger.warn("Failed to convert input schema to JSON schema:", { error });
1333
1408
  }
1334
1409
  }
1410
+ if (registeredWorkflow?.resultSchema) {
1411
+ try {
1412
+ resultSchema = (0, import_core5.zodSchemaToJsonUI)(registeredWorkflow.resultSchema);
1413
+ } catch (error) {
1414
+ logger.warn("Failed to convert result schema to JSON schema:", { error });
1415
+ }
1416
+ }
1335
1417
  if (registeredWorkflow?.suspendSchema) {
1336
1418
  try {
1337
1419
  suspendSchema = (0, import_core5.zodSchemaToJsonUI)(registeredWorkflow.suspendSchema);
@@ -1394,6 +1476,7 @@ async function handleGetWorkflow(workflowId, deps, logger) {
1394
1476
  data: {
1395
1477
  ...workflowData,
1396
1478
  inputSchema,
1479
+ resultSchema,
1397
1480
  suspendSchema,
1398
1481
  resumeSchema
1399
1482
  }
@@ -1611,6 +1694,79 @@ async function handleResumeWorkflow(workflowId, executionId, body, deps, logger)
1611
1694
  }
1612
1695
  }
1613
1696
  __name(handleResumeWorkflow, "handleResumeWorkflow");
1697
+ function formatWorkflowState(workflowState) {
1698
+ return {
1699
+ ...workflowState,
1700
+ createdAt: workflowState.createdAt instanceof Date ? workflowState.createdAt.toISOString() : workflowState.createdAt,
1701
+ updatedAt: workflowState.updatedAt instanceof Date ? workflowState.updatedAt.toISOString() : workflowState.updatedAt,
1702
+ suspension: workflowState.suspension ? {
1703
+ ...workflowState.suspension,
1704
+ suspendedAt: workflowState.suspension.suspendedAt instanceof Date ? workflowState.suspension.suspendedAt.toISOString() : workflowState.suspension.suspendedAt
1705
+ } : void 0
1706
+ };
1707
+ }
1708
+ __name(formatWorkflowState, "formatWorkflowState");
1709
+ async function handleListWorkflowRuns(workflowId, query, deps, logger) {
1710
+ try {
1711
+ const effectiveWorkflowId = query?.workflowId ?? workflowId;
1712
+ const filters = {
1713
+ workflowId: effectiveWorkflowId,
1714
+ status: query?.status,
1715
+ limit: query?.limit ? Number(query.limit) : void 0,
1716
+ offset: query?.offset ? Number(query.offset) : void 0
1717
+ };
1718
+ if (query?.from) {
1719
+ const fromDate = new Date(query.from);
1720
+ if (!Number.isNaN(fromDate.getTime())) {
1721
+ filters.from = fromDate;
1722
+ }
1723
+ }
1724
+ if (query?.to) {
1725
+ const toDate = new Date(query.to);
1726
+ if (!Number.isNaN(toDate.getTime())) {
1727
+ filters.to = toDate;
1728
+ }
1729
+ }
1730
+ if (effectiveWorkflowId) {
1731
+ const registeredWorkflow = deps.workflowRegistry.getWorkflow(effectiveWorkflowId);
1732
+ if (!registeredWorkflow) {
1733
+ return {
1734
+ success: false,
1735
+ error: `Workflow with id ${effectiveWorkflowId} not found`
1736
+ };
1737
+ }
1738
+ const workflowStates = await registeredWorkflow.workflow.memory.queryWorkflowRuns(filters);
1739
+ const formattedStates2 = workflowStates.map((state) => formatWorkflowState(state));
1740
+ return {
1741
+ success: true,
1742
+ data: formattedStates2
1743
+ };
1744
+ }
1745
+ const allWorkflowIds = deps.workflowRegistry.getAllWorkflowIds?.() ?? [];
1746
+ const results = [];
1747
+ for (const id of allWorkflowIds) {
1748
+ const registeredWorkflow = deps.workflowRegistry.getWorkflow(id);
1749
+ if (!registeredWorkflow) continue;
1750
+ const states = await registeredWorkflow.workflow.memory.queryWorkflowRuns({
1751
+ ...filters,
1752
+ workflowId: id
1753
+ });
1754
+ results.push(...states);
1755
+ }
1756
+ const formattedStates = results.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime()).map((state) => formatWorkflowState(state));
1757
+ return {
1758
+ success: true,
1759
+ data: formattedStates
1760
+ };
1761
+ } catch (error) {
1762
+ logger.error("Failed to get workflow states", { error });
1763
+ return {
1764
+ success: false,
1765
+ error: error instanceof Error ? error.message : "Failed to get workflow states"
1766
+ };
1767
+ }
1768
+ }
1769
+ __name(handleListWorkflowRuns, "handleListWorkflowRuns");
1614
1770
  async function handleGetWorkflowState(workflowId, executionId, deps, logger) {
1615
1771
  try {
1616
1772
  const registeredWorkflow = deps.workflowRegistry.getWorkflow(workflowId);
@@ -1627,15 +1783,7 @@ async function handleGetWorkflowState(workflowId, executionId, deps, logger) {
1627
1783
  error: `Workflow execution state for ${executionId} not found`
1628
1784
  };
1629
1785
  }
1630
- const formattedState = {
1631
- ...workflowState,
1632
- createdAt: workflowState.createdAt instanceof Date ? workflowState.createdAt.toISOString() : workflowState.createdAt,
1633
- updatedAt: workflowState.updatedAt instanceof Date ? workflowState.updatedAt.toISOString() : workflowState.updatedAt,
1634
- suspension: workflowState.suspension ? {
1635
- ...workflowState.suspension,
1636
- suspendedAt: workflowState.suspension.suspendedAt instanceof Date ? workflowState.suspension.suspendedAt.toISOString() : workflowState.suspension.suspendedAt
1637
- } : void 0
1638
- };
1786
+ const formattedState = formatWorkflowState(workflowState);
1639
1787
  return {
1640
1788
  success: true,
1641
1789
  data: formattedState
@@ -2229,6 +2377,7 @@ __name(mapLogResponse, "mapLogResponse");
2229
2377
  handleGetWorkflow,
2230
2378
  handleGetWorkflowState,
2231
2379
  handleGetWorkflows,
2380
+ handleListWorkflowRuns,
2232
2381
  handleResumeWorkflow,
2233
2382
  handleStreamObject,
2234
2383
  handleStreamText,