@@ -133,13 +133,13 @@ class DataPart(BaseModel):
133133 """
134134 Structured data content
135135 """
136- metadata : dict [ str , Any ] | None = None
136+ kind : Literal [ 'data' ] = 'data'
137137 """
138- Optional metadata associated with the part.
138+ Part type - data for DataParts
139139 """
140- type : Literal [ 'data' ] = 'data'
140+ metadata : dict [ str , Any ] | None = None
141141 """
142- Part type - data for DataParts
142+ Optional metadata associated with the part.
143143 """
144144
145145
@@ -577,11 +577,11 @@ class TaskState(Enum):
577577 submitted = 'submitted'
578578 working = 'working'
579579 input_required = 'input-required'
580- auth_required = 'auth-required'
581580 completed = 'completed'
582581 canceled = 'canceled'
583582 failed = 'failed'
584583 rejected = 'rejected'
584+ auth_required = 'auth-required'
585585 unknown = 'unknown'
586586
587587
@@ -590,6 +590,10 @@ class TextPart(BaseModel):
590590 Represents a text segment within parts.
591591 """
592592
593+ kind : Literal ['text' ] = 'text'
594+ """
595+ Part type - text for TextParts
596+ """
593597 metadata : dict [str , Any ] | None = None
594598 """
595599 Optional metadata associated with the part.
@@ -598,10 +602,6 @@ class TextPart(BaseModel):
598602 """
599603 Text content
600604 """
601- type : Literal ['text' ] = 'text'
602- """
603- Part type - text for TextParts
604- """
605605
606606
607607class UnsupportedOperationError (BaseModel ):
@@ -745,13 +745,13 @@ class FilePart(BaseModel):
745745 """
746746 File content either as url or bytes
747747 """
748- metadata : dict [ str , Any ] | None = None
748+ kind : Literal [ 'file' ] = 'file'
749749 """
750- Optional metadata associated with the part.
750+ Part type - file for FileParts
751751 """
752- type : Literal [ 'file' ] = 'file'
752+ metadata : dict [ str , Any ] | None = None
753753 """
754- Part type - file for FileParts
754+ Optional metadata associated with the part.
755755 """
756756
757757
@@ -933,7 +933,7 @@ class SetTaskPushNotificationConfigSuccessResponse(BaseModel):
933933
934934class Artifact (BaseModel ):
935935 """
936- Represents an artifact generated for a task.
936+ Represents an artifact generated for a task task .
937937 """
938938
939939 artifactId : str
@@ -959,9 +959,7 @@ class Artifact(BaseModel):
959959
960960
961961class GetTaskPushNotificationConfigResponse (
962- RootModel [
963- JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse
964- ]
962+ RootModel [JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse ]
965963):
966964 root : JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse
967965 """
@@ -978,9 +976,9 @@ class Message(BaseModel):
978976 """
979977 the context the message is associated with
980978 """
981- final : bool | None = None
979+ kind : Literal [ 'message' ] = 'message'
982980 """
983- indicates the end of the event stream
981+ event type
984982 """
985983 messageId : str
986984 """
@@ -1002,10 +1000,6 @@ class Message(BaseModel):
10021000 """
10031001 identifier of task the message is related to
10041002 """
1005- type : Literal ['message' ] = 'message'
1006- """
1007- event type
1008- """
10091003
10101004
10111005class MessageSendParams (BaseModel ):
@@ -1076,9 +1070,7 @@ class SendStreamingMessageRequest(BaseModel):
10761070
10771071
10781072class SetTaskPushNotificationConfigResponse (
1079- RootModel [
1080- JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
1081- ]
1073+ RootModel [JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse ]
10821074):
10831075 root : JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
10841076 """
@@ -1103,6 +1095,10 @@ class TaskArtifactUpdateEvent(BaseModel):
11031095 """
11041096 the context the task is associated with
11051097 """
1098+ kind : Literal ['artifact-update' ] = 'artifact-update'
1099+ """
1100+ event type
1101+ """
11061102 lastChunk : bool | None = None
11071103 """
11081104 Indicates if this is the last chunk of the artifact
@@ -1115,10 +1111,6 @@ class TaskArtifactUpdateEvent(BaseModel):
11151111 """
11161112 Task id
11171113 """
1118- type : Literal ['artifact-update' ] = 'artifact-update'
1119- """
1120- event type
1121- """
11221114
11231115
11241116class TaskStatus (BaseModel ):
@@ -1150,6 +1142,10 @@ class TaskStatusUpdateEvent(BaseModel):
11501142 """
11511143 indicates the end of the event stream
11521144 """
1145+ kind : Literal ['status-update' ] = 'status-update'
1146+ """
1147+ event type
1148+ """
11531149 metadata : dict [str , Any ] | None = None
11541150 """
11551151 extension metadata
@@ -1162,10 +1158,6 @@ class TaskStatusUpdateEvent(BaseModel):
11621158 """
11631159 Task id
11641160 """
1165- type : Literal ['status-update' ] = 'status-update'
1166- """
1167- event type
1168- """
11691161
11701162
11711163class A2ARequest (
@@ -1207,6 +1199,10 @@ class Task(BaseModel):
12071199 """
12081200 unique identifier for the task
12091201 """
1202+ kind : Literal ['task' ] = 'task'
1203+ """
1204+ event type
1205+ """
12101206 metadata : dict [str , Any ] | None = None
12111207 """
12121208 extension metadata
@@ -1215,10 +1211,6 @@ class Task(BaseModel):
12151211 """
12161212 current status of the task
12171213 """
1218- type : Literal ['task' ] = 'task'
1219- """
1220- event type
1221- """
12221214
12231215
12241216class CancelTaskSuccessResponse (BaseModel ):
@@ -1301,9 +1293,7 @@ class SendStreamingMessageSuccessResponse(BaseModel):
13011293 """
13021294
13031295
1304- class CancelTaskResponse (
1305- RootModel [JSONRPCErrorResponse | CancelTaskSuccessResponse ]
1306- ):
1296+ class CancelTaskResponse (RootModel [JSONRPCErrorResponse | CancelTaskSuccessResponse ]):
13071297 root : JSONRPCErrorResponse | CancelTaskSuccessResponse
13081298 """
13091299 JSON-RPC response for the 'tasks/cancel' method.
@@ -1342,9 +1332,7 @@ class JSONRPCResponse(
13421332 """
13431333
13441334
1345- class SendMessageResponse (
1346- RootModel [JSONRPCErrorResponse | SendMessageSuccessResponse ]
1347- ):
1335+ class SendMessageResponse (RootModel [JSONRPCErrorResponse | SendMessageSuccessResponse ]):
13481336 root : JSONRPCErrorResponse | SendMessageSuccessResponse
13491337 """
13501338 JSON-RPC response model for the 'message/send' method.
0 commit comments