@voltagent/server-core 2.1.3 → 2.1.5

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.
@@ -332,6 +332,124 @@ declare const AGENT_ROUTES: {
332
332
  };
333
333
  };
334
334
  };
335
+ readonly getWorkspace: {
336
+ readonly method: "get";
337
+ readonly path: "/agents/:id/workspace";
338
+ readonly summary: "Get agent workspace info";
339
+ readonly description: "Retrieve workspace configuration metadata for an agent, including capabilities (filesystem, sandbox, search, skills).";
340
+ readonly tags: readonly ["Agent Workspace"];
341
+ readonly operationId: "getAgentWorkspace";
342
+ readonly responses: {
343
+ readonly 200: {
344
+ readonly description: "Successfully retrieved workspace info";
345
+ readonly contentType: "application/json";
346
+ };
347
+ readonly 404: {
348
+ readonly description: "Agent or workspace not found";
349
+ readonly contentType: "application/json";
350
+ };
351
+ readonly 500: {
352
+ readonly description: "Failed to retrieve workspace info due to server error";
353
+ readonly contentType: "application/json";
354
+ };
355
+ };
356
+ };
357
+ readonly listWorkspaceFiles: {
358
+ readonly method: "get";
359
+ readonly path: "/agents/:id/workspace/ls";
360
+ readonly summary: "List workspace files";
361
+ readonly description: "List files and directories under a workspace path.";
362
+ readonly tags: readonly ["Agent Workspace"];
363
+ readonly operationId: "listWorkspaceFiles";
364
+ readonly responses: {
365
+ readonly 200: {
366
+ readonly description: "Successfully listed workspace files";
367
+ readonly contentType: "application/json";
368
+ };
369
+ readonly 400: {
370
+ readonly description: "Invalid request parameters";
371
+ readonly contentType: "application/json";
372
+ };
373
+ readonly 404: {
374
+ readonly description: "Agent or workspace not found";
375
+ readonly contentType: "application/json";
376
+ };
377
+ readonly 500: {
378
+ readonly description: "Failed to list workspace files due to server error";
379
+ readonly contentType: "application/json";
380
+ };
381
+ };
382
+ };
383
+ readonly readWorkspaceFile: {
384
+ readonly method: "get";
385
+ readonly path: "/agents/:id/workspace/read";
386
+ readonly summary: "Read workspace file";
387
+ readonly description: "Read a file from the workspace filesystem.";
388
+ readonly tags: readonly ["Agent Workspace"];
389
+ readonly operationId: "readWorkspaceFile";
390
+ readonly responses: {
391
+ readonly 200: {
392
+ readonly description: "Successfully read workspace file";
393
+ readonly contentType: "application/json";
394
+ };
395
+ readonly 400: {
396
+ readonly description: "Invalid request parameters";
397
+ readonly contentType: "application/json";
398
+ };
399
+ readonly 404: {
400
+ readonly description: "Agent or workspace not found";
401
+ readonly contentType: "application/json";
402
+ };
403
+ readonly 500: {
404
+ readonly description: "Failed to read workspace file due to server error";
405
+ readonly contentType: "application/json";
406
+ };
407
+ };
408
+ };
409
+ readonly listWorkspaceSkills: {
410
+ readonly method: "get";
411
+ readonly path: "/agents/:id/workspace/skills";
412
+ readonly summary: "List workspace skills";
413
+ readonly description: "List available workspace skills for an agent.";
414
+ readonly tags: readonly ["Agent Workspace"];
415
+ readonly operationId: "listWorkspaceSkills";
416
+ readonly responses: {
417
+ readonly 200: {
418
+ readonly description: "Successfully listed workspace skills";
419
+ readonly contentType: "application/json";
420
+ };
421
+ readonly 404: {
422
+ readonly description: "Agent, workspace, or skills not found";
423
+ readonly contentType: "application/json";
424
+ };
425
+ readonly 500: {
426
+ readonly description: "Failed to list workspace skills due to server error";
427
+ readonly contentType: "application/json";
428
+ };
429
+ };
430
+ };
431
+ readonly getWorkspaceSkill: {
432
+ readonly method: "get";
433
+ readonly path: "/agents/:id/workspace/skills/:skillId";
434
+ readonly summary: "Get workspace skill";
435
+ readonly description: "Retrieve a specific workspace skill including its instructions.";
436
+ readonly tags: readonly ["Agent Workspace"];
437
+ readonly operationId: "getWorkspaceSkill";
438
+ readonly responses: {
439
+ readonly 200: {
440
+ readonly description: "Successfully retrieved workspace skill";
441
+ readonly contentType: "application/json";
442
+ };
443
+ readonly 404: {
444
+ readonly description: "Agent, workspace, or skill not found";
445
+ readonly contentType: "application/json";
446
+ };
447
+ readonly 500: {
448
+ readonly description: "Failed to retrieve workspace skill due to server error";
449
+ readonly contentType: "application/json";
450
+ };
451
+ };
452
+ };
335
453
  };
