@a2a-js/sdk 0.2.4 → 0.3.0

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.
@@ -1,2048 +0,0 @@
1
- /**
2
- * This file was automatically generated by json-schema-to-typescript.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run json-schema-to-typescript to regenerate this file.
5
- */
6
- /**
7
- * This interface was referenced by `MySchema`'s JSON-Schema
8
- * via the `definition` "A2AError".
9
- */
10
- type A2AError = JSONParseError | InvalidRequestError | MethodNotFoundError | InvalidParamsError | InternalError | TaskNotFoundError | TaskNotCancelableError | PushNotificationNotSupportedError | UnsupportedOperationError | ContentTypeNotSupportedError | InvalidAgentResponseError;
11
- /**
12
- * A2A supported request types
13
- *
14
- * This interface was referenced by `MySchema`'s JSON-Schema
15
- * via the `definition` "A2ARequest".
16
- */
17
- type A2ARequest = SendMessageRequest | SendStreamingMessageRequest | GetTaskRequest | CancelTaskRequest | SetTaskPushNotificationConfigRequest | GetTaskPushNotificationConfigRequest | TaskResubscriptionRequest;
18
- /**
19
- * Represents a part of a message, which can be text, a file, or structured data.
20
- *
21
- * This interface was referenced by `MySchema`'s JSON-Schema
22
- * via the `definition` "Part".
23
- */
24
- type Part = TextPart | FilePart | DataPart;
25
- /**
26
- * Mirrors the OpenAPI Security Scheme Object
27
- * (https://swagger.io/specification/#security-scheme-object)
28
- *
29
- * This interface was referenced by `MySchema`'s JSON-Schema
30
- * via the `definition` "SecurityScheme".
31
- */
32
- type SecurityScheme = APIKeySecurityScheme | HTTPAuthSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme;
33
- /**
34
- * JSON-RPC response for the 'tasks/cancel' method.
35
- *
36
- * This interface was referenced by `MySchema`'s JSON-Schema
37
- * via the `definition` "CancelTaskResponse".
38
- */
39
- type CancelTaskResponse = JSONRPCErrorResponse | CancelTaskSuccessResponse;
40
- /**
41
- * Represents the possible states of a Task.
42
- *
43
- * This interface was referenced by `MySchema`'s JSON-Schema
44
- * via the `definition` "TaskState".
45
- */
46
- type TaskState = "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | "auth-required" | "unknown";
47
- /**
48
- * JSON-RPC response for the 'tasks/pushNotificationConfig/set' method.
49
- *
50
- * This interface was referenced by `MySchema`'s JSON-Schema
51
- * via the `definition` "GetTaskPushNotificationConfigResponse".
52
- */
53
- type GetTaskPushNotificationConfigResponse = JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse;
54
- /**
55
- * JSON-RPC response for the 'tasks/get' method.
56
- *
57
- * This interface was referenced by `MySchema`'s JSON-Schema
58
- * via the `definition` "GetTaskResponse".
59
- */
60
- type GetTaskResponse = JSONRPCErrorResponse | GetTaskSuccessResponse;
61
- /**
62
- * Represents a JSON-RPC 2.0 Response object.
63
- *
64
- * This interface was referenced by `MySchema`'s JSON-Schema
65
- * via the `definition` "JSONRPCResponse".
66
- */
67
- type JSONRPCResponse = JSONRPCErrorResponse | SendMessageSuccessResponse | SendStreamingMessageSuccessResponse | GetTaskSuccessResponse | CancelTaskSuccessResponse | SetTaskPushNotificationConfigSuccessResponse | GetTaskPushNotificationConfigSuccessResponse;
68
- /**
69
- * JSON-RPC response model for the 'message/send' method.
70
- *
71
- * This interface was referenced by `MySchema`'s JSON-Schema
72
- * via the `definition` "SendMessageResponse".
73
- */
74
- type SendMessageResponse = JSONRPCErrorResponse | SendMessageSuccessResponse;
75
- /**
76
- * JSON-RPC response model for the 'message/stream' method.
77
- *
78
- * This interface was referenced by `MySchema`'s JSON-Schema
79
- * via the `definition` "SendStreamingMessageResponse".
80
- */
81
- type SendStreamingMessageResponse = JSONRPCErrorResponse | SendStreamingMessageSuccessResponse;
82
- /**
83
- * JSON-RPC response for the 'tasks/pushNotificationConfig/set' method.
84
- *
85
- * This interface was referenced by `MySchema`'s JSON-Schema
86
- * via the `definition` "SetTaskPushNotificationConfigResponse".
87
- */
88
- type SetTaskPushNotificationConfigResponse = JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse;
89
- interface MySchema {
90
- [k: string]: unknown;
91
- }
92
- /**
93
- * JSON-RPC error indicating invalid JSON was received by the server.
94
- *
95
- * This interface was referenced by `MySchema`'s JSON-Schema
96
- * via the `definition` "JSONParseError".
97
- */
98
- interface JSONParseError {
99
- /**
100
- * A Number that indicates the error type that occurred.
101
- */
102
- code: -32700;
103
- /**
104
- * A Primitive or Structured value that contains additional information about the error.
105
- * This may be omitted.
106
- */
107
- data?: {
108
- [k: string]: unknown;
109
- };
110
- /**
111
- * A String providing a short description of the error.
112
- */
113
- message: string;
114
- }
115
- /**
116
- * JSON-RPC error indicating the JSON sent is not a valid Request object.
117
- *
118
- * This interface was referenced by `MySchema`'s JSON-Schema
119
- * via the `definition` "InvalidRequestError".
120
- */
121
- interface InvalidRequestError {
122
- /**
123
- * A Number that indicates the error type that occurred.
124
- */
125
- code: -32600;
126
- /**
127
- * A Primitive or Structured value that contains additional information about the error.
128
- * This may be omitted.
129
- */
130
- data?: {
131
- [k: string]: unknown;
132
- };
133
- /**
134
- * A String providing a short description of the error.
135
- */
136
- message: string;
137
- }
138
- /**
139
- * JSON-RPC error indicating the method does not exist or is not available.
140
- *
141
- * This interface was referenced by `MySchema`'s JSON-Schema
142
- * via the `definition` "MethodNotFoundError".
143
- */
144
- interface MethodNotFoundError {
145
- /**
146
- * A Number that indicates the error type that occurred.
147
- */
148
- code: -32601;
149
- /**
150
- * A Primitive or Structured value that contains additional information about the error.
151
- * This may be omitted.
152
- */
153
- data?: {
154
- [k: string]: unknown;
155
- };
156
- /**
157
- * A String providing a short description of the error.
158
- */
159
- message: string;
160
- }
161
- /**
162
- * JSON-RPC error indicating invalid method parameter(s).
163
- *
164
- * This interface was referenced by `MySchema`'s JSON-Schema
165
- * via the `definition` "InvalidParamsError".
166
- */
167
- interface InvalidParamsError {
168
- /**
169
- * A Number that indicates the error type that occurred.
170
- */
171
- code: -32602;
172
- /**
173
- * A Primitive or Structured value that contains additional information about the error.
174
- * This may be omitted.
175
- */
176
- data?: {
177
- [k: string]: unknown;
178
- };
179
- /**
180
- * A String providing a short description of the error.
181
- */
182
- message: string;
183
- }
184
- /**
185
- * JSON-RPC error indicating an internal JSON-RPC error on the server.
186
- *
187
- * This interface was referenced by `MySchema`'s JSON-Schema
188
- * via the `definition` "InternalError".
189
- */
190
- interface InternalError {
191
- /**
192
- * A Number that indicates the error type that occurred.
193
- */
194
- code: -32603;
195
- /**
196
- * A Primitive or Structured value that contains additional information about the error.
197
- * This may be omitted.
198
- */
199
- data?: {
200
- [k: string]: unknown;
201
- };
202
- /**
203
- * A String providing a short description of the error.
204
- */
205
- message: string;
206
- }
207
- /**
208
- * A2A specific error indicating the requested task ID was not found.
209
- *
210
- * This interface was referenced by `MySchema`'s JSON-Schema
211
- * via the `definition` "TaskNotFoundError".
212
- */
213
- interface TaskNotFoundError {
214
- /**
215
- * A Number that indicates the error type that occurred.
216
- */
217
- code: -32001;
218
- /**
219
- * A Primitive or Structured value that contains additional information about the error.
220
- * This may be omitted.
221
- */
222
- data?: {
223
- [k: string]: unknown;
224
- };
225
- /**
226
- * A String providing a short description of the error.
227
- */
228
- message: string;
229
- }
230
- /**
231
- * A2A specific error indicating the task is in a state where it cannot be canceled.
232
- *
233
- * This interface was referenced by `MySchema`'s JSON-Schema
234
- * via the `definition` "TaskNotCancelableError".
235
- */
236
- interface TaskNotCancelableError {
237
- /**
238
- * A Number that indicates the error type that occurred.
239
- */
240
- code: -32002;
241
- /**
242
- * A Primitive or Structured value that contains additional information about the error.
243
- * This may be omitted.
244
- */
245
- data?: {
246
- [k: string]: unknown;
247
- };
248
- /**
249
- * A String providing a short description of the error.
250
- */
251
- message: string;
252
- }
253
- /**
254
- * A2A specific error indicating the agent does not support push notifications.
255
- *
256
- * This interface was referenced by `MySchema`'s JSON-Schema
257
- * via the `definition` "PushNotificationNotSupportedError".
258
- */
259
- interface PushNotificationNotSupportedError {
260
- /**
261
- * A Number that indicates the error type that occurred.
262
- */
263
- code: -32003;
264
- /**
265
- * A Primitive or Structured value that contains additional information about the error.
266
- * This may be omitted.
267
- */
268
- data?: {
269
- [k: string]: unknown;
270
- };
271
- /**
272
- * A String providing a short description of the error.
273
- */
274
- message: string;
275
- }
276
- /**
277
- * A2A specific error indicating the requested operation is not supported by the agent.
278
- *
279
- * This interface was referenced by `MySchema`'s JSON-Schema
280
- * via the `definition` "UnsupportedOperationError".
281
- */
282
- interface UnsupportedOperationError {
283
- /**
284
- * A Number that indicates the error type that occurred.
285
- */
286
- code: -32004;
287
- /**
288
- * A Primitive or Structured value that contains additional information about the error.
289
- * This may be omitted.
290
- */
291
- data?: {
292
- [k: string]: unknown;
293
- };
294
- /**
295
- * A String providing a short description of the error.
296
- */
297
- message: string;
298
- }
299
- /**
300
- * A2A specific error indicating incompatible content types between request and agent capabilities.
301
- *
302
- * This interface was referenced by `MySchema`'s JSON-Schema
303
- * via the `definition` "ContentTypeNotSupportedError".
304
- */
305
- interface ContentTypeNotSupportedError {
306
- /**
307
- * A Number that indicates the error type that occurred.
308
- */
309
- code: -32005;
310
- /**
311
- * A Primitive or Structured value that contains additional information about the error.
312
- * This may be omitted.
313
- */
314
- data?: {
315
- [k: string]: unknown;
316
- };
317
- /**
318
- * A String providing a short description of the error.
319
- */
320
- message: string;
321
- }
322
- /**
323
- * A2A specific error indicating agent returned invalid response for the current method
324
- *
325
- * This interface was referenced by `MySchema`'s JSON-Schema
326
- * via the `definition` "InvalidAgentResponseError".
327
- */
328
- interface InvalidAgentResponseError {
329
- /**
330
- * A Number that indicates the error type that occurred.
331
- */
332
- code: -32006;
333
- /**
334
- * A Primitive or Structured value that contains additional information about the error.
335
- * This may be omitted.
336
- */
337
- data?: {
338
- [k: string]: unknown;
339
- };
340
- /**
341
- * A String providing a short description of the error.
342
- */
343
- message: string;
344
- }
345
- /**
346
- * JSON-RPC request model for the 'message/send' method.
347
- *
348
- * This interface was referenced by `MySchema`'s JSON-Schema
349
- * via the `definition` "SendMessageRequest".
350
- */
351
- interface SendMessageRequest {
352
- /**
353
- * An identifier established by the Client that MUST contain a String, Number.
354
- * Numbers SHOULD NOT contain fractional parts.
355
- */
356
- id: string | number;
357
- /**
358
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
359
- */
360
- jsonrpc: "2.0";
361
- /**
362
- * A String containing the name of the method to be invoked.
363
- */
364
- method: "message/send";
365
- params: MessageSendParams;
366
- }
367
- /**
368
- * A Structured value that holds the parameter values to be used during the invocation of the method.
369
- */
370
- interface MessageSendParams {
371
- configuration?: MessageSendConfiguration;
372
- message: Message;
373
- /**
374
- * Extension metadata.
375
- */
376
- metadata?: {
377
- [k: string]: unknown;
378
- };
379
- }
380
- /**
381
- * Send message configuration.
382
- */
383
- interface MessageSendConfiguration {
384
- /**
385
- * Accepted output modalities by the client.
386
- */
387
- acceptedOutputModes: string[];
388
- /**
389
- * If the server should treat the client as a blocking request.
390
- */
391
- blocking?: boolean;
392
- /**
393
- * Number of recent messages to be retrieved.
394
- */
395
- historyLength?: number;
396
- pushNotificationConfig?: PushNotificationConfig;
397
- }
398
- /**
399
- * Where the server should send notifications when disconnected.
400
- */
401
- interface PushNotificationConfig {
402
- authentication?: PushNotificationAuthenticationInfo;
403
- /**
404
- * Push Notification ID - created by server to support multiple callbacks
405
- */
406
- id?: string;
407
- /**
408
- * Token unique to this task/session.
409
- */
410
- token?: string;
411
- /**
412
- * URL for sending the push notifications.
413
- */
414
- url: string;
415
- }
416
- /**
417
- * Defines authentication details for push notifications.
418
- *
419
- * This interface was referenced by `MySchema`'s JSON-Schema
420
- * via the `definition` "PushNotificationAuthenticationInfo".
421
- */
422
- interface PushNotificationAuthenticationInfo {
423
- /**
424
- * Optional credentials
425
- */
426
- credentials?: string;
427
- /**
428
- * Supported authentication schemes - e.g. Basic, Bearer
429
- */
430
- schemes: string[];
431
- }
432
- /**
433
- * The message being sent to the server.
434
- */
435
- interface Message {
436
- /**
437
- * The context the message is associated with
438
- */
439
- contextId?: string;
440
- /**
441
- * The URIs of extensions that are present or contributed to this Message.
442
- */
443
- extensions?: string[];
444
- /**
445
- * Event type
446
- */
447
- kind: "message";
448
- /**
449
- * Identifier created by the message creator
450
- */
451
- messageId: string;
452
- /**
453
- * Extension metadata.
454
- */
455
- metadata?: {
456
- [k: string]: unknown;
457
- };
458
- /**
459
- * Message content
460
- */
461
- parts: Part[];
462
- /**
463
- * List of tasks referenced as context by this message.
464
- */
465
- referenceTaskIds?: string[];
466
- /**
467
- * Message sender's role
468
- */
469
- role: "agent" | "user";
470
- /**
471
- * Identifier of task the message is related to
472
- */
473
- taskId?: string;
474
- }
475
- /**
476
- * Represents a text segment within parts.
477
- *
478
- * This interface was referenced by `MySchema`'s JSON-Schema
479
- * via the `definition` "TextPart".
480
- */
481
- interface TextPart {
482
- /**
483
- * Part type - text for TextParts
484
- */
485
- kind: "text";
486
- /**
487
- * Optional metadata associated with the part.
488
- */
489
- metadata?: {
490
- [k: string]: unknown;
491
- };
492
- /**
493
- * Text content
494
- */
495
- text: string;
496
- }
497
- /**
498
- * Represents a File segment within parts.
499
- *
500
- * This interface was referenced by `MySchema`'s JSON-Schema
501
- * via the `definition` "FilePart".
502
- */
503
- interface FilePart {
504
- /**
505
- * File content either as url or bytes
506
- */
507
- file: FileWithBytes | FileWithUri;
508
- /**
509
- * Part type - file for FileParts
510
- */
511
- kind: "file";
512
- /**
513
- * Optional metadata associated with the part.
514
- */
515
- metadata?: {
516
- [k: string]: unknown;
517
- };
518
- }
519
- /**
520
- * Define the variant where 'bytes' is present and 'uri' is absent
521
- *
522
- * This interface was referenced by `MySchema`'s JSON-Schema
523
- * via the `definition` "FileWithBytes".
524
- */
525
- interface FileWithBytes {
526
- /**
527
- * base64 encoded content of the file
528
- */
529
- bytes: string;
530
- /**
531
- * Optional mimeType for the file
532
- */
533
- mimeType?: string;
534
- /**
535
- * Optional name for the file
536
- */
537
- name?: string;
538
- }
539
- /**
540
- * Define the variant where 'uri' is present and 'bytes' is absent
541
- *
542
- * This interface was referenced by `MySchema`'s JSON-Schema
543
- * via the `definition` "FileWithUri".
544
- */
545
- interface FileWithUri {
546
- /**
547
- * Optional mimeType for the file
548
- */
549
- mimeType?: string;
550
- /**
551
- * Optional name for the file
552
- */
553
- name?: string;
554
- /**
555
- * URL for the File content
556
- */
557
- uri: string;
558
- }
559
- /**
560
- * Represents a structured data segment within a message part.
561
- *
562
- * This interface was referenced by `MySchema`'s JSON-Schema
563
- * via the `definition` "DataPart".
564
- */
565
- interface DataPart {
566
- /**
567
- * Structured data content
568
- */
569
- data: {
570
- [k: string]: unknown;
571
- };
572
- /**
573
- * Part type - data for DataParts
574
- */
575
- kind: "data";
576
- /**
577
- * Optional metadata associated with the part.
578
- */
579
- metadata?: {
580
- [k: string]: unknown;
581
- };
582
- }
583
- /**
584
- * JSON-RPC request model for the 'message/stream' method.
585
- *
586
- * This interface was referenced by `MySchema`'s JSON-Schema
587
- * via the `definition` "SendStreamingMessageRequest".
588
- */
589
- interface SendStreamingMessageRequest {
590
- /**
591
- * An identifier established by the Client that MUST contain a String, Number.
592
- * Numbers SHOULD NOT contain fractional parts.
593
- */
594
- id: string | number;
595
- /**
596
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
597
- */
598
- jsonrpc: "2.0";
599
- /**
600
- * A String containing the name of the method to be invoked.
601
- */
602
- method: "message/stream";
603
- params: MessageSendParams1;
604
- }
605
- /**
606
- * A Structured value that holds the parameter values to be used during the invocation of the method.
607
- */
608
- interface MessageSendParams1 {
609
- configuration?: MessageSendConfiguration;
610
- message: Message;
611
- /**
612
- * Extension metadata.
613
- */
614
- metadata?: {
615
- [k: string]: unknown;
616
- };
617
- }
618
- /**
619
- * JSON-RPC request model for the 'tasks/get' method.
620
- *
621
- * This interface was referenced by `MySchema`'s JSON-Schema
622
- * via the `definition` "GetTaskRequest".
623
- */
624
- interface GetTaskRequest {
625
- /**
626
- * An identifier established by the Client that MUST contain a String, Number.
627
- * Numbers SHOULD NOT contain fractional parts.
628
- */
629
- id: string | number;
630
- /**
631
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
632
- */
633
- jsonrpc: "2.0";
634
- /**
635
- * A String containing the name of the method to be invoked.
636
- */
637
- method: "tasks/get";
638
- params: TaskQueryParams;
639
- }
640
- /**
641
- * A Structured value that holds the parameter values to be used during the invocation of the method.
642
- */
643
- interface TaskQueryParams {
644
- /**
645
- * Number of recent messages to be retrieved.
646
- */
647
- historyLength?: number;
648
- /**
649
- * Task id.
650
- */
651
- id: string;
652
- metadata?: {
653
- [k: string]: unknown;
654
- };
655
- }
656
- /**
657
- * JSON-RPC request model for the 'tasks/cancel' method.
658
- *
659
- * This interface was referenced by `MySchema`'s JSON-Schema
660
- * via the `definition` "CancelTaskRequest".
661
- */
662
- interface CancelTaskRequest {
663
- /**
664
- * An identifier established by the Client that MUST contain a String, Number.
665
- * Numbers SHOULD NOT contain fractional parts.
666
- */
667
- id: string | number;
668
- /**
669
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
670
- */
671
- jsonrpc: "2.0";
672
- /**
673
- * A String containing the name of the method to be invoked.
674
- */
675
- method: "tasks/cancel";
676
- params: TaskIdParams;
677
- }
678
- /**
679
- * A Structured value that holds the parameter values to be used during the invocation of the method.
680
- */
681
- interface TaskIdParams {
682
- /**
683
- * Task id.
684
- */
685
- id: string;
686
- metadata?: {
687
- [k: string]: unknown;
688
- };
689
- }
690
- /**
691
- * JSON-RPC request model for the 'tasks/pushNotificationConfig/set' method.
692
- *
693
- * This interface was referenced by `MySchema`'s JSON-Schema
694
- * via the `definition` "SetTaskPushNotificationConfigRequest".
695
- */
696
- interface SetTaskPushNotificationConfigRequest {
697
- /**
698
- * An identifier established by the Client that MUST contain a String, Number.
699
- * Numbers SHOULD NOT contain fractional parts.
700
- */
701
- id: string | number;
702
- /**
703
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
704
- */
705
- jsonrpc: "2.0";
706
- /**
707
- * A String containing the name of the method to be invoked.
708
- */
709
- method: "tasks/pushNotificationConfig/set";
710
- params: TaskPushNotificationConfig;
711
- }
712
- /**
713
- * A Structured value that holds the parameter values to be used during the invocation of the method.
714
- */
715
- interface TaskPushNotificationConfig {
716
- pushNotificationConfig: PushNotificationConfig1;
717
- /**
718
- * Task id.
719
- */
720
- taskId: string;
721
- }
722
- /**
723
- * Push notification configuration.
724
- */
725
- interface PushNotificationConfig1 {
726
- authentication?: PushNotificationAuthenticationInfo;
727
- /**
728
- * Push Notification ID - created by server to support multiple callbacks
729
- */
730
- id?: string;
731
- /**
732
- * Token unique to this task/session.
733
- */
734
- token?: string;
735
- /**
736
- * URL for sending the push notifications.
737
- */
738
- url: string;
739
- }
740
- /**
741
- * JSON-RPC request model for the 'tasks/pushNotificationConfig/get' method.
742
- *
743
- * This interface was referenced by `MySchema`'s JSON-Schema
744
- * via the `definition` "GetTaskPushNotificationConfigRequest".
745
- */
746
- interface GetTaskPushNotificationConfigRequest {
747
- /**
748
- * An identifier established by the Client that MUST contain a String, Number.
749
- * Numbers SHOULD NOT contain fractional parts.
750
- */
751
- id: string | number;
752
- /**
753
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
754
- */
755
- jsonrpc: "2.0";
756
- /**
757
- * A String containing the name of the method to be invoked.
758
- */
759
- method: "tasks/pushNotificationConfig/get";
760
- params: TaskIdParams1;
761
- }
762
- /**
763
- * A Structured value that holds the parameter values to be used during the invocation of the method.
764
- */
765
- interface TaskIdParams1 {
766
- /**
767
- * Task id.
768
- */
769
- id: string;
770
- metadata?: {
771
- [k: string]: unknown;
772
- };
773
- }
774
- /**
775
- * JSON-RPC request model for the 'tasks/resubscribe' method.
776
- *
777
- * This interface was referenced by `MySchema`'s JSON-Schema
778
- * via the `definition` "TaskResubscriptionRequest".
779
- */
780
- interface TaskResubscriptionRequest {
781
- /**
782
- * An identifier established by the Client that MUST contain a String, Number.
783
- * Numbers SHOULD NOT contain fractional parts.
784
- */
785
- id: string | number;
786
- /**
787
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
788
- */
789
- jsonrpc: "2.0";
790
- /**
791
- * A String containing the name of the method to be invoked.
792
- */
793
- method: "tasks/resubscribe";
794
- params: TaskIdParams2;
795
- }
796
- /**
797
- * A Structured value that holds the parameter values to be used during the invocation of the method.
798
- */
799
- interface TaskIdParams2 {
800
- /**
801
- * Task id.
802
- */
803
- id: string;
804
- metadata?: {
805
- [k: string]: unknown;
806
- };
807
- }
808
- /**
809
- * API Key security scheme.
810
- *
811
- * This interface was referenced by `MySchema`'s JSON-Schema
812
- * via the `definition` "APIKeySecurityScheme".
813
- */
814
- interface APIKeySecurityScheme {
815
- /**
816
- * Description of this security scheme.
817
- */
818
- description?: string;
819
- /**
820
- * The location of the API key. Valid values are "query", "header", or "cookie".
821
- */
822
- in: "cookie" | "header" | "query";
823
- /**
824
- * The name of the header, query or cookie parameter to be used.
825
- */
826
- name: string;
827
- type: "apiKey";
828
- }
829
- /**
830
- * Defines optional capabilities supported by an agent.
831
- *
832
- * This interface was referenced by `MySchema`'s JSON-Schema
833
- * via the `definition` "AgentCapabilities".
834
- */
835
- interface AgentCapabilities {
836
- /**
837
- * extensions supported by this agent.
838
- */
839
- extensions?: AgentExtension[];
840
- /**
841
- * true if the agent can notify updates to client.
842
- */
843
- pushNotifications?: boolean;
844
- /**
845
- * true if the agent exposes status change history for tasks.
846
- */
847
- stateTransitionHistory?: boolean;
848
- /**
849
- * true if the agent supports SSE.
850
- */
851
- streaming?: boolean;
852
- }
853
- /**
854
- * A declaration of an extension supported by an Agent.
855
- *
856
- * This interface was referenced by `MySchema`'s JSON-Schema
857
- * via the `definition` "AgentExtension".
858
- */
859
- interface AgentExtension {
860
- /**
861
- * A description of how this agent uses this extension.
862
- */
863
- description?: string;
864
- /**
865
- * Optional configuration for the extension.
866
- */
867
- params?: {
868
- [k: string]: unknown;
869
- };
870
- /**
871
- * Whether the client must follow specific requirements of the extension.
872
- */
873
- required?: boolean;
874
- /**
875
- * The URI of the extension.
876
- */
877
- uri: string;
878
- }
879
- /**
880
- * An AgentCard conveys key information:
881
- * - Overall details (version, name, description, uses)
882
- * - Skills: A set of capabilities the agent can perform
883
- * - Default modalities/content types supported by the agent.
884
- * - Authentication requirements
885
- *
886
- * This interface was referenced by `MySchema`'s JSON-Schema
887
- * via the `definition` "AgentCard".
888
- */
889
- interface AgentCard {
890
- capabilities: AgentCapabilities1;
891
- /**
892
- * The set of interaction modes that the agent supports across all skills. This can be overridden per-skill.
893
- * Supported media types for input.
894
- */
895
- defaultInputModes: string[];
896
- /**
897
- * Supported media types for output.
898
- */
899
- defaultOutputModes: string[];
900
- /**
901
- * A human-readable description of the agent. Used to assist users and
902
- * other agents in understanding what the agent can do.
903
- */
904
- description: string;
905
- /**
906
- * A URL to documentation for the agent.
907
- */
908
- documentationUrl?: string;
909
- /**
910
- * A URL to an icon for the agent.
911
- */
912
- iconUrl?: string;
913
- /**
914
- * Human readable name of the agent.
915
- */
916
- name: string;
917
- provider?: AgentProvider;
918
- /**
919
- * Security requirements for contacting the agent.
920
- */
921
- security?: {
922
- [k: string]: string[];
923
- }[];
924
- /**
925
- * Security scheme details used for authenticating with this agent.
926
- */
927
- securitySchemes?: {
928
- [k: string]: SecurityScheme;
929
- };
930
- /**
931
- * Skills are a unit of capability that an agent can perform.
932
- */
933
- skills: AgentSkill[];
934
- /**
935
- * true if the agent supports providing an extended agent card when the user is authenticated.
936
- * Defaults to false if not specified.
937
- */
938
- supportsAuthenticatedExtendedCard?: boolean;
939
- /**
940
- * A URL to the address the agent is hosted at.
941
- */
942
- url: string;
943
- /**
944
- * The version of the agent - format is up to the provider.
945
- */
946
- version: string;
947
- }
948
- /**
949
- * Optional capabilities supported by the agent.
950
- */
951
- interface AgentCapabilities1 {
952
- /**
953
- * extensions supported by this agent.
954
- */
955
- extensions?: AgentExtension[];
956
- /**
957
- * true if the agent can notify updates to client.
958
- */
959
- pushNotifications?: boolean;
960
- /**
961
- * true if the agent exposes status change history for tasks.
962
- */
963
- stateTransitionHistory?: boolean;
964
- /**
965
- * true if the agent supports SSE.
966
- */
967
- streaming?: boolean;
968
- }
969
- /**
970
- * The service provider of the agent
971
- */
972
- interface AgentProvider {
973
- /**
974
- * Agent provider's organization name.
975
- */
976
- organization: string;
977
- /**
978
- * Agent provider's URL.
979
- */
980
- url: string;
981
- }
982
- /**
983
- * HTTP Authentication security scheme.
984
- *
985
- * This interface was referenced by `MySchema`'s JSON-Schema
986
- * via the `definition` "HTTPAuthSecurityScheme".
987
- */
988
- interface HTTPAuthSecurityScheme {
989
- /**
990
- * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually
991
- * generated by an authorization server, so this information is primarily for documentation
992
- * purposes.
993
- */
994
- bearerFormat?: string;
995
- /**
996
- * Description of this security scheme.
997
- */
998
- description?: string;
999
- /**
1000
- * The name of the HTTP Authentication scheme to be used in the Authorization header as defined
1001
- * in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry.
1002
- * The value is case-insensitive, as defined in RFC7235.
1003
- */
1004
- scheme: string;
1005
- type: "http";
1006
- }
1007
- /**
1008
- * OAuth2.0 security scheme configuration.
1009
- *
1010
- * This interface was referenced by `MySchema`'s JSON-Schema
1011
- * via the `definition` "OAuth2SecurityScheme".
1012
- */
1013
- interface OAuth2SecurityScheme {
1014
- /**
1015
- * Description of this security scheme.
1016
- */
1017
- description?: string;
1018
- flows: OAuthFlows;
1019
- type: "oauth2";
1020
- }
1021
- /**
1022
- * An object containing configuration information for the flow types supported.
1023
- */
1024
- interface OAuthFlows {
1025
- authorizationCode?: AuthorizationCodeOAuthFlow;
1026
- clientCredentials?: ClientCredentialsOAuthFlow;
1027
- implicit?: ImplicitOAuthFlow;
1028
- password?: PasswordOAuthFlow;
1029
- }
1030
- /**
1031
- * Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
1032
- */
1033
- interface AuthorizationCodeOAuthFlow {
1034
- /**
1035
- * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
1036
- * standard requires the use of TLS
1037
- */
1038
- authorizationUrl: string;
1039
- /**
1040
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1041
- * standard requires the use of TLS.
1042
- */
1043
- refreshUrl?: string;
1044
- /**
1045
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1046
- * description for it. The map MAY be empty.
1047
- */
1048
- scopes: {
1049
- [k: string]: string;
1050
- };
1051
- /**
1052
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1053
- * requires the use of TLS.
1054
- */
1055
- tokenUrl: string;
1056
- }
1057
- /**
1058
- * Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0
1059
- */
1060
- interface ClientCredentialsOAuthFlow {
1061
- /**
1062
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1063
- * standard requires the use of TLS.
1064
- */
1065
- refreshUrl?: string;
1066
- /**
1067
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1068
- * description for it. The map MAY be empty.
1069
- */
1070
- scopes: {
1071
- [k: string]: string;
1072
- };
1073
- /**
1074
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1075
- * requires the use of TLS.
1076
- */
1077
- tokenUrl: string;
1078
- }
1079
- /**
1080
- * Configuration for the OAuth Implicit flow
1081
- */
1082
- interface ImplicitOAuthFlow {
1083
- /**
1084
- * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
1085
- * standard requires the use of TLS
1086
- */
1087
- authorizationUrl: string;
1088
- /**
1089
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1090
- * standard requires the use of TLS.
1091
- */
1092
- refreshUrl?: string;
1093
- /**
1094
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1095
- * description for it. The map MAY be empty.
1096
- */
1097
- scopes: {
1098
- [k: string]: string;
1099
- };
1100
- }
1101
- /**
1102
- * Configuration for the OAuth Resource Owner Password flow
1103
- */
1104
- interface PasswordOAuthFlow {
1105
- /**
1106
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1107
- * standard requires the use of TLS.
1108
- */
1109
- refreshUrl?: string;
1110
- /**
1111
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1112
- * description for it. The map MAY be empty.
1113
- */
1114
- scopes: {
1115
- [k: string]: string;
1116
- };
1117
- /**
1118
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1119
- * requires the use of TLS.
1120
- */
1121
- tokenUrl: string;
1122
- }
1123
- /**
1124
- * OpenID Connect security scheme configuration.
1125
- *
1126
- * This interface was referenced by `MySchema`'s JSON-Schema
1127
- * via the `definition` "OpenIdConnectSecurityScheme".
1128
- */
1129
- interface OpenIdConnectSecurityScheme {
1130
- /**
1131
- * Description of this security scheme.
1132
- */
1133
- description?: string;
1134
- /**
1135
- * Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata.
1136
- */
1137
- openIdConnectUrl: string;
1138
- type: "openIdConnect";
1139
- }
1140
- /**
1141
- * Represents a unit of capability that an agent can perform.
1142
- *
1143
- * This interface was referenced by `MySchema`'s JSON-Schema
1144
- * via the `definition` "AgentSkill".
1145
- */
1146
- interface AgentSkill {
1147
- /**
1148
- * Description of the skill - will be used by the client or a human
1149
- * as a hint to understand what the skill does.
1150
- */
1151
- description: string;
1152
- /**
1153
- * The set of example scenarios that the skill can perform.
1154
- * Will be used by the client as a hint to understand how the skill can be used.
1155
- */
1156
- examples?: string[];
1157
- /**
1158
- * Unique identifier for the agent's skill.
1159
- */
1160
- id: string;
1161
- /**
1162
- * The set of interaction modes that the skill supports
1163
- * (if different than the default).
1164
- * Supported media types for input.
1165
- */
1166
- inputModes?: string[];
1167
- /**
1168
- * Human readable name of the skill.
1169
- */
1170
- name: string;
1171
- /**
1172
- * Supported media types for output.
1173
- */
1174
- outputModes?: string[];
1175
- /**
1176
- * Set of tagwords describing classes of capabilities for this specific skill.
1177
- */
1178
- tags: string[];
1179
- }
1180
- /**
1181
- * Represents the service provider of an agent.
1182
- *
1183
- * This interface was referenced by `MySchema`'s JSON-Schema
1184
- * via the `definition` "AgentProvider".
1185
- */
1186
- interface AgentProvider1 {
1187
- /**
1188
- * Agent provider's organization name.
1189
- */
1190
- organization: string;
1191
- /**
1192
- * Agent provider's URL.
1193
- */
1194
- url: string;
1195
- }
1196
- /**
1197
- * Represents an artifact generated for a task.
1198
- *
1199
- * This interface was referenced by `MySchema`'s JSON-Schema
1200
- * via the `definition` "Artifact".
1201
- */
1202
- interface Artifact {
1203
- /**
1204
- * Unique identifier for the artifact.
1205
- */
1206
- artifactId: string;
1207
- /**
1208
- * Optional description for the artifact.
1209
- */
1210
- description?: string;
1211
- /**
1212
- * The URIs of extensions that are present or contributed to this Artifact.
1213
- */
1214
- extensions?: string[];
1215
- /**
1216
- * Extension metadata.
1217
- */
1218
- metadata?: {
1219
- [k: string]: unknown;
1220
- };
1221
- /**
1222
- * Optional name for the artifact.
1223
- */
1224
- name?: string;
1225
- /**
1226
- * Artifact parts.
1227
- */
1228
- parts: Part[];
1229
- }
1230
- /**
1231
- * Configuration details for a supported OAuth Flow
1232
- *
1233
- * This interface was referenced by `MySchema`'s JSON-Schema
1234
- * via the `definition` "AuthorizationCodeOAuthFlow".
1235
- */
1236
- interface AuthorizationCodeOAuthFlow1 {
1237
- /**
1238
- * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
1239
- * standard requires the use of TLS
1240
- */
1241
- authorizationUrl: string;
1242
- /**
1243
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1244
- * standard requires the use of TLS.
1245
- */
1246
- refreshUrl?: string;
1247
- /**
1248
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1249
- * description for it. The map MAY be empty.
1250
- */
1251
- scopes: {
1252
- [k: string]: string;
1253
- };
1254
- /**
1255
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1256
- * requires the use of TLS.
1257
- */
1258
- tokenUrl: string;
1259
- }
1260
- /**
1261
- * Represents a JSON-RPC 2.0 Error Response object.
1262
- *
1263
- * This interface was referenced by `MySchema`'s JSON-Schema
1264
- * via the `definition` "JSONRPCErrorResponse".
1265
- */
1266
- interface JSONRPCErrorResponse {
1267
- error: JSONRPCError | JSONParseError | InvalidRequestError | MethodNotFoundError | InvalidParamsError | InternalError | TaskNotFoundError | TaskNotCancelableError | PushNotificationNotSupportedError | UnsupportedOperationError | ContentTypeNotSupportedError | InvalidAgentResponseError;
1268
- /**
1269
- * An identifier established by the Client that MUST contain a String, Number.
1270
- * Numbers SHOULD NOT contain fractional parts.
1271
- */
1272
- id: string | number | null;
1273
- /**
1274
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1275
- */
1276
- jsonrpc: "2.0";
1277
- }
1278
- /**
1279
- * Represents a JSON-RPC 2.0 Error object.
1280
- * This is typically included in a JSONRPCErrorResponse when an error occurs.
1281
- *
1282
- * This interface was referenced by `MySchema`'s JSON-Schema
1283
- * via the `definition` "JSONRPCError".
1284
- */
1285
- interface JSONRPCError {
1286
- /**
1287
- * A Number that indicates the error type that occurred.
1288
- */
1289
- code: number;
1290
- /**
1291
- * A Primitive or Structured value that contains additional information about the error.
1292
- * This may be omitted.
1293
- */
1294
- data?: {
1295
- [k: string]: unknown;
1296
- };
1297
- /**
1298
- * A String providing a short description of the error.
1299
- */
1300
- message: string;
1301
- }
1302
- /**
1303
- * JSON-RPC success response model for the 'tasks/cancel' method.
1304
- *
1305
- * This interface was referenced by `MySchema`'s JSON-Schema
1306
- * via the `definition` "CancelTaskSuccessResponse".
1307
- */
1308
- interface CancelTaskSuccessResponse {
1309
- /**
1310
- * An identifier established by the Client that MUST contain a String, Number.
1311
- * Numbers SHOULD NOT contain fractional parts.
1312
- */
1313
- id: string | number | null;
1314
- /**
1315
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1316
- */
1317
- jsonrpc: "2.0";
1318
- result: Task;
1319
- }
1320
- /**
1321
- * The result object on success.
1322
- */
1323
- interface Task {
1324
- /**
1325
- * Collection of artifacts created by the agent.
1326
- */
1327
- artifacts?: Artifact[];
1328
- /**
1329
- * Server-generated id for contextual alignment across interactions
1330
- */
1331
- contextId: string;
1332
- history?: Message1[];
1333
- /**
1334
- * Unique identifier for the task
1335
- */
1336
- id: string;
1337
- /**
1338
- * Event type
1339
- */
1340
- kind: "task";
1341
- /**
1342
- * Extension metadata.
1343
- */
1344
- metadata?: {
1345
- [k: string]: unknown;
1346
- };
1347
- status: TaskStatus;
1348
- }
1349
- /**
1350
- * Represents a single message exchanged between user and agent.
1351
- *
1352
- * This interface was referenced by `MySchema`'s JSON-Schema
1353
- * via the `definition` "Message".
1354
- */
1355
- interface Message1 {
1356
- /**
1357
- * The context the message is associated with
1358
- */
1359
- contextId?: string;
1360
- /**
1361
- * The URIs of extensions that are present or contributed to this Message.
1362
- */
1363
- extensions?: string[];
1364
- /**
1365
- * Event type
1366
- */
1367
- kind: "message";
1368
- /**
1369
- * Identifier created by the message creator
1370
- */
1371
- messageId: string;
1372
- /**
1373
- * Extension metadata.
1374
- */
1375
- metadata?: {
1376
- [k: string]: unknown;
1377
- };
1378
- /**
1379
- * Message content
1380
- */
1381
- parts: Part[];
1382
- /**
1383
- * List of tasks referenced as context by this message.
1384
- */
1385
- referenceTaskIds?: string[];
1386
- /**
1387
- * Message sender's role
1388
- */
1389
- role: "agent" | "user";
1390
- /**
1391
- * Identifier of task the message is related to
1392
- */
1393
- taskId?: string;
1394
- }
1395
- /**
1396
- * Current status of the task
1397
- */
1398
- interface TaskStatus {
1399
- message?: Message2;
1400
- state: TaskState;
1401
- /**
1402
- * ISO 8601 datetime string when the status was recorded.
1403
- */
1404
- timestamp?: string;
1405
- }
1406
- /**
1407
- * Represents a single message exchanged between user and agent.
1408
- */
1409
- interface Message2 {
1410
- /**
1411
- * The context the message is associated with
1412
- */
1413
- contextId?: string;
1414
- /**
1415
- * The URIs of extensions that are present or contributed to this Message.
1416
- */
1417
- extensions?: string[];
1418
- /**
1419
- * Event type
1420
- */
1421
- kind: "message";
1422
- /**
1423
- * Identifier created by the message creator
1424
- */
1425
- messageId: string;
1426
- /**
1427
- * Extension metadata.
1428
- */
1429
- metadata?: {
1430
- [k: string]: unknown;
1431
- };
1432
- /**
1433
- * Message content
1434
- */
1435
- parts: Part[];
1436
- /**
1437
- * List of tasks referenced as context by this message.
1438
- */
1439
- referenceTaskIds?: string[];
1440
- /**
1441
- * Message sender's role
1442
- */
1443
- role: "agent" | "user";
1444
- /**
1445
- * Identifier of task the message is related to
1446
- */
1447
- taskId?: string;
1448
- }
1449
- /**
1450
- * Configuration details for a supported OAuth Flow
1451
- *
1452
- * This interface was referenced by `MySchema`'s JSON-Schema
1453
- * via the `definition` "ClientCredentialsOAuthFlow".
1454
- */
1455
- interface ClientCredentialsOAuthFlow1 {
1456
- /**
1457
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1458
- * standard requires the use of TLS.
1459
- */
1460
- refreshUrl?: string;
1461
- /**
1462
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1463
- * description for it. The map MAY be empty.
1464
- */
1465
- scopes: {
1466
- [k: string]: string;
1467
- };
1468
- /**
1469
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1470
- * requires the use of TLS.
1471
- */
1472
- tokenUrl: string;
1473
- }
1474
- /**
1475
- * Represents the base entity for FileParts
1476
- *
1477
- * This interface was referenced by `MySchema`'s JSON-Schema
1478
- * via the `definition` "FileBase".
1479
- */
1480
- interface FileBase {
1481
- /**
1482
- * Optional mimeType for the file
1483
- */
1484
- mimeType?: string;
1485
- /**
1486
- * Optional name for the file
1487
- */
1488
- name?: string;
1489
- }
1490
- /**
1491
- * JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
1492
- *
1493
- * This interface was referenced by `MySchema`'s JSON-Schema
1494
- * via the `definition` "GetTaskPushNotificationConfigSuccessResponse".
1495
- */
1496
- interface GetTaskPushNotificationConfigSuccessResponse {
1497
- /**
1498
- * An identifier established by the Client that MUST contain a String, Number.
1499
- * Numbers SHOULD NOT contain fractional parts.
1500
- */
1501
- id: string | number | null;
1502
- /**
1503
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1504
- */
1505
- jsonrpc: "2.0";
1506
- result: TaskPushNotificationConfig1;
1507
- }
1508
- /**
1509
- * The result object on success.
1510
- */
1511
- interface TaskPushNotificationConfig1 {
1512
- pushNotificationConfig: PushNotificationConfig1;
1513
- /**
1514
- * Task id.
1515
- */
1516
- taskId: string;
1517
- }
1518
- /**
1519
- * JSON-RPC success response for the 'tasks/get' method.
1520
- *
1521
- * This interface was referenced by `MySchema`'s JSON-Schema
1522
- * via the `definition` "GetTaskSuccessResponse".
1523
- */
1524
- interface GetTaskSuccessResponse {
1525
- /**
1526
- * An identifier established by the Client that MUST contain a String, Number.
1527
- * Numbers SHOULD NOT contain fractional parts.
1528
- */
1529
- id: string | number | null;
1530
- /**
1531
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1532
- */
1533
- jsonrpc: "2.0";
1534
- result: Task1;
1535
- }
1536
- /**
1537
- * The result object on success.
1538
- */
1539
- interface Task1 {
1540
- /**
1541
- * Collection of artifacts created by the agent.
1542
- */
1543
- artifacts?: Artifact[];
1544
- /**
1545
- * Server-generated id for contextual alignment across interactions
1546
- */
1547
- contextId: string;
1548
- history?: Message1[];
1549
- /**
1550
- * Unique identifier for the task
1551
- */
1552
- id: string;
1553
- /**
1554
- * Event type
1555
- */
1556
- kind: "task";
1557
- /**
1558
- * Extension metadata.
1559
- */
1560
- metadata?: {
1561
- [k: string]: unknown;
1562
- };
1563
- status: TaskStatus;
1564
- }
1565
- /**
1566
- * Configuration details for a supported OAuth Flow
1567
- *
1568
- * This interface was referenced by `MySchema`'s JSON-Schema
1569
- * via the `definition` "ImplicitOAuthFlow".
1570
- */
1571
- interface ImplicitOAuthFlow1 {
1572
- /**
1573
- * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
1574
- * standard requires the use of TLS
1575
- */
1576
- authorizationUrl: string;
1577
- /**
1578
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1579
- * standard requires the use of TLS.
1580
- */
1581
- refreshUrl?: string;
1582
- /**
1583
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1584
- * description for it. The map MAY be empty.
1585
- */
1586
- scopes: {
1587
- [k: string]: string;
1588
- };
1589
- }
1590
- /**
1591
- * Base interface for any JSON-RPC 2.0 request or response.
1592
- *
1593
- * This interface was referenced by `MySchema`'s JSON-Schema
1594
- * via the `definition` "JSONRPCMessage".
1595
- */
1596
- interface JSONRPCMessage {
1597
- /**
1598
- * An identifier established by the Client that MUST contain a String, Number.
1599
- * Numbers SHOULD NOT contain fractional parts.
1600
- */
1601
- id?: string | number | null;
1602
- /**
1603
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1604
- */
1605
- jsonrpc: "2.0";
1606
- }
1607
- /**
1608
- * Represents a JSON-RPC 2.0 Request object.
1609
- *
1610
- * This interface was referenced by `MySchema`'s JSON-Schema
1611
- * via the `definition` "JSONRPCRequest".
1612
- */
1613
- interface JSONRPCRequest {
1614
- /**
1615
- * An identifier established by the Client that MUST contain a String, Number.
1616
- * Numbers SHOULD NOT contain fractional parts.
1617
- */
1618
- id?: string | number | null;
1619
- /**
1620
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1621
- */
1622
- jsonrpc: "2.0";
1623
- /**
1624
- * A String containing the name of the method to be invoked.
1625
- */
1626
- method: string;
1627
- /**
1628
- * A Structured value that holds the parameter values to be used during the invocation of the method.
1629
- */
1630
- params?: {
1631
- [k: string]: unknown;
1632
- };
1633
- }
1634
- /**
1635
- * JSON-RPC success response model for the 'message/send' method.
1636
- *
1637
- * This interface was referenced by `MySchema`'s JSON-Schema
1638
- * via the `definition` "SendMessageSuccessResponse".
1639
- */
1640
- interface SendMessageSuccessResponse {
1641
- /**
1642
- * An identifier established by the Client that MUST contain a String, Number.
1643
- * Numbers SHOULD NOT contain fractional parts.
1644
- */
1645
- id: string | number | null;
1646
- /**
1647
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1648
- */
1649
- jsonrpc: "2.0";
1650
- /**
1651
- * The result object on success
1652
- */
1653
- result: Task2 | Message1;
1654
- }
1655
- /**
1656
- * This interface was referenced by `MySchema`'s JSON-Schema
1657
- * via the `definition` "Task".
1658
- */
1659
- interface Task2 {
1660
- /**
1661
- * Collection of artifacts created by the agent.
1662
- */
1663
- artifacts?: Artifact[];
1664
- /**
1665
- * Server-generated id for contextual alignment across interactions
1666
- */
1667
- contextId: string;
1668
- history?: Message1[];
1669
- /**
1670
- * Unique identifier for the task
1671
- */
1672
- id: string;
1673
- /**
1674
- * Event type
1675
- */
1676
- kind: "task";
1677
- /**
1678
- * Extension metadata.
1679
- */
1680
- metadata?: {
1681
- [k: string]: unknown;
1682
- };
1683
- status: TaskStatus;
1684
- }
1685
- /**
1686
- * JSON-RPC success response model for the 'message/stream' method.
1687
- *
1688
- * This interface was referenced by `MySchema`'s JSON-Schema
1689
- * via the `definition` "SendStreamingMessageSuccessResponse".
1690
- */
1691
- interface SendStreamingMessageSuccessResponse {
1692
- /**
1693
- * An identifier established by the Client that MUST contain a String, Number.
1694
- * Numbers SHOULD NOT contain fractional parts.
1695
- */
1696
- id: string | number | null;
1697
- /**
1698
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1699
- */
1700
- jsonrpc: "2.0";
1701
- /**
1702
- * The result object on success
1703
- */
1704
- result: Task2 | Message1 | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
1705
- }
1706
- /**
1707
- * Sent by server during sendStream or subscribe requests
1708
- *
1709
- * This interface was referenced by `MySchema`'s JSON-Schema
1710
- * via the `definition` "TaskStatusUpdateEvent".
1711
- */
1712
- interface TaskStatusUpdateEvent {
1713
- /**
1714
- * The context the task is associated with
1715
- */
1716
- contextId: string;
1717
- /**
1718
- * Indicates the end of the event stream
1719
- */
1720
- final: boolean;
1721
- /**
1722
- * Event type
1723
- */
1724
- kind: "status-update";
1725
- /**
1726
- * Extension metadata.
1727
- */
1728
- metadata?: {
1729
- [k: string]: unknown;
1730
- };
1731
- status: TaskStatus1;
1732
- /**
1733
- * Task id
1734
- */
1735
- taskId: string;
1736
- }
1737
- /**
1738
- * Current status of the task
1739
- */
1740
- interface TaskStatus1 {
1741
- message?: Message2;
1742
- state: TaskState;
1743
- /**
1744
- * ISO 8601 datetime string when the status was recorded.
1745
- */
1746
- timestamp?: string;
1747
- }
1748
- /**
1749
- * Sent by server during sendStream or subscribe requests
1750
- *
1751
- * This interface was referenced by `MySchema`'s JSON-Schema
1752
- * via the `definition` "TaskArtifactUpdateEvent".
1753
- */
1754
- interface TaskArtifactUpdateEvent {
1755
- /**
1756
- * Indicates if this artifact appends to a previous one
1757
- */
1758
- append?: boolean;
1759
- artifact: Artifact1;
1760
- /**
1761
- * The context the task is associated with
1762
- */
1763
- contextId: string;
1764
- /**
1765
- * Event type
1766
- */
1767
- kind: "artifact-update";
1768
- /**
1769
- * Indicates if this is the last chunk of the artifact
1770
- */
1771
- lastChunk?: boolean;
1772
- /**
1773
- * Extension metadata.
1774
- */
1775
- metadata?: {
1776
- [k: string]: unknown;
1777
- };
1778
- /**
1779
- * Task id
1780
- */
1781
- taskId: string;
1782
- }
1783
- /**
1784
- * Represents an artifact generated for a task.
1785
- */
1786
- interface Artifact1 {
1787
- /**
1788
- * Unique identifier for the artifact.
1789
- */
1790
- artifactId: string;
1791
- /**
1792
- * Optional description for the artifact.
1793
- */
1794
- description?: string;
1795
- /**
1796
- * The URIs of extensions that are present or contributed to this Artifact.
1797
- */
1798
- extensions?: string[];
1799
- /**
1800
- * Extension metadata.
1801
- */
1802
- metadata?: {
1803
- [k: string]: unknown;
1804
- };
1805
- /**
1806
- * Optional name for the artifact.
1807
- */
1808
- name?: string;
1809
- /**
1810
- * Artifact parts.
1811
- */
1812
- parts: Part[];
1813
- }
1814
- /**
1815
- * JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
1816
- *
1817
- * This interface was referenced by `MySchema`'s JSON-Schema
1818
- * via the `definition` "SetTaskPushNotificationConfigSuccessResponse".
1819
- */
1820
- interface SetTaskPushNotificationConfigSuccessResponse {
1821
- /**
1822
- * An identifier established by the Client that MUST contain a String, Number.
1823
- * Numbers SHOULD NOT contain fractional parts.
1824
- */
1825
- id: string | number | null;
1826
- /**
1827
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1828
- */
1829
- jsonrpc: "2.0";
1830
- result: TaskPushNotificationConfig2;
1831
- }
1832
- /**
1833
- * The result object on success.
1834
- */
1835
- interface TaskPushNotificationConfig2 {
1836
- pushNotificationConfig: PushNotificationConfig1;
1837
- /**
1838
- * Task id.
1839
- */
1840
- taskId: string;
1841
- }
1842
- /**
1843
- * Represents a JSON-RPC 2.0 Success Response object.
1844
- *
1845
- * This interface was referenced by `MySchema`'s JSON-Schema
1846
- * via the `definition` "JSONRPCSuccessResponse".
1847
- */
1848
- interface JSONRPCSuccessResponse {
1849
- /**
1850
- * An identifier established by the Client that MUST contain a String, Number.
1851
- * Numbers SHOULD NOT contain fractional parts.
1852
- */
1853
- id: string | number | null;
1854
- /**
1855
- * Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
1856
- */
1857
- jsonrpc: "2.0";
1858
- /**
1859
- * The result object on success
1860
- */
1861
- result: {
1862
- [k: string]: unknown;
1863
- };
1864
- }
1865
- /**
1866
- * Configuration for the send message request.
1867
- *
1868
- * This interface was referenced by `MySchema`'s JSON-Schema
1869
- * via the `definition` "MessageSendConfiguration".
1870
- */
1871
- interface MessageSendConfiguration1 {
1872
- /**
1873
- * Accepted output modalities by the client.
1874
- */
1875
- acceptedOutputModes: string[];
1876
- /**
1877
- * If the server should treat the client as a blocking request.
1878
- */
1879
- blocking?: boolean;
1880
- /**
1881
- * Number of recent messages to be retrieved.
1882
- */
1883
- historyLength?: number;
1884
- pushNotificationConfig?: PushNotificationConfig;
1885
- }
1886
- /**
1887
- * Sent by the client to the agent as a request. May create, continue or restart a task.
1888
- *
1889
- * This interface was referenced by `MySchema`'s JSON-Schema
1890
- * via the `definition` "MessageSendParams".
1891
- */
1892
- interface MessageSendParams2 {
1893
- configuration?: MessageSendConfiguration;
1894
- message: Message;
1895
- /**
1896
- * Extension metadata.
1897
- */
1898
- metadata?: {
1899
- [k: string]: unknown;
1900
- };
1901
- }
1902
- /**
1903
- * Allows configuration of the supported OAuth Flows
1904
- *
1905
- * This interface was referenced by `MySchema`'s JSON-Schema
1906
- * via the `definition` "OAuthFlows".
1907
- */
1908
- interface OAuthFlows1 {
1909
- authorizationCode?: AuthorizationCodeOAuthFlow;
1910
- clientCredentials?: ClientCredentialsOAuthFlow;
1911
- implicit?: ImplicitOAuthFlow;
1912
- password?: PasswordOAuthFlow;
1913
- }
1914
- /**
1915
- * Base properties common to all message parts.
1916
- *
1917
- * This interface was referenced by `MySchema`'s JSON-Schema
1918
- * via the `definition` "PartBase".
1919
- */
1920
- interface PartBase {
1921
- /**
1922
- * Optional metadata associated with the part.
1923
- */
1924
- metadata?: {
1925
- [k: string]: unknown;
1926
- };
1927
- }
1928
- /**
1929
- * Configuration details for a supported OAuth Flow
1930
- *
1931
- * This interface was referenced by `MySchema`'s JSON-Schema
1932
- * via the `definition` "PasswordOAuthFlow".
1933
- */
1934
- interface PasswordOAuthFlow1 {
1935
- /**
1936
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
1937
- * standard requires the use of TLS.
1938
- */
1939
- refreshUrl?: string;
1940
- /**
1941
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short
1942
- * description for it. The map MAY be empty.
1943
- */
1944
- scopes: {
1945
- [k: string]: string;
1946
- };
1947
- /**
1948
- * The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1949
- * requires the use of TLS.
1950
- */
1951
- tokenUrl: string;
1952
- }
1953
- /**
1954
- * Configuration for setting up push notifications for task updates.
1955
- *
1956
- * This interface was referenced by `MySchema`'s JSON-Schema
1957
- * via the `definition` "PushNotificationConfig".
1958
- */
1959
- interface PushNotificationConfig2 {
1960
- authentication?: PushNotificationAuthenticationInfo;
1961
- /**
1962
- * Push Notification ID - created by server to support multiple callbacks
1963
- */
1964
- id?: string;
1965
- /**
1966
- * Token unique to this task/session.
1967
- */
1968
- token?: string;
1969
- /**
1970
- * URL for sending the push notifications.
1971
- */
1972
- url: string;
1973
- }
1974
- /**
1975
- * Base properties shared by all security schemes.
1976
- *
1977
- * This interface was referenced by `MySchema`'s JSON-Schema
1978
- * via the `definition` "SecuritySchemeBase".
1979
- */
1980
- interface SecuritySchemeBase {
1981
- /**
1982
- * Description of this security scheme.
1983
- */
1984
- description?: string;
1985
- }
1986
- /**
1987
- * Parameters containing only a task ID, used for simple task operations.
1988
- *
1989
- * This interface was referenced by `MySchema`'s JSON-Schema
1990
- * via the `definition` "TaskIdParams".
1991
- */
1992
- interface TaskIdParams3 {
1993
- /**
1994
- * Task id.
1995
- */
1996
- id: string;
1997
- metadata?: {
1998
- [k: string]: unknown;
1999
- };
2000
- }
2001
- /**
2002
- * Parameters for setting or getting push notification configuration for a task
2003
- *
2004
- * This interface was referenced by `MySchema`'s JSON-Schema
2005
- * via the `definition` "TaskPushNotificationConfig".
2006
- */
2007
- interface TaskPushNotificationConfig3 {
2008
- pushNotificationConfig: PushNotificationConfig1;
2009
- /**
2010
- * Task id.
2011
- */
2012
- taskId: string;
2013
- }
2014
- /**
2015
- * Parameters for querying a task, including optional history length.
2016
- *
2017
- * This interface was referenced by `MySchema`'s JSON-Schema
2018
- * via the `definition` "TaskQueryParams".
2019
- */
2020
- interface TaskQueryParams1 {
2021
- /**
2022
- * Number of recent messages to be retrieved.
2023
- */
2024
- historyLength?: number;
2025
- /**
2026
- * Task id.
2027
- */
2028
- id: string;
2029
- metadata?: {
2030
- [k: string]: unknown;
2031
- };
2032
- }
2033
- /**
2034
- * TaskState and accompanying message.
2035
- *
2036
- * This interface was referenced by `MySchema`'s JSON-Schema
2037
- * via the `definition` "TaskStatus".
2038
- */
2039
- interface TaskStatus2 {
2040
- message?: Message2;
2041
- state: TaskState;
2042
- /**
2043
- * ISO 8601 datetime string when the status was recorded.
2044
- */
2045
- timestamp?: string;
2046
- }
2047
-
2048
- export type { TaskIdParams2 as $, AgentCard as A, MessageSendConfiguration as B, CancelTaskResponse as C, PushNotificationConfig as D, PushNotificationAuthenticationInfo as E, TextPart as F, GetTaskPushNotificationConfigResponse as G, FilePart as H, InvalidRequestError as I, JSONRPCResponse as J, FileWithBytes as K, FileWithUri as L, MessageSendParams as M, DataPart as N, SendStreamingMessageRequest as O, Part as P, MessageSendParams1 as Q, GetTaskRequest as R, SendMessageResponse as S, Task as T, UnsupportedOperationError as U, CancelTaskRequest as V, SetTaskPushNotificationConfigRequest as W, PushNotificationConfig1 as X, GetTaskPushNotificationConfigRequest as Y, TaskIdParams1 as Z, TaskResubscriptionRequest as _, Message as a, APIKeySecurityScheme as a0, AgentCapabilities as a1, AgentExtension as a2, AgentCapabilities1 as a3, AgentProvider as a4, HTTPAuthSecurityScheme as a5, OAuth2SecurityScheme as a6, OAuthFlows as a7, AuthorizationCodeOAuthFlow as a8, ClientCredentialsOAuthFlow as a9, TaskPushNotificationConfig2 as aA, JSONRPCSuccessResponse as aB, MessageSendConfiguration1 as aC, MessageSendParams2 as aD, OAuthFlows1 as aE, PartBase as aF, PasswordOAuthFlow1 as aG, PushNotificationConfig2 as aH, SecuritySchemeBase as aI, TaskIdParams3 as aJ, TaskPushNotificationConfig3 as aK, TaskQueryParams1 as aL, TaskStatus2 as aM, ImplicitOAuthFlow as aa, PasswordOAuthFlow as ab, OpenIdConnectSecurityScheme as ac, AgentSkill as ad, AgentProvider1 as ae, Artifact as af, AuthorizationCodeOAuthFlow1 as ag, CancelTaskSuccessResponse as ah, Message1 as ai, TaskStatus as aj, Message2 as ak, ClientCredentialsOAuthFlow1 as al, FileBase as am, GetTaskPushNotificationConfigSuccessResponse as an, TaskPushNotificationConfig1 as ao, GetTaskSuccessResponse as ap, Task1 as aq, ImplicitOAuthFlow1 as ar, JSONRPCMessage as as, JSONRPCRequest as at, SendMessageSuccessResponse as au, Task2 as av, SendStreamingMessageSuccessResponse as aw, TaskStatus1 as ax, Artifact1 as ay, SetTaskPushNotificationConfigSuccessResponse as az, TaskStatusUpdateEvent as b, TaskArtifactUpdateEvent as c, TaskPushNotificationConfig as d, SetTaskPushNotificationConfigResponse as e, TaskIdParams as f, TaskQueryParams as g, GetTaskResponse as h, JSONRPCErrorResponse as i, JSONRPCError as j, SendStreamingMessageResponse as k, A2AError as l, A2ARequest as m, SecurityScheme as n, TaskState as o, MySchema as p, JSONParseError as q, MethodNotFoundError as r, InvalidParamsError as s, InternalError as t, TaskNotFoundError as u, TaskNotCancelableError as v, PushNotificationNotSupportedError as w, ContentTypeNotSupportedError as x, InvalidAgentResponseError as y, SendMessageRequest as z };