kavachos 0.0.4 → 0.0.6

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.
Files changed (44) hide show
  1. package/dist/a2a/index.d.ts +2340 -0
  2. package/dist/a2a/index.js +821 -0
  3. package/dist/a2a/index.js.map +1 -0
  4. package/dist/agent/index.d.ts +3 -4
  5. package/dist/agent/index.js +4 -3
  6. package/dist/audit/index.d.ts +2 -3
  7. package/dist/audit/index.js +3 -3
  8. package/dist/auth/index.d.ts +490 -93
  9. package/dist/auth/index.js +4 -3
  10. package/dist/{chunk-KL6XW4S4.js → chunk-FKVAXCNJ.js} +2375 -633
  11. package/dist/chunk-FKVAXCNJ.js.map +1 -0
  12. package/dist/{chunk-5DT4DN4Y.js → chunk-IKTOSJ4O.js} +13 -13
  13. package/dist/chunk-IKTOSJ4O.js.map +1 -0
  14. package/dist/{chunk-V66UUIA7.js → chunk-KDL6A76K.js} +93 -4
  15. package/dist/chunk-KDL6A76K.js.map +1 -0
  16. package/dist/chunk-NSBPE2FW.js +15 -0
  17. package/dist/{chunk-PZ5AY32C.js.map → chunk-NSBPE2FW.js.map} +1 -1
  18. package/dist/chunk-NSTER7KE.js +538 -0
  19. package/dist/chunk-NSTER7KE.js.map +1 -0
  20. package/dist/chunk-QCRHJMDX.js +186 -0
  21. package/dist/chunk-QCRHJMDX.js.map +1 -0
  22. package/dist/{chunk-OVGNZ5OX.js → chunk-VHKZARMM.js} +6 -6
  23. package/dist/chunk-VHKZARMM.js.map +1 -0
  24. package/dist/{chunk-SJGSPIAD.js → chunk-Y3OWAJHK.js} +3 -3
  25. package/dist/{chunk-SJGSPIAD.js.map → chunk-Y3OWAJHK.js.map} +1 -1
  26. package/dist/index.d.ts +138 -6
  27. package/dist/index.js +580 -35
  28. package/dist/index.js.map +1 -1
  29. package/dist/mcp/index.d.ts +2 -2
  30. package/dist/mcp/index.js +12 -16
  31. package/dist/mcp/index.js.map +1 -1
  32. package/dist/permission/index.d.ts +3 -4
  33. package/dist/permission/index.js +4 -3
  34. package/dist/{types-Xk83hv4O.d.ts → types-W8X0PXE7.d.ts} +1764 -99
  35. package/dist/vc/index.d.ts +800 -0
  36. package/dist/vc/index.js +5 -0
  37. package/dist/vc/index.js.map +1 -0
  38. package/package.json +17 -1
  39. package/dist/chunk-5DT4DN4Y.js.map +0 -1
  40. package/dist/chunk-KL6XW4S4.js.map +0 -1
  41. package/dist/chunk-OVGNZ5OX.js.map +0 -1
  42. package/dist/chunk-PZ5AY32C.js +0 -9
  43. package/dist/chunk-V66UUIA7.js.map +0 -1
  44. package/dist/{types-mwupB57A.d.ts → types-BuHrZcjE.d.ts} +2 -2