336
454
  /**
337
455
  * Workflow route definitions
@@ -381,7 +499,7 @@ declare const WORKFLOW_ROUTES: {
381
499
  readonly method: "get";
382
500
  readonly path: "/workflows/executions";
383
501
  readonly summary: "List workflow executions (query-driven)";
384
- readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
502
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset, userId) without path parameters. You can also filter metadata with `metadata` (JSON object) or key-based params such as `metadata.tenantId=acme`.";
385
503
  readonly tags: readonly ["Workflow Management"];
386
504
  readonly operationId: "listWorkflowRuns";
387
505
  readonly responses: {
@@ -1987,7 +2105,7 @@ declare const ALL_ROUTES: {
1987
2105
  readonly method: "get";
1988
2106
  readonly path: "/workflows/executions";
1989
2107
  readonly summary: "List workflow executions (query-driven)";
1990
- readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
2108
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset, userId) without path parameters. You can also filter metadata with `metadata` (JSON object) or key-based params such as `metadata.tenantId=acme`.";
1991
2109
  readonly tags: readonly ["Workflow Management"];
1992
2110
  readonly operationId: "listWorkflowRuns";
1993
2111
  readonly responses: {
@@ -2383,6 +2501,124 @@ declare const ALL_ROUTES: {
2383
2501
  };
2384
2502
  };
2385
2503
  };
2504
+ readonly getWorkspace: {
2505
+ readonly method: "get";
2506
+ readonly path: "/agents/:id/workspace";
2507
+ readonly summary: "Get agent workspace info";
2508
+ readonly description: "Retrieve workspace configuration metadata for an agent, including capabilities (filesystem, sandbox, search, skills).";
2509
+ readonly tags: readonly ["Agent Workspace"];
2510
+ readonly operationId: "getAgentWorkspace";
2511
+ readonly responses: {
2512
+ readonly 200: {
2513
+ readonly description: "Successfully retrieved workspace info";
2514
+ readonly contentType: "application/json";
2515
+ };
2516
+ readonly 404: {
2517
+ readonly description: "Agent or workspace not found";
2518
+ readonly contentType: "application/json";
2519
+ };
2520
+ readonly 500: {
2521
+ readonly description: "Failed to retrieve workspace info due to server error";
2522
+ readonly contentType: "application/json";
2523
+ };
2524
+ };
2525
+ };
2526
+ readonly listWorkspaceFiles: {
2527
+ readonly method: "get";
2528
+ readonly path: "/agents/:id/workspace/ls";
2529
+ readonly summary: "List workspace files";
2530
+ readonly description: "List files and directories under a workspace path.";
2531
+ readonly tags: readonly ["Agent Workspace"];
2532
+ readonly operationId: "listWorkspaceFiles";
2533
+ readonly responses: {
2534
+ readonly 200: {
2535
+ readonly description: "Successfully listed workspace files";
2536
+ readonly contentType: "application/json";
2537
+ };
2538
+ readonly 400: {
2539
+ readonly description: "Invalid request parameters";
2540
+ readonly contentType: "application/json";
2541
+ };
2542
+ readonly 404: {
2543
+ readonly description: "Agent or workspace not found";
2544
+ readonly contentType: "application/json";
2545
+ };
2546
+ readonly 500: {
2547
+ readonly description: "Failed to list workspace files due to server error";
2548
+ readonly contentType: "application/json";
2549
+ };
2550
+ };
2551
+ };
2552
+ readonly readWorkspaceFile: {
2553
+ readonly method: "get";
2554
+ readonly path: "/agents/:id/workspace/read";
2555
+ readonly summary: "Read workspace file";
2556
+ readonly description: "Read a file from the workspace filesystem.";
2557
+ readonly tags: readonly ["Agent Workspace"];
2558
+ readonly operationId: "readWorkspaceFile";
2559
+ readonly responses: {
2560
+ readonly 200: {
2561
+ readonly description: "Successfully read workspace file";
2562
+ readonly contentType: "application/json";
2563
+ };
2564
+ readonly 400: {
2565
+ readonly description: "Invalid request parameters";
2566
+ readonly contentType: "application/json";
2567
+ };
2568
+ readonly 404: {
2569
+ readonly description: "Agent or workspace not found";
2570
+ readonly contentType: "application/json";
2571
+ };
2572
+ readonly 500: {
2573
+ readonly description: "Failed to read workspace file due to server error";
2574
+ readonly contentType: "application/json";
2575
+ };
2576
+ };
2577
+ };
2578
+ readonly listWorkspaceSkills: {
2579
+ readonly method: "get";
2580
+ readonly path: "/agents/:id/workspace/skills";
2581
+ readonly summary: "List workspace skills";
2582
+ readonly description: "List available workspace skills for an agent.";
2583
+ readonly tags: readonly ["Agent Workspace"];
2584
+ readonly operationId: "listWorkspaceSkills";
2585
+ readonly responses: {
2586
+ readonly 200: {
2587
+ readonly description: "Successfully listed workspace skills";
2588
+ readonly contentType: "application/json";
2589
+ };
2590
+ readonly 404: {
2591
+ readonly description: "Agent, workspace, or skills not found";
2592
+ readonly contentType: "application/json";
2593
+ };
2594
+ readonly 500: {
2595
+ readonly description: "Failed to list workspace skills due to server error";
2596
+ readonly contentType: "application/json";
2597
+ };
2598
+ };
2599
+ };
2600
+ readonly getWorkspaceSkill: {
2601
+ readonly method: "get";
2602
+ readonly path: "/agents/:id/workspace/skills/:skillId";
2603
+ readonly summary: "Get workspace skill";
2604
+ readonly description: "Retrieve a specific workspace skill including its instructions.";
2605
+ readonly tags: readonly ["Agent Workspace"];
2606
+ readonly operationId: "getWorkspaceSkill";
2607
+ readonly responses: {
2608
+ readonly 200: {
2609
+ readonly description: "Successfully retrieved workspace skill";
2610
+ readonly contentType: "application/json";
2611
+ };
2612
+ readonly 404: {
2613
+ readonly description: "Agent, workspace, or skill not found";
2614
+ readonly contentType: "application/json";
2615
+ };
2616
+ readonly 500: {
2617
+ readonly description: "Failed to retrieve workspace skill due to server error";
2618
+ readonly contentType: "application/json";
2619
+ };
2620
+ };
2621
+ };
2386
2622
  };
2387
2623
  /**
2388
2624
  * Helper to get all routes as an array
@@ -2794,6 +3030,34 @@ declare function handleGetAgent(agentId: string, deps: ServerProviderDeps, logge
2794
3030
  * Returns agent history data
2795
3031
  */
