kavachos 0.0.4 → 0.0.5

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