forked from a2aproject/a2a-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.py
More file actions
1624 lines (1397 loc) · 39.4 KB
/
types.py
File metadata and controls
1624 lines (1397 loc) · 39.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# generated by datamodel-codegen:
# filename: https://raw.githubusercontent.com/google-a2a/A2A/refs/heads/main/specification/json/a2a.json
from __future__ import annotations
from enum import Enum
from typing import Any, Literal
from pydantic import BaseModel, Field, RootModel
class A2A(RootModel[Any]):
root: Any
class In(str, Enum):
"""
The location of the API key. Valid values are "query", "header", or "cookie".
"""
cookie = 'cookie'
header = 'header'
query = 'query'
class APIKeySecurityScheme(BaseModel):
"""
API Key security scheme.
"""
description: str | None = None
"""
Description of this security scheme.
"""
in_: In = Field(..., alias='in')
"""
The location of the API key. Valid values are "query", "header", or "cookie".
"""
name: str
"""
The name of the header, query or cookie parameter to be used.
"""
type: Literal['apiKey'] = 'apiKey'
class AgentExtension(BaseModel):
"""
A declaration of an extension supported by an Agent.
"""
description: str | None = None
"""
A description of how this agent uses this extension.
"""
params: dict[str, Any] | None = None
"""
Optional configuration for the extension.
"""
required: bool | None = None
"""
Whether the client must follow specific requirements of the extension.
"""
uri: str
"""
The URI of the extension.
"""
class AgentProvider(BaseModel):
"""
Represents the service provider of an agent.
"""
organization: str
"""
Agent provider's organization name.
"""
url: str
"""
Agent provider's URL.
"""
class AgentSkill(BaseModel):
"""
Represents a unit of capability that an agent can perform.
"""
description: str
"""
Description of the skill - will be used by the client or a human
as a hint to understand what the skill does.
"""
examples: list[str] | None = None
"""
The set of example scenarios that the skill can perform.
Will be used by the client as a hint to understand how the skill can be used.
"""
id: str
"""
Unique identifier for the agent's skill.
"""
inputModes: list[str] | None = None
"""
The set of interaction modes that the skill supports
(if different than the default).
Supported media types for input.
"""
name: str
"""
Human readable name of the skill.
"""
outputModes: list[str] | None = None
"""
Supported media types for output.
"""
tags: list[str]
"""
Set of tagwords describing classes of capabilities for this specific skill.
"""
class AuthorizationCodeOAuthFlow(BaseModel):
"""
Configuration details for a supported OAuth Flow
"""
authorizationUrl: str
"""
The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS
"""
refreshUrl: str | None = None
"""
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS.
"""
scopes: dict[str, str]
"""
The available scopes for the OAuth2 security scheme. A map between the scope name and a short
description for it. The map MAY be empty.
"""
tokenUrl: str
"""
The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
requires the use of TLS.
"""
class ClientCredentialsOAuthFlow(BaseModel):
"""
Configuration details for a supported OAuth Flow
"""
refreshUrl: str | None = None
"""
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS.
"""
scopes: dict[str, str]
"""
The available scopes for the OAuth2 security scheme. A map between the scope name and a short
description for it. The map MAY be empty.
"""
tokenUrl: str
"""
The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
requires the use of TLS.
"""
class ContentTypeNotSupportedError(BaseModel):
"""
A2A specific error indicating incompatible content types between request and agent capabilities.
"""
code: Literal[-32005] = -32005
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Incompatible content types'
"""
A String providing a short description of the error.
"""
class DataPart(BaseModel):
"""
Represents a structured data segment within a message part.
"""
data: dict[str, Any]
"""
Structured data content
"""
kind: Literal['data'] = 'data'
"""
Part type - data for DataParts
"""
metadata: dict[str, Any] | None = None
"""
Optional metadata associated with the part.
"""
class FileBase(BaseModel):
"""
Represents the base entity for FileParts
"""
mimeType: str | None = None
"""
Optional mimeType for the file
"""
name: str | None = None
"""
Optional name for the file
"""
class FileWithBytes(BaseModel):
"""
Define the variant where 'bytes' is present and 'uri' is absent
"""
bytes: str
"""
base64 encoded content of the file
"""
mimeType: str | None = None
"""
Optional mimeType for the file
"""
name: str | None = None
"""
Optional name for the file
"""
class FileWithUri(BaseModel):
"""
Define the variant where 'uri' is present and 'bytes' is absent
"""
mimeType: str | None = None
"""
Optional mimeType for the file
"""
name: str | None = None
"""
Optional name for the file
"""
uri: str
"""
URL for the File content
"""
class HTTPAuthSecurityScheme(BaseModel):
"""
HTTP Authentication security scheme.
"""
bearerFormat: str | None = None
"""
A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually
generated by an authorization server, so this information is primarily for documentation
purposes.
"""
description: str | None = None
"""
Description of this security scheme.
"""
scheme: str
"""
The name of the HTTP Authentication scheme to be used in the Authorization header as defined
in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry.
The value is case-insensitive, as defined in RFC7235.
"""
type: Literal['http'] = 'http'
class ImplicitOAuthFlow(BaseModel):
"""
Configuration details for a supported OAuth Flow
"""
authorizationUrl: str
"""
The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS
"""
refreshUrl: str | None = None
"""
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS.
"""
scopes: dict[str, str]
"""
The available scopes for the OAuth2 security scheme. A map between the scope name and a short
description for it. The map MAY be empty.
"""
class InternalError(BaseModel):
"""
JSON-RPC error indicating an internal JSON-RPC error on the server.
"""
code: Literal[-32603] = -32603
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Internal error'
"""
A String providing a short description of the error.
"""
class InvalidAgentResponseError(BaseModel):
"""
A2A specific error indicating agent returned invalid response for the current method
"""
code: Literal[-32006] = -32006
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Invalid agent response'
"""
A String providing a short description of the error.
"""
class InvalidParamsError(BaseModel):
"""
JSON-RPC error indicating invalid method parameter(s).
"""
code: Literal[-32602] = -32602
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Invalid parameters'
"""
A String providing a short description of the error.
"""
class InvalidRequestError(BaseModel):
"""
JSON-RPC error indicating the JSON sent is not a valid Request object.
"""
code: Literal[-32600] = -32600
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Request payload validation error'
"""
A String providing a short description of the error.
"""
class JSONParseError(BaseModel):
"""
JSON-RPC error indicating invalid JSON was received by the server.
"""
code: Literal[-32700] = -32700
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Invalid JSON payload'
"""
A String providing a short description of the error.
"""
class JSONRPCError(BaseModel):
"""
Represents a JSON-RPC 2.0 Error object.
This is typically included in a JSONRPCErrorResponse when an error occurs.
"""
code: int
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str
"""
A String providing a short description of the error.
"""
class JSONRPCMessage(BaseModel):
"""
Base interface for any JSON-RPC 2.0 request or response.
"""
id: str | int | None = None
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
class JSONRPCRequest(BaseModel):
"""
Represents a JSON-RPC 2.0 Request object.
"""
id: str | int | None = None
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
method: str
"""
A String containing the name of the method to be invoked.
"""
params: dict[str, Any] | None = None
"""
A Structured value that holds the parameter values to be used during the invocation of the method.
"""
class JSONRPCSuccessResponse(BaseModel):
"""
Represents a JSON-RPC 2.0 Success Response object.
"""
id: str | int | None = None
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
result: Any
"""
The result object on success
"""
class Role(str, Enum):
"""
Message sender's role
"""
agent = 'agent'
user = 'user'
class MethodNotFoundError(BaseModel):
"""
JSON-RPC error indicating the method does not exist or is not available.
"""
code: Literal[-32601] = -32601
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Method not found'
"""
A String providing a short description of the error.
"""
class OpenIdConnectSecurityScheme(BaseModel):
"""
OpenID Connect security scheme configuration.
"""
description: str | None = None
"""
Description of this security scheme.
"""
openIdConnectUrl: str
"""
Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata.
"""
type: Literal['openIdConnect'] = 'openIdConnect'
class PartBase(BaseModel):
"""
Base properties common to all message parts.
"""
metadata: dict[str, Any] | None = None
"""
Optional metadata associated with the part.
"""
class PasswordOAuthFlow(BaseModel):
"""
Configuration details for a supported OAuth Flow
"""
refreshUrl: str | None = None
"""
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
standard requires the use of TLS.
"""
scopes: dict[str, str]
"""
The available scopes for the OAuth2 security scheme. A map between the scope name and a short
description for it. The map MAY be empty.
"""
tokenUrl: str
"""
The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
requires the use of TLS.
"""
class PushNotificationAuthenticationInfo(BaseModel):
"""
Defines authentication details for push notifications.
"""
credentials: str | None = None
"""
Optional credentials
"""
schemes: list[str]
"""
Supported authentication schemes - e.g. Basic, Bearer
"""
class PushNotificationConfig(BaseModel):
"""
Configuration for setting up push notifications for task updates.
"""
authentication: PushNotificationAuthenticationInfo | None = None
id: str | None = None
"""
Push Notification ID - created by server to support multiple callbacks
"""
token: str | None = None
"""
Token unique to this task/session.
"""
url: str
"""
URL for sending the push notifications.
"""
class PushNotificationNotSupportedError(BaseModel):
"""
A2A specific error indicating the agent does not support push notifications.
"""
code: Literal[-32003] = -32003
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Push Notification is not supported'
"""
A String providing a short description of the error.
"""
class SecuritySchemeBase(BaseModel):
"""
Base properties shared by all security schemes.
"""
description: str | None = None
"""
Description of this security scheme.
"""
class TaskIdParams(BaseModel):
"""
Parameters containing only a task ID, used for simple task operations.
"""
id: str
"""
Task id.
"""
metadata: dict[str, Any] | None = None
class TaskNotCancelableError(BaseModel):
"""
A2A specific error indicating the task is in a state where it cannot be canceled.
"""
code: Literal[-32002] = -32002
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Task cannot be canceled'
"""
A String providing a short description of the error.
"""
class TaskNotFoundError(BaseModel):
"""
A2A specific error indicating the requested task ID was not found.
"""
code: Literal[-32001] = -32001
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'Task not found'
"""
A String providing a short description of the error.
"""
class TaskPushNotificationConfig(BaseModel):
"""
Parameters for setting or getting push notification configuration for a task
"""
pushNotificationConfig: PushNotificationConfig
"""
Push notification configuration.
"""
taskId: str
"""
Task id.
"""
class TaskQueryParams(BaseModel):
"""
Parameters for querying a task, including optional history length.
"""
historyLength: int | None = None
"""
Number of recent messages to be retrieved.
"""
id: str
"""
Task id.
"""
metadata: dict[str, Any] | None = None
class TaskResubscriptionRequest(BaseModel):
"""
JSON-RPC request model for the 'tasks/resubscribe' method.
"""
id: str | int
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
method: Literal['tasks/resubscribe'] = 'tasks/resubscribe'
"""
A String containing the name of the method to be invoked.
"""
params: TaskIdParams
"""
A Structured value that holds the parameter values to be used during the invocation of the method.
"""
class TaskState(str, Enum):
"""
Represents the possible states of a Task.
"""
submitted = 'submitted'
working = 'working'
input_required = 'input-required'
completed = 'completed'
canceled = 'canceled'
failed = 'failed'
rejected = 'rejected'
auth_required = 'auth-required'
unknown = 'unknown'
class TextPart(BaseModel):
"""
Represents a text segment within parts.
"""
kind: Literal['text'] = 'text'
"""
Part type - text for TextParts
"""
metadata: dict[str, Any] | None = None
"""
Optional metadata associated with the part.
"""
text: str
"""
Text content
"""
class UnsupportedOperationError(BaseModel):
"""
A2A specific error indicating the requested operation is not supported by the agent.
"""
code: Literal[-32004] = -32004
"""
A Number that indicates the error type that occurred.
"""
data: Any | None = None
"""
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
"""
message: str | None = 'This operation is not supported'
"""
A String providing a short description of the error.
"""
class A2AError(
RootModel[
JSONParseError
| InvalidRequestError
| MethodNotFoundError
| InvalidParamsError
| InternalError
| TaskNotFoundError
| TaskNotCancelableError
| PushNotificationNotSupportedError
| UnsupportedOperationError
| ContentTypeNotSupportedError
| InvalidAgentResponseError
]
):
root: (
JSONParseError
| InvalidRequestError
| MethodNotFoundError
| InvalidParamsError
| InternalError
| TaskNotFoundError
| TaskNotCancelableError
| PushNotificationNotSupportedError
| UnsupportedOperationError
| ContentTypeNotSupportedError
| InvalidAgentResponseError
)
class AgentCapabilities(BaseModel):
"""
Defines optional capabilities supported by an agent.
"""
extensions: list[AgentExtension] | None = None
"""
extensions supported by this agent.
"""
pushNotifications: bool | None = None
"""
true if the agent can notify updates to client.
"""
stateTransitionHistory: bool | None = None
"""
true if the agent exposes status change history for tasks.
"""
streaming: bool | None = None
"""
true if the agent supports SSE.
"""
class CancelTaskRequest(BaseModel):
"""
JSON-RPC request model for the 'tasks/cancel' method.
"""
id: str | int
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
method: Literal['tasks/cancel'] = 'tasks/cancel'
"""
A String containing the name of the method to be invoked.
"""
params: TaskIdParams
"""
A Structured value that holds the parameter values to be used during the invocation of the method.
"""
class FilePart(BaseModel):
"""
Represents a File segment within parts.
"""
file: FileWithBytes | FileWithUri
"""
File content either as url or bytes
"""
kind: Literal['file'] = 'file'
"""
Part type - file for FileParts
"""
metadata: dict[str, Any] | None = None
"""
Optional metadata associated with the part.
"""
class GetTaskPushNotificationConfigRequest(BaseModel):
"""
JSON-RPC request model for the 'tasks/pushNotificationConfig/get' method.
"""
id: str | int
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
method: Literal['tasks/pushNotificationConfig/get'] = (
'tasks/pushNotificationConfig/get'
)
"""
A String containing the name of the method to be invoked.
"""
params: TaskIdParams
"""
A Structured value that holds the parameter values to be used during the invocation of the method.
"""
class GetTaskPushNotificationConfigSuccessResponse(BaseModel):
"""
JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
"""
id: str | int | None = None
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
result: TaskPushNotificationConfig
"""
The result object on success.
"""
class GetTaskRequest(BaseModel):
"""
JSON-RPC request model for the 'tasks/get' method.
"""
id: str | int
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
method: Literal['tasks/get'] = 'tasks/get'
"""
A String containing the name of the method to be invoked.
"""
params: TaskQueryParams
"""
A Structured value that holds the parameter values to be used during the invocation of the method.
"""
class JSONRPCErrorResponse(BaseModel):
"""
Represents a JSON-RPC 2.0 Error Response object.
"""
error: (
JSONRPCError
| JSONParseError
| InvalidRequestError
| MethodNotFoundError
| InvalidParamsError
| InternalError
| TaskNotFoundError
| TaskNotCancelableError
| PushNotificationNotSupportedError
| UnsupportedOperationError
| ContentTypeNotSupportedError
| InvalidAgentResponseError
)
id: str | int | None = None
"""
An identifier established by the Client that MUST contain a String, Number.
Numbers SHOULD NOT contain fractional parts.
"""
jsonrpc: Literal['2.0'] = '2.0'
"""
Specifies the version of the JSON-RPC protocol. MUST be exactly "2.0".
"""
class MessageSendConfiguration(BaseModel):
"""
Configuration for the send message request.
"""
acceptedOutputModes: list[str]
"""
Accepted output modalities by the client.