@relaycast/a2a 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,494 @@
1
+ import { z } from 'zod';
2
+ export declare const A2aSkillSchema: z.ZodObject<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
+ }, z.core.$strip>;
8
+ export declare const A2aAgentCardSchema: z.ZodObject<{
9
+ name: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ url: z.ZodString;
12
+ version: z.ZodString;
13
+ skills: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodOptional<z.ZodString>;
15
+ name: z.ZodString;
16
+ description: z.ZodOptional<z.ZodString>;
17
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ }, z.core.$strip>>;
19
+ provider: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
+ capabilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
+ default_input_modes: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ default_output_modes: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ documentation_url: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ export declare const A2aFilePartSchema: z.ZodObject<{
26
+ kind: z.ZodLiteral<"file">;
27
+ file: z.ZodObject<{
28
+ name: z.ZodString;
29
+ mime_type: z.ZodOptional<z.ZodString>;
30
+ uri: z.ZodOptional<z.ZodString>;
31
+ bytes: z.ZodOptional<z.ZodNumber>;
32
+ }, z.core.$strip>;
33
+ }, z.core.$strip>;
34
+ export declare const A2aDataPartSchema: z.ZodObject<{
35
+ kind: z.ZodLiteral<"data">;
36
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
37
+ }, z.core.$strip>;
38
+ export declare const A2aTextPartSchema: z.ZodObject<{
39
+ kind: z.ZodLiteral<"text">;
40
+ text: z.ZodString;
41
+ }, z.core.$strip>;
42
+ export declare const A2aPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
43
+ kind: z.ZodLiteral<"text">;
44
+ text: z.ZodString;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ kind: z.ZodLiteral<"file">;
47
+ file: z.ZodObject<{
48
+ name: z.ZodString;
49
+ mime_type: z.ZodOptional<z.ZodString>;
50
+ uri: z.ZodOptional<z.ZodString>;
51
+ bytes: z.ZodOptional<z.ZodNumber>;
52
+ }, z.core.$strip>;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ kind: z.ZodLiteral<"data">;
55
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
56
+ }, z.core.$strip>], "kind">;
57
+ export declare const A2aMessageSchema: z.ZodObject<{
58
+ message_id: z.ZodString;
59
+ role: z.ZodDefault<z.ZodEnum<{
60
+ user: "user";
61
+ agent: "agent";
62
+ system: "system";
63
+ }>>;
64
+ context_id: z.ZodOptional<z.ZodString>;
65
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
66
+ kind: z.ZodLiteral<"text">;
67
+ text: z.ZodString;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"file">;
70
+ file: z.ZodObject<{
71
+ name: z.ZodString;
72
+ mime_type: z.ZodOptional<z.ZodString>;
73
+ uri: z.ZodOptional<z.ZodString>;
74
+ bytes: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strip>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ kind: z.ZodLiteral<"data">;
78
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
79
+ }, z.core.$strip>], "kind">>;
80
+ }, z.core.$strip>;
81
+ export declare const A2aArtifactSchema: z.ZodObject<{
82
+ name: z.ZodString;
83
+ description: z.ZodOptional<z.ZodString>;
84
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
85
+ kind: z.ZodLiteral<"text">;
86
+ text: z.ZodString;
87
+ }, z.core.$strip>, z.ZodObject<{
88
+ kind: z.ZodLiteral<"file">;
89
+ file: z.ZodObject<{
90
+ name: z.ZodString;
91
+ mime_type: z.ZodOptional<z.ZodString>;
92
+ uri: z.ZodOptional<z.ZodString>;
93
+ bytes: z.ZodOptional<z.ZodNumber>;
94
+ }, z.core.$strip>;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ kind: z.ZodLiteral<"data">;
97
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
98
+ }, z.core.$strip>], "kind">>;
99
+ }, z.core.$strip>;
100
+ export declare const A2aTaskStateSchema: z.ZodEnum<{
101
+ unknown: "unknown";
102
+ submitted: "submitted";
103
+ working: "working";
104
+ "input-required": "input-required";
105
+ completed: "completed";
106
+ failed: "failed";
107
+ canceled: "canceled";
108
+ }>;
109
+ export declare const A2aTaskSchema: z.ZodObject<{
110
+ id: z.ZodString;
111
+ context_id: z.ZodOptional<z.ZodString>;
112
+ status: z.ZodObject<{
113
+ state: z.ZodEnum<{
114
+ unknown: "unknown";
115
+ submitted: "submitted";
116
+ working: "working";
117
+ "input-required": "input-required";
118
+ completed: "completed";
119
+ failed: "failed";
120
+ canceled: "canceled";
121
+ }>;
122
+ message: z.ZodOptional<z.ZodString>;
123
+ }, z.core.$strip>;
124
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
125
+ name: z.ZodString;
126
+ description: z.ZodOptional<z.ZodString>;
127
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ kind: z.ZodLiteral<"text">;
129
+ text: z.ZodString;
130
+ }, z.core.$strip>, z.ZodObject<{
131
+ kind: z.ZodLiteral<"file">;
132
+ file: z.ZodObject<{
133
+ name: z.ZodString;
134
+ mime_type: z.ZodOptional<z.ZodString>;
135
+ uri: z.ZodOptional<z.ZodString>;
136
+ bytes: z.ZodOptional<z.ZodNumber>;
137
+ }, z.core.$strip>;
138
+ }, z.core.$strip>, z.ZodObject<{
139
+ kind: z.ZodLiteral<"data">;
140
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
141
+ }, z.core.$strip>], "kind">>;
142
+ }, z.core.$strip>>>;
143
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
144
+ message_id: z.ZodString;
145
+ role: z.ZodDefault<z.ZodEnum<{
146
+ user: "user";
147
+ agent: "agent";
148
+ system: "system";
149
+ }>>;
150
+ context_id: z.ZodOptional<z.ZodString>;
151
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
152
+ kind: z.ZodLiteral<"text">;
153
+ text: z.ZodString;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ kind: z.ZodLiteral<"file">;
156
+ file: z.ZodObject<{
157
+ name: z.ZodString;
158
+ mime_type: z.ZodOptional<z.ZodString>;
159
+ uri: z.ZodOptional<z.ZodString>;
160
+ bytes: z.ZodOptional<z.ZodNumber>;
161
+ }, z.core.$strip>;
162
+ }, z.core.$strip>, z.ZodObject<{
163
+ kind: z.ZodLiteral<"data">;
164
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
165
+ }, z.core.$strip>], "kind">>;
166
+ }, z.core.$strip>>>;
167
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
168
+ }, z.core.$strip>;
169
+ export declare const JsonRpcRequestSchema: z.ZodObject<{
170
+ jsonrpc: z.ZodLiteral<"2.0">;
171
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
172
+ method: z.ZodString;
173
+ params: z.ZodOptional<z.ZodObject<{
174
+ message: z.ZodOptional<z.ZodObject<{
175
+ message_id: z.ZodString;
176
+ role: z.ZodDefault<z.ZodEnum<{
177
+ user: "user";
178
+ agent: "agent";
179
+ system: "system";
180
+ }>>;
181
+ context_id: z.ZodOptional<z.ZodString>;
182
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
183
+ kind: z.ZodLiteral<"text">;
184
+ text: z.ZodString;
185
+ }, z.core.$strip>, z.ZodObject<{
186
+ kind: z.ZodLiteral<"file">;
187
+ file: z.ZodObject<{
188
+ name: z.ZodString;
189
+ mime_type: z.ZodOptional<z.ZodString>;
190
+ uri: z.ZodOptional<z.ZodString>;
191
+ bytes: z.ZodOptional<z.ZodNumber>;
192
+ }, z.core.$strip>;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ kind: z.ZodLiteral<"data">;
195
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
196
+ }, z.core.$strip>], "kind">>;
197
+ }, z.core.$strip>>;
198
+ }, z.core.$loose>>;
199
+ }, z.core.$strip>;
200
+ export declare const JsonRpcErrorSchema: z.ZodObject<{
201
+ code: z.ZodNumber;
202
+ message: z.ZodString;
203
+ data: z.ZodOptional<z.ZodUnknown>;
204
+ }, z.core.$strip>;
205
+ export declare const JsonRpcResponseSchema: z.ZodObject<{
206
+ jsonrpc: z.ZodLiteral<"2.0">;
207
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
208
+ result: z.ZodOptional<z.ZodObject<{
209
+ task: z.ZodOptional<z.ZodObject<{
210
+ id: z.ZodString;
211
+ context_id: z.ZodOptional<z.ZodString>;
212
+ status: z.ZodObject<{
213
+ state: z.ZodEnum<{
214
+ unknown: "unknown";
215
+ submitted: "submitted";
216
+ working: "working";
217
+ "input-required": "input-required";
218
+ completed: "completed";
219
+ failed: "failed";
220
+ canceled: "canceled";
221
+ }>;
222
+ message: z.ZodOptional<z.ZodString>;
223
+ }, z.core.$strip>;
224
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
+ name: z.ZodString;
226
+ description: z.ZodOptional<z.ZodString>;
227
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
228
+ kind: z.ZodLiteral<"text">;
229
+ text: z.ZodString;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ kind: z.ZodLiteral<"file">;
232
+ file: z.ZodObject<{
233
+ name: z.ZodString;
234
+ mime_type: z.ZodOptional<z.ZodString>;
235
+ uri: z.ZodOptional<z.ZodString>;
236
+ bytes: z.ZodOptional<z.ZodNumber>;
237
+ }, z.core.$strip>;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ kind: z.ZodLiteral<"data">;
240
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
241
+ }, z.core.$strip>], "kind">>;
242
+ }, z.core.$strip>>>;
243
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
+ message_id: z.ZodString;
245
+ role: z.ZodDefault<z.ZodEnum<{
246
+ user: "user";
247
+ agent: "agent";
248
+ system: "system";
249
+ }>>;
250
+ context_id: z.ZodOptional<z.ZodString>;
251
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
252
+ kind: z.ZodLiteral<"text">;
253
+ text: z.ZodString;
254
+ }, z.core.$strip>, z.ZodObject<{
255
+ kind: z.ZodLiteral<"file">;
256
+ file: z.ZodObject<{
257
+ name: z.ZodString;
258
+ mime_type: z.ZodOptional<z.ZodString>;
259
+ uri: z.ZodOptional<z.ZodString>;
260
+ bytes: z.ZodOptional<z.ZodNumber>;
261
+ }, z.core.$strip>;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"data">;
264
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
265
+ }, z.core.$strip>], "kind">>;
266
+ }, z.core.$strip>>>;
267
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
268
+ }, z.core.$strip>>;
269
+ message: z.ZodOptional<z.ZodObject<{
270
+ message_id: z.ZodString;
271
+ role: z.ZodDefault<z.ZodEnum<{
272
+ user: "user";
273
+ agent: "agent";
274
+ system: "system";
275
+ }>>;
276
+ context_id: z.ZodOptional<z.ZodString>;
277
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
278
+ kind: z.ZodLiteral<"text">;
279
+ text: z.ZodString;
280
+ }, z.core.$strip>, z.ZodObject<{
281
+ kind: z.ZodLiteral<"file">;
282
+ file: z.ZodObject<{
283
+ name: z.ZodString;
284
+ mime_type: z.ZodOptional<z.ZodString>;
285
+ uri: z.ZodOptional<z.ZodString>;
286
+ bytes: z.ZodOptional<z.ZodNumber>;
287
+ }, z.core.$strip>;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ kind: z.ZodLiteral<"data">;
290
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
291
+ }, z.core.$strip>], "kind">>;
292
+ }, z.core.$strip>>;
293
+ }, z.core.$loose>>;
294
+ error: z.ZodOptional<z.ZodObject<{
295
+ code: z.ZodNumber;
296
+ message: z.ZodString;
297
+ data: z.ZodOptional<z.ZodUnknown>;
298
+ }, z.core.$strip>>;
299
+ }, z.core.$strip>;
300
+ export declare const A2aResponseSchema: z.ZodObject<{
301
+ task: z.ZodOptional<z.ZodObject<{
302
+ id: z.ZodString;
303
+ context_id: z.ZodOptional<z.ZodString>;
304
+ status: z.ZodObject<{
305
+ state: z.ZodEnum<{
306
+ unknown: "unknown";
307
+ submitted: "submitted";
308
+ working: "working";
309
+ "input-required": "input-required";
310
+ completed: "completed";
311
+ failed: "failed";
312
+ canceled: "canceled";
313
+ }>;
314
+ message: z.ZodOptional<z.ZodString>;
315
+ }, z.core.$strip>;
316
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
317
+ name: z.ZodString;
318
+ description: z.ZodOptional<z.ZodString>;
319
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
320
+ kind: z.ZodLiteral<"text">;
321
+ text: z.ZodString;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ kind: z.ZodLiteral<"file">;
324
+ file: z.ZodObject<{
325
+ name: z.ZodString;
326
+ mime_type: z.ZodOptional<z.ZodString>;
327
+ uri: z.ZodOptional<z.ZodString>;
328
+ bytes: z.ZodOptional<z.ZodNumber>;
329
+ }, z.core.$strip>;
330
+ }, z.core.$strip>, z.ZodObject<{
331
+ kind: z.ZodLiteral<"data">;
332
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
333
+ }, z.core.$strip>], "kind">>;
334
+ }, z.core.$strip>>>;
335
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
+ message_id: z.ZodString;
337
+ role: z.ZodDefault<z.ZodEnum<{
338
+ user: "user";
339
+ agent: "agent";
340
+ system: "system";
341
+ }>>;
342
+ context_id: z.ZodOptional<z.ZodString>;
343
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
344
+ kind: z.ZodLiteral<"text">;
345
+ text: z.ZodString;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ kind: z.ZodLiteral<"file">;
348
+ file: z.ZodObject<{
349
+ name: z.ZodString;
350
+ mime_type: z.ZodOptional<z.ZodString>;
351
+ uri: z.ZodOptional<z.ZodString>;
352
+ bytes: z.ZodOptional<z.ZodNumber>;
353
+ }, z.core.$strip>;
354
+ }, z.core.$strip>, z.ZodObject<{
355
+ kind: z.ZodLiteral<"data">;
356
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
357
+ }, z.core.$strip>], "kind">>;
358
+ }, z.core.$strip>>>;
359
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
360
+ }, z.core.$strip>>;
361
+ message: z.ZodOptional<z.ZodObject<{
362
+ message_id: z.ZodString;
363
+ role: z.ZodDefault<z.ZodEnum<{
364
+ user: "user";
365
+ agent: "agent";
366
+ system: "system";
367
+ }>>;
368
+ context_id: z.ZodOptional<z.ZodString>;
369
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
370
+ kind: z.ZodLiteral<"text">;
371
+ text: z.ZodString;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ kind: z.ZodLiteral<"file">;
374
+ file: z.ZodObject<{
375
+ name: z.ZodString;
376
+ mime_type: z.ZodOptional<z.ZodString>;
377
+ uri: z.ZodOptional<z.ZodString>;
378
+ bytes: z.ZodOptional<z.ZodNumber>;
379
+ }, z.core.$strip>;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ kind: z.ZodLiteral<"data">;
382
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
383
+ }, z.core.$strip>], "kind">>;
384
+ }, z.core.$strip>>;
385
+ response: z.ZodOptional<z.ZodObject<{
386
+ jsonrpc: z.ZodLiteral<"2.0">;
387
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
388
+ result: z.ZodOptional<z.ZodObject<{
389
+ task: z.ZodOptional<z.ZodObject<{
390
+ id: z.ZodString;
391
+ context_id: z.ZodOptional<z.ZodString>;
392
+ status: z.ZodObject<{
393
+ state: z.ZodEnum<{
394
+ unknown: "unknown";
395
+ submitted: "submitted";
396
+ working: "working";
397
+ "input-required": "input-required";
398
+ completed: "completed";
399
+ failed: "failed";
400
+ canceled: "canceled";
401
+ }>;
402
+ message: z.ZodOptional<z.ZodString>;
403
+ }, z.core.$strip>;
404
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
405
+ name: z.ZodString;
406
+ description: z.ZodOptional<z.ZodString>;
407
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
408
+ kind: z.ZodLiteral<"text">;
409
+ text: z.ZodString;
410
+ }, z.core.$strip>, z.ZodObject<{
411
+ kind: z.ZodLiteral<"file">;
412
+ file: z.ZodObject<{
413
+ name: z.ZodString;
414
+ mime_type: z.ZodOptional<z.ZodString>;
415
+ uri: z.ZodOptional<z.ZodString>;
416
+ bytes: z.ZodOptional<z.ZodNumber>;
417
+ }, z.core.$strip>;
418
+ }, z.core.$strip>, z.ZodObject<{
419
+ kind: z.ZodLiteral<"data">;
420
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
421
+ }, z.core.$strip>], "kind">>;
422
+ }, z.core.$strip>>>;
423
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
424
+ message_id: z.ZodString;
425
+ role: z.ZodDefault<z.ZodEnum<{
426
+ user: "user";
427
+ agent: "agent";
428
+ system: "system";
429
+ }>>;
430
+ context_id: z.ZodOptional<z.ZodString>;
431
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
432
+ kind: z.ZodLiteral<"text">;
433
+ text: z.ZodString;
434
+ }, z.core.$strip>, z.ZodObject<{
435
+ kind: z.ZodLiteral<"file">;
436
+ file: z.ZodObject<{
437
+ name: z.ZodString;
438
+ mime_type: z.ZodOptional<z.ZodString>;
439
+ uri: z.ZodOptional<z.ZodString>;
440
+ bytes: z.ZodOptional<z.ZodNumber>;
441
+ }, z.core.$strip>;
442
+ }, z.core.$strip>, z.ZodObject<{
443
+ kind: z.ZodLiteral<"data">;
444
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
445
+ }, z.core.$strip>], "kind">>;
446
+ }, z.core.$strip>>>;
447
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
448
+ }, z.core.$strip>>;
449
+ message: z.ZodOptional<z.ZodObject<{
450
+ message_id: z.ZodString;
451
+ role: z.ZodDefault<z.ZodEnum<{
452
+ user: "user";
453
+ agent: "agent";
454
+ system: "system";
455
+ }>>;
456
+ context_id: z.ZodOptional<z.ZodString>;
457
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
458
+ kind: z.ZodLiteral<"text">;
459
+ text: z.ZodString;
460
+ }, z.core.$strip>, z.ZodObject<{
461
+ kind: z.ZodLiteral<"file">;
462
+ file: z.ZodObject<{
463
+ name: z.ZodString;
464
+ mime_type: z.ZodOptional<z.ZodString>;
465
+ uri: z.ZodOptional<z.ZodString>;
466
+ bytes: z.ZodOptional<z.ZodNumber>;
467
+ }, z.core.$strip>;
468
+ }, z.core.$strip>, z.ZodObject<{
469
+ kind: z.ZodLiteral<"data">;
470
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
471
+ }, z.core.$strip>], "kind">>;
472
+ }, z.core.$strip>>;
473
+ }, z.core.$loose>>;
474
+ error: z.ZodOptional<z.ZodObject<{
475
+ code: z.ZodNumber;
476
+ message: z.ZodString;
477
+ data: z.ZodOptional<z.ZodUnknown>;
478
+ }, z.core.$strip>>;
479
+ }, z.core.$strip>>;
480
+ }, z.core.$strip>;
481
+ export type A2aSkill = z.infer<typeof A2aSkillSchema>;
482
+ export type A2aAgentCard = z.infer<typeof A2aAgentCardSchema>;
483
+ export type A2aFilePart = z.infer<typeof A2aFilePartSchema>;
484
+ export type A2aDataPart = z.infer<typeof A2aDataPartSchema>;
485
+ export type A2aTextPart = z.infer<typeof A2aTextPartSchema>;
486
+ export type A2aPart = z.infer<typeof A2aPartSchema>;
487
+ export type A2aMessage = z.infer<typeof A2aMessageSchema>;
488
+ export type A2aArtifact = z.infer<typeof A2aArtifactSchema>;
489
+ export type A2aTaskState = z.infer<typeof A2aTaskStateSchema>;
490
+ export type A2aTask = z.infer<typeof A2aTaskSchema>;
491
+ export type A2aJsonRpcRequest = z.infer<typeof JsonRpcRequestSchema>;
492
+ export type A2aJsonRpcResponse = z.infer<typeof JsonRpcResponseSchema>;
493
+ export type A2aResponse = z.infer<typeof A2aResponseSchema>;
494
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;iBAW7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;iBAQ5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;2BAIxB,CAAC;AAE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AAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,100 @@
1
+ import { z } from 'zod';
2
+ export const A2aSkillSchema = z.object({
3
+ id: z.string().min(1).optional(),
4
+ name: z.string().min(1),
5
+ description: z.string().optional(),
6
+ tags: z.array(z.string()).optional(),
7
+ });
8
+ export const A2aAgentCardSchema = z.object({
9
+ name: z.string().min(1),
10
+ description: z.string().optional(),
11
+ url: z.string().url(),
12
+ version: z.string().min(1),
13
+ skills: z.array(A2aSkillSchema).min(1),
14
+ provider: z.record(z.string(), z.unknown()).optional(),
15
+ capabilities: z.record(z.string(), z.unknown()).optional(),
16
+ default_input_modes: z.array(z.string()).optional(),
17
+ default_output_modes: z.array(z.string()).optional(),
18
+ documentation_url: z.string().url().optional(),
19
+ });
20
+ export const A2aFilePartSchema = z.object({
21
+ kind: z.literal('file'),
22
+ file: z.object({
23
+ name: z.string().min(1),
24
+ mime_type: z.string().min(1).optional(),
25
+ uri: z.string().min(1).optional(),
26
+ bytes: z.number().int().nonnegative().optional(),
27
+ }),
28
+ });
29
+ export const A2aDataPartSchema = z.object({
30
+ kind: z.literal('data'),
31
+ data: z.record(z.string(), z.unknown()),
32
+ });
33
+ export const A2aTextPartSchema = z.object({
34
+ kind: z.literal('text'),
35
+ text: z.string(),
36
+ });
37
+ export const A2aPartSchema = z.discriminatedUnion('kind', [
38
+ A2aTextPartSchema,
39
+ A2aFilePartSchema,
40
+ A2aDataPartSchema,
41
+ ]);
42
+ export const A2aMessageSchema = z.object({
43
+ message_id: z.string(),
44
+ role: z.enum(['user', 'agent', 'system']).default('user'),
45
+ context_id: z.string().optional(),
46
+ parts: z.array(A2aPartSchema).min(1),
47
+ });
48
+ export const A2aArtifactSchema = z.object({
49
+ name: z.string(),
50
+ description: z.string().optional(),
51
+ parts: z.array(A2aPartSchema).min(1),
52
+ });
53
+ export const A2aTaskStateSchema = z.enum([
54
+ 'submitted',
55
+ 'working',
56
+ 'input-required',
57
+ 'completed',
58
+ 'failed',
59
+ 'canceled',
60
+ 'unknown',
61
+ ]);
62
+ export const A2aTaskSchema = z.object({
63
+ id: z.string(),
64
+ context_id: z.string().optional(),
65
+ status: z.object({
66
+ state: A2aTaskStateSchema,
67
+ message: z.string().optional(),
68
+ }),
69
+ artifacts: z.array(A2aArtifactSchema).optional(),
70
+ history: z.array(A2aMessageSchema).optional(),
71
+ metadata: z.record(z.string(), z.unknown()).optional(),
72
+ });
73
+ export const JsonRpcRequestSchema = z.object({
74
+ jsonrpc: z.literal('2.0'),
75
+ id: z.union([z.string(), z.number()]).optional(),
76
+ method: z.string().min(1),
77
+ params: z.object({
78
+ message: A2aMessageSchema.optional(),
79
+ }).passthrough().optional(),
80
+ });
81
+ export const JsonRpcErrorSchema = z.object({
82
+ code: z.number(),
83
+ message: z.string(),
84
+ data: z.unknown().optional(),
85
+ });
86
+ export const JsonRpcResponseSchema = z.object({
87
+ jsonrpc: z.literal('2.0'),
88
+ id: z.union([z.string(), z.number()]).optional(),
89
+ result: z.object({
90
+ task: A2aTaskSchema.optional(),
91
+ message: A2aMessageSchema.optional(),
92
+ }).passthrough().optional(),
93
+ error: JsonRpcErrorSchema.optional(),
94
+ });
95
+ export const A2aResponseSchema = z.object({
96
+ task: A2aTaskSchema.optional(),
97
+ message: A2aMessageSchema.optional(),
98
+ response: JsonRpcResponseSchema.optional(),
99
+ });
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,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AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@relaycast/a2a",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
7
14
  "scripts": {
8
15
  "build": "rm -rf dist tsconfig.tsbuildinfo && tsc",
9
- "test": "vitest run",
16
+ "test": "vitest run --passWithNoTests",
10
17
  "lint": "eslint src/"
11
18
  },
12
19
  "repository": {