@@ -133,13 +133,13 @@ class DataPart(BaseModel):
133133 """
134134 Structured data content
135135 """
136- metadata : dict [ str , Any ] | None = None
136+ itemType : 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+ itemType : 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+ itemType : 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 """
@@ -982,6 +980,10 @@ class Message(BaseModel):
982980 """
983981 indicates the end of the event stream
984982 """
983+ itemType : Literal ['message' ] = 'message'
984+ """
985+ event type
986+ """
985987 messageId : str
986988 """
987989 identifier created by the message creator
@@ -1002,10 +1004,6 @@ class Message(BaseModel):
10021004 """
10031005 identifier of task the message is related to
10041006 """
1005- type : Literal ['message' ] = 'message'
1006- """
1007- event type
1008- """
10091007
10101008
10111009class MessageSendParams (BaseModel ):
@@ -1076,9 +1074,7 @@ class SendStreamingMessageRequest(BaseModel):
10761074
10771075
10781076class SetTaskPushNotificationConfigResponse (
1079- RootModel [
1080- JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
1081- ]
1077+ RootModel [JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse ]
10821078):
10831079 root : JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
10841080 """
@@ -1103,6 +1099,10 @@ class TaskArtifactUpdateEvent(BaseModel):
11031099 """
11041100 the context the task is associated with
11051101 """
1102+ itemType : Literal ['artifact-update' ] = 'artifact-update'
1103+ """
1104+ event type
1105+ """
11061106 lastChunk : bool | None = None
11071107 """
11081108 Indicates if this is the last chunk of the artifact
@@ -1115,10 +1115,6 @@ class TaskArtifactUpdateEvent(BaseModel):
11151115 """
11161116 Task id
11171117 """
1118- type : Literal ['artifact-update' ] = 'artifact-update'
1119- """
1120- event type
1121- """
11221118
11231119
11241120class TaskStatus (BaseModel ):
@@ -1150,6 +1146,10 @@ class TaskStatusUpdateEvent(BaseModel):
11501146 """
11511147 indicates the end of the event stream
11521148 """
1149+ itemType : Literal ['status-update' ] = 'status-update'
1150+ """
1151+ event type
1152+ """
11531153 metadata : dict [str , Any ] | None = None
11541154 """
11551155 extension metadata
@@ -1162,10 +1162,6 @@ class TaskStatusUpdateEvent(BaseModel):
11621162 """
11631163 Task id
11641164 """
1165- type : Literal ['status-update' ] = 'status-update'
1166- """
1167- event type
1168- """
11691165
11701166
11711167class A2ARequest (
@@ -1207,6 +1203,10 @@ class Task(BaseModel):
12071203 """
12081204 unique identifier for the task
12091205 """
1206+ itemType : Literal ['task' ] = 'task'
1207+ """
1208+ event type
1209+ """
12101210 metadata : dict [str , Any ] | None = None
12111211 """
12121212 extension metadata
@@ -1215,10 +1215,6 @@ class Task(BaseModel):
12151215 """
12161216 current status of the task
12171217 """
1218- type : Literal ['task' ] = 'task'
1219- """
1220- event type
1221- """
12221218
12231219
12241220class CancelTaskSuccessResponse (BaseModel ):
@@ -1301,9 +1297,7 @@ class SendStreamingMessageSuccessResponse(BaseModel):
13011297 """
13021298
13031299
1304- class CancelTaskResponse (
1305- RootModel [JSONRPCErrorResponse | CancelTaskSuccessResponse ]
1306- ):
1300+ class CancelTaskResponse (RootModel [JSONRPCErrorResponse | CancelTaskSuccessResponse ]):
13071301 root : JSONRPCErrorResponse | CancelTaskSuccessResponse
13081302 """
13091303 JSON-RPC response for the 'tasks/cancel' method.
@@ -1342,9 +1336,7 @@ class JSONRPCResponse(
13421336 """
13431337
13441338
1345- class SendMessageResponse (
1346- RootModel [JSONRPCErrorResponse | SendMessageSuccessResponse ]
1347- ):
1339+ class SendMessageResponse (RootModel [JSONRPCErrorResponse | SendMessageSuccessResponse ]):
13481340 root : JSONRPCErrorResponse | SendMessageSuccessResponse
13491341 """
13501342 JSON-RPC response model for the 'message/send' method.
0 commit comments