2796
3032
  declare function handleGetAgentHistory(agentId: string, page: number, limit: number, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3033
+ /**
3034
+ * Handler for getting agent workspace info
3035
+ */
3036
+ declare function handleGetAgentWorkspaceInfo(agentId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3037
+ /**
3038
+ * Handler for listing workspace files
3039
+ */
3040
+ declare function handleListAgentWorkspaceFiles(agentId: string, options: {
3041
+ path?: string;
3042
+ }, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3043
+ /**
3044
+ * Handler for reading a workspace file
3045
+ */
3046
+ declare function handleReadAgentWorkspaceFile(agentId: string, options: {
3047
+ path?: string;
3048
+ offset?: unknown;
3049
+ limit?: unknown;
3050
+ }, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3051
+ /**
3052
+ * Handler for listing workspace skills
3053
+ */
3054
+ declare function handleListAgentWorkspaceSkills(agentId: string, options: {
3055
+ refresh?: unknown;
3056
+ }, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3057
+ /**
3058
+ * Handler for reading a workspace skill
3059
+ */
3060
+ declare function handleGetAgentWorkspaceSkill(agentId: string, skillId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2797
3061
 
2798
3062
  /**
2799
3063
  * Log filter options for querying logs
@@ -2854,17 +3118,20 @@ declare function handleCancelWorkflow(executionId: string, body: any, deps: Serv
2854
3118
  * Returns resume result
2855
3119
  */
2856
3120
  declare function handleResumeWorkflow(workflowId: string, executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3121
+ type WorkflowRunsQuery = {
3122
+ status?: string | number;
3123
+ from?: string | number;
3124
+ to?: string | number;
3125
+ limit?: string | number;
3126
+ offset?: string | number;
3127
+ workflowId?: string | number;
3128
+ userId?: string | number;
3129
+ metadata?: string;
3130
+ } & Record<string, string | number | undefined>;
2857
3131
  /**
2858
3132
  * Handler for listing workflow execution runs
2859
3133
  */
2860
- declare function handleListWorkflowRuns(workflowId: string | undefined, query: {
2861
- status?: string;
2862
- from?: string;
2863
- to?: string;
2864
- limit?: string;
2865
- offset?: string;
2866
- workflowId?: string;
2867
- } | undefined, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3134
+ declare function handleListWorkflowRuns(workflowId: string | undefined, query: WorkflowRunsQuery | undefined, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2868
3135
  /**
2869
3136
  * Handler for getting workflow execution state
2870
3137
  * Returns workflow state from Memory V2
@@ -3133,4 +3400,4 @@ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiRe
3133
3400
  */
3134
3401
  declare function getResponseStatus(response: ApiResponse): number;
3135
3402
 
3136
- export { handleStreamText as $, type ApiResponse as A, type JsonRpcResponse as B, type JsonRpcStream as C, type JsonRpcHandlerResult as D, type ErrorResponse as E, type JsonRpcRequest as F, type A2ARequestContext as G, type HttpMethod as H, type AgentCardSkill as I, type JsonRpcError as J, type AgentCardProviderInfo as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCardCapabilities as N, OBSERVABILITY_ROUTES as O, type AgentCard as P, A2AErrorCode 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, normalizeError as X, isJsonRpcRequest as Y, handleGetAgents as Z, handleGenerateText as _, type A2AServerLikeWithHandlers as a, handleChatStream as a0, handleResumeChatStream as a1, handleGenerateObject as a2, handleStreamObject as a3, handleGetAgent as a4, handleGetAgentHistory as a5, handleGetWorkflows as a6, handleGetWorkflow as a7, handleExecuteWorkflow as a8, handleStreamWorkflow as a9, mapHandlerResponse as aA, getResponseStatus as aB, type OpenApiInfo as aC, type AppSetupConfig as aD, getOrCreateLogger as aE, shouldEnableSwaggerUI as aF, getOpenApiDoc as aG, DEFAULT_CORS_OPTIONS as aH, handleSuspendWorkflow as aa, handleCancelWorkflow as ab, handleResumeWorkflow as ac, handleListWorkflowRuns as ad, handleGetWorkflowState as ae, type LogFilterOptions as af, type LogHandlerResponse as ag, handleGetLogs as ah, handleListMemoryConversations as ai, handleGetMemoryConversation as aj, handleListMemoryConversationMessages as ak, handleGetMemoryWorkingMemory as al, handleSaveMemoryMessages as am, handleCreateMemoryConversation as an, handleUpdateMemoryConversation as ao, handleDeleteMemoryConversation as ap, handleCloneMemoryConversation as aq, handleUpdateMemoryWorkingMemory as ar, handleDeleteMemoryMessages as as, handleSearchMemory as at, listMemoryUsersHandler as au, listMemoryConversationsHandler as av, getConversationMessagesHandler as aw, getConversationStepsHandler as ax, getWorkingMemoryHandler as ay, mapLogResponse as az, 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, MEMORY_ROUTES as q, ALL_ROUTES as r, getAllRoutesArray as s, MCP_ROUTES as t, A2A_ROUTES as u, getRoutesByTag as v, parseJsonRpcRequest as w, resolveAgentCard as x, executeA2ARequest as y, type A2AJsonRpcId as z };
3403
+ export { handleStreamText as $, type ApiResponse as A, type JsonRpcResponse as B, type JsonRpcStream as C, type JsonRpcHandlerResult as D, type ErrorResponse as E, type JsonRpcRequest as F, type A2ARequestContext as G, type HttpMethod as H, type AgentCardSkill as I, type JsonRpcError as J, type AgentCardProviderInfo as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCardCapabilities as N, OBSERVABILITY_ROUTES as O, type AgentCard as P, A2AErrorCode 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, normalizeError as X, isJsonRpcRequest as Y, handleGetAgents as Z, handleGenerateText as _, type A2AServerLikeWithHandlers as a, handleChatStream as a0, handleResumeChatStream as a1, handleGenerateObject as a2, handleStreamObject as a3, handleGetAgent as a4, handleGetAgentHistory as a5, handleGetAgentWorkspaceInfo as a6, handleListAgentWorkspaceFiles as a7, handleReadAgentWorkspaceFile as a8, handleListAgentWorkspaceSkills as a9, listMemoryConversationsHandler as aA, getConversationMessagesHandler as aB, getConversationStepsHandler as aC, getWorkingMemoryHandler as aD, mapLogResponse as aE, mapHandlerResponse as aF, getResponseStatus as aG, type OpenApiInfo as aH, type AppSetupConfig as aI, getOrCreateLogger as aJ, shouldEnableSwaggerUI as aK, getOpenApiDoc as aL, DEFAULT_CORS_OPTIONS as aM, handleGetAgentWorkspaceSkill as aa, handleGetWorkflows as ab, handleGetWorkflow as ac, handleExecuteWorkflow as ad, handleStreamWorkflow as ae, handleSuspendWorkflow as af, handleCancelWorkflow as ag, handleResumeWorkflow as ah, handleListWorkflowRuns as ai, handleGetWorkflowState as aj, type LogFilterOptions as ak, type LogHandlerResponse as al, handleGetLogs as am, handleListMemoryConversations as an, handleGetMemoryConversation as ao, handleListMemoryConversationMessages as ap, handleGetMemoryWorkingMemory as aq, handleSaveMemoryMessages as ar, handleCreateMemoryConversation as as, handleUpdateMemoryConversation as at, handleDeleteMemoryConversation as au, handleCloneMemoryConversation as av, handleUpdateMemoryWorkingMemory as aw, handleDeleteMemoryMessages as ax, handleSearchMemory as ay, listMemoryUsersHandler as az, 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, MEMORY_ROUTES as q, ALL_ROUTES as r, getAllRoutesArray as s, MCP_ROUTES as t, A2A_ROUTES as u, getRoutesByTag as v, parseJsonRpcRequest as w, resolveAgentCard as x, executeA2ARequest as y, type A2AJsonRpcId as z };