You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/a2a/types.py
+118Lines changed: 118 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1271,6 +1271,69 @@ class ListTaskPushNotificationConfigSuccessResponse(A2ABaseModel):
1271
1271
"""
1272
1272
1273
1273
1274
+
classListTasksParams(A2ABaseModel):
1275
+
"""
1276
+
Parameters for listing tasks with optional filtering criteria.
1277
+
"""
1278
+
1279
+
context_id: str|None=None
1280
+
"""
1281
+
Filter tasks by context ID to get tasks from a specific conversation or session.
1282
+
"""
1283
+
history_length: int|None=None
1284
+
"""
1285
+
Number of recent messages to include in each task's history. Must be non-negative. Defaults to 0 if not specified.
1286
+
"""
1287
+
include_artifacts: bool|None=None
1288
+
"""
1289
+
Whether to include artifacts in the returned tasks. Defaults to false to reduce payload size.
1290
+
"""
1291
+
last_updated_after: int|None=None
1292
+
"""
1293
+
Filter tasks updated after this timestamp (milliseconds since epoch). Only tasks with a last updated time greater than or equal to this value will be returned.
1294
+
"""
1295
+
metadata: dict[str, Any] |None=None
1296
+
"""
1297
+
Request-specific metadata.
1298
+
"""
1299
+
page_size: int|None=None
1300
+
"""
1301
+
Maximum number of tasks to return. Must be between 1 and 100. Defaults to 50 if not specified.
1302
+
"""
1303
+
page_token: str|None=None
1304
+
"""
1305
+
Token for pagination. Use the nextPageToken from a previous ListTasksResult response.
1306
+
"""
1307
+
status: TaskState|None=None
1308
+
"""
1309
+
Filter tasks by their current status state.
1310
+
"""
1311
+
1312
+
1313
+
classListTasksRequest(A2ABaseModel):
1314
+
"""
1315
+
JSON-RPC request model for the 'tasks/list' method.
1316
+
"""
1317
+
1318
+
id: str|int
1319
+
"""
1320
+
A unique identifier established by the client. It must be a String, a Number, or null.
1321
+
The server must reply with the same value in the response. This property is omitted for notifications.
1322
+
"""
1323
+
jsonrpc: Literal['2.0'] ='2.0'
1324
+
"""
1325
+
The version of the JSON-RPC protocol. MUST be exactly "2.0".
1326
+
"""
1327
+
method: Literal['tasks/list'] ='tasks/list'
1328
+
"""
1329
+
A String containing the name of the method to be invoked.
1330
+
"""
1331
+
params: ListTasksParams|None=None
1332
+
"""
1333
+
A Structured value that holds the parameter values to be used during the invocation of the method.
1334
+
"""
1335
+
1336
+
1274
1337
classMessageSendConfiguration(A2ABaseModel):
1275
1338
"""
1276
1339
Defines configuration options for a `message/send` or `message/stream` request.
@@ -1694,6 +1757,7 @@ class A2ARequest(
1694
1757
SendMessageRequest
1695
1758
|SendStreamingMessageRequest
1696
1759
|GetTaskRequest
1760
+
|ListTasksRequest
1697
1761
|CancelTaskRequest
1698
1762
|SetTaskPushNotificationConfigRequest
1699
1763
|GetTaskPushNotificationConfigRequest
@@ -1707,6 +1771,7 @@ class A2ARequest(
1707
1771
SendMessageRequest
1708
1772
|SendStreamingMessageRequest
1709
1773
|GetTaskRequest
1774
+
|ListTasksRequest
1710
1775
|CancelTaskRequest
1711
1776
|SetTaskPushNotificationConfigRequest
1712
1777
|GetTaskPushNotificationConfigRequest
@@ -1936,6 +2001,48 @@ class GetTaskSuccessResponse(A2ABaseModel):
1936
2001
"""
1937
2002
1938
2003
2004
+
classListTasksResult(A2ABaseModel):
2005
+
"""
2006
+
Result object for tasks/list method containing an array of tasks and pagination information.
2007
+
"""
2008
+
2009
+
next_page_token: str
2010
+
"""
2011
+
Token for retrieving the next page. Empty string if no more results.
2012
+
"""
2013
+
page_size: int
2014
+
"""
2015
+
Maximum number of tasks returned in this response.
2016
+
"""
2017
+
tasks: list[Task]
2018
+
"""
2019
+
Array of tasks matching the specified criteria.
2020
+
"""
2021
+
total_size: int
2022
+
"""
2023
+
Total number of tasks available (before pagination).
2024
+
"""
2025
+
2026
+
2027
+
classListTasksSuccessResponse(A2ABaseModel):
2028
+
"""
2029
+
JSON-RPC success response model for the 'tasks/list' method.
2030
+
"""
2031
+
2032
+
id: str|int|None=None
2033
+
"""
2034
+
The identifier established by the client.
2035
+
"""
2036
+
jsonrpc: Literal['2.0'] ='2.0'
2037
+
"""
2038
+
The version of the JSON-RPC protocol. MUST be exactly "2.0".
2039
+
"""
2040
+
result: ListTasksResult
2041
+
"""
2042
+
The result object on success.
2043
+
"""
2044
+
2045
+
1939
2046
classSendMessageSuccessResponse(A2ABaseModel):
1940
2047
"""
1941
2048
Represents a successful JSON-RPC response for the `message/send` method.
0 commit comments