@@ -0,0 +1,2340 @@
1
+ import * as jose from 'jose';
2
+ import { A as AgentIdentity } from '../types-W8X0PXE7.js';
3
+ import { z } from 'zod';
4
+ import { R as Result } from '../types-BuHrZcjE.js';
5
+ import 'drizzle-orm/sqlite-core';
6
+
7
+ /**
8
+ * A2A (Agent-to-Agent) protocol types for KavachOS.
9
+ *
10
+ * Implements the Google Agent2Agent protocol specification for
11
+ * agent interoperability. Covers Agent Cards, JSON-RPC methods,
12
+ * task lifecycle, message/artifact types, and authentication schemes.
13
+ *
14
+ * @see https://a2a-protocol.org/latest/specification/
15
+ */
16
+
17
+ declare const A2A_PROTOCOL_VERSION = "0.3";
18
+ declare const A2A_JSONRPC_VERSION = "2.0";
19
+ declare const A2A_WELL_KNOWN_PATH = "/.well-known/agent.json";
20
+ type A2ARole = "user" | "agent";
21
+ type A2ATaskState = "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
22
+ interface A2ATextPart {
23
+ type: "text";
24
+ text: string;
25
+ }
26
+ interface A2AFilePart {
27
+ type: "file";
28
+ fileUri: string;
29
+ mimeType: string;
30
+ name?: string;
31
+ }
32
+ interface A2ADataPart {
33
+ type: "data";
34
+ mimeType: string;
35
+ data: string;
36
+ }
37
+ type A2APart = A2ATextPart | A2AFilePart | A2ADataPart;
38
+ interface A2AMessage {
39
+ id: string;
40
+ role: A2ARole;
41
+ parts: A2APart[];
42
+ createdAt: string;
43
+ metadata?: Record<string, unknown>;
44
+ referenceTaskIds?: string[];
45
+ }
46
+ interface A2AArtifact {
47
+ id: string;
48
+ name?: string;
49
+ mimeType?: string;
50
+ parts: A2APart[];
51
+ metadata?: Record<string, unknown>;
52
+ createdAt: string;
53
+ }
54
+ interface A2ATaskStatus {
55
+ code: A2ATaskState;
56
+ message?: string;
57
+ progress?: number;
58
+ }
59
+ interface A2ATask {
60
+ id: string;
61
+ contextId: string;
62
+ status: A2ATaskStatus;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ history?: A2AMessage[];
66
+ artifacts?: A2AArtifact[];
67
+ metadata?: Record<string, unknown>;
68
+ }
69
+ interface A2ATaskStatusUpdateEvent {
70
+ taskId: string;
71
+ contextId: string;
72
+ newState: A2ATaskState;
73
+ newStatus: A2ATaskStatus;
74
+ timestamp: string;
75
+ metadata?: Record<string, unknown>;
76
+ }
77
+ interface A2ATaskArtifactUpdateEvent {
78
+ taskId: string;
79
+ contextId: string;
80
+ artifactId: string;
81
+ artifact: A2AArtifact;
82
+ timestamp: string;
83
+ }
84
+ type A2AStreamEvent = {
85
+ type: "task";
86
+ task: A2ATask;
87
+ } | {
88
+ type: "message";
89
+ message: A2AMessage;
90
+ } | {
91
+ type: "statusUpdate";
92
+ event: A2ATaskStatusUpdateEvent;
93
+ } | {
94
+ type: "artifactUpdate";
95
+ event: A2ATaskArtifactUpdateEvent;
96
+ };
97
+ interface A2AApiKeySecurityScheme {
98
+ type: "apiKey";
99
+ name: string;
100
+ in: "query" | "header" | "cookie";
101
+ description?: string;
102
+ }
103
+ interface A2AHttpSecurityScheme {
104
+ type: "http";
105
+ scheme: string;
106
+ bearerFormat?: string;
107
+ description?: string;
108
+ }
109
+ interface A2AOAuth2Flow {
110
+ authorizationUrl?: string;
111
+ tokenUrl?: string;
112
+ refreshUrl?: string;
113
+ scopes: Record<string, string>;
114
+ }
115
+ interface A2AOAuth2SecurityScheme {
116
+ type: "oauth2";
117
+ flows: {
118
+ implicit?: A2AOAuth2Flow;
119
+ password?: A2AOAuth2Flow;
120
+ clientCredentials?: A2AOAuth2Flow;
121
+ authorizationCode?: A2AOAuth2Flow;
122
+ deviceCode?: A2AOAuth2Flow;
123
+ };
124
+ description?: string;
125
+ }
126
+ interface A2AOidcSecurityScheme {
127
+ type: "openIdConnect";
128
+ openIdConnectUrl: string;
129
+ description?: string;
130
+ }
131
+ interface A2AMutualTlsSecurityScheme {
132
+ type: "mutualTls";
133
+ description?: string;
134
+ }
135
+ type A2ASecurityScheme = A2AApiKeySecurityScheme | A2AHttpSecurityScheme | A2AOAuth2SecurityScheme | A2AOidcSecurityScheme | A2AMutualTlsSecurityScheme;
136
+ interface A2AAgentProvider {
137
+ name: string;
138
+ email?: string;
139
+ url?: string;
140
+ }
141
+ interface A2AAgentSkill {
142
+ id: string;
143
+ name: string;
144
+ description: string;
145
+ inputSchema?: Record<string, unknown>;
146
+ outputSchema?: Record<string, unknown>;
147
+ supportedMediaTypes?: string[];
148
+ tags?: string[];
149
+ }
150
+ interface A2AAgentCapabilities {
151
+ streaming?: boolean;
152
+ pushNotifications?: boolean;
153
+ extendedAgentCard?: boolean;
154
+ }
155
+ interface A2AAgentCardSignature {
156
+ algorithm: string;
157
+ signature: string;
158
+ keyId: string;
159
+ }
160
+ interface A2AAgentCard {
161
+ id: string;
162
+ name: string;
163
+ description: string;
164
+ version: string;
165
+ protocolVersion: string;
166
+ url: string;
167
+ provider?: A2AAgentProvider;
168
+ capabilities?: A2AAgentCapabilities;
169
+ skills: A2AAgentSkill[];
170
+ securitySchemes?: Record<string, A2ASecurityScheme>;
171
+ security?: Array<Record<string, string[]>>;
172
+ defaultInputModes?: string[];
173
+ defaultOutputModes?: string[];
174
+ documentationUrl?: string;
175
+ signature?: A2AAgentCardSignature;
176
+ metadata?: Record<string, unknown>;
177
+ }
178
+ interface A2AJsonRpcRequest<P = unknown> {
179
+ jsonrpc: "2.0";
180
+ id: string | number;
181
+ method: string;
182
+ params: P;
183
+ }
184
+ interface A2AJsonRpcResponse<R = unknown> {
185
+ jsonrpc: "2.0";
186
+ id: string | number;
187
+ result?: R;
188
+ error?: A2AJsonRpcError;
189
+ }
190
+ interface A2AJsonRpcError {
191
+ code: number;
192
+ message: string;
193
+ data?: unknown;
194
+ }
195
+ declare const A2A_ERROR_CODES: {
196
+ readonly PARSE_ERROR: -32700;
197
+ readonly INVALID_REQUEST: -32600;
198
+ readonly METHOD_NOT_FOUND: -32601;
199
+ readonly INVALID_PARAMS: -32602;
200
+ readonly INTERNAL_ERROR: -32603;
201
+ readonly TASK_NOT_FOUND: -32001;
202
+ readonly AGENT_NOT_FOUND: -32002;
203
+ readonly AUTHENTICATION_REQUIRED: -32003;
204
+ readonly PERMISSION_DENIED: -32004;
205
+ readonly RATE_LIMITED: -32005;
206
+ readonly TASK_ALREADY_COMPLETED: -32006;
207
+ };
208
+ interface A2ASendMessageParams {
209
+ message: A2AMessage;
210
+ configuration?: A2ASendMessageConfiguration;
211
+ metadata?: Record<string, unknown>;
212
+ }
213
+ interface A2ASendMessageConfiguration {
214
+ acceptedOutputModes?: string[];
215
+ historyLength?: number;
216
+ returnImmediately?: boolean;
217
+ }
218
+ interface A2AGetTaskParams {
219
+ id: string;
220
+ historyLength?: number;
221
+ }
222
+ interface A2ACancelTaskParams {
223
+ id: string;
224
+ metadata?: Record<string, unknown>;
225
+ }
226
+ declare const A2A_METHODS: {
227
+ readonly SEND_MESSAGE: "message/send";
228
+ readonly SEND_STREAMING_MESSAGE: "message/stream";
229
+ readonly GET_TASK: "tasks/get";
230
+ readonly CANCEL_TASK: "tasks/cancel";
231
+ };
232
+ interface A2ATaskHandler {
233
+ /** Handle an incoming message and produce a task result */
234
+ onMessage: (message: A2AMessage, config?: A2ASendMessageConfiguration) => Promise<A2ATask>;
235
+ /** Handle task cancellation */
236
+ onCancel?: (taskId: string) => Promise<A2ATask>;
237
+ /** Handle streaming message — yields events instead of returning a task */
238
+ onMessageStream?: (message: A2AMessage, config?: A2ASendMessageConfiguration) => AsyncIterable<A2AStreamEvent>;
239
+ }
240
+ interface A2AServerConfig {
241
+ /** Agent card for this server */
242
+ agentCard: A2AAgentCard;
243
+ /** Handler for incoming tasks */
244
+ handler: A2ATaskHandler;
245
+ /** Validate an incoming auth token. Return the agent ID or null if invalid. */
246
+ authenticate?: (request: Request) => Promise<string | null>;
247
+ /** Called after each A2A interaction for audit logging */
248
+ onAudit?: (event: A2AAuditEvent) => Promise<void>;
249
+ /** In-memory or external task store. Defaults to in-memory Map. */
250
+ taskStore?: A2ATaskStore;
251
+ }
252
+ interface A2ATaskStore {
253
+ get: (taskId: string) => Promise<A2ATask | undefined>;
254
+ set: (taskId: string, task: A2ATask) => Promise<void>;
255
+ delete: (taskId: string) => Promise<boolean>;
256
+ }
257
+ interface A2AAuditEvent {
258
+ method: string;
259
+ agentId: string | null;
260
+ taskId?: string;
261
+ timestamp: string;
262
+ success: boolean;
263
+ error?: string;
264
+ }
265
+ interface A2AClientConfig {
266
+ /** Base URL of the remote A2A agent, or a discovered Agent Card */
267
+ agent: string | A2AAgentCard;
268
+ /** Auth token or function that returns a token */
269
+ getAuthToken?: () => Promise<string> | string;
270
+ /** Custom fetch implementation (for testing or proxying) */
271
+ fetch?: typeof globalThis.fetch;
272
+ /** Request timeout in milliseconds. Default: 30_000. */
273
+ timeout?: number;
274
+ }
275
+ interface A2AClient {
276
+ /** Discover the remote agent's card from /.well-known/agent.json */
277
+ discover: () => Promise<Result<A2AAgentCard>>;
278
+ /** Send a message and get a task back */
279
+ sendMessage: (params: A2ASendMessageParams) => Promise<Result<A2ATask>>;
280
+ /** Get an existing task by ID */
281
+ getTask: (params: A2AGetTaskParams) => Promise<Result<A2ATask>>;
282
+ /** Cancel a running task */
283
+ cancelTask: (params: A2ACancelTaskParams) => Promise<Result<A2ATask>>;
284
+ /** Send a streaming message and receive SSE events */
285
+ sendStreamingMessage: (params: A2ASendMessageParams) => AsyncIterable<A2AStreamEvent>;
286
+ }
287
+ declare const A2ATextPartSchema: z.ZodObject<{
288
+ type: z.ZodLiteral<"text">;
289
+ text: z.ZodString;
290
+ }, "strip", z.ZodTypeAny, {
291
+ text: string;
292
+ type: "text";
293
+ }, {
294
+ text: string;
295
+ type: "text";
296
+ }>;
297
+ declare const A2AFilePartSchema: z.ZodObject<{
298
+ type: z.ZodLiteral<"file">;
299
+ fileUri: z.ZodString;
300
+ mimeType: z.ZodString;
301
+ name: z.ZodOptional<z.ZodString>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ type: "file";
304
+ fileUri: string;
305
+ mimeType: string;
306
+ name?: string | undefined;
307
+ }, {
308
+ type: "file";
309
+ fileUri: string;
310
+ mimeType: string;
311
+ name?: string | undefined;
312
+ }>;
313
+ declare const A2ADataPartSchema: z.ZodObject<{
314
+ type: z.ZodLiteral<"data">;
315
+ mimeType: z.ZodString;
316
+ data: z.ZodString;
317
+ }, "strip", z.ZodTypeAny, {
318
+ data: string;
319
+ type: "data";
320
+ mimeType: string;
321
+ }, {
322
+ data: string;
323
+ type: "data";
324
+ mimeType: string;
325
+ }>;
326
+ declare const A2APartSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
327
+ type: z.ZodLiteral<"text">;
328
+ text: z.ZodString;
329
+ }, "strip", z.ZodTypeAny, {
330
+ text: string;
331
+ type: "text";
332
+ }, {
333
+ text: string;
334
+ type: "text";
335
+ }>, z.ZodObject<{
336
+ type: z.ZodLiteral<"file">;
337
+ fileUri: z.ZodString;
338
+ mimeType: z.ZodString;
339
+ name: z.ZodOptional<z.ZodString>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ type: "file";
342
+ fileUri: string;
343
+ mimeType: string;
344
+ name?: string | undefined;
345
+ }, {
346
+ type: "file";
347
+ fileUri: string;
348
+ mimeType: string;
349
+ name?: string | undefined;
350
+ }>, z.ZodObject<{
351
+ type: z.ZodLiteral<"data">;
352
+ mimeType: z.ZodString;
353
+ data: z.ZodString;
354
+ }, "strip", z.ZodTypeAny, {
355
+ data: string;
356
+ type: "data";
357
+ mimeType: string;
358
+ }, {
359
+ data: string;
360
+ type: "data";
361
+ mimeType: string;
362
+ }>]>;
363
+ declare const A2AMessageSchema: z.ZodObject<{
364
+ id: z.ZodString;
365
+ role: z.ZodEnum<["user", "agent"]>;
366
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
367
+ type: z.ZodLiteral<"text">;
368
+ text: z.ZodString;
369
+ }, "strip", z.ZodTypeAny, {
370
+ text: string;
371
+ type: "text";
372
+ }, {
373
+ text: string;
374
+ type: "text";
375
+ }>, z.ZodObject<{
376
+ type: z.ZodLiteral<"file">;
377
+ fileUri: z.ZodString;
378
+ mimeType: z.ZodString;
379
+ name: z.ZodOptional<z.ZodString>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ type: "file";
382
+ fileUri: string;
383
+ mimeType: string;
384
+ name?: string | undefined;
385
+ }, {
386
+ type: "file";
387
+ fileUri: string;
388
+ mimeType: string;
389
+ name?: string | undefined;
390
+ }>, z.ZodObject<{
391
+ type: z.ZodLiteral<"data">;
392
+ mimeType: z.ZodString;
393
+ data: z.ZodString;
394
+ }, "strip", z.ZodTypeAny, {
395
+ data: string;
396
+ type: "data";
397
+ mimeType: string;
398
+ }, {
399
+ data: string;
400
+ type: "data";
401
+ mimeType: string;
402
+ }>]>, "many">;
403
+ createdAt: z.ZodString;
404
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
405
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ id: string;
408
+ createdAt: string;
409
+ role: "user" | "agent";
410
+ parts: ({
411
+ text: string;
412
+ type: "text";
413
+ } | {
414
+ type: "file";
415
+ fileUri: string;
416
+ mimeType: string;
417
+ name?: string | undefined;
418
+ } | {
419
+ data: string;
420
+ type: "data";
421
+ mimeType: string;
422
+ })[];
423
+ metadata?: Record<string, unknown> | undefined;
424
+ referenceTaskIds?: string[] | undefined;
425
+ }, {
426
+ id: string;
427
+ createdAt: string;
428
+ role: "user" | "agent";
429
+ parts: ({
430
+ text: string;
431
+ type: "text";
432
+ } | {
433
+ type: "file";
434
+ fileUri: string;
435
+ mimeType: string;
436
+ name?: string | undefined;
437
+ } | {
438
+ data: string;
439
+ type: "data";
440
+ mimeType: string;
441
+ })[];
442
+ metadata?: Record<string, unknown> | undefined;
443
+ referenceTaskIds?: string[] | undefined;
444
+ }>;
445
+ declare const A2ATaskStateSchema: z.ZodEnum<["submitted", "working", "input-required", "completed", "failed", "canceled", "auth-required", "rejected"]>;
446
+ declare const A2ATaskStatusSchema: z.ZodObject<{
447
+ code: z.ZodEnum<["submitted", "working", "input-required", "completed", "failed", "canceled", "auth-required", "rejected"]>;
448
+ message: z.ZodOptional<z.ZodString>;
449
+ progress: z.ZodOptional<z.ZodNumber>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
452
+ message?: string | undefined;
453
+ progress?: number | undefined;
454
+ }, {
455
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
456
+ message?: string | undefined;
457
+ progress?: number | undefined;
458
+ }>;
459
+ declare const A2AArtifactSchema: z.ZodObject<{
460
+ id: z.ZodString;
461
+ name: z.ZodOptional<z.ZodString>;
462
+ mimeType: z.ZodOptional<z.ZodString>;
463
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
464
+ type: z.ZodLiteral<"text">;
465
+ text: z.ZodString;
466
+ }, "strip", z.ZodTypeAny, {
467
+ text: string;
468
+ type: "text";
469
+ }, {
470
+ text: string;
471
+ type: "text";
472
+ }>, z.ZodObject<{
473
+ type: z.ZodLiteral<"file">;
474
+ fileUri: z.ZodString;
475
+ mimeType: z.ZodString;
476
+ name: z.ZodOptional<z.ZodString>;
477
+ }, "strip", z.ZodTypeAny, {
478
+ type: "file";
479
+ fileUri: string;
480
+ mimeType: string;
481
+ name?: string | undefined;
482
+ }, {
483
+ type: "file";
484
+ fileUri: string;
485
+ mimeType: string;
486
+ name?: string | undefined;
487
+ }>, z.ZodObject<{
488
+ type: z.ZodLiteral<"data">;
489
+ mimeType: z.ZodString;
490
+ data: z.ZodString;
491
+ }, "strip", z.ZodTypeAny, {
492
+ data: string;
493
+ type: "data";
494
+ mimeType: string;
495
+ }, {
496
+ data: string;
497
+ type: "data";
498
+ mimeType: string;
499
+ }>]>, "many">;
500
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
501
+ createdAt: z.ZodString;
502
+ }, "strip", z.ZodTypeAny, {
503
+ id: string;
504
+ createdAt: string;
505
+ parts: ({
506
+ text: string;
507
+ type: "text";
508
+ } | {
509
+ type: "file";
510
+ fileUri: string;
511
+ mimeType: string;
512
+ name?: string | undefined;
513
+ } | {
514
+ data: string;
515
+ type: "data";
516
+ mimeType: string;
517
+ })[];
518
+ name?: string | undefined;
519
+ metadata?: Record<string, unknown> | undefined;
520
+ mimeType?: string | undefined;
521
+ }, {
522
+ id: string;
523
+ createdAt: string;
524
+ parts: ({
525
+ text: string;
526
+ type: "text";
527
+ } | {
528
+ type: "file";
529
+ fileUri: string;
530
+ mimeType: string;
531
+ name?: string | undefined;
532
+ } | {
533
+ data: string;
534
+ type: "data";
535
+ mimeType: string;
536
+ })[];
537
+ name?: string | undefined;
538
+ metadata?: Record<string, unknown> | undefined;
539
+ mimeType?: string | undefined;
540
+ }>;
541
+ declare const A2ATaskSchema: z.ZodObject<{
542
+ id: z.ZodString;
543
+ contextId: z.ZodString;
544
+ status: z.ZodObject<{
545
+ code: z.ZodEnum<["submitted", "working", "input-required", "completed", "failed", "canceled", "auth-required", "rejected"]>;
546
+ message: z.ZodOptional<z.ZodString>;
547
+ progress: z.ZodOptional<z.ZodNumber>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
550
+ message?: string | undefined;
551
+ progress?: number | undefined;
552
+ }, {
553
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
554
+ message?: string | undefined;
555
+ progress?: number | undefined;
556
+ }>;
557
+ createdAt: z.ZodString;
558
+ updatedAt: z.ZodString;
559
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
560
+ id: z.ZodString;
561
+ role: z.ZodEnum<["user", "agent"]>;
562
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
563
+ type: z.ZodLiteral<"text">;
564
+ text: z.ZodString;
565
+ }, "strip", z.ZodTypeAny, {
566
+ text: string;
567
+ type: "text";
568
+ }, {
569
+ text: string;
570
+ type: "text";
571
+ }>, z.ZodObject<{
572
+ type: z.ZodLiteral<"file">;
573
+ fileUri: z.ZodString;
574
+ mimeType: z.ZodString;
575
+ name: z.ZodOptional<z.ZodString>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ type: "file";
578
+ fileUri: string;
579
+ mimeType: string;
580
+ name?: string | undefined;
581
+ }, {
582
+ type: "file";
583
+ fileUri: string;
584
+ mimeType: string;
585
+ name?: string | undefined;
586
+ }>, z.ZodObject<{
587
+ type: z.ZodLiteral<"data">;
588
+ mimeType: z.ZodString;
589
+ data: z.ZodString;
590
+ }, "strip", z.ZodTypeAny, {
591
+ data: string;
592
+ type: "data";
593
+ mimeType: string;
594
+ }, {
595
+ data: string;
596
+ type: "data";
597
+ mimeType: string;
598
+ }>]>, "many">;
599
+ createdAt: z.ZodString;
600
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
601
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
602
+ }, "strip", z.ZodTypeAny, {
603
+ id: string;
604
+ createdAt: string;
605
+ role: "user" | "agent";
606
+ parts: ({
607
+ text: string;
608
+ type: "text";
609
+ } | {
610
+ type: "file";
611
+ fileUri: string;
612
+ mimeType: string;
613
+ name?: string | undefined;
614
+ } | {
615
+ data: string;
616
+ type: "data";
617
+ mimeType: string;
618
+ })[];
619
+ metadata?: Record<string, unknown> | undefined;
620
+ referenceTaskIds?: string[] | undefined;
621
+ }, {
622
+ id: string;
623
+ createdAt: string;
624
+ role: "user" | "agent";
625
+ parts: ({
626
+ text: string;
627
+ type: "text";
628
+ } | {
629
+ type: "file";
630
+ fileUri: string;
631
+ mimeType: string;
632
+ name?: string | undefined;
633
+ } | {
634
+ data: string;
635
+ type: "data";
636
+ mimeType: string;
637
+ })[];
638
+ metadata?: Record<string, unknown> | undefined;
639
+ referenceTaskIds?: string[] | undefined;
640
+ }>, "many">>;
641
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
642
+ id: z.ZodString;
643
+ name: z.ZodOptional<z.ZodString>;
644
+ mimeType: z.ZodOptional<z.ZodString>;
645
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
646
+ type: z.ZodLiteral<"text">;
647
+ text: z.ZodString;
648
+ }, "strip", z.ZodTypeAny, {
649
+ text: string;
650
+ type: "text";
651
+ }, {
652
+ text: string;
653
+ type: "text";
654
+ }>, z.ZodObject<{
655
+ type: z.ZodLiteral<"file">;
656
+ fileUri: z.ZodString;
657
+ mimeType: z.ZodString;
658
+ name: z.ZodOptional<z.ZodString>;
659
+ }, "strip", z.ZodTypeAny, {
660
+ type: "file";
661
+ fileUri: string;
662
+ mimeType: string;
663
+ name?: string | undefined;
664
+ }, {
665
+ type: "file";
666
+ fileUri: string;
667
+ mimeType: string;
668
+ name?: string | undefined;
669
+ }>, z.ZodObject<{
670
+ type: z.ZodLiteral<"data">;
671
+ mimeType: z.ZodString;
672
+ data: z.ZodString;
673
+ }, "strip", z.ZodTypeAny, {
674
+ data: string;
675
+ type: "data";
676
+ mimeType: string;
677
+ }, {
678
+ data: string;
679
+ type: "data";
680
+ mimeType: string;
681
+ }>]>, "many">;
682
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
683
+ createdAt: z.ZodString;
684
+ }, "strip", z.ZodTypeAny, {
685
+ id: string;
686
+ createdAt: string;
687
+ parts: ({
688
+ text: string;
689
+ type: "text";
690
+ } | {
691
+ type: "file";
692
+ fileUri: string;
693
+ mimeType: string;
694
+ name?: string | undefined;
695
+ } | {
696
+ data: string;
697
+ type: "data";
698
+ mimeType: string;
699
+ })[];
700
+ name?: string | undefined;
701
+ metadata?: Record<string, unknown> | undefined;
702
+ mimeType?: string | undefined;
703
+ }, {
704
+ id: string;
705
+ createdAt: string;
706
+ parts: ({
707
+ text: string;
708
+ type: "text";
709
+ } | {
710
+ type: "file";
711
+ fileUri: string;
712
+ mimeType: string;
713
+ name?: string | undefined;
714
+ } | {
715
+ data: string;
716
+ type: "data";
717
+ mimeType: string;
718
+ })[];
719
+ name?: string | undefined;
720
+ metadata?: Record<string, unknown> | undefined;
721
+ mimeType?: string | undefined;
722
+ }>, "many">>;
723
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
724
+ }, "strip", z.ZodTypeAny, {
725
+ id: string;
726
+ createdAt: string;
727
+ updatedAt: string;
728
+ status: {
729
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
730
+ message?: string | undefined;
731
+ progress?: number | undefined;
732
+ };
733
+ contextId: string;
734
+ metadata?: Record<string, unknown> | undefined;
735
+ history?: {
736
+ id: string;
737
+ createdAt: string;
738
+ role: "user" | "agent";
739
+ parts: ({
740
+ text: string;
741
+ type: "text";
742
+ } | {
743
+ type: "file";
744
+ fileUri: string;
745
+ mimeType: string;
746
+ name?: string | undefined;
747
+ } | {
748
+ data: string;
749
+ type: "data";
750
+ mimeType: string;
751
+ })[];
752
+ metadata?: Record<string, unknown> | undefined;
753
+ referenceTaskIds?: string[] | undefined;
754
+ }[] | undefined;
755
+ artifacts?: {
756
+ id: string;
757
+ createdAt: string;
758
+ parts: ({
759
+ text: string;
760
+ type: "text";
761
+ } | {
762
+ type: "file";
763
+ fileUri: string;
764
+ mimeType: string;
765
+ name?: string | undefined;
766
+ } | {
767
+ data: string;
768
+ type: "data";
769
+ mimeType: string;
770
+ })[];
771
+ name?: string | undefined;
772
+ metadata?: Record<string, unknown> | undefined;
773
+ mimeType?: string | undefined;
774
+ }[] | undefined;
775
+ }, {
776
+ id: string;
777
+ createdAt: string;
778
+ updatedAt: string;
779
+ status: {
780
+ code: "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled" | "auth-required" | "rejected";
781
+ message?: string | undefined;
782
+ progress?: number | undefined;
783
+ };
784
+ contextId: string;
785
+ metadata?: Record<string, unknown> | undefined;
786
+ history?: {
787
+ id: string;
788
+ createdAt: string;
789
+ role: "user" | "agent";
790
+ parts: ({
791
+ text: string;
792
+ type: "text";
793
+ } | {
794
+ type: "file";
795
+ fileUri: string;
796
+ mimeType: string;
797
+ name?: string | undefined;
798
+ } | {
799
+ data: string;
800
+ type: "data";
801
+ mimeType: string;
802
+ })[];
803
+ metadata?: Record<string, unknown> | undefined;
804
+ referenceTaskIds?: string[] | undefined;
805
+ }[] | undefined;
806
+ artifacts?: {
807
+ id: string;
808
+ createdAt: string;
809
+ parts: ({
810
+ text: string;
811
+ type: "text";
812
+ } | {
813
+ type: "file";
814
+ fileUri: string;
815
+ mimeType: string;
816
+ name?: string | undefined;
817
+ } | {
818
+ data: string;
819
+ type: "data";
820
+ mimeType: string;
821
+ })[];
822
+ name?: string | undefined;
823
+ metadata?: Record<string, unknown> | undefined;
824
+ mimeType?: string | undefined;
825
+ }[] | undefined;
826
+ }>;
827
+ declare const A2AAgentSkillSchema: z.ZodObject<{
828
+ id: z.ZodString;
829
+ name: z.ZodString;
830
+ description: z.ZodString;
831
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
832
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
833
+ supportedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
834
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
835
+ }, "strip", z.ZodTypeAny, {
836
+ name: string;
837
+ id: string;
838
+ description: string;
839
+ inputSchema?: Record<string, unknown> | undefined;
840
+ outputSchema?: Record<string, unknown> | undefined;
841
+ supportedMediaTypes?: string[] | undefined;
842
+ tags?: string[] | undefined;
843
+ }, {
844
+ name: string;
845
+ id: string;
846
+ description: string;
847
+ inputSchema?: Record<string, unknown> | undefined;
848
+ outputSchema?: Record<string, unknown> | undefined;
849
+ supportedMediaTypes?: string[] | undefined;
850
+ tags?: string[] | undefined;
851
+ }>;
852
+ declare const A2AAgentProviderSchema: z.ZodObject<{
853
+ name: z.ZodString;
854
+ email: z.ZodOptional<z.ZodString>;
855
+ url: z.ZodOptional<z.ZodString>;
856
+ }, "strip", z.ZodTypeAny, {
857
+ name: string;
858
+ email?: string | undefined;
859
+ url?: string | undefined;
860
+ }, {
861
+ name: string;
862
+ email?: string | undefined;
863
+ url?: string | undefined;
864
+ }>;
865
+ declare const A2AAgentCapabilitiesSchema: z.ZodObject<{
866
+ streaming: z.ZodOptional<z.ZodBoolean>;
867
+ pushNotifications: z.ZodOptional<z.ZodBoolean>;
868
+ extendedAgentCard: z.ZodOptional<z.ZodBoolean>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ streaming?: boolean | undefined;
871
+ pushNotifications?: boolean | undefined;
872
+ extendedAgentCard?: boolean | undefined;
873
+ }, {
874
+ streaming?: boolean | undefined;
875
+ pushNotifications?: boolean | undefined;
876
+ extendedAgentCard?: boolean | undefined;
877
+ }>;
878
+ declare const A2AApiKeySecuritySchemeSchema: z.ZodObject<{
879
+ description: z.ZodOptional<z.ZodString>;
880
+ } & {
881
+ type: z.ZodLiteral<"apiKey">;
882
+ name: z.ZodString;
883
+ in: z.ZodEnum<["query", "header", "cookie"]>;
884
+ }, "strip", z.ZodTypeAny, {
885
+ name: string;
886
+ type: "apiKey";
887
+ in: "query" | "cookie" | "header";
888
+ description?: string | undefined;
889
+ }, {
890
+ name: string;
891
+ type: "apiKey";
892
+ in: "query" | "cookie" | "header";
893
+ description?: string | undefined;
894
+ }>;
895
+ declare const A2AHttpSecuritySchemeSchema: z.ZodObject<{
896
+ description: z.ZodOptional<z.ZodString>;
897
+ } & {
898
+ type: z.ZodLiteral<"http">;
899
+ scheme: z.ZodString;
900
+ bearerFormat: z.ZodOptional<z.ZodString>;
901
+ }, "strip", z.ZodTypeAny, {
902
+ type: "http";
903
+ scheme: string;
904
+ description?: string | undefined;
905
+ bearerFormat?: string | undefined;
906
+ }, {
907
+ type: "http";
908
+ scheme: string;
909
+ description?: string | undefined;
910
+ bearerFormat?: string | undefined;
911
+ }>;
912
+ declare const A2AOAuth2FlowSchema: z.ZodObject<{
913
+ authorizationUrl: z.ZodOptional<z.ZodString>;
914
+ tokenUrl: z.ZodOptional<z.ZodString>;
915
+ refreshUrl: z.ZodOptional<z.ZodString>;
916
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ scopes: Record<string, string>;
919
+ authorizationUrl?: string | undefined;
920
+ tokenUrl?: string | undefined;
921
+ refreshUrl?: string | undefined;
922
+ }, {
923
+ scopes: Record<string, string>;
924
+ authorizationUrl?: string | undefined;
925
+ tokenUrl?: string | undefined;
926
+ refreshUrl?: string | undefined;
927
+ }>;
928
+ declare const A2AOAuth2SecuritySchemeSchema: z.ZodObject<{
929
+ description: z.ZodOptional<z.ZodString>;
930
+ } & {
931
+ type: z.ZodLiteral<"oauth2">;
932
+ flows: z.ZodObject<{
933
+ implicit: z.ZodOptional<z.ZodObject<{
934
+ authorizationUrl: z.ZodOptional<z.ZodString>;
935
+ tokenUrl: z.ZodOptional<z.ZodString>;
936
+ refreshUrl: z.ZodOptional<z.ZodString>;
937
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
938
+ }, "strip", z.ZodTypeAny, {
939
+ scopes: Record<string, string>;
940
+ authorizationUrl?: string | undefined;
941
+ tokenUrl?: string | undefined;
942
+ refreshUrl?: string | undefined;
943
+ }, {
944
+ scopes: Record<string, string>;
945
+ authorizationUrl?: string | undefined;
946
+ tokenUrl?: string | undefined;
947
+ refreshUrl?: string | undefined;
948
+ }>>;
949
+ password: z.ZodOptional<z.ZodObject<{
950
+ authorizationUrl: z.ZodOptional<z.ZodString>;
951
+ tokenUrl: z.ZodOptional<z.ZodString>;
952
+ refreshUrl: z.ZodOptional<z.ZodString>;
953
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ scopes: Record<string, string>;
956
+ authorizationUrl?: string | undefined;
957
+ tokenUrl?: string | undefined;
958
+ refreshUrl?: string | undefined;
959
+ }, {
960
+ scopes: Record<string, string>;
961
+ authorizationUrl?: string | undefined;
962
+ tokenUrl?: string | undefined;
963
+ refreshUrl?: string | undefined;
964
+ }>>;
965
+ clientCredentials: z.ZodOptional<z.ZodObject<{
966
+ authorizationUrl: z.ZodOptional<z.ZodString>;
967
+ tokenUrl: z.ZodOptional<z.ZodString>;
968
+ refreshUrl: z.ZodOptional<z.ZodString>;
969
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
970
+ }, "strip", z.ZodTypeAny, {
971
+ scopes: Record<string, string>;
972
+ authorizationUrl?: string | undefined;
973
+ tokenUrl?: string | undefined;
974
+ refreshUrl?: string | undefined;
975
+ }, {
976
+ scopes: Record<string, string>;
977
+ authorizationUrl?: string | undefined;
978
+ tokenUrl?: string | undefined;
979
+ refreshUrl?: string | undefined;
980
+ }>>;
981
+ authorizationCode: z.ZodOptional<z.ZodObject<{
982
+ authorizationUrl: z.ZodOptional<z.ZodString>;
983
+ tokenUrl: z.ZodOptional<z.ZodString>;
984
+ refreshUrl: z.ZodOptional<z.ZodString>;
985
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
986
+ }, "strip", z.ZodTypeAny, {
987
+ scopes: Record<string, string>;
988
+ authorizationUrl?: string | undefined;
989
+ tokenUrl?: string | undefined;
990
+ refreshUrl?: string | undefined;
991
+ }, {
992
+ scopes: Record<string, string>;
993
+ authorizationUrl?: string | undefined;
994
+ tokenUrl?: string | undefined;
995
+ refreshUrl?: string | undefined;
996
+ }>>;
997
+ deviceCode: z.ZodOptional<z.ZodObject<{
998
+ authorizationUrl: z.ZodOptional<z.ZodString>;
999
+ tokenUrl: z.ZodOptional<z.ZodString>;
1000
+ refreshUrl: z.ZodOptional<z.ZodString>;
1001
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1002
+ }, "strip", z.ZodTypeAny, {
1003
+ scopes: Record<string, string>;
1004
+ authorizationUrl?: string | undefined;
1005
+ tokenUrl?: string | undefined;
1006
+ refreshUrl?: string | undefined;
1007
+ }, {
1008
+ scopes: Record<string, string>;
1009
+ authorizationUrl?: string | undefined;
1010
+ tokenUrl?: string | undefined;
1011
+ refreshUrl?: string | undefined;
1012
+ }>>;
1013
+ }, "strip", z.ZodTypeAny, {
1014
+ password?: {
1015
+ scopes: Record<string, string>;
1016
+ authorizationUrl?: string | undefined;
1017
+ tokenUrl?: string | undefined;
1018
+ refreshUrl?: string | undefined;
1019
+ } | undefined;
1020
+ implicit?: {
1021
+ scopes: Record<string, string>;
1022
+ authorizationUrl?: string | undefined;
1023
+ tokenUrl?: string | undefined;
1024
+ refreshUrl?: string | undefined;
1025
+ } | undefined;
1026
+ clientCredentials?: {
1027
+ scopes: Record<string, string>;
1028
+ authorizationUrl?: string | undefined;
1029
+ tokenUrl?: string | undefined;
1030
+ refreshUrl?: string | undefined;
1031
+ } | undefined;
1032
+ authorizationCode?: {
1033
+ scopes: Record<string, string>;
1034
+ authorizationUrl?: string | undefined;
1035
+ tokenUrl?: string | undefined;
1036
+ refreshUrl?: string | undefined;
1037
+ } | undefined;
1038
+ deviceCode?: {
1039
+ scopes: Record<string, string>;
1040
+ authorizationUrl?: string | undefined;
1041
+ tokenUrl?: string | undefined;
1042
+ refreshUrl?: string | undefined;
1043
+ } | undefined;
1044
+ }, {
1045
+ password?: {
1046
+ scopes: Record<string, string>;
1047
+ authorizationUrl?: string | undefined;
1048
+ tokenUrl?: string | undefined;
1049
+ refreshUrl?: string | undefined;
1050
+ } | undefined;
1051
+ implicit?: {
1052
+ scopes: Record<string, string>;
1053
+ authorizationUrl?: string | undefined;
1054
+ tokenUrl?: string | undefined;
1055
+ refreshUrl?: string | undefined;
1056
+ } | undefined;
1057
+ clientCredentials?: {
1058
+ scopes: Record<string, string>;
1059
+ authorizationUrl?: string | undefined;
1060
+ tokenUrl?: string | undefined;
1061
+ refreshUrl?: string | undefined;
1062
+ } | undefined;
1063
+ authorizationCode?: {
1064
+ scopes: Record<string, string>;
1065
+ authorizationUrl?: string | undefined;
1066
+ tokenUrl?: string | undefined;
1067
+ refreshUrl?: string | undefined;
1068
+ } | undefined;
1069
+ deviceCode?: {
1070
+ scopes: Record<string, string>;
1071
+ authorizationUrl?: string | undefined;
1072
+ tokenUrl?: string | undefined;
1073
+ refreshUrl?: string | undefined;
1074
+ } | undefined;
1075
+ }>;
1076
+ }, "strip", z.ZodTypeAny, {
1077
+ type: "oauth2";
1078
+ flows: {
1079
+ password?: {
1080
+ scopes: Record<string, string>;
1081
+ authorizationUrl?: string | undefined;
1082
+ tokenUrl?: string | undefined;
1083
+ refreshUrl?: string | undefined;
1084
+ } | undefined;
1085
+ implicit?: {
1086
+ scopes: Record<string, string>;
1087
+ authorizationUrl?: string | undefined;
1088
+ tokenUrl?: string | undefined;
1089
+ refreshUrl?: string | undefined;
1090
+ } | undefined;
1091
+ clientCredentials?: {
1092
+ scopes: Record<string, string>;
1093
+ authorizationUrl?: string | undefined;
1094
+ tokenUrl?: string | undefined;
1095
+ refreshUrl?: string | undefined;
1096
+ } | undefined;
1097
+ authorizationCode?: {
1098
+ scopes: Record<string, string>;
1099
+ authorizationUrl?: string | undefined;
1100
+ tokenUrl?: string | undefined;
1101
+ refreshUrl?: string | undefined;
1102
+ } | undefined;
1103
+ deviceCode?: {
1104
+ scopes: Record<string, string>;
1105
+ authorizationUrl?: string | undefined;
1106
+ tokenUrl?: string | undefined;
1107
+ refreshUrl?: string | undefined;
1108
+ } | undefined;
1109
+ };
1110
+ description?: string | undefined;
1111
+ }, {
1112
+ type: "oauth2";
1113
+ flows: {
1114
+ password?: {
1115
+ scopes: Record<string, string>;
1116
+ authorizationUrl?: string | undefined;
1117
+ tokenUrl?: string | undefined;
1118
+ refreshUrl?: string | undefined;
1119
+ } | undefined;
1120
+ implicit?: {
1121
+ scopes: Record<string, string>;
1122
+ authorizationUrl?: string | undefined;
1123
+ tokenUrl?: string | undefined;
1124
+ refreshUrl?: string | undefined;
1125
+ } | undefined;
1126
+ clientCredentials?: {
1127
+ scopes: Record<string, string>;
1128
+ authorizationUrl?: string | undefined;
1129
+ tokenUrl?: string | undefined;
1130
+ refreshUrl?: string | undefined;
1131
+ } | undefined;
1132
+ authorizationCode?: {
1133
+ scopes: Record<string, string>;
1134
+ authorizationUrl?: string | undefined;
1135
+ tokenUrl?: string | undefined;
1136
+ refreshUrl?: string | undefined;
1137
+ } | undefined;
1138
+ deviceCode?: {
1139
+ scopes: Record<string, string>;
1140
+ authorizationUrl?: string | undefined;
1141
+ tokenUrl?: string | undefined;
1142
+ refreshUrl?: string | undefined;
1143
+ } | undefined;
1144
+ };
1145
+ description?: string | undefined;
1146
+ }>;
1147
+ declare const A2AOidcSecuritySchemeSchema: z.ZodObject<{
1148
+ description: z.ZodOptional<z.ZodString>;
1149
+ } & {
1150
+ type: z.ZodLiteral<"openIdConnect">;
1151
+ openIdConnectUrl: z.ZodString;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ type: "openIdConnect";
1154
+ openIdConnectUrl: string;
1155
+ description?: string | undefined;
1156
+ }, {
1157
+ type: "openIdConnect";
1158
+ openIdConnectUrl: string;
1159
+ description?: string | undefined;
1160
+ }>;
1161
+ declare const A2AMutualTlsSecuritySchemeSchema: z.ZodObject<{
1162
+ description: z.ZodOptional<z.ZodString>;
1163
+ } & {
1164
+ type: z.ZodLiteral<"mutualTls">;
1165
+ }, "strip", z.ZodTypeAny, {
1166
+ type: "mutualTls";
1167
+ description?: string | undefined;
1168
+ }, {
1169
+ type: "mutualTls";
1170
+ description?: string | undefined;
1171
+ }>;
1172
+ declare const A2ASecuritySchemeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1173
+ description: z.ZodOptional<z.ZodString>;
1174
+ } & {
1175
+ type: z.ZodLiteral<"apiKey">;
1176
+ name: z.ZodString;
1177
+ in: z.ZodEnum<["query", "header", "cookie"]>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ name: string;
1180
+ type: "apiKey";
1181
+ in: "query" | "cookie" | "header";
1182
+ description?: string | undefined;
1183
+ }, {
1184
+ name: string;
1185
+ type: "apiKey";
1186
+ in: "query" | "cookie" | "header";
1187
+ description?: string | undefined;
1188
+ }>, z.ZodObject<{
1189
+ description: z.ZodOptional<z.ZodString>;
1190
+ } & {
1191
+ type: z.ZodLiteral<"http">;
1192
+ scheme: z.ZodString;
1193
+ bearerFormat: z.ZodOptional<z.ZodString>;
1194
+ }, "strip", z.ZodTypeAny, {
1195
+ type: "http";
1196
+ scheme: string;
1197
+ description?: string | undefined;
1198
+ bearerFormat?: string | undefined;
1199
+ }, {
1200
+ type: "http";
1201
+ scheme: string;
1202
+ description?: string | undefined;
1203
+ bearerFormat?: string | undefined;
1204
+ }>, z.ZodObject<{
1205
+ description: z.ZodOptional<z.ZodString>;
1206
+ } & {
1207
+ type: z.ZodLiteral<"oauth2">;
1208
+ flows: z.ZodObject<{
1209
+ implicit: z.ZodOptional<z.ZodObject<{
1210
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1211
+ tokenUrl: z.ZodOptional<z.ZodString>;
1212
+ refreshUrl: z.ZodOptional<z.ZodString>;
1213
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1214
+ }, "strip", z.ZodTypeAny, {
1215
+ scopes: Record<string, string>;
1216
+ authorizationUrl?: string | undefined;
1217
+ tokenUrl?: string | undefined;
1218
+ refreshUrl?: string | undefined;
1219
+ }, {
1220
+ scopes: Record<string, string>;
1221
+ authorizationUrl?: string | undefined;
1222
+ tokenUrl?: string | undefined;
1223
+ refreshUrl?: string | undefined;
1224
+ }>>;
1225
+ password: z.ZodOptional<z.ZodObject<{
1226
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1227
+ tokenUrl: z.ZodOptional<z.ZodString>;
1228
+ refreshUrl: z.ZodOptional<z.ZodString>;
1229
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1230
+ }, "strip", z.ZodTypeAny, {
1231
+ scopes: Record<string, string>;
1232
+ authorizationUrl?: string | undefined;
1233
+ tokenUrl?: string | undefined;
1234
+ refreshUrl?: string | undefined;
1235
+ }, {
1236
+ scopes: Record<string, string>;
1237
+ authorizationUrl?: string | undefined;
1238
+ tokenUrl?: string | undefined;
1239
+ refreshUrl?: string | undefined;
1240
+ }>>;
1241
+ clientCredentials: z.ZodOptional<z.ZodObject<{
1242
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1243
+ tokenUrl: z.ZodOptional<z.ZodString>;
1244
+ refreshUrl: z.ZodOptional<z.ZodString>;
1245
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1246
+ }, "strip", z.ZodTypeAny, {
1247
+ scopes: Record<string, string>;
1248
+ authorizationUrl?: string | undefined;
1249
+ tokenUrl?: string | undefined;
1250
+ refreshUrl?: string | undefined;
1251
+ }, {
1252
+ scopes: Record<string, string>;
1253
+ authorizationUrl?: string | undefined;
1254
+ tokenUrl?: string | undefined;
1255
+ refreshUrl?: string | undefined;
1256
+ }>>;
1257
+ authorizationCode: z.ZodOptional<z.ZodObject<{
1258
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1259
+ tokenUrl: z.ZodOptional<z.ZodString>;
1260
+ refreshUrl: z.ZodOptional<z.ZodString>;
1261
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1262
+ }, "strip", z.ZodTypeAny, {
1263
+ scopes: Record<string, string>;
1264
+ authorizationUrl?: string | undefined;
1265
+ tokenUrl?: string | undefined;
1266
+ refreshUrl?: string | undefined;
1267
+ }, {
1268
+ scopes: Record<string, string>;
1269
+ authorizationUrl?: string | undefined;
1270
+ tokenUrl?: string | undefined;
1271
+ refreshUrl?: string | undefined;
1272
+ }>>;
1273
+ deviceCode: z.ZodOptional<z.ZodObject<{
1274
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1275
+ tokenUrl: z.ZodOptional<z.ZodString>;
1276
+ refreshUrl: z.ZodOptional<z.ZodString>;
1277
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1278
+ }, "strip", z.ZodTypeAny, {
1279
+ scopes: Record<string, string>;
1280
+ authorizationUrl?: string | undefined;
1281
+ tokenUrl?: string | undefined;
1282
+ refreshUrl?: string | undefined;
1283
+ }, {
1284
+ scopes: Record<string, string>;
1285
+ authorizationUrl?: string | undefined;
1286
+ tokenUrl?: string | undefined;
1287
+ refreshUrl?: string | undefined;
1288
+ }>>;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ password?: {
1291
+ scopes: Record<string, string>;
1292
+ authorizationUrl?: string | undefined;
1293
+ tokenUrl?: string | undefined;
1294
+ refreshUrl?: string | undefined;
1295
+ } | undefined;
1296
+ implicit?: {
1297
+ scopes: Record<string, string>;
1298
+ authorizationUrl?: string | undefined;
1299
+ tokenUrl?: string | undefined;
1300
+ refreshUrl?: string | undefined;
1301
+ } | undefined;
1302
+ clientCredentials?: {
1303
+ scopes: Record<string, string>;
1304
+ authorizationUrl?: string | undefined;
1305
+ tokenUrl?: string | undefined;
1306
+ refreshUrl?: string | undefined;
1307
+ } | undefined;
1308
+ authorizationCode?: {
1309
+ scopes: Record<string, string>;
1310
+ authorizationUrl?: string | undefined;
1311
+ tokenUrl?: string | undefined;
1312
+ refreshUrl?: string | undefined;
1313
+ } | undefined;
1314
+ deviceCode?: {
1315
+ scopes: Record<string, string>;
1316
+ authorizationUrl?: string | undefined;
1317
+ tokenUrl?: string | undefined;
1318
+ refreshUrl?: string | undefined;
1319
+ } | undefined;
1320
+ }, {
1321
+ password?: {
1322
+ scopes: Record<string, string>;
1323
+ authorizationUrl?: string | undefined;
1324
+ tokenUrl?: string | undefined;
1325
+ refreshUrl?: string | undefined;
1326
+ } | undefined;
1327
+ implicit?: {
1328
+ scopes: Record<string, string>;
1329
+ authorizationUrl?: string | undefined;
1330
+ tokenUrl?: string | undefined;
1331
+ refreshUrl?: string | undefined;
1332
+ } | undefined;
1333
+ clientCredentials?: {
1334
+ scopes: Record<string, string>;
1335
+ authorizationUrl?: string | undefined;
1336
+ tokenUrl?: string | undefined;
1337
+ refreshUrl?: string | undefined;
1338
+ } | undefined;
1339
+ authorizationCode?: {
1340
+ scopes: Record<string, string>;
1341
+ authorizationUrl?: string | undefined;
1342
+ tokenUrl?: string | undefined;
1343
+ refreshUrl?: string | undefined;
1344
+ } | undefined;
1345
+ deviceCode?: {
1346
+ scopes: Record<string, string>;
1347
+ authorizationUrl?: string | undefined;
1348
+ tokenUrl?: string | undefined;
1349
+ refreshUrl?: string | undefined;
1350
+ } | undefined;
1351
+ }>;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ type: "oauth2";
1354
+ flows: {
1355
+ password?: {
1356
+ scopes: Record<string, string>;
1357
+ authorizationUrl?: string | undefined;
1358
+ tokenUrl?: string | undefined;
1359
+ refreshUrl?: string | undefined;
1360
+ } | undefined;
1361
+ implicit?: {
1362
+ scopes: Record<string, string>;
1363
+ authorizationUrl?: string | undefined;
1364
+ tokenUrl?: string | undefined;
1365
+ refreshUrl?: string | undefined;
1366
+ } | undefined;
1367
+ clientCredentials?: {
1368
+ scopes: Record<string, string>;
1369
+ authorizationUrl?: string | undefined;
1370
+ tokenUrl?: string | undefined;
1371
+ refreshUrl?: string | undefined;
1372
+ } | undefined;
1373
+ authorizationCode?: {
1374
+ scopes: Record<string, string>;
1375
+ authorizationUrl?: string | undefined;
1376
+ tokenUrl?: string | undefined;
1377
+ refreshUrl?: string | undefined;
1378
+ } | undefined;
1379
+ deviceCode?: {
1380
+ scopes: Record<string, string>;
1381
+ authorizationUrl?: string | undefined;
1382
+ tokenUrl?: string | undefined;
1383
+ refreshUrl?: string | undefined;
1384
+ } | undefined;
1385
+ };
1386
+ description?: string | undefined;
1387
+ }, {
1388
+ type: "oauth2";
1389
+ flows: {
1390
+ password?: {
1391
+ scopes: Record<string, string>;
1392
+ authorizationUrl?: string | undefined;
1393
+ tokenUrl?: string | undefined;
1394
+ refreshUrl?: string | undefined;
1395
+ } | undefined;
1396
+ implicit?: {
1397
+ scopes: Record<string, string>;
1398
+ authorizationUrl?: string | undefined;
1399
+ tokenUrl?: string | undefined;
1400
+ refreshUrl?: string | undefined;
1401
+ } | undefined;
1402
+ clientCredentials?: {
1403
+ scopes: Record<string, string>;
1404
+ authorizationUrl?: string | undefined;
1405
+ tokenUrl?: string | undefined;
1406
+ refreshUrl?: string | undefined;
1407
+ } | undefined;
1408
+ authorizationCode?: {
1409
+ scopes: Record<string, string>;
1410
+ authorizationUrl?: string | undefined;
1411
+ tokenUrl?: string | undefined;
1412
+ refreshUrl?: string | undefined;
1413
+ } | undefined;
1414
+ deviceCode?: {
1415
+ scopes: Record<string, string>;
1416
+ authorizationUrl?: string | undefined;
1417
+ tokenUrl?: string | undefined;
1418
+ refreshUrl?: string | undefined;
1419
+ } | undefined;
1420
+ };
1421
+ description?: string | undefined;
1422
+ }>, z.ZodObject<{
1423
+ description: z.ZodOptional<z.ZodString>;
1424
+ } & {
1425
+ type: z.ZodLiteral<"openIdConnect">;
1426
+ openIdConnectUrl: z.ZodString;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ type: "openIdConnect";
1429
+ openIdConnectUrl: string;
1430
+ description?: string | undefined;
1431
+ }, {
1432
+ type: "openIdConnect";
1433
+ openIdConnectUrl: string;
1434
+ description?: string | undefined;
1435
+ }>, z.ZodObject<{
1436
+ description: z.ZodOptional<z.ZodString>;
1437
+ } & {
1438
+ type: z.ZodLiteral<"mutualTls">;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ type: "mutualTls";
1441
+ description?: string | undefined;
1442
+ }, {
1443
+ type: "mutualTls";
1444
+ description?: string | undefined;
1445
+ }>]>;
1446
+ declare const A2AAgentCardSignatureSchema: z.ZodObject<{
1447
+ algorithm: z.ZodString;
1448
+ signature: z.ZodString;
1449
+ keyId: z.ZodString;
1450
+ }, "strip", z.ZodTypeAny, {
1451
+ keyId: string;
1452
+ algorithm: string;
1453
+ signature: string;
1454
+ }, {
1455
+ keyId: string;
1456
+ algorithm: string;
1457
+ signature: string;
1458
+ }>;
1459
+ declare const A2AAgentCardSchema: z.ZodObject<{
1460
+ id: z.ZodString;
1461
+ name: z.ZodString;
1462
+ description: z.ZodString;
1463
+ version: z.ZodString;
1464
+ protocolVersion: z.ZodString;
1465
+ url: z.ZodString;
1466
+ provider: z.ZodOptional<z.ZodObject<{
1467
+ name: z.ZodString;
1468
+ email: z.ZodOptional<z.ZodString>;
1469
+ url: z.ZodOptional<z.ZodString>;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ name: string;
1472
+ email?: string | undefined;
1473
+ url?: string | undefined;
1474
+ }, {
1475
+ name: string;
1476
+ email?: string | undefined;
1477
+ url?: string | undefined;
1478
+ }>>;
1479
+ capabilities: z.ZodOptional<z.ZodObject<{
1480
+ streaming: z.ZodOptional<z.ZodBoolean>;
1481
+ pushNotifications: z.ZodOptional<z.ZodBoolean>;
1482
+ extendedAgentCard: z.ZodOptional<z.ZodBoolean>;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ streaming?: boolean | undefined;
1485
+ pushNotifications?: boolean | undefined;
1486
+ extendedAgentCard?: boolean | undefined;
1487
+ }, {
1488
+ streaming?: boolean | undefined;
1489
+ pushNotifications?: boolean | undefined;
1490
+ extendedAgentCard?: boolean | undefined;
1491
+ }>>;
1492
+ skills: z.ZodArray<z.ZodObject<{
1493
+ id: z.ZodString;
1494
+ name: z.ZodString;
1495
+ description: z.ZodString;
1496
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1497
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1498
+ supportedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1499
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1500
+ }, "strip", z.ZodTypeAny, {
1501
+ name: string;
1502
+ id: string;
1503
+ description: string;
1504
+ inputSchema?: Record<string, unknown> | undefined;
1505
+ outputSchema?: Record<string, unknown> | undefined;
1506
+ supportedMediaTypes?: string[] | undefined;
1507
+ tags?: string[] | undefined;
1508
+ }, {
1509
+ name: string;
1510
+ id: string;
1511
+ description: string;
1512
+ inputSchema?: Record<string, unknown> | undefined;
1513
+ outputSchema?: Record<string, unknown> | undefined;
1514
+ supportedMediaTypes?: string[] | undefined;
1515
+ tags?: string[] | undefined;
1516
+ }>, "many">;
1517
+ securitySchemes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1518
+ description: z.ZodOptional<z.ZodString>;
1519
+ } & {
1520
+ type: z.ZodLiteral<"apiKey">;
1521
+ name: z.ZodString;
1522
+ in: z.ZodEnum<["query", "header", "cookie"]>;
1523
+ }, "strip", z.ZodTypeAny, {
1524
+ name: string;
1525
+ type: "apiKey";
1526
+ in: "query" | "cookie" | "header";
1527
+ description?: string | undefined;
1528
+ }, {
1529
+ name: string;
1530
+ type: "apiKey";
1531
+ in: "query" | "cookie" | "header";
1532
+ description?: string | undefined;
1533
+ }>, z.ZodObject<{
1534
+ description: z.ZodOptional<z.ZodString>;
1535
+ } & {
1536
+ type: z.ZodLiteral<"http">;
1537
+ scheme: z.ZodString;
1538
+ bearerFormat: z.ZodOptional<z.ZodString>;
1539
+ }, "strip", z.ZodTypeAny, {
1540
+ type: "http";
1541
+ scheme: string;
1542
+ description?: string | undefined;
1543
+ bearerFormat?: string | undefined;
1544
+ }, {
1545
+ type: "http";
1546
+ scheme: string;
1547
+ description?: string | undefined;
1548
+ bearerFormat?: string | undefined;
1549
+ }>, z.ZodObject<{
1550
+ description: z.ZodOptional<z.ZodString>;
1551
+ } & {
1552
+ type: z.ZodLiteral<"oauth2">;
1553
+ flows: z.ZodObject<{
1554
+ implicit: z.ZodOptional<z.ZodObject<{
1555
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1556
+ tokenUrl: z.ZodOptional<z.ZodString>;
1557
+ refreshUrl: z.ZodOptional<z.ZodString>;
1558
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1559
+ }, "strip", z.ZodTypeAny, {
1560
+ scopes: Record<string, string>;
1561
+ authorizationUrl?: string | undefined;
1562
+ tokenUrl?: string | undefined;
1563
+ refreshUrl?: string | undefined;
1564
+ }, {
1565
+ scopes: Record<string, string>;
1566
+ authorizationUrl?: string | undefined;
1567
+ tokenUrl?: string | undefined;
1568
+ refreshUrl?: string | undefined;
1569
+ }>>;
1570
+ password: z.ZodOptional<z.ZodObject<{
1571
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1572
+ tokenUrl: z.ZodOptional<z.ZodString>;
1573
+ refreshUrl: z.ZodOptional<z.ZodString>;
1574
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1575
+ }, "strip", z.ZodTypeAny, {
1576
+ scopes: Record<string, string>;
1577
+ authorizationUrl?: string | undefined;
1578
+ tokenUrl?: string | undefined;
1579
+ refreshUrl?: string | undefined;
1580
+ }, {
1581
+ scopes: Record<string, string>;
1582
+ authorizationUrl?: string | undefined;
1583
+ tokenUrl?: string | undefined;
1584
+ refreshUrl?: string | undefined;
1585
+ }>>;
1586
+ clientCredentials: z.ZodOptional<z.ZodObject<{
1587
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1588
+ tokenUrl: z.ZodOptional<z.ZodString>;
1589
+ refreshUrl: z.ZodOptional<z.ZodString>;
1590
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ scopes: Record<string, string>;
1593
+ authorizationUrl?: string | undefined;
1594
+ tokenUrl?: string | undefined;
1595
+ refreshUrl?: string | undefined;
1596
+ }, {
1597
+ scopes: Record<string, string>;
1598
+ authorizationUrl?: string | undefined;
1599
+ tokenUrl?: string | undefined;
1600
+ refreshUrl?: string | undefined;
1601
+ }>>;
1602
+ authorizationCode: z.ZodOptional<z.ZodObject<{
1603
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1604
+ tokenUrl: z.ZodOptional<z.ZodString>;
1605
+ refreshUrl: z.ZodOptional<z.ZodString>;
1606
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1607
+ }, "strip", z.ZodTypeAny, {
1608
+ scopes: Record<string, string>;
1609
+ authorizationUrl?: string | undefined;
1610
+ tokenUrl?: string | undefined;
1611
+ refreshUrl?: string | undefined;
1612
+ }, {
1613
+ scopes: Record<string, string>;
1614
+ authorizationUrl?: string | undefined;
1615
+ tokenUrl?: string | undefined;
1616
+ refreshUrl?: string | undefined;
1617
+ }>>;
1618
+ deviceCode: z.ZodOptional<z.ZodObject<{
1619
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1620
+ tokenUrl: z.ZodOptional<z.ZodString>;
1621
+ refreshUrl: z.ZodOptional<z.ZodString>;
1622
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
1623
+ }, "strip", z.ZodTypeAny, {
1624
+ scopes: Record<string, string>;
1625
+ authorizationUrl?: string | undefined;
1626
+ tokenUrl?: string | undefined;
1627
+ refreshUrl?: string | undefined;
1628
+ }, {
1629
+ scopes: Record<string, string>;
1630
+ authorizationUrl?: string | undefined;
1631
+ tokenUrl?: string | undefined;
1632
+ refreshUrl?: string | undefined;
1633
+ }>>;
1634
+ }, "strip", z.ZodTypeAny, {
1635
+ password?: {
1636
+ scopes: Record<string, string>;
1637
+ authorizationUrl?: string | undefined;
1638
+ tokenUrl?: string | undefined;
1639
+ refreshUrl?: string | undefined;
1640
+ } | undefined;
1641
+ implicit?: {
1642
+ scopes: Record<string, string>;
1643
+ authorizationUrl?: string | undefined;
1644
+ tokenUrl?: string | undefined;
1645
+ refreshUrl?: string | undefined;
1646
+ } | undefined;
1647
+ clientCredentials?: {
1648
+ scopes: Record<string, string>;
1649
+ authorizationUrl?: string | undefined;
1650
+ tokenUrl?: string | undefined;
1651
+ refreshUrl?: string | undefined;
1652
+ } | undefined;
1653
+ authorizationCode?: {
1654
+ scopes: Record<string, string>;
1655
+ authorizationUrl?: string | undefined;
1656
+ tokenUrl?: string | undefined;
1657
+ refreshUrl?: string | undefined;
1658
+ } | undefined;
1659
+ deviceCode?: {
1660
+ scopes: Record<string, string>;
1661
+ authorizationUrl?: string | undefined;
1662
+ tokenUrl?: string | undefined;
1663
+ refreshUrl?: string | undefined;
1664
+ } | undefined;
1665
+ }, {
1666
+ password?: {
1667
+ scopes: Record<string, string>;
1668
+ authorizationUrl?: string | undefined;
1669
+ tokenUrl?: string | undefined;
1670
+ refreshUrl?: string | undefined;
1671
+ } | undefined;
1672
+ implicit?: {
1673
+ scopes: Record<string, string>;
1674
+ authorizationUrl?: string | undefined;
1675
+ tokenUrl?: string | undefined;
1676
+ refreshUrl?: string | undefined;
1677
+ } | undefined;
1678
+ clientCredentials?: {
1679
+ scopes: Record<string, string>;
1680
+ authorizationUrl?: string | undefined;
1681
+ tokenUrl?: string | undefined;
1682
+ refreshUrl?: string | undefined;
1683
+ } | undefined;
1684
+ authorizationCode?: {
1685
+ scopes: Record<string, string>;
1686
+ authorizationUrl?: string | undefined;
1687
+ tokenUrl?: string | undefined;
1688
+ refreshUrl?: string | undefined;
1689
+ } | undefined;
1690
+ deviceCode?: {
1691
+ scopes: Record<string, string>;
1692
+ authorizationUrl?: string | undefined;
1693
+ tokenUrl?: string | undefined;
1694
+ refreshUrl?: string | undefined;
1695
+ } | undefined;
1696
+ }>;
1697
+ }, "strip", z.ZodTypeAny, {
1698
+ type: "oauth2";
1699
+ flows: {
1700
+ password?: {
1701
+ scopes: Record<string, string>;
1702
+ authorizationUrl?: string | undefined;
1703
+ tokenUrl?: string | undefined;
1704
+ refreshUrl?: string | undefined;
1705
+ } | undefined;
1706
+ implicit?: {
1707
+ scopes: Record<string, string>;
1708
+ authorizationUrl?: string | undefined;
1709
+ tokenUrl?: string | undefined;
1710
+ refreshUrl?: string | undefined;
1711
+ } | undefined;
1712
+ clientCredentials?: {
1713
+ scopes: Record<string, string>;
1714
+ authorizationUrl?: string | undefined;
1715
+ tokenUrl?: string | undefined;
1716
+ refreshUrl?: string | undefined;
1717
+ } | undefined;
1718
+ authorizationCode?: {
1719
+ scopes: Record<string, string>;
1720
+ authorizationUrl?: string | undefined;
1721
+ tokenUrl?: string | undefined;
1722
+ refreshUrl?: string | undefined;
1723
+ } | undefined;
1724
+ deviceCode?: {
1725
+ scopes: Record<string, string>;
1726
+ authorizationUrl?: string | undefined;
1727
+ tokenUrl?: string | undefined;
1728
+ refreshUrl?: string | undefined;
1729
+ } | undefined;
1730
+ };
1731
+ description?: string | undefined;
1732
+ }, {
1733
+ type: "oauth2";
1734
+ flows: {
1735
+ password?: {
1736
+ scopes: Record<string, string>;
1737
+ authorizationUrl?: string | undefined;
1738
+ tokenUrl?: string | undefined;
1739
+ refreshUrl?: string | undefined;
1740
+ } | undefined;
1741
+ implicit?: {
1742
+ scopes: Record<string, string>;
1743
+ authorizationUrl?: string | undefined;
1744
+ tokenUrl?: string | undefined;
1745
+ refreshUrl?: string | undefined;
1746
+ } | undefined;
1747
+ clientCredentials?: {
1748
+ scopes: Record<string, string>;
1749
+ authorizationUrl?: string | undefined;
1750
+ tokenUrl?: string | undefined;
1751
+ refreshUrl?: string | undefined;
1752
+ } | undefined;
1753
+ authorizationCode?: {
1754
+ scopes: Record<string, string>;
1755
+ authorizationUrl?: string | undefined;
1756
+ tokenUrl?: string | undefined;
1757
+ refreshUrl?: string | undefined;
1758
+ } | undefined;
1759
+ deviceCode?: {
1760
+ scopes: Record<string, string>;
1761
+ authorizationUrl?: string | undefined;
1762
+ tokenUrl?: string | undefined;
1763
+ refreshUrl?: string | undefined;
1764
+ } | undefined;
1765
+ };
1766
+ description?: string | undefined;
1767
+ }>, z.ZodObject<{
1768
+ description: z.ZodOptional<z.ZodString>;
1769
+ } & {
1770
+ type: z.ZodLiteral<"openIdConnect">;
1771
+ openIdConnectUrl: z.ZodString;
1772
+ }, "strip", z.ZodTypeAny, {
1773
+ type: "openIdConnect";
1774
+ openIdConnectUrl: string;
1775
+ description?: string | undefined;
1776
+ }, {
1777
+ type: "openIdConnect";
1778
+ openIdConnectUrl: string;
1779
+ description?: string | undefined;
1780
+ }>, z.ZodObject<{
1781
+ description: z.ZodOptional<z.ZodString>;
1782
+ } & {
1783
+ type: z.ZodLiteral<"mutualTls">;
1784
+ }, "strip", z.ZodTypeAny, {
1785
+ type: "mutualTls";
1786
+ description?: string | undefined;
1787
+ }, {
1788
+ type: "mutualTls";
1789
+ description?: string | undefined;
1790
+ }>]>>>;
1791
+ security: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>, "many">>;
1792
+ defaultInputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1793
+ defaultOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1794
+ documentationUrl: z.ZodOptional<z.ZodString>;
1795
+ signature: z.ZodOptional<z.ZodObject<{
1796
+ algorithm: z.ZodString;
1797
+ signature: z.ZodString;
1798
+ keyId: z.ZodString;
1799
+ }, "strip", z.ZodTypeAny, {
1800
+ keyId: string;
1801
+ algorithm: string;
1802
+ signature: string;
1803
+ }, {
1804
+ keyId: string;
1805
+ algorithm: string;
1806
+ signature: string;
1807
+ }>>;
1808
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1809
+ }, "strip", z.ZodTypeAny, {
1810
+ name: string;
1811
+ id: string;
1812
+ description: string;
1813
+ version: string;
1814
+ url: string;
1815
+ protocolVersion: string;
1816
+ skills: {
1817
+ name: string;
1818
+ id: string;
1819
+ description: string;
1820
+ inputSchema?: Record<string, unknown> | undefined;
1821
+ outputSchema?: Record<string, unknown> | undefined;
1822
+ supportedMediaTypes?: string[] | undefined;
1823
+ tags?: string[] | undefined;
1824
+ }[];
1825
+ metadata?: Record<string, unknown> | undefined;
1826
+ capabilities?: {
1827
+ streaming?: boolean | undefined;
1828
+ pushNotifications?: boolean | undefined;
1829
+ extendedAgentCard?: boolean | undefined;
1830
+ } | undefined;
1831
+ provider?: {
1832
+ name: string;
1833
+ email?: string | undefined;
1834
+ url?: string | undefined;
1835
+ } | undefined;
1836
+ signature?: {
1837
+ keyId: string;
1838
+ algorithm: string;
1839
+ signature: string;
1840
+ } | undefined;
1841
+ securitySchemes?: Record<string, {
1842
+ name: string;
1843
+ type: "apiKey";
1844
+ in: "query" | "cookie" | "header";
1845
+ description?: string | undefined;
1846
+ } | {
1847
+ type: "http";
1848
+ scheme: string;
1849
+ description?: string | undefined;
1850
+ bearerFormat?: string | undefined;
1851
+ } | {
1852
+ type: "oauth2";
1853
+ flows: {
1854
+ password?: {
1855
+ scopes: Record<string, string>;
1856
+ authorizationUrl?: string | undefined;
1857
+ tokenUrl?: string | undefined;
1858
+ refreshUrl?: string | undefined;
1859
+ } | undefined;
1860
+ implicit?: {
1861
+ scopes: Record<string, string>;
1862
+ authorizationUrl?: string | undefined;
1863
+ tokenUrl?: string | undefined;
1864
+ refreshUrl?: string | undefined;
1865
+ } | undefined;
1866
+ clientCredentials?: {
1867
+ scopes: Record<string, string>;
1868
+ authorizationUrl?: string | undefined;
1869
+ tokenUrl?: string | undefined;
1870
+ refreshUrl?: string | undefined;
1871
+ } | undefined;
1872
+ authorizationCode?: {
1873
+ scopes: Record<string, string>;
1874
+ authorizationUrl?: string | undefined;
1875
+ tokenUrl?: string | undefined;
1876
+ refreshUrl?: string | undefined;
1877
+ } | undefined;
1878
+ deviceCode?: {
1879
+ scopes: Record<string, string>;
1880
+ authorizationUrl?: string | undefined;
1881
+ tokenUrl?: string | undefined;
1882
+ refreshUrl?: string | undefined;
1883
+ } | undefined;
1884
+ };
1885
+ description?: string | undefined;
1886
+ } | {
1887
+ type: "openIdConnect";
1888
+ openIdConnectUrl: string;
1889
+ description?: string | undefined;
1890
+ } | {
1891
+ type: "mutualTls";
1892
+ description?: string | undefined;
1893
+ }> | undefined;
1894
+ security?: Record<string, string[]>[] | undefined;
1895
+ defaultInputModes?: string[] | undefined;
1896
+ defaultOutputModes?: string[] | undefined;
1897
+ documentationUrl?: string | undefined;
1898
+ }, {
1899
+ name: string;
1900
+ id: string;
1901
+ description: string;
1902
+ version: string;
1903
+ url: string;
1904
+ protocolVersion: string;
1905
+ skills: {
1906
+ name: string;
1907
+ id: string;
1908
+ description: string;
1909
+ inputSchema?: Record<string, unknown> | undefined;
1910
+ outputSchema?: Record<string, unknown> | undefined;
1911
+ supportedMediaTypes?: string[] | undefined;
1912
+ tags?: string[] | undefined;
1913
+ }[];
1914
+ metadata?: Record<string, unknown> | undefined;
1915
+ capabilities?: {
1916
+ streaming?: boolean | undefined;
1917
+ pushNotifications?: boolean | undefined;
1918
+ extendedAgentCard?: boolean | undefined;
1919
+ } | undefined;
1920
+ provider?: {
1921
+ name: string;
1922
+ email?: string | undefined;
1923
+ url?: string | undefined;
1924
+ } | undefined;
1925
+ signature?: {
1926
+ keyId: string;
1927
+ algorithm: string;
1928
+ signature: string;
1929
+ } | undefined;
1930
+ securitySchemes?: Record<string, {
1931
+ name: string;
1932
+ type: "apiKey";
1933
+ in: "query" | "cookie" | "header";
1934
+ description?: string | undefined;
1935
+ } | {
1936
+ type: "http";
1937
+ scheme: string;
1938
+ description?: string | undefined;
1939
+ bearerFormat?: string | undefined;
1940
+ } | {
1941
+ type: "oauth2";
1942
+ flows: {
1943
+ password?: {
1944
+ scopes: Record<string, string>;
1945
+ authorizationUrl?: string | undefined;
1946
+ tokenUrl?: string | undefined;
1947
+ refreshUrl?: string | undefined;
1948
+ } | undefined;
1949
+ implicit?: {
1950
+ scopes: Record<string, string>;
1951
+ authorizationUrl?: string | undefined;
1952
+ tokenUrl?: string | undefined;
1953
+ refreshUrl?: string | undefined;
1954
+ } | undefined;
1955
+ clientCredentials?: {
1956
+ scopes: Record<string, string>;
1957
+ authorizationUrl?: string | undefined;
1958
+ tokenUrl?: string | undefined;
1959
+ refreshUrl?: string | undefined;
1960
+ } | undefined;
1961
+ authorizationCode?: {
1962
+ scopes: Record<string, string>;
1963
+ authorizationUrl?: string | undefined;
1964
+ tokenUrl?: string | undefined;
1965
+ refreshUrl?: string | undefined;
1966
+ } | undefined;
1967
+ deviceCode?: {
1968
+ scopes: Record<string, string>;
1969
+ authorizationUrl?: string | undefined;
1970
+ tokenUrl?: string | undefined;
1971
+ refreshUrl?: string | undefined;
1972
+ } | undefined;
1973
+ };
1974
+ description?: string | undefined;
1975
+ } | {
1976
+ type: "openIdConnect";
1977
+ openIdConnectUrl: string;
1978
+ description?: string | undefined;
1979
+ } | {
1980
+ type: "mutualTls";
1981
+ description?: string | undefined;
1982
+ }> | undefined;
1983
+ security?: Record<string, string[]>[] | undefined;
1984
+ defaultInputModes?: string[] | undefined;
1985
+ defaultOutputModes?: string[] | undefined;
1986
+ documentationUrl?: string | undefined;
1987
+ }>;
1988
+ declare const A2ASendMessageConfigurationSchema: z.ZodObject<{
1989
+ acceptedOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1990
+ historyLength: z.ZodOptional<z.ZodNumber>;
1991
+ returnImmediately: z.ZodOptional<z.ZodBoolean>;
1992
+ }, "strip", z.ZodTypeAny, {
1993
+ acceptedOutputModes?: string[] | undefined;
1994
+ historyLength?: number | undefined;
1995
+ returnImmediately?: boolean | undefined;
1996
+ }, {
1997
+ acceptedOutputModes?: string[] | undefined;
1998
+ historyLength?: number | undefined;
1999
+ returnImmediately?: boolean | undefined;
2000
+ }>;
2001
+ declare const A2ASendMessageParamsSchema: z.ZodObject<{
2002
+ message: z.ZodObject<{
2003
+ id: z.ZodString;
2004
+ role: z.ZodEnum<["user", "agent"]>;
2005
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2006
+ type: z.ZodLiteral<"text">;
2007
+ text: z.ZodString;
2008
+ }, "strip", z.ZodTypeAny, {
2009
+ text: string;
2010
+ type: "text";
2011
+ }, {
2012
+ text: string;
2013
+ type: "text";
2014
+ }>, z.ZodObject<{
2015
+ type: z.ZodLiteral<"file">;
2016
+ fileUri: z.ZodString;
2017
+ mimeType: z.ZodString;
2018
+ name: z.ZodOptional<z.ZodString>;
2019
+ }, "strip", z.ZodTypeAny, {
2020
+ type: "file";
2021
+ fileUri: string;
2022
+ mimeType: string;
2023
+ name?: string | undefined;
2024
+ }, {
2025
+ type: "file";
2026
+ fileUri: string;
2027
+ mimeType: string;
2028
+ name?: string | undefined;
2029
+ }>, z.ZodObject<{
2030
+ type: z.ZodLiteral<"data">;
2031
+ mimeType: z.ZodString;
2032
+ data: z.ZodString;
2033
+ }, "strip", z.ZodTypeAny, {
2034
+ data: string;
2035
+ type: "data";
2036
+ mimeType: string;
2037
+ }, {
2038
+ data: string;
2039
+ type: "data";
2040
+ mimeType: string;
2041
+ }>]>, "many">;
2042
+ createdAt: z.ZodString;
2043
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2044
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2045
+ }, "strip", z.ZodTypeAny, {
2046
+ id: string;
2047
+ createdAt: string;
2048
+ role: "user" | "agent";
2049
+ parts: ({
2050
+ text: string;
2051
+ type: "text";
2052
+ } | {
2053
+ type: "file";
2054
+ fileUri: string;
2055
+ mimeType: string;
2056
+ name?: string | undefined;
2057
+ } | {
2058
+ data: string;
2059
+ type: "data";
2060
+ mimeType: string;
2061
+ })[];
2062
+ metadata?: Record<string, unknown> | undefined;
2063
+ referenceTaskIds?: string[] | undefined;
2064
+ }, {
2065
+ id: string;
2066
+ createdAt: string;
2067
+ role: "user" | "agent";
2068
+ parts: ({
2069
+ text: string;
2070
+ type: "text";
2071
+ } | {
2072
+ type: "file";
2073
+ fileUri: string;
2074
+ mimeType: string;
2075
+ name?: string | undefined;
2076
+ } | {
2077
+ data: string;
2078
+ type: "data";
2079
+ mimeType: string;
2080
+ })[];
2081
+ metadata?: Record<string, unknown> | undefined;
2082
+ referenceTaskIds?: string[] | undefined;
2083
+ }>;
2084
+ configuration: z.ZodOptional<z.ZodObject<{
2085
+ acceptedOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2086
+ historyLength: z.ZodOptional<z.ZodNumber>;
2087
+ returnImmediately: z.ZodOptional<z.ZodBoolean>;
2088
+ }, "strip", z.ZodTypeAny, {
2089
+ acceptedOutputModes?: string[] | undefined;
2090
+ historyLength?: number | undefined;
2091
+ returnImmediately?: boolean | undefined;
2092
+ }, {
2093
+ acceptedOutputModes?: string[] | undefined;
2094
+ historyLength?: number | undefined;
2095
+ returnImmediately?: boolean | undefined;
2096
+ }>>;
2097
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2098
+ }, "strip", z.ZodTypeAny, {
2099
+ message: {
2100
+ id: string;
2101
+ createdAt: string;
2102
+ role: "user" | "agent";
2103
+ parts: ({
2104
+ text: string;
2105
+ type: "text";
2106
+ } | {
2107
+ type: "file";
2108
+ fileUri: string;
2109
+ mimeType: string;
2110
+ name?: string | undefined;
2111
+ } | {
2112
+ data: string;
2113
+ type: "data";
2114
+ mimeType: string;
2115
+ })[];
2116
+ metadata?: Record<string, unknown> | undefined;
2117
+ referenceTaskIds?: string[] | undefined;
2118
+ };
2119
+ metadata?: Record<string, unknown> | undefined;
2120
+ configuration?: {
2121
+ acceptedOutputModes?: string[] | undefined;
2122
+ historyLength?: number | undefined;
2123
+ returnImmediately?: boolean | undefined;
2124
+ } | undefined;
2125
+ }, {
2126
+ message: {
2127
+ id: string;
2128
+ createdAt: string;
2129
+ role: "user" | "agent";
2130
+ parts: ({
2131
+ text: string;
2132
+ type: "text";
2133
+ } | {
2134
+ type: "file";
2135
+ fileUri: string;
2136
+ mimeType: string;
2137
+ name?: string | undefined;
2138
+ } | {
2139
+ data: string;
2140
+ type: "data";
2141
+ mimeType: string;
2142
+ })[];
2143
+ metadata?: Record<string, unknown> | undefined;
2144
+ referenceTaskIds?: string[] | undefined;
2145
+ };
2146
+ metadata?: Record<string, unknown> | undefined;
2147
+ configuration?: {
2148
+ acceptedOutputModes?: string[] | undefined;
2149
+ historyLength?: number | undefined;
2150
+ returnImmediately?: boolean | undefined;
2151
+ } | undefined;
2152
+ }>;
2153
+ declare const A2AGetTaskParamsSchema: z.ZodObject<{
2154
+ id: z.ZodString;
2155
+ historyLength: z.ZodOptional<z.ZodNumber>;
2156
+ }, "strip", z.ZodTypeAny, {
2157
+ id: string;
2158
+ historyLength?: number | undefined;
2159
+ }, {
2160
+ id: string;
2161
+ historyLength?: number | undefined;
2162
+ }>;
2163
+ declare const A2ACancelTaskParamsSchema: z.ZodObject<{
2164
+ id: z.ZodString;
2165
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2166
+ }, "strip", z.ZodTypeAny, {
2167
+ id: string;
2168
+ metadata?: Record<string, unknown> | undefined;
2169
+ }, {
2170
+ id: string;
2171
+ metadata?: Record<string, unknown> | undefined;
2172
+ }>;
2173
+ declare const A2AJsonRpcRequestSchema: z.ZodObject<{
2174
+ jsonrpc: z.ZodLiteral<"2.0">;
2175
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
2176
+ method: z.ZodString;
2177
+ params: z.ZodUnknown;
2178
+ }, "strip", z.ZodTypeAny, {
2179
+ id: string | number;
2180
+ method: string;
2181
+ jsonrpc: "2.0";
2182
+ params?: unknown;
2183
+ }, {
2184
+ id: string | number;
2185
+ method: string;
2186
+ jsonrpc: "2.0";
2187
+ params?: unknown;
2188
+ }>;
2189
+
2190
+ /**
2191
+ * A2A Agent Card management.
2192
+ *
2193
+ * Creates, validates, signs, and verifies Agent Cards that describe
2194
+ * an agent's identity, capabilities, skills, and auth requirements
2195
+ * using the A2A protocol format.
2196
+ */
2197
+
2198
+ interface CreateAgentCardInput {
2199
+ /** The KavachOS agent identity to build the card from */
2200
+ agent: Pick<AgentIdentity, "id" | "name" | "type">;
2201
+ /** The URL where this agent's A2A endpoint is hosted */
2202
+ url: string;
2203
+ /** Human-readable description of what the agent does */
2204
+ description: string;
2205
+ /** Semantic version of this agent */
2206
+ version: string;
2207
+ /** Skills this agent can perform */
2208
+ skills: A2AAgentSkill[];
2209
+ /** Optional provider information */
2210
+ provider?: A2AAgentProvider;
2211
+ /** Optional capabilities declaration */
2212
+ capabilities?: A2AAgentCapabilities;
2213
+ /** Security schemes required to call this agent */
2214
+ securitySchemes?: Record<string, A2ASecurityScheme>;
2215
+ /** Security requirements (references to securitySchemes keys) */
2216
+ security?: Array<Record<string, string[]>>;
2217
+ /** Default accepted input MIME types */
2218
+ defaultInputModes?: string[];
2219
+ /** Default output MIME types */
2220
+ defaultOutputModes?: string[];
2221
+ /** Link to agent documentation */
2222
+ documentationUrl?: string;
2223
+ /** Arbitrary metadata */
2224
+ metadata?: Record<string, unknown>;
2225
+ }
2226
+ /**
2227
+ * Create an A2A-compliant Agent Card from a KavachOS agent identity.
2228
+ *
2229
+ * Maps KavachOS agent fields to the A2A Agent Card format and sets
2230
+ * the protocol version automatically.
2231
+ */
2232
+ declare function createAgentCard(input: CreateAgentCardInput): A2AAgentCard;
2233
+ /**
2234
+ * Validate an incoming Agent Card against the A2A schema.
2235
+ *
2236
+ * Returns the parsed card on success or a structured error on failure.
2237
+ */
2238
+ declare function validateAgentCard(card: unknown): Result<A2AAgentCard>;
2239
+ interface SignAgentCardOptions {
2240
+ /** The Agent Card to sign */
2241
+ card: A2AAgentCard;
2242
+ /** JWK private key used to create the signature */
2243
+ privateKey: CryptoKey | jose.JWK;
2244
+ /** Signing algorithm. Default: "ES256". */
2245
+ algorithm?: string;
2246
+ /** Key ID to include in the signature. Auto-generated if not provided. */
2247
+ keyId?: string;
2248
+ }
2249
+ /**
2250
+ * Sign an Agent Card with a private key.
2251
+ *
2252
+ * Creates a JWS compact signature over the card's canonical JSON
2253
+ * (excluding the signature field itself). The signature, algorithm,
2254
+ * and key ID are attached to the card's `signature` field.
2255
+ */
2256
+ declare function signAgentCard(options: SignAgentCardOptions): Promise<Result<A2AAgentCard>>;
2257
+ interface VerifyAgentCardOptions {
2258
+ /** The signed Agent Card to verify */
2259
+ card: A2AAgentCard;
2260
+ /** JWK public key used to verify the signature */
2261
+ publicKey: CryptoKey | jose.JWK;
2262
+ }
2263
+ /**
2264
+ * Verify a signed Agent Card's signature.
2265
+ *
2266
+ * Checks that the JWS signature in `card.signature` is valid
2267
+ * against the provided public key and that the payload matches
2268
+ * the card content (minus the signature field).
2269
+ */
2270
+ declare function verifyAgentCard(options: VerifyAgentCardOptions): Promise<Result<{
2271
+ valid: boolean;
2272
+ card: A2AAgentCard;
2273
+ }>>;
2274
+
2275
+ /**
2276
+ * A2A client for KavachOS.
2277
+ *
2278
+ * Discovers remote agents via /.well-known/agent.json and communicates
2279
+ * with them through JSON-RPC over HTTP. Supports message send, task
2280
+ * retrieval, cancellation, and SSE streaming.
2281
+ */
2282
+
2283
+ /**
2284
+ * Create an A2A client that can discover and call remote A2A agents.
2285
+ *
2286
+ * @example
2287
+ * ```typescript
2288
+ * const client = createA2AClient({
2289
+ * agent: 'https://remote-agent.example.com',
2290
+ * getAuthToken: () => kavach.issueToken({ agentId: myAgent.id }),
2291
+ * });
2292
+ *
2293
+ * const card = await client.discover();
2294
+ * const result = await client.sendMessage({
2295
+ * message: { id: '1', role: 'user', parts: [{ type: 'text', text: 'Hello' }], createdAt: new Date().toISOString() },
2296
+ * });
2297
+ * ```
2298
+ */
2299
+ declare function createA2AClient(config: A2AClientConfig): A2AClient;
2300
+
2301
+ /**
2302
+ * A2A JSON-RPC server for KavachOS.
2303
+ *
2304
+ * Creates a Web API Request/Response handler that implements the A2A
2305
+ * protocol's JSON-RPC endpoint. Handles message/send, tasks/get,
2306
+ * tasks/cancel, and message/stream (SSE). Authenticates callers through
2307
+ * KavachOS and logs every interaction to the audit trail.
2308
+ */
2309
+
2310
+ interface A2AServer {
2311
+ /** Handle an incoming HTTP request (JSON-RPC or agent card discovery) */
2312
+ handleRequest: (request: Request) => Promise<Response>;
2313
+ /** Access the task store directly (for testing or admin) */
2314
+ taskStore: A2ATaskStore;
2315
+ }
2316
+ /**
2317
+ * Create an A2A-compliant JSON-RPC server.
2318
+ *
2319
+ * The returned `handleRequest` function accepts standard Web API Request
2320
+ * objects and returns Response objects. Mount it at whatever path you
2321
+ * prefer; it also handles `/.well-known/agent.json` for agent card
2322
+ * discovery.
2323
+ *
2324
+ * @example
2325
+ * ```typescript
2326
+ * const server = createA2AServer({
2327
+ * agentCard: myCard,
2328
+ * handler: {
2329
+ * onMessage: async (msg) => ({ id: '...', contextId: '...', status: { code: 'completed' }, ... }),
2330
+ * },
2331
+ * authenticate: async (req) => verifyToken(req),
2332
+ * });
2333
+ *
2334
+ * // In your HTTP framework:
2335
+ * app.all('/a2a', (req) => server.handleRequest(req));
2336
+ * ```
2337
+ */
2338
+ declare function createA2AServer(config: A2AServerConfig): A2AServer;
2339
+
2340
+ export { type A2AAgentCapabilities, A2AAgentCapabilitiesSchema, type A2AAgentCard, A2AAgentCardSchema, type A2AAgentCardSignature, A2AAgentCardSignatureSchema, type A2AAgentProvider, A2AAgentProviderSchema, type A2AAgentSkill, A2AAgentSkillSchema, type A2AApiKeySecurityScheme, A2AApiKeySecuritySchemeSchema, type A2AArtifact, A2AArtifactSchema, type A2AAuditEvent, type A2ACancelTaskParams, A2ACancelTaskParamsSchema, type A2AClient, type A2AClientConfig, type A2ADataPart, A2ADataPartSchema, type A2AFilePart, A2AFilePartSchema, type A2AGetTaskParams, A2AGetTaskParamsSchema, type A2AHttpSecurityScheme, A2AHttpSecuritySchemeSchema, type A2AJsonRpcError, type A2AJsonRpcRequest, A2AJsonRpcRequestSchema, type A2AJsonRpcResponse, type A2AMessage, A2AMessageSchema, type A2AMutualTlsSecurityScheme, A2AMutualTlsSecuritySchemeSchema, type A2AOAuth2Flow, A2AOAuth2FlowSchema, type A2AOAuth2SecurityScheme, A2AOAuth2SecuritySchemeSchema, type A2AOidcSecurityScheme, A2AOidcSecuritySchemeSchema, type A2APart, A2APartSchema, type A2ARole, type A2ASecurityScheme, A2ASecuritySchemeSchema, type A2ASendMessageConfiguration, A2ASendMessageConfigurationSchema, type A2ASendMessageParams, A2ASendMessageParamsSchema, type A2AServer, type A2AServerConfig, type A2AStreamEvent, type A2ATask, type A2ATaskArtifactUpdateEvent, type A2ATaskHandler, A2ATaskSchema, type A2ATaskState, A2ATaskStateSchema, type A2ATaskStatus, A2ATaskStatusSchema, type A2ATaskStatusUpdateEvent, type A2ATaskStore, type A2ATextPart, A2ATextPartSchema, A2A_ERROR_CODES, A2A_JSONRPC_VERSION, A2A_METHODS, A2A_PROTOCOL_VERSION, A2A_WELL_KNOWN_PATH, type CreateAgentCardInput, type SignAgentCardOptions, type VerifyAgentCardOptions, createA2AClient, createA2AServer, createAgentCard, signAgentCard, validateAgentCard, verifyAgentCard };