@voltagent/server-core 1.0.11 → 1.0.12

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.
@@ -0,0 +1,1889 @@
1
+ import { ServerProviderDeps, A2AServerRegistry } from '@voltagent/core';
2
+ import { Logger, LogLevel, LogEntry, LogFilter } from '@voltagent/internal';
3
+ import { A2AServerLike } from '@voltagent/internal/a2a';
4
+
5
+ /**
6
+ * Common app setup utilities
7
+ * Framework-agnostic application configuration helpers
8
+ */
9
+
10
+ /**
11
+ * OpenAPI documentation info
12
+ */
13
+ interface OpenApiInfo {
14
+ version?: string;
15
+ title?: string;
16
+ description?: string;
17
+ }
18
+ /**
19
+ * Common app setup configuration
20
+ */
21
+ interface AppSetupConfig {
22
+ /**
23
+ * Enable Swagger UI
24
+ */
25
+ enableSwaggerUI?: boolean;
26
+ /**
27
+ * CORS options
28
+ */
29
+ corsOptions?: any;
30
+ /**
31
+ * OpenAPI documentation info
32
+ */
33
+ openApiInfo?: OpenApiInfo;
34
+ /**
35
+ * Server port for documentation
36
+ */
37
+ port?: number;
38
+ }
39
+ /**
40
+ * Get or create a logger instance
41
+ * @param deps Server provider dependencies
42
+ * @param component Component name for logger
43
+ * @returns Logger instance
44
+ */
45
+ declare function getOrCreateLogger(deps: ServerProviderDeps, component?: string): Logger;
46
+ /**
47
+ * Check if Swagger UI should be enabled
48
+ * @param config App configuration
49
+ * @returns Whether Swagger UI should be enabled
50
+ */
51
+ declare function shouldEnableSwaggerUI(config: {
52
+ enableSwaggerUI?: boolean;
53
+ }): boolean;
54
+ /**
55
+ * Get default OpenAPI documentation info
56
+ * @param port Server port
57
+ * @returns OpenAPI documentation object
58
+ */
59
+ declare function getOpenApiDoc(port: number, info?: OpenApiInfo): {
60
+ openapi: "3.1.0";
61
+ info: {
62
+ version: string;
63
+ title: string;
64
+ description: string;
65
+ };
66
+ servers: {
67
+ url: string;
68
+ description: string;
69
+ }[];
70
+ };
71
+ /**
72
+ * Default CORS configuration
73
+ */
74
+ declare const DEFAULT_CORS_OPTIONS: {
75
+ origin: string;
76
+ methods: string[];
77
+ allowedHeaders: string[];
78
+ credentials: boolean;
79
+ };
80
+
81
+ /**
82
+ * Framework-agnostic route definitions
83
+ * These can be used by any server implementation (Hono, Fastify, Express, etc.)
84
+ */
85
+ /**
86
+ * HTTP methods
87
+ */
88
+ type HttpMethod = "get" | "post" | "put" | "patch" | "delete" | "options" | "head";
89
+ /**
90
+ * Response definition for a specific status code
91
+ */
92
+ interface ResponseDefinition {
93
+ description: string;
94
+ contentType?: string;
95
+ }
96
+ /**
97
+ * Base route definition that can be used by any framework
98
+ */
99
+ interface RouteDefinition {
100
+ method: HttpMethod;
101
+ path: string;
102
+ summary: string;
103
+ description: string;
104
+ tags: string[];
105
+ operationId?: string;
106
+ responses?: Record<number, ResponseDefinition>;
107
+ }
108
+ /**
109
+ * Agent route definitions
110
+ */
111
+ declare const AGENT_ROUTES: {
112
+ readonly listAgents: {
113
+ readonly method: "get";
114
+ readonly path: "/agents";
115
+ readonly summary: "List all registered agents";
116
+ readonly description: "Retrieve a comprehensive list of all agents registered in the system. Each agent includes its configuration, status, model information, tools, sub-agents, and memory settings. Use this endpoint to discover available agents and their capabilities.";
117
+ readonly tags: readonly ["Agent Management"];
118
+ readonly operationId: "listAgents";
119
+ readonly responses: {
120
+ readonly 200: {
121
+ readonly description: "Successfully retrieved list of all registered agents";
122
+ readonly contentType: "application/json";
123
+ };
124
+ readonly 500: {
125
+ readonly description: "Failed to retrieve agents due to server error";
126
+ readonly contentType: "application/json";
127
+ };
128
+ };
129
+ };
130
+ readonly getAgent: {
131
+ readonly method: "get";
132
+ readonly path: "/agents/:id";
133
+ readonly summary: "Get agent by ID";
134
+ readonly description: "Retrieve detailed information about a specific agent by its ID.";
135
+ readonly tags: readonly ["Agent Management"];
136
+ readonly operationId: "getAgent";
137
+ readonly responses: {
138
+ readonly 200: {
139
+ readonly description: "Successfully retrieved agent details";
140
+ readonly contentType: "application/json";
141
+ };
142
+ readonly 404: {
143
+ readonly description: "Agent not found";
144
+ readonly contentType: "application/json";
145
+ };
146
+ readonly 500: {
147
+ readonly description: "Failed to retrieve agent due to server error";
148
+ readonly contentType: "application/json";
149
+ };
150
+ };
151
+ };
152
+ readonly generateText: {
153
+ readonly method: "post";
154
+ readonly path: "/agents/:id/text";
155
+ readonly summary: "Generate text response";
156
+ readonly description: "Generate a text response from an agent using the provided conversation history. This endpoint processes messages synchronously and returns the complete response once generation is finished. Use this for traditional request-response interactions where you need the full response before proceeding.";
157
+ readonly tags: readonly ["Agent Generation"];
158
+ readonly operationId: "generateText";
159
+ readonly responses: {
160
+ readonly 200: {
161
+ readonly description: "Successfully generated text response from the agent";
162
+ readonly contentType: "application/json";
163
+ };
164
+ readonly 400: {
165
+ readonly description: "Invalid request parameters or message format";
166
+ readonly contentType: "application/json";
167
+ };
168
+ readonly 404: {
169
+ readonly description: "Agent not found";
170
+ readonly contentType: "application/json";
171
+ };
172
+ readonly 500: {
173
+ readonly description: "Failed to generate text due to server error";
174
+ readonly contentType: "application/json";
175
+ };
176
+ };
177
+ };
178
+ readonly streamText: {
179
+ readonly method: "post";
180
+ readonly path: "/agents/:id/stream";
181
+ readonly summary: "Stream raw text response";
182
+ readonly description: "Generate a text response from an agent and stream the raw fullStream data via Server-Sent Events (SSE). This endpoint provides direct access to all stream events including text deltas, tool calls, and tool results. Use this for advanced applications that need full control over stream processing.";
183
+ readonly tags: readonly ["Agent Generation"];
184
+ readonly operationId: "streamText";
185
+ readonly responses: {
186
+ readonly 200: {
187
+ readonly description: "Successfully established SSE stream for raw text generation";
188
+ readonly contentType: "text/event-stream";
189
+ };
190
+ readonly 400: {
191
+ readonly description: "Invalid request parameters or message format";
192
+ readonly contentType: "application/json";
193
+ };
194
+ readonly 404: {
195
+ readonly description: "Agent not found";
196
+ readonly contentType: "application/json";
197
+ };
198
+ readonly 500: {
199
+ readonly description: "Failed to stream text due to server error";
200
+ readonly contentType: "application/json";
201
+ };
202
+ };
203
+ };
204
+ readonly chatStream: {
205
+ readonly method: "post";
206
+ readonly path: "/agents/:id/chat";
207
+ readonly summary: "Stream chat messages";
208
+ readonly description: "Generate a text response from an agent and stream it as UI messages via Server-Sent Events (SSE). This endpoint is optimized for chat interfaces and works seamlessly with the AI SDK's useChat hook. It provides a high-level stream format with automatic handling of messages, tool calls, and metadata.";
209
+ readonly tags: readonly ["Agent Generation"];
210
+ readonly operationId: "chatStream";
211
+ readonly responses: {
212
+ readonly 200: {
213
+ readonly description: "Successfully established SSE stream for chat generation";
214
+ readonly contentType: "text/event-stream";
215
+ };
216
+ readonly 400: {
217
+ readonly description: "Invalid request parameters or message format";
218
+ readonly contentType: "application/json";
219
+ };
220
+ readonly 404: {
221
+ readonly description: "Agent not found";
222
+ readonly contentType: "application/json";
223
+ };
224
+ readonly 500: {
225
+ readonly description: "Failed to stream chat due to server error";
226
+ readonly contentType: "application/json";
227
+ };
228
+ };
229
+ };
230
+ readonly generateObject: {
231
+ readonly method: "post";
232
+ readonly path: "/agents/:id/object";
233
+ readonly summary: "Generate structured object";
234
+ readonly description: "Generate a structured object that conforms to a specified JSON schema. This endpoint is perfect for extracting structured data from unstructured input, generating form data, or creating API responses with guaranteed structure. The agent will ensure the output matches the provided schema exactly.";
235
+ readonly tags: readonly ["Agent Generation"];
236
+ readonly operationId: "generateObject";
237
+ readonly responses: {
238
+ readonly 200: {
239
+ readonly description: "Successfully generated structured object matching the provided schema";
240
+ readonly contentType: "application/json";
241
+ };
242
+ readonly 400: {
243
+ readonly description: "Invalid request parameters, message format, or schema";
244
+ readonly contentType: "application/json";
245
+ };
246
+ readonly 404: {
247
+ readonly description: "Agent not found";
248
+ readonly contentType: "application/json";
249
+ };
250
+ readonly 500: {
251
+ readonly description: "Failed to generate object due to server error";
252
+ readonly contentType: "application/json";
253
+ };
254
+ };
255
+ };
256
+ readonly streamObject: {
257
+ readonly method: "post";
258
+ readonly path: "/agents/:id/stream-object";
259
+ readonly summary: "Stream structured object generation";
260
+ readonly description: "Generate a structured object and stream partial updates via Server-Sent Events (SSE). This allows you to display incremental object construction in real-time, useful for complex object generation where you want to show progress. Events may contain partial object updates or the complete final object, depending on the agent's implementation.";
261
+ readonly tags: readonly ["Agent Generation"];
262
+ readonly operationId: "streamObject";
263
+ readonly responses: {
264
+ readonly 200: {
265
+ readonly description: "Successfully established SSE stream for object generation";
266
+ readonly contentType: "text/event-stream";
267
+ };
268
+ readonly 400: {
269
+ readonly description: "Invalid request parameters, message format, or schema";
270
+ readonly contentType: "application/json";
271
+ };
272
+ readonly 404: {
273
+ readonly description: "Agent not found";
274
+ readonly contentType: "application/json";
275
+ };
276
+ readonly 500: {
277
+ readonly description: "Failed to stream object due to server error";
278
+ readonly contentType: "application/json";
279
+ };
280
+ };
281
+ };
282
+ readonly getAgentHistory: {
283
+ readonly method: "get";
284
+ readonly path: "/agents/:id/history";
285
+ readonly summary: "Get agent history";
286
+ readonly description: "Retrieve the execution history for a specific agent with pagination support.";
287
+ readonly tags: readonly ["Agent Management"];
288
+ readonly operationId: "getAgentHistory";
289
+ readonly responses: {
290
+ readonly 200: {
291
+ readonly description: "Successfully retrieved agent execution history";
292
+ readonly contentType: "application/json";
293
+ };
294
+ readonly 404: {
295
+ readonly description: "Agent not found";
296
+ readonly contentType: "application/json";
297
+ };
298
+ readonly 500: {
299
+ readonly description: "Failed to retrieve agent history due to server error";
300
+ readonly contentType: "application/json";
301
+ };
302
+ };
303
+ };
304
+ };
305
+ /**
306
+ * Workflow route definitions
307
+ */
308
+ declare const WORKFLOW_ROUTES: {
309
+ readonly listWorkflows: {
310
+ readonly method: "get";
311
+ readonly path: "/workflows";
312
+ readonly summary: "List all registered workflows";
313
+ readonly description: "Retrieve a list of all workflows registered in the system. Each workflow includes its ID, name, purpose, step count, and current status. Use this endpoint to discover available workflows and understand their capabilities before execution.";
314
+ readonly tags: readonly ["Workflow Management"];
315
+ readonly operationId: "listWorkflows";
316
+ readonly responses: {
317
+ readonly 200: {
318
+ readonly description: "Successfully retrieved list of all registered workflows";
319
+ readonly contentType: "application/json";
320
+ };
321
+ readonly 500: {
322
+ readonly description: "Failed to retrieve workflows due to server error";
323
+ readonly contentType: "application/json";
324
+ };
325
+ };
326
+ };
327
+ readonly getWorkflow: {
328
+ readonly method: "get";
329
+ readonly path: "/workflows/:id";
330
+ readonly summary: "Get workflow by ID";
331
+ readonly description: "Retrieve detailed information about a specific workflow by its ID.";
332
+ readonly tags: readonly ["Workflow Management"];
333
+ readonly operationId: "getWorkflow";
334
+ readonly responses: {
335
+ readonly 200: {
336
+ readonly description: "Successfully retrieved workflow details";
337
+ readonly contentType: "application/json";
338
+ };
339
+ readonly 404: {
340
+ readonly description: "Workflow not found";
341
+ readonly contentType: "application/json";
342
+ };
343
+ readonly 500: {
344
+ readonly description: "Failed to retrieve workflow due to server error";
345
+ readonly contentType: "application/json";
346
+ };
347
+ };
348
+ };
349
+ readonly executeWorkflow: {
350
+ readonly method: "post";
351
+ readonly path: "/workflows/:id/execute";
352
+ readonly summary: "Execute workflow synchronously";
353
+ readonly description: "Execute a workflow and wait for it to complete. This endpoint runs the workflow to completion and returns the final result. Use this for workflows that complete quickly or when you need the complete result before proceeding. For long-running workflows, consider using the streaming endpoint instead.";
354
+ readonly tags: readonly ["Workflow Management"];
355
+ readonly operationId: "executeWorkflow";
356
+ readonly responses: {
357
+ readonly 200: {
358
+ readonly description: "Successfully executed workflow and returned final result";
359
+ readonly contentType: "application/json";
360
+ };
361
+ readonly 400: {
362
+ readonly description: "Invalid workflow input or parameters";
363
+ readonly contentType: "application/json";
364
+ };
365
+ readonly 404: {
366
+ readonly description: "Workflow not found";
367
+ readonly contentType: "application/json";
368
+ };
369
+ readonly 500: {
370
+ readonly description: "Failed to execute workflow due to server error";
371
+ readonly contentType: "application/json";
372
+ };
373
+ };
374
+ };
375
+ readonly streamWorkflow: {
376
+ readonly method: "post";
377
+ readonly path: "/workflows/:id/stream";
378
+ readonly summary: "Stream workflow execution events";
379
+ readonly description: "Execute a workflow and stream real-time events via Server-Sent Events (SSE). The stream remains open during suspension and continues after resume.";
380
+ readonly tags: readonly ["Workflow Management"];
381
+ readonly operationId: "streamWorkflow";
382
+ readonly responses: {
383
+ readonly 200: {
384
+ readonly description: "Successfully established SSE stream for workflow execution";
385
+ readonly contentType: "text/event-stream";
386
+ };
387
+ readonly 400: {
388
+ readonly description: "Invalid workflow input or parameters";
389
+ readonly contentType: "application/json";
390
+ };
391
+ readonly 404: {
392
+ readonly description: "Workflow not found";
393
+ readonly contentType: "application/json";
394
+ };
395
+ readonly 500: {
396
+ readonly description: "Failed to stream workflow due to server error";
397
+ readonly contentType: "application/json";
398
+ };
399
+ };
400
+ };
401
+ readonly suspendWorkflow: {
402
+ readonly method: "post";
403
+ readonly path: "/workflows/:id/executions/:executionId/suspend";
404
+ readonly summary: "Suspend workflow execution";
405
+ readonly description: "Suspend a running workflow execution at its current step. This allows you to pause long-running workflows, perform external validations, wait for human approval, or handle rate limits. The workflow state is preserved and can be resumed later with the resume endpoint. Only workflows in 'running' state can be suspended.";
406
+ readonly tags: readonly ["Workflow Management"];
407
+ readonly operationId: "suspendWorkflow";
408
+ readonly responses: {
409
+ readonly 200: {
410
+ readonly description: "Successfully suspended workflow execution";
411
+ readonly contentType: "application/json";
412
+ };
413
+ readonly 400: {
414
+ readonly description: "Workflow is not in a suspendable state";
415
+ readonly contentType: "application/json";
416
+ };
417
+ readonly 404: {
418
+ readonly description: "Workflow or execution not found";
419
+ readonly contentType: "application/json";
420
+ };
421
+ readonly 500: {
422
+ readonly description: "Failed to suspend workflow due to server error";
423
+ readonly contentType: "application/json";
424
+ };
425
+ };
426
+ };
427
+ readonly cancelWorkflow: {
428
+ readonly method: "post";
429
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
430
+ readonly summary: "Cancel workflow execution";
431
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
432
+ readonly tags: readonly ["Workflow Management"];
433
+ readonly operationId: "cancelWorkflow";
434
+ readonly responses: {
435
+ readonly 200: {
436
+ readonly description: "Successfully cancelled workflow execution";
437
+ readonly contentType: "application/json";
438
+ };
439
+ readonly 404: {
440
+ readonly description: "Workflow or execution not found";
441
+ readonly contentType: "application/json";
442
+ };
443
+ readonly 409: {
444
+ readonly description: "Workflow execution already completed or not cancellable";
445
+ readonly contentType: "application/json";
446
+ };
447
+ readonly 500: {
448
+ readonly description: "Failed to cancel workflow due to server error";
449
+ readonly contentType: "application/json";
450
+ };
451
+ };
452
+ };
453
+ readonly resumeWorkflow: {
454
+ readonly method: "post";
455
+ readonly path: "/workflows/:id/executions/:executionId/resume";
456
+ readonly summary: "Resume suspended workflow";
457
+ readonly description: "Resume a previously suspended workflow execution from where it left off. You can optionally provide resume data that will be passed to the suspended step for processing. This is commonly used after human approval, external system responses, or scheduled resumptions. The workflow continues execution and returns the final result.";
458
+ readonly tags: readonly ["Workflow Management"];
459
+ readonly operationId: "resumeWorkflow";
460
+ readonly responses: {
461
+ readonly 200: {
462
+ readonly description: "Successfully resumed workflow execution and returned final result";
463
+ readonly contentType: "application/json";
464
+ };
465
+ readonly 400: {
466
+ readonly description: "Workflow is not in a suspended state";
467
+ readonly contentType: "application/json";
468
+ };
469
+ readonly 404: {
470
+ readonly description: "Workflow or execution not found";
471
+ readonly contentType: "application/json";
472
+ };
473
+ readonly 500: {
474
+ readonly description: "Failed to resume workflow due to server error";
475
+ readonly contentType: "application/json";
476
+ };
477
+ };
478
+ };
479
+ readonly getWorkflowState: {
480
+ readonly method: "get";
481
+ readonly path: "/workflows/:id/executions/:executionId/state";
482
+ readonly summary: "Get workflow execution state";
483
+ readonly description: "Retrieve the workflow execution state including input data, suspension information, context, and current status. This is essential for understanding the current state of a workflow execution, especially for suspended workflows that need to be resumed with the correct context.";
484
+ readonly tags: readonly ["Workflow Management"];
485
+ readonly operationId: "getWorkflowState";
486
+ readonly responses: {
487
+ readonly 200: {
488
+ readonly description: "Successfully retrieved workflow execution state";
489
+ readonly contentType: "application/json";
490
+ };
491
+ readonly 404: {
492
+ readonly description: "Workflow or execution not found";
493
+ readonly contentType: "application/json";
494
+ };
495
+ readonly 500: {
496
+ readonly description: "Failed to retrieve workflow state due to server error";
497
+ readonly contentType: "application/json";
498
+ };
499
+ };
500
+ };
501
+ };
502
+ /**
503
+ * Log route definitions
504
+ */
505
+ declare const LOG_ROUTES: {
506
+ readonly getLogs: {
507
+ readonly method: "get";
508
+ readonly path: "/api/logs";
509
+ readonly summary: "Get logs with filters";
510
+ readonly description: "Retrieve system logs with optional filtering by level, agent ID, workflow ID, conversation ID, execution ID, and time range.";
511
+ readonly tags: readonly ["Logging"];
512
+ readonly operationId: "getLogs";
513
+ readonly responses: {
514
+ readonly 200: {
515
+ readonly description: "Successfully retrieved filtered log entries";
516
+ readonly contentType: "application/json";
517
+ };
518
+ readonly 400: {
519
+ readonly description: "Invalid filter parameters";
520
+ readonly contentType: "application/json";
521
+ };
522
+ readonly 500: {
523
+ readonly description: "Failed to retrieve logs due to server error";
524
+ readonly contentType: "application/json";
525
+ };
526
+ };
527
+ };
528
+ };
529
+ /**
530
+ * Update route definitions
531
+ */
532
+ declare const UPDATE_ROUTES: {
533
+ readonly checkUpdates: {
534
+ readonly method: "get";
535
+ readonly path: "/updates";
536
+ readonly summary: "Check for updates";
537
+ readonly description: "Check for available package updates in the VoltAgent ecosystem.";
538
+ readonly tags: readonly ["System"];
539
+ readonly operationId: "checkUpdates";
540
+ readonly responses: {
541
+ readonly 200: {
542
+ readonly description: "Successfully checked for available updates";
543
+ readonly contentType: "application/json";
544
+ };
545
+ readonly 500: {
546
+ readonly description: "Failed to check updates due to server error";
547
+ readonly contentType: "application/json";
548
+ };
549
+ };
550
+ };
551
+ readonly installUpdates: {
552
+ readonly method: "post";
553
+ readonly path: "/updates/install";
554
+ readonly summary: "Install updates";
555
+ readonly description: "Install available updates for VoltAgent packages. Can install a single package or all packages.";
556
+ readonly tags: readonly ["System"];
557
+ readonly operationId: "installUpdates";
558
+ readonly responses: {
559
+ readonly 200: {
560
+ readonly description: "Successfully installed requested updates";
561
+ readonly contentType: "application/json";
562
+ };
563
+ readonly 400: {
564
+ readonly description: "Invalid update request or package not found";
565
+ readonly contentType: "application/json";
566
+ };
567
+ readonly 500: {
568
+ readonly description: "Failed to install updates due to server error";
569
+ readonly contentType: "application/json";
570
+ };
571
+ };
572
+ };
573
+ };
574
+ /**
575
+ * Observability route definitions
576
+ */
577
+ declare const OBSERVABILITY_ROUTES: {
578
+ readonly setupObservability: {
579
+ readonly method: "post";
580
+ readonly path: "/setup-observability";
581
+ readonly summary: "Configure observability settings";
582
+ readonly description: "Updates the .env file with VoltAgent public and secret keys to enable observability features. This allows automatic tracing and monitoring of agent operations.";
583
+ readonly tags: readonly ["Observability"];
584
+ readonly operationId: "setupObservability";
585
+ readonly responses: {
586
+ readonly 200: {
587
+ readonly description: "Successfully configured observability settings";
588
+ readonly contentType: "application/json";
589
+ };
590
+ readonly 400: {
591
+ readonly description: "Invalid request - missing publicKey or secretKey";
592
+ readonly contentType: "application/json";
593
+ };
594
+ readonly 500: {
595
+ readonly description: "Failed to update .env file";
596
+ readonly contentType: "application/json";
597
+ };
598
+ };
599
+ };
600
+ readonly getTraces: {
601
+ readonly method: "get";
602
+ readonly path: "/observability/traces";
603
+ readonly summary: "List all traces";
604
+ readonly description: "Retrieve all OpenTelemetry traces from the observability store. Each trace represents a complete operation with its spans showing the execution flow.";
605
+ readonly tags: readonly ["Observability"];
606
+ readonly operationId: "getTraces";
607
+ readonly responses: {
608
+ readonly 200: {
609
+ readonly description: "Successfully retrieved traces";
610
+ readonly contentType: "application/json";
611
+ };
612
+ readonly 500: {
613
+ readonly description: "Failed to retrieve traces due to server error";
614
+ readonly contentType: "application/json";
615
+ };
616
+ };
617
+ };
618
+ readonly getTraceById: {
619
+ readonly method: "get";
620
+ readonly path: "/observability/traces/:traceId";
621
+ readonly summary: "Get trace by ID";
622
+ readonly description: "Retrieve a specific trace and all its spans by trace ID.";
623
+ readonly tags: readonly ["Observability"];
624
+ readonly operationId: "getTraceById";
625
+ readonly responses: {
626
+ readonly 200: {
627
+ readonly description: "Successfully retrieved trace";
628
+ readonly contentType: "application/json";
629
+ };
630
+ readonly 404: {
631
+ readonly description: "Trace not found";
632
+ readonly contentType: "application/json";
633
+ };
634
+ readonly 500: {
635
+ readonly description: "Failed to retrieve trace due to server error";
636
+ readonly contentType: "application/json";
637
+ };
638
+ };
639
+ };
640
+ readonly getSpanById: {
641
+ readonly method: "get";
642
+ readonly path: "/observability/spans/:spanId";
643
+ readonly summary: "Get span by ID";
644
+ readonly description: "Retrieve a specific span by its ID.";
645
+ readonly tags: readonly ["Observability"];
646
+ readonly operationId: "getSpanById";
647
+ readonly responses: {
648
+ readonly 200: {
649
+ readonly description: "Successfully retrieved span";
650
+ readonly contentType: "application/json";
651
+ };
652
+ readonly 404: {
653
+ readonly description: "Span not found";
654
+ readonly contentType: "application/json";
655
+ };
656
+ readonly 500: {
657
+ readonly description: "Failed to retrieve span due to server error";
658
+ readonly contentType: "application/json";
659
+ };
660
+ };
661
+ };
662
+ readonly getObservabilityStatus: {
663
+ readonly method: "get";
664
+ readonly path: "/observability/status";
665
+ readonly summary: "Get observability status";
666
+ readonly description: "Check the status and configuration of the observability system.";
667
+ readonly tags: readonly ["Observability"];
668
+ readonly operationId: "getObservabilityStatus";
669
+ readonly responses: {
670
+ readonly 200: {
671
+ readonly description: "Successfully retrieved observability status";
672
+ readonly contentType: "application/json";
673
+ };
674
+ readonly 500: {
675
+ readonly description: "Failed to retrieve status due to server error";
676
+ readonly contentType: "application/json";
677
+ };
678
+ };
679
+ };
680
+ readonly getLogsByTraceId: {
681
+ readonly method: "get";
682
+ readonly path: "/observability/traces/:traceId/logs";
683
+ readonly summary: "Get logs by trace ID";
684
+ readonly description: "Retrieve all logs associated with a specific trace ID.";
685
+ readonly tags: readonly ["Observability"];
686
+ readonly operationId: "getLogsByTraceId";
687
+ readonly responses: {
688
+ readonly 200: {
689
+ readonly description: "Successfully retrieved logs";
690
+ readonly contentType: "application/json";
691
+ };
692
+ readonly 404: {
693
+ readonly description: "No logs found for the trace";
694
+ readonly contentType: "application/json";
695
+ };
696
+ readonly 500: {
697
+ readonly description: "Failed to retrieve logs due to server error";
698
+ readonly contentType: "application/json";
699
+ };
700
+ };
701
+ };
702
+ readonly getLogsBySpanId: {
703
+ readonly method: "get";
704
+ readonly path: "/observability/spans/:spanId/logs";
705
+ readonly summary: "Get logs by span ID";
706
+ readonly description: "Retrieve all logs associated with a specific span ID.";
707
+ readonly tags: readonly ["Observability"];
708
+ readonly operationId: "getLogsBySpanId";
709
+ readonly responses: {
710
+ readonly 200: {
711
+ readonly description: "Successfully retrieved logs";
712
+ readonly contentType: "application/json";
713
+ };
714
+ readonly 404: {
715
+ readonly description: "No logs found for the span";
716
+ readonly contentType: "application/json";
717
+ };
718
+ readonly 500: {
719
+ readonly description: "Failed to retrieve logs due to server error";
720
+ readonly contentType: "application/json";
721
+ };
722
+ };
723
+ };
724
+ readonly queryLogs: {
725
+ readonly method: "get";
726
+ readonly path: "/observability/logs";
727
+ readonly summary: "Query logs";
728
+ readonly description: "Query logs with filters such as severity, time range, trace ID, etc.";
729
+ readonly tags: readonly ["Observability"];
730
+ readonly operationId: "queryLogs";
731
+ readonly responses: {
732
+ readonly 200: {
733
+ readonly description: "Successfully retrieved logs";
734
+ readonly contentType: "application/json";
735
+ };
736
+ readonly 400: {
737
+ readonly description: "Invalid query parameters";
738
+ readonly contentType: "application/json";
739
+ };
740
+ readonly 500: {
741
+ readonly description: "Failed to query logs due to server error";
742
+ readonly contentType: "application/json";
743
+ };
744
+ };
745
+ };
746
+ };
747
+ /**
748
+ * All route definitions combined
749
+ */
750
+ declare const ALL_ROUTES: {
751
+ readonly setupObservability: {
752
+ readonly method: "post";
753
+ readonly path: "/setup-observability";
754
+ readonly summary: "Configure observability settings";
755
+ readonly description: "Updates the .env file with VoltAgent public and secret keys to enable observability features. This allows automatic tracing and monitoring of agent operations.";
756
+ readonly tags: readonly ["Observability"];
757
+ readonly operationId: "setupObservability";
758
+ readonly responses: {
759
+ readonly 200: {
760
+ readonly description: "Successfully configured observability settings";
761
+ readonly contentType: "application/json";
762
+ };
763
+ readonly 400: {
764
+ readonly description: "Invalid request - missing publicKey or secretKey";
765
+ readonly contentType: "application/json";
766
+ };
767
+ readonly 500: {
768
+ readonly description: "Failed to update .env file";
769
+ readonly contentType: "application/json";
770
+ };
771
+ };
772
+ };
773
+ readonly getTraces: {
774
+ readonly method: "get";
775
+ readonly path: "/observability/traces";
776
+ readonly summary: "List all traces";
777
+ readonly description: "Retrieve all OpenTelemetry traces from the observability store. Each trace represents a complete operation with its spans showing the execution flow.";
778
+ readonly tags: readonly ["Observability"];
779
+ readonly operationId: "getTraces";
780
+ readonly responses: {
781
+ readonly 200: {
782
+ readonly description: "Successfully retrieved traces";
783
+ readonly contentType: "application/json";
784
+ };
785
+ readonly 500: {
786
+ readonly description: "Failed to retrieve traces due to server error";
787
+ readonly contentType: "application/json";
788
+ };
789
+ };
790
+ };
791
+ readonly getTraceById: {
792
+ readonly method: "get";
793
+ readonly path: "/observability/traces/:traceId";
794
+ readonly summary: "Get trace by ID";
795
+ readonly description: "Retrieve a specific trace and all its spans by trace ID.";
796
+ readonly tags: readonly ["Observability"];
797
+ readonly operationId: "getTraceById";
798
+ readonly responses: {
799
+ readonly 200: {
800
+ readonly description: "Successfully retrieved trace";
801
+ readonly contentType: "application/json";
802
+ };
803
+ readonly 404: {
804
+ readonly description: "Trace not found";
805
+ readonly contentType: "application/json";
806
+ };
807
+ readonly 500: {
808
+ readonly description: "Failed to retrieve trace due to server error";
809
+ readonly contentType: "application/json";
810
+ };
811
+ };
812
+ };
813
+ readonly getSpanById: {
814
+ readonly method: "get";
815
+ readonly path: "/observability/spans/:spanId";
816
+ readonly summary: "Get span by ID";
817
+ readonly description: "Retrieve a specific span by its ID.";
818
+ readonly tags: readonly ["Observability"];
819
+ readonly operationId: "getSpanById";
820
+ readonly responses: {
821
+ readonly 200: {
822
+ readonly description: "Successfully retrieved span";
823
+ readonly contentType: "application/json";
824
+ };
825
+ readonly 404: {
826
+ readonly description: "Span not found";
827
+ readonly contentType: "application/json";
828
+ };
829
+ readonly 500: {
830
+ readonly description: "Failed to retrieve span due to server error";
831
+ readonly contentType: "application/json";
832
+ };
833
+ };
834
+ };
835
+ readonly getObservabilityStatus: {
836
+ readonly method: "get";
837
+ readonly path: "/observability/status";
838
+ readonly summary: "Get observability status";
839
+ readonly description: "Check the status and configuration of the observability system.";
840
+ readonly tags: readonly ["Observability"];
841
+ readonly operationId: "getObservabilityStatus";
842
+ readonly responses: {
843
+ readonly 200: {
844
+ readonly description: "Successfully retrieved observability status";
845
+ readonly contentType: "application/json";
846
+ };
847
+ readonly 500: {
848
+ readonly description: "Failed to retrieve status due to server error";
849
+ readonly contentType: "application/json";
850
+ };
851
+ };
852
+ };
853
+ readonly getLogsByTraceId: {
854
+ readonly method: "get";
855
+ readonly path: "/observability/traces/:traceId/logs";
856
+ readonly summary: "Get logs by trace ID";
857
+ readonly description: "Retrieve all logs associated with a specific trace ID.";
858
+ readonly tags: readonly ["Observability"];
859
+ readonly operationId: "getLogsByTraceId";
860
+ readonly responses: {
861
+ readonly 200: {
862
+ readonly description: "Successfully retrieved logs";
863
+ readonly contentType: "application/json";
864
+ };
865
+ readonly 404: {
866
+ readonly description: "No logs found for the trace";
867
+ readonly contentType: "application/json";
868
+ };
869
+ readonly 500: {
870
+ readonly description: "Failed to retrieve logs due to server error";
871
+ readonly contentType: "application/json";
872
+ };
873
+ };
874
+ };
875
+ readonly getLogsBySpanId: {
876
+ readonly method: "get";
877
+ readonly path: "/observability/spans/:spanId/logs";
878
+ readonly summary: "Get logs by span ID";
879
+ readonly description: "Retrieve all logs associated with a specific span ID.";
880
+ readonly tags: readonly ["Observability"];
881
+ readonly operationId: "getLogsBySpanId";
882
+ readonly responses: {
883
+ readonly 200: {
884
+ readonly description: "Successfully retrieved logs";
885
+ readonly contentType: "application/json";
886
+ };
887
+ readonly 404: {
888
+ readonly description: "No logs found for the span";
889
+ readonly contentType: "application/json";
890
+ };
891
+ readonly 500: {
892
+ readonly description: "Failed to retrieve logs due to server error";
893
+ readonly contentType: "application/json";
894
+ };
895
+ };
896
+ };
897
+ readonly queryLogs: {
898
+ readonly method: "get";
899
+ readonly path: "/observability/logs";
900
+ readonly summary: "Query logs";
901
+ readonly description: "Query logs with filters such as severity, time range, trace ID, etc.";
902
+ readonly tags: readonly ["Observability"];
903
+ readonly operationId: "queryLogs";
904
+ readonly responses: {
905
+ readonly 200: {
906
+ readonly description: "Successfully retrieved logs";
907
+ readonly contentType: "application/json";
908
+ };
909
+ readonly 400: {
910
+ readonly description: "Invalid query parameters";
911
+ readonly contentType: "application/json";
912
+ };
913
+ readonly 500: {
914
+ readonly description: "Failed to query logs due to server error";
915
+ readonly contentType: "application/json";
916
+ };
917
+ };
918
+ };
919
+ readonly checkUpdates: {
920
+ readonly method: "get";
921
+ readonly path: "/updates";
922
+ readonly summary: "Check for updates";
923
+ readonly description: "Check for available package updates in the VoltAgent ecosystem.";
924
+ readonly tags: readonly ["System"];
925
+ readonly operationId: "checkUpdates";
926
+ readonly responses: {
927
+ readonly 200: {
928
+ readonly description: "Successfully checked for available updates";
929
+ readonly contentType: "application/json";
930
+ };
931
+ readonly 500: {
932
+ readonly description: "Failed to check updates due to server error";
933
+ readonly contentType: "application/json";
934
+ };
935
+ };
936
+ };
937
+ readonly installUpdates: {
938
+ readonly method: "post";
939
+ readonly path: "/updates/install";
940
+ readonly summary: "Install updates";
941
+ readonly description: "Install available updates for VoltAgent packages. Can install a single package or all packages.";
942
+ readonly tags: readonly ["System"];
943
+ readonly operationId: "installUpdates";
944
+ readonly responses: {
945
+ readonly 200: {
946
+ readonly description: "Successfully installed requested updates";
947
+ readonly contentType: "application/json";
948
+ };
949
+ readonly 400: {
950
+ readonly description: "Invalid update request or package not found";
951
+ readonly contentType: "application/json";
952
+ };
953
+ readonly 500: {
954
+ readonly description: "Failed to install updates due to server error";
955
+ readonly contentType: "application/json";
956
+ };
957
+ };
958
+ };
959
+ readonly getLogs: {
960
+ readonly method: "get";
961
+ readonly path: "/api/logs";
962
+ readonly summary: "Get logs with filters";
963
+ readonly description: "Retrieve system logs with optional filtering by level, agent ID, workflow ID, conversation ID, execution ID, and time range.";
964
+ readonly tags: readonly ["Logging"];
965
+ readonly operationId: "getLogs";
966
+ readonly responses: {
967
+ readonly 200: {
968
+ readonly description: "Successfully retrieved filtered log entries";
969
+ readonly contentType: "application/json";
970
+ };
971
+ readonly 400: {
972
+ readonly description: "Invalid filter parameters";
973
+ readonly contentType: "application/json";
974
+ };
975
+ readonly 500: {
976
+ readonly description: "Failed to retrieve logs due to server error";
977
+ readonly contentType: "application/json";
978
+ };
979
+ };
980
+ };
981
+ readonly listWorkflows: {
982
+ readonly method: "get";
983
+ readonly path: "/workflows";
984
+ readonly summary: "List all registered workflows";
985
+ readonly description: "Retrieve a list of all workflows registered in the system. Each workflow includes its ID, name, purpose, step count, and current status. Use this endpoint to discover available workflows and understand their capabilities before execution.";
986
+ readonly tags: readonly ["Workflow Management"];
987
+ readonly operationId: "listWorkflows";
988
+ readonly responses: {
989
+ readonly 200: {
990
+ readonly description: "Successfully retrieved list of all registered workflows";
991
+ readonly contentType: "application/json";
992
+ };
993
+ readonly 500: {
994
+ readonly description: "Failed to retrieve workflows due to server error";
995
+ readonly contentType: "application/json";
996
+ };
997
+ };
998
+ };
999
+ readonly getWorkflow: {
1000
+ readonly method: "get";
1001
+ readonly path: "/workflows/:id";
1002
+ readonly summary: "Get workflow by ID";
1003
+ readonly description: "Retrieve detailed information about a specific workflow by its ID.";
1004
+ readonly tags: readonly ["Workflow Management"];
1005
+ readonly operationId: "getWorkflow";
1006
+ readonly responses: {
1007
+ readonly 200: {
1008
+ readonly description: "Successfully retrieved workflow details";
1009
+ readonly contentType: "application/json";
1010
+ };
1011
+ readonly 404: {
1012
+ readonly description: "Workflow not found";
1013
+ readonly contentType: "application/json";
1014
+ };
1015
+ readonly 500: {
1016
+ readonly description: "Failed to retrieve workflow due to server error";
1017
+ readonly contentType: "application/json";
1018
+ };
1019
+ };
1020
+ };
1021
+ readonly executeWorkflow: {
1022
+ readonly method: "post";
1023
+ readonly path: "/workflows/:id/execute";
1024
+ readonly summary: "Execute workflow synchronously";
1025
+ readonly description: "Execute a workflow and wait for it to complete. This endpoint runs the workflow to completion and returns the final result. Use this for workflows that complete quickly or when you need the complete result before proceeding. For long-running workflows, consider using the streaming endpoint instead.";
1026
+ readonly tags: readonly ["Workflow Management"];
1027
+ readonly operationId: "executeWorkflow";
1028
+ readonly responses: {
1029
+ readonly 200: {
1030
+ readonly description: "Successfully executed workflow and returned final result";
1031
+ readonly contentType: "application/json";
1032
+ };
1033
+ readonly 400: {
1034
+ readonly description: "Invalid workflow input or parameters";
1035
+ readonly contentType: "application/json";
1036
+ };
1037
+ readonly 404: {
1038
+ readonly description: "Workflow not found";
1039
+ readonly contentType: "application/json";
1040
+ };
1041
+ readonly 500: {
1042
+ readonly description: "Failed to execute workflow due to server error";
1043
+ readonly contentType: "application/json";
1044
+ };
1045
+ };
1046
+ };
1047
+ readonly streamWorkflow: {
1048
+ readonly method: "post";
1049
+ readonly path: "/workflows/:id/stream";
1050
+ readonly summary: "Stream workflow execution events";
1051
+ readonly description: "Execute a workflow and stream real-time events via Server-Sent Events (SSE). The stream remains open during suspension and continues after resume.";
1052
+ readonly tags: readonly ["Workflow Management"];
1053
+ readonly operationId: "streamWorkflow";
1054
+ readonly responses: {
1055
+ readonly 200: {
1056
+ readonly description: "Successfully established SSE stream for workflow execution";
1057
+ readonly contentType: "text/event-stream";
1058
+ };
1059
+ readonly 400: {
1060
+ readonly description: "Invalid workflow input or parameters";
1061
+ readonly contentType: "application/json";
1062
+ };
1063
+ readonly 404: {
1064
+ readonly description: "Workflow not found";
1065
+ readonly contentType: "application/json";
1066
+ };
1067
+ readonly 500: {
1068
+ readonly description: "Failed to stream workflow due to server error";
1069
+ readonly contentType: "application/json";
1070
+ };
1071
+ };
1072
+ };
1073
+ readonly suspendWorkflow: {
1074
+ readonly method: "post";
1075
+ readonly path: "/workflows/:id/executions/:executionId/suspend";
1076
+ readonly summary: "Suspend workflow execution";
1077
+ readonly description: "Suspend a running workflow execution at its current step. This allows you to pause long-running workflows, perform external validations, wait for human approval, or handle rate limits. The workflow state is preserved and can be resumed later with the resume endpoint. Only workflows in 'running' state can be suspended.";
1078
+ readonly tags: readonly ["Workflow Management"];
1079
+ readonly operationId: "suspendWorkflow";
1080
+ readonly responses: {
1081
+ readonly 200: {
1082
+ readonly description: "Successfully suspended workflow execution";
1083
+ readonly contentType: "application/json";
1084
+ };
1085
+ readonly 400: {
1086
+ readonly description: "Workflow is not in a suspendable state";
1087
+ readonly contentType: "application/json";
1088
+ };
1089
+ readonly 404: {
1090
+ readonly description: "Workflow or execution not found";
1091
+ readonly contentType: "application/json";
1092
+ };
1093
+ readonly 500: {
1094
+ readonly description: "Failed to suspend workflow due to server error";
1095
+ readonly contentType: "application/json";
1096
+ };
1097
+ };
1098
+ };
1099
+ readonly cancelWorkflow: {
1100
+ readonly method: "post";
1101
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
1102
+ readonly summary: "Cancel workflow execution";
1103
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
1104
+ readonly tags: readonly ["Workflow Management"];
1105
+ readonly operationId: "cancelWorkflow";
1106
+ readonly responses: {
1107
+ readonly 200: {
1108
+ readonly description: "Successfully cancelled workflow execution";
1109
+ readonly contentType: "application/json";
1110
+ };
1111
+ readonly 404: {
1112
+ readonly description: "Workflow or execution not found";
1113
+ readonly contentType: "application/json";
1114
+ };
1115
+ readonly 409: {
1116
+ readonly description: "Workflow execution already completed or not cancellable";
1117
+ readonly contentType: "application/json";
1118
+ };
1119
+ readonly 500: {
1120
+ readonly description: "Failed to cancel workflow due to server error";
1121
+ readonly contentType: "application/json";
1122
+ };
1123
+ };
1124
+ };
1125
+ readonly resumeWorkflow: {
1126
+ readonly method: "post";
1127
+ readonly path: "/workflows/:id/executions/:executionId/resume";
1128
+ readonly summary: "Resume suspended workflow";
1129
+ readonly description: "Resume a previously suspended workflow execution from where it left off. You can optionally provide resume data that will be passed to the suspended step for processing. This is commonly used after human approval, external system responses, or scheduled resumptions. The workflow continues execution and returns the final result.";
1130
+ readonly tags: readonly ["Workflow Management"];
1131
+ readonly operationId: "resumeWorkflow";
1132
+ readonly responses: {
1133
+ readonly 200: {
1134
+ readonly description: "Successfully resumed workflow execution and returned final result";
1135
+ readonly contentType: "application/json";
1136
+ };
1137
+ readonly 400: {
1138
+ readonly description: "Workflow is not in a suspended state";
1139
+ readonly contentType: "application/json";
1140
+ };
1141
+ readonly 404: {
1142
+ readonly description: "Workflow or execution not found";
1143
+ readonly contentType: "application/json";
1144
+ };
1145
+ readonly 500: {
1146
+ readonly description: "Failed to resume workflow due to server error";
1147
+ readonly contentType: "application/json";
1148
+ };
1149
+ };
1150
+ };
1151
+ readonly getWorkflowState: {
1152
+ readonly method: "get";
1153
+ readonly path: "/workflows/:id/executions/:executionId/state";
1154
+ readonly summary: "Get workflow execution state";
1155
+ readonly description: "Retrieve the workflow execution state including input data, suspension information, context, and current status. This is essential for understanding the current state of a workflow execution, especially for suspended workflows that need to be resumed with the correct context.";
1156
+ readonly tags: readonly ["Workflow Management"];
1157
+ readonly operationId: "getWorkflowState";
1158
+ readonly responses: {
1159
+ readonly 200: {
1160
+ readonly description: "Successfully retrieved workflow execution state";
1161
+ readonly contentType: "application/json";
1162
+ };
1163
+ readonly 404: {
1164
+ readonly description: "Workflow or execution not found";
1165
+ readonly contentType: "application/json";
1166
+ };
1167
+ readonly 500: {
1168
+ readonly description: "Failed to retrieve workflow state due to server error";
1169
+ readonly contentType: "application/json";
1170
+ };
1171
+ };
1172
+ };
1173
+ readonly listAgents: {
1174
+ readonly method: "get";
1175
+ readonly path: "/agents";
1176
+ readonly summary: "List all registered agents";
1177
+ readonly description: "Retrieve a comprehensive list of all agents registered in the system. Each agent includes its configuration, status, model information, tools, sub-agents, and memory settings. Use this endpoint to discover available agents and their capabilities.";
1178
+ readonly tags: readonly ["Agent Management"];
1179
+ readonly operationId: "listAgents";
1180
+ readonly responses: {
1181
+ readonly 200: {
1182
+ readonly description: "Successfully retrieved list of all registered agents";
1183
+ readonly contentType: "application/json";
1184
+ };
1185
+ readonly 500: {
1186
+ readonly description: "Failed to retrieve agents due to server error";
1187
+ readonly contentType: "application/json";
1188
+ };
1189
+ };
1190
+ };
1191
+ readonly getAgent: {
1192
+ readonly method: "get";
1193
+ readonly path: "/agents/:id";
1194
+ readonly summary: "Get agent by ID";
1195
+ readonly description: "Retrieve detailed information about a specific agent by its ID.";
1196
+ readonly tags: readonly ["Agent Management"];
1197
+ readonly operationId: "getAgent";
1198
+ readonly responses: {
1199
+ readonly 200: {
1200
+ readonly description: "Successfully retrieved agent details";
1201
+ readonly contentType: "application/json";
1202
+ };
1203
+ readonly 404: {
1204
+ readonly description: "Agent not found";
1205
+ readonly contentType: "application/json";
1206
+ };
1207
+ readonly 500: {
1208
+ readonly description: "Failed to retrieve agent due to server error";
1209
+ readonly contentType: "application/json";
1210
+ };
1211
+ };
1212
+ };
1213
+ readonly generateText: {
1214
+ readonly method: "post";
1215
+ readonly path: "/agents/:id/text";
1216
+ readonly summary: "Generate text response";
1217
+ readonly description: "Generate a text response from an agent using the provided conversation history. This endpoint processes messages synchronously and returns the complete response once generation is finished. Use this for traditional request-response interactions where you need the full response before proceeding.";
1218
+ readonly tags: readonly ["Agent Generation"];
1219
+ readonly operationId: "generateText";
1220
+ readonly responses: {
1221
+ readonly 200: {
1222
+ readonly description: "Successfully generated text response from the agent";
1223
+ readonly contentType: "application/json";
1224
+ };
1225
+ readonly 400: {
1226
+ readonly description: "Invalid request parameters or message format";
1227
+ readonly contentType: "application/json";
1228
+ };
1229
+ readonly 404: {
1230
+ readonly description: "Agent not found";
1231
+ readonly contentType: "application/json";
1232
+ };
1233
+ readonly 500: {
1234
+ readonly description: "Failed to generate text due to server error";
1235
+ readonly contentType: "application/json";
1236
+ };
1237
+ };
1238
+ };
1239
+ readonly streamText: {
1240
+ readonly method: "post";
1241
+ readonly path: "/agents/:id/stream";
1242
+ readonly summary: "Stream raw text response";
1243
+ readonly description: "Generate a text response from an agent and stream the raw fullStream data via Server-Sent Events (SSE). This endpoint provides direct access to all stream events including text deltas, tool calls, and tool results. Use this for advanced applications that need full control over stream processing.";
1244
+ readonly tags: readonly ["Agent Generation"];
1245
+ readonly operationId: "streamText";
1246
+ readonly responses: {
1247
+ readonly 200: {
1248
+ readonly description: "Successfully established SSE stream for raw text generation";
1249
+ readonly contentType: "text/event-stream";
1250
+ };
1251
+ readonly 400: {
1252
+ readonly description: "Invalid request parameters or message format";
1253
+ readonly contentType: "application/json";
1254
+ };
1255
+ readonly 404: {
1256
+ readonly description: "Agent not found";
1257
+ readonly contentType: "application/json";
1258
+ };
1259
+ readonly 500: {
1260
+ readonly description: "Failed to stream text due to server error";
1261
+ readonly contentType: "application/json";
1262
+ };
1263
+ };
1264
+ };
1265
+ readonly chatStream: {
1266
+ readonly method: "post";
1267
+ readonly path: "/agents/:id/chat";
1268
+ readonly summary: "Stream chat messages";
1269
+ readonly description: "Generate a text response from an agent and stream it as UI messages via Server-Sent Events (SSE). This endpoint is optimized for chat interfaces and works seamlessly with the AI SDK's useChat hook. It provides a high-level stream format with automatic handling of messages, tool calls, and metadata.";
1270
+ readonly tags: readonly ["Agent Generation"];
1271
+ readonly operationId: "chatStream";
1272
+ readonly responses: {
1273
+ readonly 200: {
1274
+ readonly description: "Successfully established SSE stream for chat generation";
1275
+ readonly contentType: "text/event-stream";
1276
+ };
1277
+ readonly 400: {
1278
+ readonly description: "Invalid request parameters or message format";
1279
+ readonly contentType: "application/json";
1280
+ };
1281
+ readonly 404: {
1282
+ readonly description: "Agent not found";
1283
+ readonly contentType: "application/json";
1284
+ };
1285
+ readonly 500: {
1286
+ readonly description: "Failed to stream chat due to server error";
1287
+ readonly contentType: "application/json";
1288
+ };
1289
+ };
1290
+ };
1291
+ readonly generateObject: {
1292
+ readonly method: "post";
1293
+ readonly path: "/agents/:id/object";
1294
+ readonly summary: "Generate structured object";
1295
+ readonly description: "Generate a structured object that conforms to a specified JSON schema. This endpoint is perfect for extracting structured data from unstructured input, generating form data, or creating API responses with guaranteed structure. The agent will ensure the output matches the provided schema exactly.";
1296
+ readonly tags: readonly ["Agent Generation"];
1297
+ readonly operationId: "generateObject";
1298
+ readonly responses: {
1299
+ readonly 200: {
1300
+ readonly description: "Successfully generated structured object matching the provided schema";
1301
+ readonly contentType: "application/json";
1302
+ };
1303
+ readonly 400: {
1304
+ readonly description: "Invalid request parameters, message format, or schema";
1305
+ readonly contentType: "application/json";
1306
+ };
1307
+ readonly 404: {
1308
+ readonly description: "Agent not found";
1309
+ readonly contentType: "application/json";
1310
+ };
1311
+ readonly 500: {
1312
+ readonly description: "Failed to generate object due to server error";
1313
+ readonly contentType: "application/json";
1314
+ };
1315
+ };
1316
+ };
1317
+ readonly streamObject: {
1318
+ readonly method: "post";
1319
+ readonly path: "/agents/:id/stream-object";
1320
+ readonly summary: "Stream structured object generation";
1321
+ readonly description: "Generate a structured object and stream partial updates via Server-Sent Events (SSE). This allows you to display incremental object construction in real-time, useful for complex object generation where you want to show progress. Events may contain partial object updates or the complete final object, depending on the agent's implementation.";
1322
+ readonly tags: readonly ["Agent Generation"];
1323
+ readonly operationId: "streamObject";
1324
+ readonly responses: {
1325
+ readonly 200: {
1326
+ readonly description: "Successfully established SSE stream for object generation";
1327
+ readonly contentType: "text/event-stream";
1328
+ };
1329
+ readonly 400: {
1330
+ readonly description: "Invalid request parameters, message format, or schema";
1331
+ readonly contentType: "application/json";
1332
+ };
1333
+ readonly 404: {
1334
+ readonly description: "Agent not found";
1335
+ readonly contentType: "application/json";
1336
+ };
1337
+ readonly 500: {
1338
+ readonly description: "Failed to stream object due to server error";
1339
+ readonly contentType: "application/json";
1340
+ };
1341
+ };
1342
+ };
1343
+ readonly getAgentHistory: {
1344
+ readonly method: "get";
1345
+ readonly path: "/agents/:id/history";
1346
+ readonly summary: "Get agent history";
1347
+ readonly description: "Retrieve the execution history for a specific agent with pagination support.";
1348
+ readonly tags: readonly ["Agent Management"];
1349
+ readonly operationId: "getAgentHistory";
1350
+ readonly responses: {
1351
+ readonly 200: {
1352
+ readonly description: "Successfully retrieved agent execution history";
1353
+ readonly contentType: "application/json";
1354
+ };
1355
+ readonly 404: {
1356
+ readonly description: "Agent not found";
1357
+ readonly contentType: "application/json";
1358
+ };
1359
+ readonly 500: {
1360
+ readonly description: "Failed to retrieve agent history due to server error";
1361
+ readonly contentType: "application/json";
1362
+ };
1363
+ };
1364
+ };
1365
+ };
1366
+ /**
1367
+ * Helper to get all routes as an array
1368
+ */
1369
+ declare function getAllRoutesArray(): RouteDefinition[];
1370
+ /**
1371
+ * MCP route definitions
1372
+ */
1373
+ declare const MCP_ROUTES: {
1374
+ listServers: {
1375
+ method: "get";
1376
+ path: string;
1377
+ summary: string;
1378
+ description: string;
1379
+ tags: string[];
1380
+ operationId: string;
1381
+ responses: {
1382
+ 200: {
1383
+ description: string;
1384
+ contentType: string;
1385
+ };
1386
+ 500: {
1387
+ description: string;
1388
+ contentType: string;
1389
+ };
1390
+ };
1391
+ };
1392
+ getServer: {
1393
+ method: "get";
1394
+ path: string;
1395
+ summary: string;
1396
+ description: string;
1397
+ tags: string[];
1398
+ operationId: string;
1399
+ responses: {
1400
+ 200: {
1401
+ description: string;
1402
+ contentType: string;
1403
+ };
1404
+ 404: {
1405
+ description: string;
1406
+ contentType: string;
1407
+ };
1408
+ };
1409
+ };
1410
+ listTools: {
1411
+ method: "get";
1412
+ path: string;
1413
+ summary: string;
1414
+ description: string;
1415
+ tags: string[];
1416
+ operationId: string;
1417
+ responses: {
1418
+ 200: {
1419
+ description: string;
1420
+ contentType: string;
1421
+ };
1422
+ 404: {
1423
+ description: string;
1424
+ contentType: string;
1425
+ };
1426
+ 500: {
1427
+ description: string;
1428
+ contentType: string;
1429
+ };
1430
+ };
1431
+ };
1432
+ invokeTool: {
1433
+ method: "post";
1434
+ path: string;
1435
+ summary: string;
1436
+ description: string;
1437
+ tags: string[];
1438
+ operationId: string;
1439
+ responses: {
1440
+ 200: {
1441
+ description: string;
1442
+ contentType: string;
1443
+ };
1444
+ 404: {
1445
+ description: string;
1446
+ contentType: string;
1447
+ };
1448
+ 500: {
1449
+ description: string;
1450
+ contentType: string;
1451
+ };
1452
+ };
1453
+ };
1454
+ setLogLevel: {
1455
+ method: "post";
1456
+ path: string;
1457
+ summary: string;
1458
+ description: string;
1459
+ tags: string[];
1460
+ operationId: string;
1461
+ responses: {
1462
+ 200: {
1463
+ description: string;
1464
+ contentType: string;
1465
+ };
1466
+ 404: {
1467
+ description: string;
1468
+ contentType: string;
1469
+ };
1470
+ 500: {
1471
+ description: string;
1472
+ contentType: string;
1473
+ };
1474
+ };
1475
+ };
1476
+ listPrompts: {
1477
+ method: "get";
1478
+ path: string;
1479
+ summary: string;
1480
+ description: string;
1481
+ tags: string[];
1482
+ operationId: string;
1483
+ responses: {
1484
+ 200: {
1485
+ description: string;
1486
+ contentType: string;
1487
+ };
1488
+ 404: {
1489
+ description: string;
1490
+ contentType: string;
1491
+ };
1492
+ 500: {
1493
+ description: string;
1494
+ contentType: string;
1495
+ };
1496
+ };
1497
+ };
1498
+ getPrompt: {
1499
+ method: "get";
1500
+ path: string;
1501
+ summary: string;
1502
+ description: string;
1503
+ tags: string[];
1504
+ operationId: string;
1505
+ responses: {
1506
+ 200: {
1507
+ description: string;
1508
+ contentType: string;
1509
+ };
1510
+ 400: {
1511
+ description: string;
1512
+ contentType: string;
1513
+ };
1514
+ 404: {
1515
+ description: string;
1516
+ contentType: string;
1517
+ };
1518
+ 500: {
1519
+ description: string;
1520
+ contentType: string;
1521
+ };
1522
+ };
1523
+ };
1524
+ listResources: {
1525
+ method: "get";
1526
+ path: string;
1527
+ summary: string;
1528
+ description: string;
1529
+ tags: string[];
1530
+ operationId: string;
1531
+ responses: {
1532
+ 200: {
1533
+ description: string;
1534
+ contentType: string;
1535
+ };
1536
+ 404: {
1537
+ description: string;
1538
+ contentType: string;
1539
+ };
1540
+ 500: {
1541
+ description: string;
1542
+ contentType: string;
1543
+ };
1544
+ };
1545
+ };
1546
+ readResource: {
1547
+ method: "get";
1548
+ path: string;
1549
+ summary: string;
1550
+ description: string;
1551
+ tags: string[];
1552
+ operationId: string;
1553
+ responses: {
1554
+ 200: {
1555
+ description: string;
1556
+ contentType: string;
1557
+ };
1558
+ 400: {
1559
+ description: string;
1560
+ contentType: string;
1561
+ };
1562
+ 404: {
1563
+ description: string;
1564
+ contentType: string;
1565
+ };
1566
+ 500: {
1567
+ description: string;
1568
+ contentType: string;
1569
+ };
1570
+ };
1571
+ };
1572
+ listResourceTemplates: {
1573
+ method: "get";
1574
+ path: string;
1575
+ summary: string;
1576
+ description: string;
1577
+ tags: string[];
1578
+ operationId: string;
1579
+ responses: {
1580
+ 200: {
1581
+ description: string;
1582
+ contentType: string;
1583
+ };
1584
+ 404: {
1585
+ description: string;
1586
+ contentType: string;
1587
+ };
1588
+ 500: {
1589
+ description: string;
1590
+ contentType: string;
1591
+ };
1592
+ };
1593
+ };
1594
+ };
1595
+ declare const A2A_ROUTES: {
1596
+ agentCard: {
1597
+ method: "get";
1598
+ path: string;
1599
+ summary: string;
1600
+ description: string;
1601
+ tags: string[];
1602
+ operationId: string;
1603
+ responses: {
1604
+ 200: {
1605
+ description: string;
1606
+ contentType: string;
1607
+ };
1608
+ 404: {
1609
+ description: string;
1610
+ contentType: string;
1611
+ };
1612
+ 400: {
1613
+ description: string;
1614
+ contentType: string;
1615
+ };
1616
+ };
1617
+ };
1618
+ jsonRpc: {
1619
+ method: "post";
1620
+ path: string;
1621
+ summary: string;
1622
+ description: string;
1623
+ tags: string[];
1624
+ operationId: string;
1625
+ responses: {
1626
+ 200: {
1627
+ description: string;
1628
+ contentType: string;
1629
+ };
1630
+ 400: {
1631
+ description: string;
1632
+ contentType: string;
1633
+ };
1634
+ 404: {
1635
+ description: string;
1636
+ contentType: string;
1637
+ };
1638
+ };
1639
+ };
1640
+ };
1641
+ /**
1642
+ * Helper to get routes by tag
1643
+ */
1644
+ declare function getRoutesByTag(tag: string): RouteDefinition[];
1645
+
1646
+ /**
1647
+ * Framework-agnostic response types for server handlers
1648
+ */
1649
+ interface SuccessResponse<T = any> {
1650
+ success: true;
1651
+ data: T;
1652
+ }
1653
+ interface ErrorResponse {
1654
+ success: false;
1655
+ error: string;
1656
+ }
1657
+ type ApiResponse<T = any> = SuccessResponse<T> | ErrorResponse;
1658
+ type StreamResponse = Response | ReadableStream | ErrorResponse;
1659
+ declare function isErrorResponse(response: any): response is ErrorResponse;
1660
+ declare function isSuccessResponse<T>(response: any): response is SuccessResponse<T>;
1661
+
1662
+ /**
1663
+ * Handler for listing all agents
1664
+ * Returns agent data array
1665
+ */
1666
+ declare function handleGetAgents(deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1667
+ /**
1668
+ * Handler for generating text
1669
+ * Returns generated text data
1670
+ */
1671
+ declare function handleGenerateText(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<ApiResponse>;
1672
+ /**
1673
+ * Handler for streaming text generation with raw fullStream
1674
+ * Returns raw stream data via SSE
1675
+ */
1676
+ declare function handleStreamText(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
1677
+ /**
1678
+ * Handler for streaming chat messages
1679
+ * Returns AI SDK UI Message Stream Response
1680
+ */
1681
+ declare function handleChatStream(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
1682
+ /**
1683
+ * Handler for generating objects
1684
+ * Returns generated object data
1685
+ */
1686
+ declare function handleGenerateObject(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<ApiResponse>;
1687
+ /**
1688
+ * Handler for streaming object generation
1689
+ * Returns AI SDK Response or error
1690
+ */
1691
+ declare function handleStreamObject(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
1692
+
1693
+ /**
1694
+ * Handler for getting a single agent by ID
1695
+ * Returns agent data
1696
+ */
1697
+ declare function handleGetAgent(agentId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1698
+ /**
1699
+ * Handler for getting agent history
1700
+ * Returns agent history data
1701
+ */
1702
+ declare function handleGetAgentHistory(agentId: string, page: number, limit: number, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1703
+
1704
+ /**
1705
+ * Log filter options for querying logs
1706
+ */
1707
+ interface LogFilterOptions {
1708
+ limit?: number;
1709
+ level?: LogLevel;
1710
+ agentId?: string;
1711
+ conversationId?: string;
1712
+ workflowId?: string;
1713
+ executionId?: string;
1714
+ since?: string | Date;
1715
+ until?: string | Date;
1716
+ }
1717
+ interface LogHandlerResponse {
1718
+ logs: LogEntry[];
1719
+ total: number;
1720
+ query: LogFilter;
1721
+ }
1722
+ /**
1723
+ * Handler for getting logs with filters
1724
+ * Returns filtered log entries
1725
+ */
1726
+ declare function handleGetLogs(options: LogFilterOptions, _deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse<LogHandlerResponse>>;
1727
+
1728
+ /**
1729
+ * Handler for listing all workflows
1730
+ * Returns workflow list data
1731
+ */
1732
+ declare function handleGetWorkflows(deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1733
+ /**
1734
+ * Handler for getting a single workflow
1735
+ * Returns workflow detail data with inferred schemas
1736
+ */
1737
+ declare function handleGetWorkflow(workflowId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1738
+ /**
1739
+ * Handler for executing a workflow
1740
+ * Returns workflow execution result
1741
+ */
1742
+ declare function handleExecuteWorkflow(workflowId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1743
+ /**
1744
+ * Handler for streaming workflow execution
1745
+ * Returns a ReadableStream for SSE
1746
+ */
1747
+ declare function handleStreamWorkflow(workflowId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ReadableStream | ErrorResponse>;
1748
+ /**
1749
+ * Handler for suspending a workflow
1750
+ * Returns suspension result
1751
+ */
1752
+ declare function handleSuspendWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1753
+ /**
1754
+ * Handler for cancelling a workflow
1755
+ * Returns cancellation result
1756
+ */
1757
+ declare function handleCancelWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1758
+ /**
1759
+ * Handler for resuming a workflow
1760
+ * Returns resume result
1761
+ */
1762
+ declare function handleResumeWorkflow(workflowId: string, executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1763
+ /**
1764
+ * Handler for getting workflow execution state
1765
+ * Returns workflow state from Memory V2
1766
+ */
1767
+ declare function handleGetWorkflowState(workflowId: string, executionId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
1768
+
1769
+ type A2AJsonRpcId = string | number | null;
1770
+ interface JsonRpcError<Data = unknown> {
1771
+ code: number;
1772
+ message: string;
1773
+ data?: Data;
1774
+ }
1775
+ interface JsonRpcResponse<Result = unknown, ErrorData = unknown> {
1776
+ jsonrpc: "2.0";
1777
+ id: A2AJsonRpcId;
1778
+ result?: Result;
1779
+ error?: JsonRpcError<ErrorData> | null;
1780
+ }
1781
+ interface JsonRpcStream<Result = unknown, ErrorData = unknown> {
1782
+ kind: "stream";
1783
+ id: A2AJsonRpcId;
1784
+ stream: AsyncGenerator<JsonRpcResponse<Result, ErrorData>>;
1785
+ }
1786
+ type JsonRpcHandlerResult<Result = unknown, ErrorData = unknown> = JsonRpcResponse<Result, ErrorData> | JsonRpcStream<Result, ErrorData>;
1787
+ interface JsonRpcRequest<Params = unknown> {
1788
+ jsonrpc: "2.0";
1789
+ id: A2AJsonRpcId;
1790
+ method: string;
1791
+ params?: Params;
1792
+ }
1793
+ interface A2ARequestContext {
1794
+ userId?: string;
1795
+ sessionId?: string;
1796
+ metadata?: Record<string, unknown>;
1797
+ }
1798
+ interface AgentCardSkill {
1799
+ id: string;
1800
+ name: string;
1801
+ description?: string;
1802
+ tags?: string[];
1803
+ }
1804
+ interface AgentCardProviderInfo {
1805
+ organization?: string;
1806
+ url?: string;
1807
+ }
1808
+ interface AgentCardCapabilities {
1809
+ streaming: boolean;
1810
+ pushNotifications: boolean;
1811
+ stateTransitionHistory: boolean;
1812
+ }
1813
+ interface AgentCard {
1814
+ name: string;
1815
+ description?: string;
1816
+ url: string;
1817
+ provider?: AgentCardProviderInfo;
1818
+ version: string;
1819
+ capabilities: AgentCardCapabilities;
1820
+ defaultInputModes: string[];
1821
+ defaultOutputModes: string[];
1822
+ skills: AgentCardSkill[];
1823
+ }
1824
+ interface A2AServerLikeWithHandlers extends A2AServerLike {
1825
+ getAgentCard?(agentId: string, context?: A2ARequestContext): AgentCard;
1826
+ handleRequest?(agentId: string, request: JsonRpcRequest, context?: A2ARequestContext): Promise<JsonRpcHandlerResult>;
1827
+ }
1828
+ declare const A2AErrorCode: {
1829
+ readonly PARSE_ERROR: -32700;
1830
+ readonly INVALID_REQUEST: -32600;
1831
+ readonly METHOD_NOT_FOUND: -32601;
1832
+ readonly INVALID_PARAMS: -32602;
1833
+ readonly INTERNAL_ERROR: -32603;
1834
+ readonly TASK_NOT_FOUND: -32001;
1835
+ readonly TASK_NOT_CANCELABLE: -32002;
1836
+ readonly PUSH_NOTIFICATION_UNSUPPORTED: -32003;
1837
+ readonly UNSUPPORTED_OPERATION: -32004;
1838
+ };
1839
+ type A2AErrorCode = (typeof A2AErrorCode)[keyof typeof A2AErrorCode];
1840
+ declare class VoltA2AError extends Error {
1841
+ code: A2AErrorCode;
1842
+ data?: unknown | undefined;
1843
+ taskId?: string | undefined;
1844
+ constructor(code: A2AErrorCode, message: string, data?: unknown | undefined, taskId?: string | undefined);
1845
+ toJsonRpcError(): JsonRpcError;
1846
+ static parseError(details?: unknown): VoltA2AError;
1847
+ static invalidRequest(message?: string, details?: unknown): VoltA2AError;
1848
+ static methodNotFound(method: string): VoltA2AError;
1849
+ static invalidParams(message?: string, details?: unknown): VoltA2AError;
1850
+ static taskNotFound(taskId: string): VoltA2AError;
1851
+ static taskNotCancelable(taskId: string): VoltA2AError;
1852
+ static unsupportedOperation(message?: string): VoltA2AError;
1853
+ static internal(message?: string, details?: unknown): VoltA2AError;
1854
+ }
1855
+ declare function normalizeError(id: A2AJsonRpcId, cause: unknown): JsonRpcResponse<never>;
1856
+ declare function isJsonRpcRequest(value: unknown): value is JsonRpcRequest;
1857
+
1858
+ declare function parseJsonRpcRequest(payload: unknown): JsonRpcRequest;
1859
+ declare function resolveAgentCard(registry: A2AServerRegistry<A2AServerLikeWithHandlers>, serverId: string, agentId: string, context?: A2ARequestContext): AgentCard;
1860
+ declare function executeA2ARequest(params: {
1861
+ registry: A2AServerRegistry<A2AServerLikeWithHandlers>;
1862
+ serverId: string;
1863
+ request: JsonRpcRequest;
1864
+ context?: A2ARequestContext;
1865
+ logger?: Logger;
1866
+ }): Promise<JsonRpcHandlerResult>;
1867
+
1868
+ interface LogResponseData {
1869
+ success: true;
1870
+ data: LogEntry[];
1871
+ total: number;
1872
+ query: LogFilter;
1873
+ }
1874
+ /**
1875
+ * Maps a log handler response to match OpenAPI schema expectations
1876
+ * Extracts nested data properties to root level
1877
+ */
1878
+ declare function mapLogResponse(response: ApiResponse<LogHandlerResponse>): LogResponseData | ErrorResponse;
1879
+ /**
1880
+ * Maps a generic handler response to framework-specific format
1881
+ * Can be extended for other response types as needed
1882
+ */
1883
+ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiResponse;
1884
+ /**
1885
+ * Extracts HTTP status code from response
1886
+ */
1887
+ declare function getResponseStatus(response: ApiResponse): number;
1888
+
1889
+ export { handleGetWorkflowState as $, type ApiResponse as A, handleGetAgents as B, handleGenerateText as C, handleStreamText as D, type ErrorResponse as E, handleChatStream as F, handleGenerateObject as G, type HttpMethod as H, handleStreamObject as I, type JsonRpcError as J, handleGetAgent as K, LOG_ROUTES as L, MCP_ROUTES as M, handleGetAgentHistory as N, OBSERVABILITY_ROUTES as O, handleGetWorkflows as P, handleGetWorkflow as Q, type ResponseDefinition as R, type SuccessResponse as S, handleExecuteWorkflow as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleStreamWorkflow as X, handleSuspendWorkflow as Y, handleCancelWorkflow as Z, handleResumeWorkflow as _, type A2AServerLikeWithHandlers as a, type LogFilterOptions as a0, type LogHandlerResponse as a1, handleGetLogs as a2, mapLogResponse as a3, mapHandlerResponse as a4, getResponseStatus as a5, type OpenApiInfo as a6, type AppSetupConfig as a7, getOrCreateLogger as a8, shouldEnableSwaggerUI as a9, getOpenApiDoc as aa, DEFAULT_CORS_OPTIONS as ab, type StreamResponse as b, isSuccessResponse as c, type RouteDefinition as d, AGENT_ROUTES as e, ALL_ROUTES as f, getAllRoutesArray as g, A2A_ROUTES as h, isErrorResponse as i, getRoutesByTag as j, executeA2ARequest as k, type A2AJsonRpcId as l, type JsonRpcResponse as m, type JsonRpcStream as n, type JsonRpcHandlerResult as o, parseJsonRpcRequest as p, type JsonRpcRequest as q, resolveAgentCard as r, type A2ARequestContext as s, type AgentCardSkill as t, type AgentCardProviderInfo as u, type AgentCardCapabilities as v, type AgentCard as w, A2AErrorCode as x, normalizeError as y, isJsonRpcRequest as z };