@orq-ai/node 4.0.0-rc.50 → 4.0.0-rc.52

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.
Files changed (161) hide show
  1. package/README.md +3 -4
  2. package/bin/mcp-server.js +1125 -606
  3. package/bin/mcp-server.js.map +50 -51
  4. package/docs/sdks/agents/README.md +80 -80
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/agentsInvoke.d.ts +1 -1
  7. package/funcs/agentsInvoke.d.ts.map +1 -1
  8. package/funcs/agentsInvoke.js +1 -1
  9. package/funcs/agentsInvoke.js.map +1 -1
  10. package/funcs/agentsListTasks.d.ts +1 -1
  11. package/funcs/agentsListTasks.d.ts.map +1 -1
  12. package/funcs/agentsListTasks.js +1 -1
  13. package/funcs/agentsListTasks.js.map +1 -1
  14. package/funcs/agentsRetrieveTask.d.ts +1 -1
  15. package/funcs/agentsRetrieveTask.d.ts.map +1 -1
  16. package/funcs/agentsRetrieveTask.js +1 -1
  17. package/funcs/agentsRetrieveTask.js.map +1 -1
  18. package/funcs/agentsRun.d.ts +1 -1
  19. package/funcs/agentsRun.d.ts.map +1 -1
  20. package/funcs/agentsRun.js +1 -1
  21. package/funcs/agentsRun.js.map +1 -1
  22. package/jsr.json +1 -1
  23. package/lib/config.d.ts +2 -2
  24. package/lib/config.js +2 -2
  25. package/mcp-server/mcp-server.js +1 -1
  26. package/mcp-server/server.js +2 -2
  27. package/mcp-server/server.js.map +1 -1
  28. package/models/errors/index.d.ts +0 -1
  29. package/models/errors/index.d.ts.map +1 -1
  30. package/models/errors/index.js +0 -1
  31. package/models/errors/index.js.map +1 -1
  32. package/models/operations/createbudget.js +2 -2
  33. package/models/operations/createcontact.js +2 -2
  34. package/models/operations/createdataset.js +2 -2
  35. package/models/operations/createdatasetitem.js +8 -8
  36. package/models/operations/createdatasource.js +2 -2
  37. package/models/operations/createeval.js +28 -28
  38. package/models/operations/createtool.d.ts +25 -25
  39. package/models/operations/createtool.d.ts.map +1 -1
  40. package/models/operations/createtool.js +41 -41
  41. package/models/operations/createtool.js.map +1 -1
  42. package/models/operations/deploymentinvoke.d.ts +6 -6
  43. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  44. package/models/operations/deploymentinvoke.js +9 -9
  45. package/models/operations/deploymentinvoke.js.map +1 -1
  46. package/models/operations/fileget.js +2 -2
  47. package/models/operations/filelist.js +2 -2
  48. package/models/operations/fileupload.js +2 -2
  49. package/models/operations/getagenttask.d.ts +682 -108
  50. package/models/operations/getagenttask.d.ts.map +1 -1
  51. package/models/operations/getagenttask.js +635 -155
  52. package/models/operations/getagenttask.js.map +1 -1
  53. package/models/operations/getalltools.js +12 -12
  54. package/models/operations/getbudget.js +2 -2
  55. package/models/operations/getevals.js +28 -28
  56. package/models/operations/invokeagent.d.ts +143 -123
  57. package/models/operations/invokeagent.d.ts.map +1 -1
  58. package/models/operations/invokeagent.js +143 -146
  59. package/models/operations/invokeagent.js.map +1 -1
  60. package/models/operations/listagenttasks.d.ts +680 -118
  61. package/models/operations/listagenttasks.d.ts.map +1 -1
  62. package/models/operations/listagenttasks.js +612 -144
  63. package/models/operations/listagenttasks.js.map +1 -1
  64. package/models/operations/listbudgets.js +2 -2
  65. package/models/operations/listchunks.d.ts +6 -6
  66. package/models/operations/listchunks.d.ts.map +1 -1
  67. package/models/operations/listchunks.js +9 -9
  68. package/models/operations/listchunks.js.map +1 -1
  69. package/models/operations/listcontacts.js +2 -2
  70. package/models/operations/listdatasetdatapoints.js +8 -8
  71. package/models/operations/listdatasets.js +2 -2
  72. package/models/operations/listdatasources.d.ts +6 -6
  73. package/models/operations/listdatasources.d.ts.map +1 -1
  74. package/models/operations/listdatasources.js +12 -11
  75. package/models/operations/listdatasources.js.map +1 -1
  76. package/models/operations/retrievecontact.js +2 -2
  77. package/models/operations/retrievedatapoint.js +8 -8
  78. package/models/operations/retrievedataset.js +2 -2
  79. package/models/operations/retrievedatasource.js +2 -2
  80. package/models/operations/retrievetool.js +12 -12
  81. package/models/operations/runagent.d.ts +112 -98
  82. package/models/operations/runagent.d.ts.map +1 -1
  83. package/models/operations/runagent.js +120 -121
  84. package/models/operations/runagent.js.map +1 -1
  85. package/models/operations/streamagent.d.ts +18 -12
  86. package/models/operations/streamagent.d.ts.map +1 -1
  87. package/models/operations/streamagent.js +13 -13
  88. package/models/operations/streamagent.js.map +1 -1
  89. package/models/operations/streamrunagent.d.ts +12 -12
  90. package/models/operations/streamrunagent.d.ts.map +1 -1
  91. package/models/operations/streamrunagent.js +15 -15
  92. package/models/operations/streamrunagent.js.map +1 -1
  93. package/models/operations/updateagent.d.ts +11 -8
  94. package/models/operations/updateagent.d.ts.map +1 -1
  95. package/models/operations/updateagent.js +13 -11
  96. package/models/operations/updateagent.js.map +1 -1
  97. package/models/operations/updatebudget.js +2 -2
  98. package/models/operations/updatecontact.js +2 -2
  99. package/models/operations/updatedatapoint.js +8 -8
  100. package/models/operations/updatedataset.js +2 -2
  101. package/models/operations/updatedatasource.js +2 -2
  102. package/models/operations/updateeval.js +28 -28
  103. package/models/operations/updatetool.js +14 -14
  104. package/package.json +1 -1
  105. package/sdk/agents.d.ts +10 -10
  106. package/sdk/agents.d.ts.map +1 -1
  107. package/sdk/agents.js +9 -9
  108. package/sdk/agents.js.map +1 -1
  109. package/src/funcs/agentsInvoke.ts +4 -4
  110. package/src/funcs/agentsListTasks.ts +4 -4
  111. package/src/funcs/agentsRetrieveTask.ts +8 -8
  112. package/src/funcs/agentsRun.ts +4 -4
  113. package/src/lib/config.ts +2 -2
  114. package/src/mcp-server/mcp-server.ts +1 -1
  115. package/src/mcp-server/server.ts +2 -2
  116. package/src/models/errors/index.ts +0 -1
  117. package/src/models/operations/createbudget.ts +2 -2
  118. package/src/models/operations/createcontact.ts +2 -2
  119. package/src/models/operations/createdataset.ts +2 -2
  120. package/src/models/operations/createdatasetitem.ts +8 -8
  121. package/src/models/operations/createdatasource.ts +2 -2
  122. package/src/models/operations/createeval.ts +28 -28
  123. package/src/models/operations/createtool.ts +76 -76
  124. package/src/models/operations/deploymentinvoke.ts +17 -24
  125. package/src/models/operations/fileget.ts +2 -2
  126. package/src/models/operations/filelist.ts +2 -2
  127. package/src/models/operations/fileupload.ts +2 -2
  128. package/src/models/operations/getagenttask.ts +1873 -428
  129. package/src/models/operations/getalltools.ts +12 -12
  130. package/src/models/operations/getbudget.ts +2 -2
  131. package/src/models/operations/getevals.ts +28 -28
  132. package/src/models/operations/invokeagent.ts +319 -299
  133. package/src/models/operations/listagenttasks.ts +2029 -540
  134. package/src/models/operations/listbudgets.ts +2 -2
  135. package/src/models/operations/listchunks.ts +14 -14
  136. package/src/models/operations/listcontacts.ts +2 -2
  137. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  138. package/src/models/operations/listdatasets.ts +2 -2
  139. package/src/models/operations/listdatasources.ts +15 -22
  140. package/src/models/operations/retrievecontact.ts +2 -2
  141. package/src/models/operations/retrievedatapoint.ts +8 -8
  142. package/src/models/operations/retrievedataset.ts +2 -2
  143. package/src/models/operations/retrievedatasource.ts +2 -2
  144. package/src/models/operations/retrievetool.ts +12 -12
  145. package/src/models/operations/runagent.ts +264 -220
  146. package/src/models/operations/streamagent.ts +28 -22
  147. package/src/models/operations/streamrunagent.ts +24 -24
  148. package/src/models/operations/updateagent.ts +25 -18
  149. package/src/models/operations/updatebudget.ts +2 -2
  150. package/src/models/operations/updatecontact.ts +2 -2
  151. package/src/models/operations/updatedatapoint.ts +8 -8
  152. package/src/models/operations/updatedataset.ts +2 -2
  153. package/src/models/operations/updatedatasource.ts +2 -2
  154. package/src/models/operations/updateeval.ts +28 -28
  155. package/src/models/operations/updatetool.ts +14 -14
  156. package/src/sdk/agents.ts +20 -20
  157. package/models/errors/getagenttask.d.ts +0 -29
  158. package/models/errors/getagenttask.d.ts.map +0 -1
  159. package/models/errors/getagenttask.js +0 -74
  160. package/models/errors/getagenttask.js.map +0 -1
  161. package/src/models/errors/getagenttask.ts +0 -67
@@ -9,10 +9,44 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
+ export type ListAgentTasksRequest = {
13
+ /**
14
+ * The unique key of the agent
15
+ */
16
+ agentKey: string;
17
+ /**
18
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
19
+ */
20
+ limit?: number | undefined;
21
+ /**
22
+ * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
23
+ */
24
+ startingAfter?: string | undefined;
25
+ /**
26
+ * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
27
+ */
28
+ endingBefore?: string | undefined;
29
+ /**
30
+ * Comma-separated list of task statuses to filter by. Available values: submitted, working, input-required, auth-required, completed, failed, canceled, rejected
31
+ */
32
+ status?: string | undefined;
33
+ };
34
+
35
+ /**
36
+ * A2A entity type
37
+ */
38
+ export const ListAgentTasksKind = {
39
+ Task: "task",
40
+ } as const;
41
+ /**
42
+ * A2A entity type
43
+ */
44
+ export type ListAgentTasksKind = ClosedEnum<typeof ListAgentTasksKind>;
45
+
12
46
  /**
13
- * Comma-separated list of task statuses to filter by. Available values: inactive, approval_required, in_progress, errored
47
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
14
48
  */
15
- export const Status = {
49
+ export const ListAgentTasksTaskState = {
16
50
  Submitted: "submitted",
17
51
  Working: "working",
18
52
  InputRequired: "input-required",
@@ -23,42 +57,216 @@ export const Status = {
23
57
  Rejected: "rejected",
24
58
  } as const;
25
59
  /**
26
- * Comma-separated list of task statuses to filter by. Available values: inactive, approval_required, in_progress, errored
60
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
61
+ */
62
+ export type ListAgentTasksTaskState = ClosedEnum<
63
+ typeof ListAgentTasksTaskState
64
+ >;
65
+
66
+ export const ListAgentTasksAgentsResponseKind = {
67
+ Message: "message",
68
+ } as const;
69
+ export type ListAgentTasksAgentsResponseKind = ClosedEnum<
70
+ typeof ListAgentTasksAgentsResponseKind
71
+ >;
72
+
73
+ /**
74
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
75
+ */
76
+ export const ListAgentTasksAgentsExtendedMessageRole = {
77
+ User: "user",
78
+ Agent: "agent",
79
+ Tool: "tool",
80
+ System: "system",
81
+ } as const;
82
+ /**
83
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
27
84
  */
28
- export type Status = ClosedEnum<typeof Status>;
85
+ export type ListAgentTasksAgentsExtendedMessageRole = ClosedEnum<
86
+ typeof ListAgentTasksAgentsExtendedMessageRole
87
+ >;
29
88
 
30
- export type ListAgentTasksRequest = {
89
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind =
90
+ {
91
+ ToolResult: "tool_result",
92
+ } as const;
93
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind =
94
+ ClosedEnum<
95
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind
96
+ >;
97
+
98
+ /**
99
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
100
+ */
101
+ export type ListAgentTasksPartsAgentsToolResultPart = {
102
+ kind:
103
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind;
104
+ toolCallId: string;
105
+ result?: any | undefined;
106
+ metadata?: { [k: string]: any } | undefined;
107
+ };
108
+
109
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind =
110
+ {
111
+ ToolCall: "tool_call",
112
+ } as const;
113
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind =
114
+ ClosedEnum<
115
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind
116
+ >;
117
+
118
+ /**
119
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
120
+ */
121
+ export type ListAgentTasksPartsToolCallPart = {
122
+ kind:
123
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind;
124
+ toolName: string;
125
+ toolCallId: string;
126
+ arguments: { [k: string]: any };
127
+ metadata?: { [k: string]: any } | undefined;
128
+ };
129
+
130
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind =
131
+ {
132
+ File: "file",
133
+ } as const;
134
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind =
135
+ ClosedEnum<
136
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind
137
+ >;
138
+
139
+ /**
140
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
141
+ */
142
+ export type ListAgentTasksFileAgentsResponseFileInURIFormat = {
31
143
  /**
32
- * The unique key of the agent
144
+ * URL for the File content
33
145
  */
34
- agentKey: string;
146
+ uri: string;
35
147
  /**
36
- * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
148
+ * Optional mimeType for the file
37
149
  */
38
- limit?: number | undefined;
150
+ mimeType?: string | undefined;
39
151
  /**
40
- * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
152
+ * Optional name for the file
41
153
  */
42
- startingAfter?: string | undefined;
154
+ name?: string | undefined;
155
+ };
156
+
157
+ /**
158
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
159
+ */
160
+ export type ListAgentTasksFileAgentsResponseBinaryFormat = {
43
161
  /**
44
- * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
162
+ * base64 encoded content of the file
45
163
  */
46
- endingBefore?: string | undefined;
164
+ bytes: string;
47
165
  /**
48
- * Comma-separated list of task statuses to filter by. Available values: inactive, approval_required, in_progress, errored
166
+ * Optional mimeType for the file
167
+ */
168
+ mimeType?: string | undefined;
169
+ /**
170
+ * Optional name for the file
49
171
  */
50
- status?: Status | undefined;
172
+ name?: string | undefined;
51
173
  };
52
174
 
53
- export const ListAgentTasksKind = {
54
- Task: "task",
55
- } as const;
56
- export type ListAgentTasksKind = ClosedEnum<typeof ListAgentTasksKind>;
175
+ export type ListAgentTasksPartsAgentsResponseFile =
176
+ | ListAgentTasksFileAgentsResponseBinaryFormat
177
+ | ListAgentTasksFileAgentsResponseFileInURIFormat;
57
178
 
58
- export type ListAgentTasksStatus = {
59
- state: string;
179
+ /**
180
+ * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
181
+ */
182
+ export type ListAgentTasksPartsAgentsResponseFilePart = {
183
+ kind:
184
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind;
185
+ file:
186
+ | ListAgentTasksFileAgentsResponseBinaryFormat
187
+ | ListAgentTasksFileAgentsResponseFileInURIFormat;
188
+ metadata?: { [k: string]: any } | undefined;
189
+ };
190
+
191
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind =
192
+ {
193
+ Data: "data",
194
+ } as const;
195
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind =
196
+ ClosedEnum<
197
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind
198
+ >;
199
+
200
+ /**
201
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
202
+ */
203
+ export type ListAgentTasksPartsAgentsResponseDataPart = {
204
+ kind:
205
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind;
206
+ data: { [k: string]: any };
207
+ metadata?: { [k: string]: any } | undefined;
208
+ };
209
+
210
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind =
211
+ {
212
+ Text: "text",
213
+ } as const;
214
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind =
215
+ ClosedEnum<
216
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind
217
+ >;
218
+
219
+ /**
220
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
221
+ */
222
+ export type ListAgentTasksPartsAgentsResponseTextPart = {
223
+ kind:
224
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind;
225
+ text: string;
226
+ };
227
+
228
+ export type ListAgentTasksAgentsResponseParts =
229
+ | ListAgentTasksPartsToolCallPart
230
+ | ListAgentTasksPartsAgentsResponseTextPart
231
+ | ListAgentTasksPartsAgentsResponseDataPart
232
+ | ListAgentTasksPartsAgentsResponseFilePart
233
+ | ListAgentTasksPartsAgentsToolResultPart;
234
+
235
+ /**
236
+ * Optional A2A message providing additional context about the current status
237
+ */
238
+ export type ListAgentTasksTaskStatusMessage = {
239
+ kind: ListAgentTasksAgentsResponseKind;
240
+ messageId: string;
241
+ /**
242
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
243
+ */
244
+ role: ListAgentTasksAgentsExtendedMessageRole;
245
+ parts: Array<
246
+ | ListAgentTasksPartsToolCallPart
247
+ | ListAgentTasksPartsAgentsResponseTextPart
248
+ | ListAgentTasksPartsAgentsResponseDataPart
249
+ | ListAgentTasksPartsAgentsResponseFilePart
250
+ | ListAgentTasksPartsAgentsToolResultPart
251
+ >;
252
+ };
253
+
254
+ /**
255
+ * Current task execution status
256
+ */
257
+ export type ListAgentTasksTaskStatus = {
258
+ /**
259
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
260
+ */
261
+ state: ListAgentTasksTaskState;
262
+ /**
263
+ * ISO 8601 timestamp of when the status was updated
264
+ */
60
265
  timestamp?: string | undefined;
61
- message?: any | undefined;
266
+ /**
267
+ * Optional A2A message providing additional context about the current status
268
+ */
269
+ message?: ListAgentTasksTaskStatusMessage | undefined;
62
270
  };
63
271
 
64
272
  export const ListAgentTasksAgentsKind = {
@@ -69,18 +277,20 @@ export type ListAgentTasksAgentsKind = ClosedEnum<
69
277
  >;
70
278
 
71
279
  /**
72
- * Extended A2A message role
280
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
73
281
  */
74
- export const ListAgentTasksRole = {
282
+ export const ListAgentTasksExtendedMessageRole = {
75
283
  User: "user",
76
284
  Agent: "agent",
77
285
  Tool: "tool",
78
286
  System: "system",
79
287
  } as const;
80
288
  /**
81
- * Extended A2A message role
289
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
82
290
  */
83
- export type ListAgentTasksRole = ClosedEnum<typeof ListAgentTasksRole>;
291
+ export type ListAgentTasksExtendedMessageRole = ClosedEnum<
292
+ typeof ListAgentTasksExtendedMessageRole
293
+ >;
84
294
 
85
295
  export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind = {
86
296
  ToolResult: "tool_result",
@@ -88,7 +298,10 @@ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind = {
88
298
  export type ListAgentTasksPartsAgentsResponse200ApplicationJSONKind =
89
299
  ClosedEnum<typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONKind>;
90
300
 
91
- export type ListAgentTasksParts5 = {
301
+ /**
302
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
303
+ */
304
+ export type ListAgentTasksPartsToolResultPart = {
92
305
  kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONKind;
93
306
  toolCallId: string;
94
307
  result?: any | undefined;
@@ -102,7 +315,10 @@ export type ListAgentTasksPartsAgentsResponse200Kind = ClosedEnum<
102
315
  typeof ListAgentTasksPartsAgentsResponse200Kind
103
316
  >;
104
317
 
105
- export type ListAgentTasksParts4 = {
318
+ /**
319
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
320
+ */
321
+ export type PartsToolCallPart = {
106
322
  kind: ListAgentTasksPartsAgentsResponse200Kind;
107
323
  toolName: string;
108
324
  toolCallId: string;
@@ -157,7 +373,10 @@ export type ListAgentTasksPartsFile =
157
373
  | ListAgentTasksFileBinaryFormat
158
374
  | ListAgentTasksFileFileInURIFormat;
159
375
 
160
- export type ListAgentTasksParts3 = {
376
+ /**
377
+ * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
378
+ */
379
+ export type ListAgentTasksPartsFilePart = {
161
380
  kind: ListAgentTasksPartsAgentsResponseKind;
162
381
  file: ListAgentTasksFileBinaryFormat | ListAgentTasksFileFileInURIFormat;
163
382
  metadata?: { [k: string]: any } | undefined;
@@ -170,7 +389,10 @@ export type ListAgentTasksPartsAgentsKind = ClosedEnum<
170
389
  typeof ListAgentTasksPartsAgentsKind
171
390
  >;
172
391
 
173
- export type ListAgentTasksParts2 = {
392
+ /**
393
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
394
+ */
395
+ export type ListAgentTasksPartsAgentsDataPart = {
174
396
  kind: ListAgentTasksPartsAgentsKind;
175
397
  data: { [k: string]: any };
176
398
  metadata?: { [k: string]: any } | undefined;
@@ -183,116 +405,280 @@ export type ListAgentTasksPartsKind = ClosedEnum<
183
405
  typeof ListAgentTasksPartsKind
184
406
  >;
185
407
 
186
- export type ListAgentTasksParts1 = {
408
+ /**
409
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
410
+ */
411
+ export type ListAgentTasksPartsTextPart = {
187
412
  kind: ListAgentTasksPartsKind;
188
413
  text: string;
189
414
  };
190
415
 
191
416
  export type ListAgentTasksParts =
192
- | ListAgentTasksParts4
193
- | ListAgentTasksParts1
194
- | ListAgentTasksParts2
195
- | ListAgentTasksParts3
196
- | ListAgentTasksParts5;
417
+ | PartsToolCallPart
418
+ | ListAgentTasksPartsTextPart
419
+ | ListAgentTasksPartsAgentsDataPart
420
+ | ListAgentTasksPartsFilePart
421
+ | ListAgentTasksPartsToolResultPart;
197
422
 
198
- export type ListAgentTasksHistory = {
423
+ /**
424
+ * Extended Agent-to-Agent protocol message with support for tool calls and tool results. Extends the base A2A message format with Orquesta-specific features.
425
+ */
426
+ export type ListAgentTasksExtendedA2AMessage = {
199
427
  kind: ListAgentTasksAgentsKind;
428
+ /**
429
+ * Unique identifier for the message
430
+ */
200
431
  messageId: string;
201
432
  /**
202
- * Extended A2A message role
433
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
434
+ */
435
+ role: ListAgentTasksExtendedMessageRole;
436
+ /**
437
+ * Array of message parts (text, file, tool_call, tool_result)
203
438
  */
204
- role: ListAgentTasksRole;
205
439
  parts: Array<
206
- | ListAgentTasksParts4
207
- | ListAgentTasksParts1
208
- | ListAgentTasksParts2
209
- | ListAgentTasksParts3
210
- | ListAgentTasksParts5
440
+ | PartsToolCallPart
441
+ | ListAgentTasksPartsTextPart
442
+ | ListAgentTasksPartsAgentsDataPart
443
+ | ListAgentTasksPartsFilePart
444
+ | ListAgentTasksPartsToolResultPart
211
445
  >;
446
+ /**
447
+ * Associated task ID if applicable
448
+ */
212
449
  taskId?: string | undefined;
450
+ /**
451
+ * Correlation ID for execution tracking
452
+ */
213
453
  contextId?: string | undefined;
454
+ /**
455
+ * Additional message metadata
456
+ */
214
457
  metadata?: { [k: string]: any } | undefined;
215
458
  };
216
459
 
217
- export const ListAgentTasksAgentsResponseKind = {
218
- Artifact: "artifact",
219
- } as const;
220
- export type ListAgentTasksAgentsResponseKind = ClosedEnum<
221
- typeof ListAgentTasksAgentsResponseKind
222
- >;
460
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind =
461
+ {
462
+ Data: "data",
463
+ } as const;
464
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind =
465
+ ClosedEnum<
466
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind
467
+ >;
223
468
 
224
- export type ListAgentTasksArtifacts = {
225
- kind: ListAgentTasksAgentsResponseKind;
226
- artifactId: string;
227
- name: string;
228
- type: string;
229
- url?: string | undefined;
230
- data?: any | undefined;
469
+ /**
470
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
471
+ */
472
+ export type ListAgentTasksPartsDataPart = {
473
+ kind:
474
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind;
475
+ data: { [k: string]: any };
476
+ metadata?: { [k: string]: any } | undefined;
231
477
  };
232
478
 
233
- export type Tasks = {
234
- id: string;
235
- contextId: string;
236
- kind: ListAgentTasksKind;
237
- status: ListAgentTasksStatus;
238
- history: Array<ListAgentTasksHistory>;
239
- artifacts?: Array<ListAgentTasksArtifacts> | undefined;
240
- metadata?: { [k: string]: any } | undefined;
479
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind =
480
+ {
481
+ File: "file",
482
+ } as const;
483
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind =
484
+ ClosedEnum<
485
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind
486
+ >;
487
+
488
+ /**
489
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
490
+ */
491
+ export type ListAgentTasksFileAgentsFileInURIFormat = {
492
+ /**
493
+ * URL for the File content
494
+ */
495
+ uri: string;
496
+ /**
497
+ * Optional mimeType for the file
498
+ */
499
+ mimeType?: string | undefined;
500
+ /**
501
+ * Optional name for the file
502
+ */
503
+ name?: string | undefined;
241
504
  };
242
505
 
243
506
  /**
244
- * Agent tasks retrieved
507
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
245
508
  */
246
- export type ListAgentTasksResponseBody = {
247
- tasks: Array<Tasks>;
248
- overallTotal: number;
509
+ export type ListAgentTasksFileAgentsBinaryFormat = {
510
+ /**
511
+ * base64 encoded content of the file
512
+ */
513
+ bytes: string;
514
+ /**
515
+ * Optional mimeType for the file
516
+ */
517
+ mimeType?: string | undefined;
518
+ /**
519
+ * Optional name for the file
520
+ */
521
+ name?: string | undefined;
249
522
  };
250
523
 
251
- /** @internal */
252
- export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
253
- .nativeEnum(Status);
254
- /** @internal */
255
- export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
256
- Status$inboundSchema;
524
+ export type ListAgentTasksPartsAgentsFile =
525
+ | ListAgentTasksFileAgentsBinaryFormat
526
+ | ListAgentTasksFileAgentsFileInURIFormat;
257
527
 
258
- /** @internal */
259
- export const ListAgentTasksRequest$inboundSchema: z.ZodType<
260
- ListAgentTasksRequest,
261
- z.ZodTypeDef,
262
- unknown
263
- > = z.object({
264
- agent_key: z.string(),
265
- limit: z.number().default(10),
266
- starting_after: z.string().optional(),
267
- ending_before: z.string().optional(),
268
- status: Status$inboundSchema.optional(),
269
- }).transform((v) => {
270
- return remap$(v, {
271
- "agent_key": "agentKey",
272
- "starting_after": "startingAfter",
273
- "ending_before": "endingBefore",
274
- });
275
- });
276
- /** @internal */
277
- export type ListAgentTasksRequest$Outbound = {
278
- agent_key: string;
279
- limit: number;
280
- starting_after?: string | undefined;
281
- ending_before?: string | undefined;
282
- status?: string | undefined;
528
+ /**
529
+ * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
530
+ */
531
+ export type ListAgentTasksPartsAgentsFilePart = {
532
+ kind:
533
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind;
534
+ file:
535
+ | ListAgentTasksFileAgentsBinaryFormat
536
+ | ListAgentTasksFileAgentsFileInURIFormat;
537
+ metadata?: { [k: string]: any } | undefined;
283
538
  };
284
539
 
285
- /** @internal */
286
- export const ListAgentTasksRequest$outboundSchema: z.ZodType<
287
- ListAgentTasksRequest$Outbound,
288
- z.ZodTypeDef,
289
- ListAgentTasksRequest
290
- > = z.object({
291
- agentKey: z.string(),
292
- limit: z.number().default(10),
540
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind =
541
+ {
542
+ Text: "text",
543
+ } as const;
544
+ export type ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind =
545
+ ClosedEnum<
546
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind
547
+ >;
548
+
549
+ /**
550
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
551
+ */
552
+ export type ListAgentTasksPartsAgentsTextPart = {
553
+ kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind;
554
+ text: string;
555
+ };
556
+
557
+ export type ListAgentTasksAgentsParts =
558
+ | ListAgentTasksPartsAgentsTextPart
559
+ | ListAgentTasksPartsAgentsFilePart
560
+ | ListAgentTasksPartsDataPart;
561
+
562
+ /**
563
+ * A file or data artifact produced by the agent during task execution. Follows the A2A SDK Artifact structure with required name field.
564
+ */
565
+ export type ListAgentTasksTaskArtifact = {
566
+ /**
567
+ * Unique identifier for the artifact (ULID format)
568
+ */
569
+ artifactId: string;
570
+ /**
571
+ * Required name for the artifact (e.g., filename or descriptive title)
572
+ */
573
+ name: string;
574
+ /**
575
+ * Optional human-readable description of the artifact
576
+ */
577
+ description?: string | undefined;
578
+ /**
579
+ * Array of artifact content parts (text, file, or data). Does not include tool_call or tool_result parts.
580
+ */
581
+ parts: Array<
582
+ | ListAgentTasksPartsAgentsTextPart
583
+ | ListAgentTasksPartsAgentsFilePart
584
+ | ListAgentTasksPartsDataPart
585
+ >;
586
+ /**
587
+ * File extensions associated with this artifact (e.g., [".pdf"])
588
+ */
589
+ extensions?: Array<string> | undefined;
590
+ /**
591
+ * Additional artifact metadata as key-value pairs
592
+ */
593
+ metadata?: { [k: string]: any } | undefined;
594
+ };
595
+
596
+ /**
597
+ * Agent task execution response format with full conversation history and artifacts. Used for API responses when retrieving task details.
598
+ */
599
+ export type ExtendedTaskResponse = {
600
+ /**
601
+ * Unique task execution identifier
602
+ */
603
+ id: string;
604
+ /**
605
+ * Correlation ID for tracking
606
+ */
607
+ contextId: string;
608
+ /**
609
+ * A2A entity type
610
+ */
611
+ kind: ListAgentTasksKind;
612
+ /**
613
+ * Current task execution status
614
+ */
615
+ status: ListAgentTasksTaskStatus;
616
+ /**
617
+ * Conversation history with all messages exchanged
618
+ */
619
+ history: Array<ListAgentTasksExtendedA2AMessage>;
620
+ /**
621
+ * Optional files or data produced during execution
622
+ */
623
+ artifacts?: Array<ListAgentTasksTaskArtifact> | undefined;
624
+ /**
625
+ * Additional task metadata
626
+ */
627
+ metadata?: { [k: string]: any } | undefined;
628
+ };
629
+
630
+ /**
631
+ * Response format for listing all tasks associated with an agent. Includes paginated task array and total count.
632
+ */
633
+ export type ListAgentTasksAgentTasksListResponse = {
634
+ /**
635
+ * Array of agent tasks with full execution details
636
+ */
637
+ tasks: Array<ExtendedTaskResponse>;
638
+ /**
639
+ * Total count of tasks for this agent (across all pages, unfiltered)
640
+ */
641
+ overallTotal: number;
642
+ };
643
+
644
+ /** @internal */
645
+ export const ListAgentTasksRequest$inboundSchema: z.ZodType<
646
+ ListAgentTasksRequest,
647
+ z.ZodTypeDef,
648
+ unknown
649
+ > = z.object({
650
+ agent_key: z.string(),
651
+ limit: z.number().default(10),
652
+ starting_after: z.string().optional(),
653
+ ending_before: z.string().optional(),
654
+ status: z.string().optional(),
655
+ }).transform((v) => {
656
+ return remap$(v, {
657
+ "agent_key": "agentKey",
658
+ "starting_after": "startingAfter",
659
+ "ending_before": "endingBefore",
660
+ });
661
+ });
662
+ /** @internal */
663
+ export type ListAgentTasksRequest$Outbound = {
664
+ agent_key: string;
665
+ limit: number;
666
+ starting_after?: string | undefined;
667
+ ending_before?: string | undefined;
668
+ status?: string | undefined;
669
+ };
670
+
671
+ /** @internal */
672
+ export const ListAgentTasksRequest$outboundSchema: z.ZodType<
673
+ ListAgentTasksRequest$Outbound,
674
+ z.ZodTypeDef,
675
+ ListAgentTasksRequest
676
+ > = z.object({
677
+ agentKey: z.string(),
678
+ limit: z.number().default(10),
293
679
  startingAfter: z.string().optional(),
294
680
  endingBefore: z.string().optional(),
295
- status: Status$outboundSchema.optional(),
681
+ status: z.string().optional(),
296
682
  }).transform((v) => {
297
683
  return remap$(v, {
298
684
  agentKey: "agent_key",
@@ -328,218 +714,1416 @@ export const ListAgentTasksKind$outboundSchema: z.ZodNativeEnum<
328
714
  > = ListAgentTasksKind$inboundSchema;
329
715
 
330
716
  /** @internal */
331
- export const ListAgentTasksStatus$inboundSchema: z.ZodType<
332
- ListAgentTasksStatus,
717
+ export const ListAgentTasksTaskState$inboundSchema: z.ZodNativeEnum<
718
+ typeof ListAgentTasksTaskState
719
+ > = z.nativeEnum(ListAgentTasksTaskState);
720
+ /** @internal */
721
+ export const ListAgentTasksTaskState$outboundSchema: z.ZodNativeEnum<
722
+ typeof ListAgentTasksTaskState
723
+ > = ListAgentTasksTaskState$inboundSchema;
724
+
725
+ /** @internal */
726
+ export const ListAgentTasksAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
727
+ typeof ListAgentTasksAgentsResponseKind
728
+ > = z.nativeEnum(ListAgentTasksAgentsResponseKind);
729
+ /** @internal */
730
+ export const ListAgentTasksAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
731
+ typeof ListAgentTasksAgentsResponseKind
732
+ > = ListAgentTasksAgentsResponseKind$inboundSchema;
733
+
734
+ /** @internal */
735
+ export const ListAgentTasksAgentsExtendedMessageRole$inboundSchema:
736
+ z.ZodNativeEnum<typeof ListAgentTasksAgentsExtendedMessageRole> = z
737
+ .nativeEnum(ListAgentTasksAgentsExtendedMessageRole);
738
+ /** @internal */
739
+ export const ListAgentTasksAgentsExtendedMessageRole$outboundSchema:
740
+ z.ZodNativeEnum<typeof ListAgentTasksAgentsExtendedMessageRole> =
741
+ ListAgentTasksAgentsExtendedMessageRole$inboundSchema;
742
+
743
+ /** @internal */
744
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind$inboundSchema:
745
+ z.ZodNativeEnum<
746
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind
747
+ > = z.nativeEnum(
748
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind,
749
+ );
750
+ /** @internal */
751
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind$outboundSchema:
752
+ z.ZodNativeEnum<
753
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind
754
+ > =
755
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind$inboundSchema;
756
+
757
+ /** @internal */
758
+ export const ListAgentTasksPartsAgentsToolResultPart$inboundSchema: z.ZodType<
759
+ ListAgentTasksPartsAgentsToolResultPart,
333
760
  z.ZodTypeDef,
334
761
  unknown
335
762
  > = z.object({
336
- state: z.string(),
337
- timestamp: z.string().optional(),
338
- message: z.any().optional(),
763
+ kind:
764
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind$inboundSchema,
765
+ tool_call_id: z.string(),
766
+ result: z.any().optional(),
767
+ metadata: z.record(z.any()).optional(),
768
+ }).transform((v) => {
769
+ return remap$(v, {
770
+ "tool_call_id": "toolCallId",
771
+ });
339
772
  });
340
773
  /** @internal */
341
- export type ListAgentTasksStatus$Outbound = {
342
- state: string;
343
- timestamp?: string | undefined;
344
- message?: any | undefined;
774
+ export type ListAgentTasksPartsAgentsToolResultPart$Outbound = {
775
+ kind: string;
776
+ tool_call_id: string;
777
+ result?: any | undefined;
778
+ metadata?: { [k: string]: any } | undefined;
345
779
  };
346
780
 
347
781
  /** @internal */
348
- export const ListAgentTasksStatus$outboundSchema: z.ZodType<
349
- ListAgentTasksStatus$Outbound,
782
+ export const ListAgentTasksPartsAgentsToolResultPart$outboundSchema: z.ZodType<
783
+ ListAgentTasksPartsAgentsToolResultPart$Outbound,
350
784
  z.ZodTypeDef,
351
- ListAgentTasksStatus
785
+ ListAgentTasksPartsAgentsToolResultPart
352
786
  > = z.object({
353
- state: z.string(),
354
- timestamp: z.string().optional(),
355
- message: z.any().optional(),
787
+ kind:
788
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage5Kind$outboundSchema,
789
+ toolCallId: z.string(),
790
+ result: z.any().optional(),
791
+ metadata: z.record(z.any()).optional(),
792
+ }).transform((v) => {
793
+ return remap$(v, {
794
+ toolCallId: "tool_call_id",
795
+ });
356
796
  });
357
797
 
358
- export function listAgentTasksStatusToJSON(
359
- listAgentTasksStatus: ListAgentTasksStatus,
798
+ export function listAgentTasksPartsAgentsToolResultPartToJSON(
799
+ listAgentTasksPartsAgentsToolResultPart:
800
+ ListAgentTasksPartsAgentsToolResultPart,
360
801
  ): string {
361
802
  return JSON.stringify(
362
- ListAgentTasksStatus$outboundSchema.parse(listAgentTasksStatus),
803
+ ListAgentTasksPartsAgentsToolResultPart$outboundSchema.parse(
804
+ listAgentTasksPartsAgentsToolResultPart,
805
+ ),
363
806
  );
364
807
  }
365
- export function listAgentTasksStatusFromJSON(
808
+ export function listAgentTasksPartsAgentsToolResultPartFromJSON(
366
809
  jsonString: string,
367
- ): SafeParseResult<ListAgentTasksStatus, SDKValidationError> {
810
+ ): SafeParseResult<
811
+ ListAgentTasksPartsAgentsToolResultPart,
812
+ SDKValidationError
813
+ > {
368
814
  return safeParse(
369
815
  jsonString,
370
- (x) => ListAgentTasksStatus$inboundSchema.parse(JSON.parse(x)),
371
- `Failed to parse 'ListAgentTasksStatus' from JSON`,
816
+ (x) =>
817
+ ListAgentTasksPartsAgentsToolResultPart$inboundSchema.parse(
818
+ JSON.parse(x),
819
+ ),
820
+ `Failed to parse 'ListAgentTasksPartsAgentsToolResultPart' from JSON`,
372
821
  );
373
822
  }
374
823
 
375
824
  /** @internal */
376
- export const ListAgentTasksAgentsKind$inboundSchema: z.ZodNativeEnum<
377
- typeof ListAgentTasksAgentsKind
378
- > = z.nativeEnum(ListAgentTasksAgentsKind);
379
- /** @internal */
380
- export const ListAgentTasksAgentsKind$outboundSchema: z.ZodNativeEnum<
381
- typeof ListAgentTasksAgentsKind
382
- > = ListAgentTasksAgentsKind$inboundSchema;
383
-
384
- /** @internal */
385
- export const ListAgentTasksRole$inboundSchema: z.ZodNativeEnum<
386
- typeof ListAgentTasksRole
387
- > = z.nativeEnum(ListAgentTasksRole);
388
- /** @internal */
389
- export const ListAgentTasksRole$outboundSchema: z.ZodNativeEnum<
390
- typeof ListAgentTasksRole
391
- > = ListAgentTasksRole$inboundSchema;
392
-
393
- /** @internal */
394
- export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
825
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind$inboundSchema:
395
826
  z.ZodNativeEnum<
396
- typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONKind
397
- > = z.nativeEnum(ListAgentTasksPartsAgentsResponse200ApplicationJSONKind);
827
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind
828
+ > = z.nativeEnum(
829
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind,
830
+ );
398
831
  /** @internal */
399
- export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
832
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind$outboundSchema:
400
833
  z.ZodNativeEnum<
401
- typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONKind
402
- > = ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
834
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind
835
+ > =
836
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind$inboundSchema;
403
837
 
404
838
  /** @internal */
405
- export const ListAgentTasksParts5$inboundSchema: z.ZodType<
406
- ListAgentTasksParts5,
839
+ export const ListAgentTasksPartsToolCallPart$inboundSchema: z.ZodType<
840
+ ListAgentTasksPartsToolCallPart,
407
841
  z.ZodTypeDef,
408
842
  unknown
409
843
  > = z.object({
410
- kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
844
+ kind:
845
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind$inboundSchema,
846
+ tool_name: z.string(),
411
847
  tool_call_id: z.string(),
412
- result: z.any().optional(),
848
+ arguments: z.record(z.any()),
413
849
  metadata: z.record(z.any()).optional(),
414
850
  }).transform((v) => {
415
851
  return remap$(v, {
852
+ "tool_name": "toolName",
416
853
  "tool_call_id": "toolCallId",
417
854
  });
418
855
  });
419
856
  /** @internal */
420
- export type ListAgentTasksParts5$Outbound = {
857
+ export type ListAgentTasksPartsToolCallPart$Outbound = {
858
+ kind: string;
859
+ tool_name: string;
860
+ tool_call_id: string;
861
+ arguments: { [k: string]: any };
862
+ metadata?: { [k: string]: any } | undefined;
863
+ };
864
+
865
+ /** @internal */
866
+ export const ListAgentTasksPartsToolCallPart$outboundSchema: z.ZodType<
867
+ ListAgentTasksPartsToolCallPart$Outbound,
868
+ z.ZodTypeDef,
869
+ ListAgentTasksPartsToolCallPart
870
+ > = z.object({
871
+ kind:
872
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessageKind$outboundSchema,
873
+ toolName: z.string(),
874
+ toolCallId: z.string(),
875
+ arguments: z.record(z.any()),
876
+ metadata: z.record(z.any()).optional(),
877
+ }).transform((v) => {
878
+ return remap$(v, {
879
+ toolName: "tool_name",
880
+ toolCallId: "tool_call_id",
881
+ });
882
+ });
883
+
884
+ export function listAgentTasksPartsToolCallPartToJSON(
885
+ listAgentTasksPartsToolCallPart: ListAgentTasksPartsToolCallPart,
886
+ ): string {
887
+ return JSON.stringify(
888
+ ListAgentTasksPartsToolCallPart$outboundSchema.parse(
889
+ listAgentTasksPartsToolCallPart,
890
+ ),
891
+ );
892
+ }
893
+ export function listAgentTasksPartsToolCallPartFromJSON(
894
+ jsonString: string,
895
+ ): SafeParseResult<ListAgentTasksPartsToolCallPart, SDKValidationError> {
896
+ return safeParse(
897
+ jsonString,
898
+ (x) => ListAgentTasksPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
899
+ `Failed to parse 'ListAgentTasksPartsToolCallPart' from JSON`,
900
+ );
901
+ }
902
+
903
+ /** @internal */
904
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind$inboundSchema:
905
+ z.ZodNativeEnum<
906
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind
907
+ > = z.nativeEnum(
908
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind,
909
+ );
910
+ /** @internal */
911
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind$outboundSchema:
912
+ z.ZodNativeEnum<
913
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind
914
+ > =
915
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind$inboundSchema;
916
+
917
+ /** @internal */
918
+ export const ListAgentTasksFileAgentsResponseFileInURIFormat$inboundSchema:
919
+ z.ZodType<
920
+ ListAgentTasksFileAgentsResponseFileInURIFormat,
921
+ z.ZodTypeDef,
922
+ unknown
923
+ > = z.object({
924
+ uri: z.string(),
925
+ mimeType: z.string().optional(),
926
+ name: z.string().optional(),
927
+ });
928
+ /** @internal */
929
+ export type ListAgentTasksFileAgentsResponseFileInURIFormat$Outbound = {
930
+ uri: string;
931
+ mimeType?: string | undefined;
932
+ name?: string | undefined;
933
+ };
934
+
935
+ /** @internal */
936
+ export const ListAgentTasksFileAgentsResponseFileInURIFormat$outboundSchema:
937
+ z.ZodType<
938
+ ListAgentTasksFileAgentsResponseFileInURIFormat$Outbound,
939
+ z.ZodTypeDef,
940
+ ListAgentTasksFileAgentsResponseFileInURIFormat
941
+ > = z.object({
942
+ uri: z.string(),
943
+ mimeType: z.string().optional(),
944
+ name: z.string().optional(),
945
+ });
946
+
947
+ export function listAgentTasksFileAgentsResponseFileInURIFormatToJSON(
948
+ listAgentTasksFileAgentsResponseFileInURIFormat:
949
+ ListAgentTasksFileAgentsResponseFileInURIFormat,
950
+ ): string {
951
+ return JSON.stringify(
952
+ ListAgentTasksFileAgentsResponseFileInURIFormat$outboundSchema.parse(
953
+ listAgentTasksFileAgentsResponseFileInURIFormat,
954
+ ),
955
+ );
956
+ }
957
+ export function listAgentTasksFileAgentsResponseFileInURIFormatFromJSON(
958
+ jsonString: string,
959
+ ): SafeParseResult<
960
+ ListAgentTasksFileAgentsResponseFileInURIFormat,
961
+ SDKValidationError
962
+ > {
963
+ return safeParse(
964
+ jsonString,
965
+ (x) =>
966
+ ListAgentTasksFileAgentsResponseFileInURIFormat$inboundSchema.parse(
967
+ JSON.parse(x),
968
+ ),
969
+ `Failed to parse 'ListAgentTasksFileAgentsResponseFileInURIFormat' from JSON`,
970
+ );
971
+ }
972
+
973
+ /** @internal */
974
+ export const ListAgentTasksFileAgentsResponseBinaryFormat$inboundSchema:
975
+ z.ZodType<
976
+ ListAgentTasksFileAgentsResponseBinaryFormat,
977
+ z.ZodTypeDef,
978
+ unknown
979
+ > = z.object({
980
+ bytes: z.string(),
981
+ mimeType: z.string().optional(),
982
+ name: z.string().optional(),
983
+ });
984
+ /** @internal */
985
+ export type ListAgentTasksFileAgentsResponseBinaryFormat$Outbound = {
986
+ bytes: string;
987
+ mimeType?: string | undefined;
988
+ name?: string | undefined;
989
+ };
990
+
991
+ /** @internal */
992
+ export const ListAgentTasksFileAgentsResponseBinaryFormat$outboundSchema:
993
+ z.ZodType<
994
+ ListAgentTasksFileAgentsResponseBinaryFormat$Outbound,
995
+ z.ZodTypeDef,
996
+ ListAgentTasksFileAgentsResponseBinaryFormat
997
+ > = z.object({
998
+ bytes: z.string(),
999
+ mimeType: z.string().optional(),
1000
+ name: z.string().optional(),
1001
+ });
1002
+
1003
+ export function listAgentTasksFileAgentsResponseBinaryFormatToJSON(
1004
+ listAgentTasksFileAgentsResponseBinaryFormat:
1005
+ ListAgentTasksFileAgentsResponseBinaryFormat,
1006
+ ): string {
1007
+ return JSON.stringify(
1008
+ ListAgentTasksFileAgentsResponseBinaryFormat$outboundSchema.parse(
1009
+ listAgentTasksFileAgentsResponseBinaryFormat,
1010
+ ),
1011
+ );
1012
+ }
1013
+ export function listAgentTasksFileAgentsResponseBinaryFormatFromJSON(
1014
+ jsonString: string,
1015
+ ): SafeParseResult<
1016
+ ListAgentTasksFileAgentsResponseBinaryFormat,
1017
+ SDKValidationError
1018
+ > {
1019
+ return safeParse(
1020
+ jsonString,
1021
+ (x) =>
1022
+ ListAgentTasksFileAgentsResponseBinaryFormat$inboundSchema.parse(
1023
+ JSON.parse(x),
1024
+ ),
1025
+ `Failed to parse 'ListAgentTasksFileAgentsResponseBinaryFormat' from JSON`,
1026
+ );
1027
+ }
1028
+
1029
+ /** @internal */
1030
+ export const ListAgentTasksPartsAgentsResponseFile$inboundSchema: z.ZodType<
1031
+ ListAgentTasksPartsAgentsResponseFile,
1032
+ z.ZodTypeDef,
1033
+ unknown
1034
+ > = z.union([
1035
+ z.lazy(() => ListAgentTasksFileAgentsResponseBinaryFormat$inboundSchema),
1036
+ z.lazy(() => ListAgentTasksFileAgentsResponseFileInURIFormat$inboundSchema),
1037
+ ]);
1038
+ /** @internal */
1039
+ export type ListAgentTasksPartsAgentsResponseFile$Outbound =
1040
+ | ListAgentTasksFileAgentsResponseBinaryFormat$Outbound
1041
+ | ListAgentTasksFileAgentsResponseFileInURIFormat$Outbound;
1042
+
1043
+ /** @internal */
1044
+ export const ListAgentTasksPartsAgentsResponseFile$outboundSchema: z.ZodType<
1045
+ ListAgentTasksPartsAgentsResponseFile$Outbound,
1046
+ z.ZodTypeDef,
1047
+ ListAgentTasksPartsAgentsResponseFile
1048
+ > = z.union([
1049
+ z.lazy(() => ListAgentTasksFileAgentsResponseBinaryFormat$outboundSchema),
1050
+ z.lazy(() => ListAgentTasksFileAgentsResponseFileInURIFormat$outboundSchema),
1051
+ ]);
1052
+
1053
+ export function listAgentTasksPartsAgentsResponseFileToJSON(
1054
+ listAgentTasksPartsAgentsResponseFile: ListAgentTasksPartsAgentsResponseFile,
1055
+ ): string {
1056
+ return JSON.stringify(
1057
+ ListAgentTasksPartsAgentsResponseFile$outboundSchema.parse(
1058
+ listAgentTasksPartsAgentsResponseFile,
1059
+ ),
1060
+ );
1061
+ }
1062
+ export function listAgentTasksPartsAgentsResponseFileFromJSON(
1063
+ jsonString: string,
1064
+ ): SafeParseResult<ListAgentTasksPartsAgentsResponseFile, SDKValidationError> {
1065
+ return safeParse(
1066
+ jsonString,
1067
+ (x) =>
1068
+ ListAgentTasksPartsAgentsResponseFile$inboundSchema.parse(JSON.parse(x)),
1069
+ `Failed to parse 'ListAgentTasksPartsAgentsResponseFile' from JSON`,
1070
+ );
1071
+ }
1072
+
1073
+ /** @internal */
1074
+ export const ListAgentTasksPartsAgentsResponseFilePart$inboundSchema: z.ZodType<
1075
+ ListAgentTasksPartsAgentsResponseFilePart,
1076
+ z.ZodTypeDef,
1077
+ unknown
1078
+ > = z.object({
1079
+ kind:
1080
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind$inboundSchema,
1081
+ file: z.union([
1082
+ z.lazy(() => ListAgentTasksFileAgentsResponseBinaryFormat$inboundSchema),
1083
+ z.lazy(() => ListAgentTasksFileAgentsResponseFileInURIFormat$inboundSchema),
1084
+ ]),
1085
+ metadata: z.record(z.any()).optional(),
1086
+ });
1087
+ /** @internal */
1088
+ export type ListAgentTasksPartsAgentsResponseFilePart$Outbound = {
1089
+ kind: string;
1090
+ file:
1091
+ | ListAgentTasksFileAgentsResponseBinaryFormat$Outbound
1092
+ | ListAgentTasksFileAgentsResponseFileInURIFormat$Outbound;
1093
+ metadata?: { [k: string]: any } | undefined;
1094
+ };
1095
+
1096
+ /** @internal */
1097
+ export const ListAgentTasksPartsAgentsResponseFilePart$outboundSchema:
1098
+ z.ZodType<
1099
+ ListAgentTasksPartsAgentsResponseFilePart$Outbound,
1100
+ z.ZodTypeDef,
1101
+ ListAgentTasksPartsAgentsResponseFilePart
1102
+ > = z.object({
1103
+ kind:
1104
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusKind$outboundSchema,
1105
+ file: z.union([
1106
+ z.lazy(() => ListAgentTasksFileAgentsResponseBinaryFormat$outboundSchema),
1107
+ z.lazy(() =>
1108
+ ListAgentTasksFileAgentsResponseFileInURIFormat$outboundSchema
1109
+ ),
1110
+ ]),
1111
+ metadata: z.record(z.any()).optional(),
1112
+ });
1113
+
1114
+ export function listAgentTasksPartsAgentsResponseFilePartToJSON(
1115
+ listAgentTasksPartsAgentsResponseFilePart:
1116
+ ListAgentTasksPartsAgentsResponseFilePart,
1117
+ ): string {
1118
+ return JSON.stringify(
1119
+ ListAgentTasksPartsAgentsResponseFilePart$outboundSchema.parse(
1120
+ listAgentTasksPartsAgentsResponseFilePart,
1121
+ ),
1122
+ );
1123
+ }
1124
+ export function listAgentTasksPartsAgentsResponseFilePartFromJSON(
1125
+ jsonString: string,
1126
+ ): SafeParseResult<
1127
+ ListAgentTasksPartsAgentsResponseFilePart,
1128
+ SDKValidationError
1129
+ > {
1130
+ return safeParse(
1131
+ jsonString,
1132
+ (x) =>
1133
+ ListAgentTasksPartsAgentsResponseFilePart$inboundSchema.parse(
1134
+ JSON.parse(x),
1135
+ ),
1136
+ `Failed to parse 'ListAgentTasksPartsAgentsResponseFilePart' from JSON`,
1137
+ );
1138
+ }
1139
+
1140
+ /** @internal */
1141
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind$inboundSchema:
1142
+ z.ZodNativeEnum<
1143
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind
1144
+ > = z.nativeEnum(
1145
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind,
1146
+ );
1147
+ /** @internal */
1148
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind$outboundSchema:
1149
+ z.ZodNativeEnum<
1150
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind
1151
+ > =
1152
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind$inboundSchema;
1153
+
1154
+ /** @internal */
1155
+ export const ListAgentTasksPartsAgentsResponseDataPart$inboundSchema: z.ZodType<
1156
+ ListAgentTasksPartsAgentsResponseDataPart,
1157
+ z.ZodTypeDef,
1158
+ unknown
1159
+ > = z.object({
1160
+ kind:
1161
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind$inboundSchema,
1162
+ data: z.record(z.any()),
1163
+ metadata: z.record(z.any()).optional(),
1164
+ });
1165
+ /** @internal */
1166
+ export type ListAgentTasksPartsAgentsResponseDataPart$Outbound = {
1167
+ kind: string;
1168
+ data: { [k: string]: any };
1169
+ metadata?: { [k: string]: any } | undefined;
1170
+ };
1171
+
1172
+ /** @internal */
1173
+ export const ListAgentTasksPartsAgentsResponseDataPart$outboundSchema:
1174
+ z.ZodType<
1175
+ ListAgentTasksPartsAgentsResponseDataPart$Outbound,
1176
+ z.ZodTypeDef,
1177
+ ListAgentTasksPartsAgentsResponseDataPart
1178
+ > = z.object({
1179
+ kind:
1180
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage2Kind$outboundSchema,
1181
+ data: z.record(z.any()),
1182
+ metadata: z.record(z.any()).optional(),
1183
+ });
1184
+
1185
+ export function listAgentTasksPartsAgentsResponseDataPartToJSON(
1186
+ listAgentTasksPartsAgentsResponseDataPart:
1187
+ ListAgentTasksPartsAgentsResponseDataPart,
1188
+ ): string {
1189
+ return JSON.stringify(
1190
+ ListAgentTasksPartsAgentsResponseDataPart$outboundSchema.parse(
1191
+ listAgentTasksPartsAgentsResponseDataPart,
1192
+ ),
1193
+ );
1194
+ }
1195
+ export function listAgentTasksPartsAgentsResponseDataPartFromJSON(
1196
+ jsonString: string,
1197
+ ): SafeParseResult<
1198
+ ListAgentTasksPartsAgentsResponseDataPart,
1199
+ SDKValidationError
1200
+ > {
1201
+ return safeParse(
1202
+ jsonString,
1203
+ (x) =>
1204
+ ListAgentTasksPartsAgentsResponseDataPart$inboundSchema.parse(
1205
+ JSON.parse(x),
1206
+ ),
1207
+ `Failed to parse 'ListAgentTasksPartsAgentsResponseDataPart' from JSON`,
1208
+ );
1209
+ }
1210
+
1211
+ /** @internal */
1212
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind$inboundSchema:
1213
+ z.ZodNativeEnum<
1214
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind
1215
+ > = z.nativeEnum(
1216
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind,
1217
+ );
1218
+ /** @internal */
1219
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind$outboundSchema:
1220
+ z.ZodNativeEnum<
1221
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind
1222
+ > =
1223
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind$inboundSchema;
1224
+
1225
+ /** @internal */
1226
+ export const ListAgentTasksPartsAgentsResponseTextPart$inboundSchema: z.ZodType<
1227
+ ListAgentTasksPartsAgentsResponseTextPart,
1228
+ z.ZodTypeDef,
1229
+ unknown
1230
+ > = z.object({
1231
+ kind:
1232
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind$inboundSchema,
1233
+ text: z.string(),
1234
+ });
1235
+ /** @internal */
1236
+ export type ListAgentTasksPartsAgentsResponseTextPart$Outbound = {
1237
+ kind: string;
1238
+ text: string;
1239
+ };
1240
+
1241
+ /** @internal */
1242
+ export const ListAgentTasksPartsAgentsResponseTextPart$outboundSchema:
1243
+ z.ZodType<
1244
+ ListAgentTasksPartsAgentsResponseTextPart$Outbound,
1245
+ z.ZodTypeDef,
1246
+ ListAgentTasksPartsAgentsResponseTextPart
1247
+ > = z.object({
1248
+ kind:
1249
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksStatusMessage1Kind$outboundSchema,
1250
+ text: z.string(),
1251
+ });
1252
+
1253
+ export function listAgentTasksPartsAgentsResponseTextPartToJSON(
1254
+ listAgentTasksPartsAgentsResponseTextPart:
1255
+ ListAgentTasksPartsAgentsResponseTextPart,
1256
+ ): string {
1257
+ return JSON.stringify(
1258
+ ListAgentTasksPartsAgentsResponseTextPart$outboundSchema.parse(
1259
+ listAgentTasksPartsAgentsResponseTextPart,
1260
+ ),
1261
+ );
1262
+ }
1263
+ export function listAgentTasksPartsAgentsResponseTextPartFromJSON(
1264
+ jsonString: string,
1265
+ ): SafeParseResult<
1266
+ ListAgentTasksPartsAgentsResponseTextPart,
1267
+ SDKValidationError
1268
+ > {
1269
+ return safeParse(
1270
+ jsonString,
1271
+ (x) =>
1272
+ ListAgentTasksPartsAgentsResponseTextPart$inboundSchema.parse(
1273
+ JSON.parse(x),
1274
+ ),
1275
+ `Failed to parse 'ListAgentTasksPartsAgentsResponseTextPart' from JSON`,
1276
+ );
1277
+ }
1278
+
1279
+ /** @internal */
1280
+ export const ListAgentTasksAgentsResponseParts$inboundSchema: z.ZodType<
1281
+ ListAgentTasksAgentsResponseParts,
1282
+ z.ZodTypeDef,
1283
+ unknown
1284
+ > = z.union([
1285
+ z.lazy(() => ListAgentTasksPartsToolCallPart$inboundSchema),
1286
+ z.lazy(() => ListAgentTasksPartsAgentsResponseTextPart$inboundSchema),
1287
+ z.lazy(() => ListAgentTasksPartsAgentsResponseDataPart$inboundSchema),
1288
+ z.lazy(() => ListAgentTasksPartsAgentsResponseFilePart$inboundSchema),
1289
+ z.lazy(() => ListAgentTasksPartsAgentsToolResultPart$inboundSchema),
1290
+ ]);
1291
+ /** @internal */
1292
+ export type ListAgentTasksAgentsResponseParts$Outbound =
1293
+ | ListAgentTasksPartsToolCallPart$Outbound
1294
+ | ListAgentTasksPartsAgentsResponseTextPart$Outbound
1295
+ | ListAgentTasksPartsAgentsResponseDataPart$Outbound
1296
+ | ListAgentTasksPartsAgentsResponseFilePart$Outbound
1297
+ | ListAgentTasksPartsAgentsToolResultPart$Outbound;
1298
+
1299
+ /** @internal */
1300
+ export const ListAgentTasksAgentsResponseParts$outboundSchema: z.ZodType<
1301
+ ListAgentTasksAgentsResponseParts$Outbound,
1302
+ z.ZodTypeDef,
1303
+ ListAgentTasksAgentsResponseParts
1304
+ > = z.union([
1305
+ z.lazy(() => ListAgentTasksPartsToolCallPart$outboundSchema),
1306
+ z.lazy(() => ListAgentTasksPartsAgentsResponseTextPart$outboundSchema),
1307
+ z.lazy(() => ListAgentTasksPartsAgentsResponseDataPart$outboundSchema),
1308
+ z.lazy(() => ListAgentTasksPartsAgentsResponseFilePart$outboundSchema),
1309
+ z.lazy(() => ListAgentTasksPartsAgentsToolResultPart$outboundSchema),
1310
+ ]);
1311
+
1312
+ export function listAgentTasksAgentsResponsePartsToJSON(
1313
+ listAgentTasksAgentsResponseParts: ListAgentTasksAgentsResponseParts,
1314
+ ): string {
1315
+ return JSON.stringify(
1316
+ ListAgentTasksAgentsResponseParts$outboundSchema.parse(
1317
+ listAgentTasksAgentsResponseParts,
1318
+ ),
1319
+ );
1320
+ }
1321
+ export function listAgentTasksAgentsResponsePartsFromJSON(
1322
+ jsonString: string,
1323
+ ): SafeParseResult<ListAgentTasksAgentsResponseParts, SDKValidationError> {
1324
+ return safeParse(
1325
+ jsonString,
1326
+ (x) => ListAgentTasksAgentsResponseParts$inboundSchema.parse(JSON.parse(x)),
1327
+ `Failed to parse 'ListAgentTasksAgentsResponseParts' from JSON`,
1328
+ );
1329
+ }
1330
+
1331
+ /** @internal */
1332
+ export const ListAgentTasksTaskStatusMessage$inboundSchema: z.ZodType<
1333
+ ListAgentTasksTaskStatusMessage,
1334
+ z.ZodTypeDef,
1335
+ unknown
1336
+ > = z.object({
1337
+ kind: ListAgentTasksAgentsResponseKind$inboundSchema,
1338
+ messageId: z.string(),
1339
+ role: ListAgentTasksAgentsExtendedMessageRole$inboundSchema,
1340
+ parts: z.array(
1341
+ z.union([
1342
+ z.lazy(() => ListAgentTasksPartsToolCallPart$inboundSchema),
1343
+ z.lazy(() => ListAgentTasksPartsAgentsResponseTextPart$inboundSchema),
1344
+ z.lazy(() => ListAgentTasksPartsAgentsResponseDataPart$inboundSchema),
1345
+ z.lazy(() => ListAgentTasksPartsAgentsResponseFilePart$inboundSchema),
1346
+ z.lazy(() => ListAgentTasksPartsAgentsToolResultPart$inboundSchema),
1347
+ ]),
1348
+ ),
1349
+ });
1350
+ /** @internal */
1351
+ export type ListAgentTasksTaskStatusMessage$Outbound = {
1352
+ kind: string;
1353
+ messageId: string;
1354
+ role: string;
1355
+ parts: Array<
1356
+ | ListAgentTasksPartsToolCallPart$Outbound
1357
+ | ListAgentTasksPartsAgentsResponseTextPart$Outbound
1358
+ | ListAgentTasksPartsAgentsResponseDataPart$Outbound
1359
+ | ListAgentTasksPartsAgentsResponseFilePart$Outbound
1360
+ | ListAgentTasksPartsAgentsToolResultPart$Outbound
1361
+ >;
1362
+ };
1363
+
1364
+ /** @internal */
1365
+ export const ListAgentTasksTaskStatusMessage$outboundSchema: z.ZodType<
1366
+ ListAgentTasksTaskStatusMessage$Outbound,
1367
+ z.ZodTypeDef,
1368
+ ListAgentTasksTaskStatusMessage
1369
+ > = z.object({
1370
+ kind: ListAgentTasksAgentsResponseKind$outboundSchema,
1371
+ messageId: z.string(),
1372
+ role: ListAgentTasksAgentsExtendedMessageRole$outboundSchema,
1373
+ parts: z.array(
1374
+ z.union([
1375
+ z.lazy(() => ListAgentTasksPartsToolCallPart$outboundSchema),
1376
+ z.lazy(() => ListAgentTasksPartsAgentsResponseTextPart$outboundSchema),
1377
+ z.lazy(() => ListAgentTasksPartsAgentsResponseDataPart$outboundSchema),
1378
+ z.lazy(() => ListAgentTasksPartsAgentsResponseFilePart$outboundSchema),
1379
+ z.lazy(() => ListAgentTasksPartsAgentsToolResultPart$outboundSchema),
1380
+ ]),
1381
+ ),
1382
+ });
1383
+
1384
+ export function listAgentTasksTaskStatusMessageToJSON(
1385
+ listAgentTasksTaskStatusMessage: ListAgentTasksTaskStatusMessage,
1386
+ ): string {
1387
+ return JSON.stringify(
1388
+ ListAgentTasksTaskStatusMessage$outboundSchema.parse(
1389
+ listAgentTasksTaskStatusMessage,
1390
+ ),
1391
+ );
1392
+ }
1393
+ export function listAgentTasksTaskStatusMessageFromJSON(
1394
+ jsonString: string,
1395
+ ): SafeParseResult<ListAgentTasksTaskStatusMessage, SDKValidationError> {
1396
+ return safeParse(
1397
+ jsonString,
1398
+ (x) => ListAgentTasksTaskStatusMessage$inboundSchema.parse(JSON.parse(x)),
1399
+ `Failed to parse 'ListAgentTasksTaskStatusMessage' from JSON`,
1400
+ );
1401
+ }
1402
+
1403
+ /** @internal */
1404
+ export const ListAgentTasksTaskStatus$inboundSchema: z.ZodType<
1405
+ ListAgentTasksTaskStatus,
1406
+ z.ZodTypeDef,
1407
+ unknown
1408
+ > = z.object({
1409
+ state: ListAgentTasksTaskState$inboundSchema,
1410
+ timestamp: z.string().optional(),
1411
+ message: z.lazy(() => ListAgentTasksTaskStatusMessage$inboundSchema)
1412
+ .optional(),
1413
+ });
1414
+ /** @internal */
1415
+ export type ListAgentTasksTaskStatus$Outbound = {
1416
+ state: string;
1417
+ timestamp?: string | undefined;
1418
+ message?: ListAgentTasksTaskStatusMessage$Outbound | undefined;
1419
+ };
1420
+
1421
+ /** @internal */
1422
+ export const ListAgentTasksTaskStatus$outboundSchema: z.ZodType<
1423
+ ListAgentTasksTaskStatus$Outbound,
1424
+ z.ZodTypeDef,
1425
+ ListAgentTasksTaskStatus
1426
+ > = z.object({
1427
+ state: ListAgentTasksTaskState$outboundSchema,
1428
+ timestamp: z.string().optional(),
1429
+ message: z.lazy(() => ListAgentTasksTaskStatusMessage$outboundSchema)
1430
+ .optional(),
1431
+ });
1432
+
1433
+ export function listAgentTasksTaskStatusToJSON(
1434
+ listAgentTasksTaskStatus: ListAgentTasksTaskStatus,
1435
+ ): string {
1436
+ return JSON.stringify(
1437
+ ListAgentTasksTaskStatus$outboundSchema.parse(listAgentTasksTaskStatus),
1438
+ );
1439
+ }
1440
+ export function listAgentTasksTaskStatusFromJSON(
1441
+ jsonString: string,
1442
+ ): SafeParseResult<ListAgentTasksTaskStatus, SDKValidationError> {
1443
+ return safeParse(
1444
+ jsonString,
1445
+ (x) => ListAgentTasksTaskStatus$inboundSchema.parse(JSON.parse(x)),
1446
+ `Failed to parse 'ListAgentTasksTaskStatus' from JSON`,
1447
+ );
1448
+ }
1449
+
1450
+ /** @internal */
1451
+ export const ListAgentTasksAgentsKind$inboundSchema: z.ZodNativeEnum<
1452
+ typeof ListAgentTasksAgentsKind
1453
+ > = z.nativeEnum(ListAgentTasksAgentsKind);
1454
+ /** @internal */
1455
+ export const ListAgentTasksAgentsKind$outboundSchema: z.ZodNativeEnum<
1456
+ typeof ListAgentTasksAgentsKind
1457
+ > = ListAgentTasksAgentsKind$inboundSchema;
1458
+
1459
+ /** @internal */
1460
+ export const ListAgentTasksExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
1461
+ typeof ListAgentTasksExtendedMessageRole
1462
+ > = z.nativeEnum(ListAgentTasksExtendedMessageRole);
1463
+ /** @internal */
1464
+ export const ListAgentTasksExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
1465
+ typeof ListAgentTasksExtendedMessageRole
1466
+ > = ListAgentTasksExtendedMessageRole$inboundSchema;
1467
+
1468
+ /** @internal */
1469
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
1470
+ z.ZodNativeEnum<
1471
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONKind
1472
+ > = z.nativeEnum(ListAgentTasksPartsAgentsResponse200ApplicationJSONKind);
1473
+ /** @internal */
1474
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
1475
+ z.ZodNativeEnum<
1476
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONKind
1477
+ > = ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
1478
+
1479
+ /** @internal */
1480
+ export const ListAgentTasksPartsToolResultPart$inboundSchema: z.ZodType<
1481
+ ListAgentTasksPartsToolResultPart,
1482
+ z.ZodTypeDef,
1483
+ unknown
1484
+ > = z.object({
1485
+ kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
1486
+ tool_call_id: z.string(),
1487
+ result: z.any().optional(),
1488
+ metadata: z.record(z.any()).optional(),
1489
+ }).transform((v) => {
1490
+ return remap$(v, {
1491
+ "tool_call_id": "toolCallId",
1492
+ });
1493
+ });
1494
+ /** @internal */
1495
+ export type ListAgentTasksPartsToolResultPart$Outbound = {
1496
+ kind: string;
1497
+ tool_call_id: string;
1498
+ result?: any | undefined;
1499
+ metadata?: { [k: string]: any } | undefined;
1500
+ };
1501
+
1502
+ /** @internal */
1503
+ export const ListAgentTasksPartsToolResultPart$outboundSchema: z.ZodType<
1504
+ ListAgentTasksPartsToolResultPart$Outbound,
1505
+ z.ZodTypeDef,
1506
+ ListAgentTasksPartsToolResultPart
1507
+ > = z.object({
1508
+ kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
1509
+ toolCallId: z.string(),
1510
+ result: z.any().optional(),
1511
+ metadata: z.record(z.any()).optional(),
1512
+ }).transform((v) => {
1513
+ return remap$(v, {
1514
+ toolCallId: "tool_call_id",
1515
+ });
1516
+ });
1517
+
1518
+ export function listAgentTasksPartsToolResultPartToJSON(
1519
+ listAgentTasksPartsToolResultPart: ListAgentTasksPartsToolResultPart,
1520
+ ): string {
1521
+ return JSON.stringify(
1522
+ ListAgentTasksPartsToolResultPart$outboundSchema.parse(
1523
+ listAgentTasksPartsToolResultPart,
1524
+ ),
1525
+ );
1526
+ }
1527
+ export function listAgentTasksPartsToolResultPartFromJSON(
1528
+ jsonString: string,
1529
+ ): SafeParseResult<ListAgentTasksPartsToolResultPart, SDKValidationError> {
1530
+ return safeParse(
1531
+ jsonString,
1532
+ (x) => ListAgentTasksPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
1533
+ `Failed to parse 'ListAgentTasksPartsToolResultPart' from JSON`,
1534
+ );
1535
+ }
1536
+
1537
+ /** @internal */
1538
+ export const ListAgentTasksPartsAgentsResponse200Kind$inboundSchema:
1539
+ z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponse200Kind> = z
1540
+ .nativeEnum(ListAgentTasksPartsAgentsResponse200Kind);
1541
+ /** @internal */
1542
+ export const ListAgentTasksPartsAgentsResponse200Kind$outboundSchema:
1543
+ z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponse200Kind> =
1544
+ ListAgentTasksPartsAgentsResponse200Kind$inboundSchema;
1545
+
1546
+ /** @internal */
1547
+ export const PartsToolCallPart$inboundSchema: z.ZodType<
1548
+ PartsToolCallPart,
1549
+ z.ZodTypeDef,
1550
+ unknown
1551
+ > = z.object({
1552
+ kind: ListAgentTasksPartsAgentsResponse200Kind$inboundSchema,
1553
+ tool_name: z.string(),
1554
+ tool_call_id: z.string(),
1555
+ arguments: z.record(z.any()),
1556
+ metadata: z.record(z.any()).optional(),
1557
+ }).transform((v) => {
1558
+ return remap$(v, {
1559
+ "tool_name": "toolName",
1560
+ "tool_call_id": "toolCallId",
1561
+ });
1562
+ });
1563
+ /** @internal */
1564
+ export type PartsToolCallPart$Outbound = {
1565
+ kind: string;
1566
+ tool_name: string;
1567
+ tool_call_id: string;
1568
+ arguments: { [k: string]: any };
1569
+ metadata?: { [k: string]: any } | undefined;
1570
+ };
1571
+
1572
+ /** @internal */
1573
+ export const PartsToolCallPart$outboundSchema: z.ZodType<
1574
+ PartsToolCallPart$Outbound,
1575
+ z.ZodTypeDef,
1576
+ PartsToolCallPart
1577
+ > = z.object({
1578
+ kind: ListAgentTasksPartsAgentsResponse200Kind$outboundSchema,
1579
+ toolName: z.string(),
1580
+ toolCallId: z.string(),
1581
+ arguments: z.record(z.any()),
1582
+ metadata: z.record(z.any()).optional(),
1583
+ }).transform((v) => {
1584
+ return remap$(v, {
1585
+ toolName: "tool_name",
1586
+ toolCallId: "tool_call_id",
1587
+ });
1588
+ });
1589
+
1590
+ export function partsToolCallPartToJSON(
1591
+ partsToolCallPart: PartsToolCallPart,
1592
+ ): string {
1593
+ return JSON.stringify(
1594
+ PartsToolCallPart$outboundSchema.parse(partsToolCallPart),
1595
+ );
1596
+ }
1597
+ export function partsToolCallPartFromJSON(
1598
+ jsonString: string,
1599
+ ): SafeParseResult<PartsToolCallPart, SDKValidationError> {
1600
+ return safeParse(
1601
+ jsonString,
1602
+ (x) => PartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
1603
+ `Failed to parse 'PartsToolCallPart' from JSON`,
1604
+ );
1605
+ }
1606
+
1607
+ /** @internal */
1608
+ export const ListAgentTasksPartsAgentsResponseKind$inboundSchema:
1609
+ z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponseKind> = z.nativeEnum(
1610
+ ListAgentTasksPartsAgentsResponseKind,
1611
+ );
1612
+ /** @internal */
1613
+ export const ListAgentTasksPartsAgentsResponseKind$outboundSchema:
1614
+ z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponseKind> =
1615
+ ListAgentTasksPartsAgentsResponseKind$inboundSchema;
1616
+
1617
+ /** @internal */
1618
+ export const ListAgentTasksFileFileInURIFormat$inboundSchema: z.ZodType<
1619
+ ListAgentTasksFileFileInURIFormat,
1620
+ z.ZodTypeDef,
1621
+ unknown
1622
+ > = z.object({
1623
+ uri: z.string(),
1624
+ mimeType: z.string().optional(),
1625
+ name: z.string().optional(),
1626
+ });
1627
+ /** @internal */
1628
+ export type ListAgentTasksFileFileInURIFormat$Outbound = {
1629
+ uri: string;
1630
+ mimeType?: string | undefined;
1631
+ name?: string | undefined;
1632
+ };
1633
+
1634
+ /** @internal */
1635
+ export const ListAgentTasksFileFileInURIFormat$outboundSchema: z.ZodType<
1636
+ ListAgentTasksFileFileInURIFormat$Outbound,
1637
+ z.ZodTypeDef,
1638
+ ListAgentTasksFileFileInURIFormat
1639
+ > = z.object({
1640
+ uri: z.string(),
1641
+ mimeType: z.string().optional(),
1642
+ name: z.string().optional(),
1643
+ });
1644
+
1645
+ export function listAgentTasksFileFileInURIFormatToJSON(
1646
+ listAgentTasksFileFileInURIFormat: ListAgentTasksFileFileInURIFormat,
1647
+ ): string {
1648
+ return JSON.stringify(
1649
+ ListAgentTasksFileFileInURIFormat$outboundSchema.parse(
1650
+ listAgentTasksFileFileInURIFormat,
1651
+ ),
1652
+ );
1653
+ }
1654
+ export function listAgentTasksFileFileInURIFormatFromJSON(
1655
+ jsonString: string,
1656
+ ): SafeParseResult<ListAgentTasksFileFileInURIFormat, SDKValidationError> {
1657
+ return safeParse(
1658
+ jsonString,
1659
+ (x) => ListAgentTasksFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
1660
+ `Failed to parse 'ListAgentTasksFileFileInURIFormat' from JSON`,
1661
+ );
1662
+ }
1663
+
1664
+ /** @internal */
1665
+ export const ListAgentTasksFileBinaryFormat$inboundSchema: z.ZodType<
1666
+ ListAgentTasksFileBinaryFormat,
1667
+ z.ZodTypeDef,
1668
+ unknown
1669
+ > = z.object({
1670
+ bytes: z.string(),
1671
+ mimeType: z.string().optional(),
1672
+ name: z.string().optional(),
1673
+ });
1674
+ /** @internal */
1675
+ export type ListAgentTasksFileBinaryFormat$Outbound = {
1676
+ bytes: string;
1677
+ mimeType?: string | undefined;
1678
+ name?: string | undefined;
1679
+ };
1680
+
1681
+ /** @internal */
1682
+ export const ListAgentTasksFileBinaryFormat$outboundSchema: z.ZodType<
1683
+ ListAgentTasksFileBinaryFormat$Outbound,
1684
+ z.ZodTypeDef,
1685
+ ListAgentTasksFileBinaryFormat
1686
+ > = z.object({
1687
+ bytes: z.string(),
1688
+ mimeType: z.string().optional(),
1689
+ name: z.string().optional(),
1690
+ });
1691
+
1692
+ export function listAgentTasksFileBinaryFormatToJSON(
1693
+ listAgentTasksFileBinaryFormat: ListAgentTasksFileBinaryFormat,
1694
+ ): string {
1695
+ return JSON.stringify(
1696
+ ListAgentTasksFileBinaryFormat$outboundSchema.parse(
1697
+ listAgentTasksFileBinaryFormat,
1698
+ ),
1699
+ );
1700
+ }
1701
+ export function listAgentTasksFileBinaryFormatFromJSON(
1702
+ jsonString: string,
1703
+ ): SafeParseResult<ListAgentTasksFileBinaryFormat, SDKValidationError> {
1704
+ return safeParse(
1705
+ jsonString,
1706
+ (x) => ListAgentTasksFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
1707
+ `Failed to parse 'ListAgentTasksFileBinaryFormat' from JSON`,
1708
+ );
1709
+ }
1710
+
1711
+ /** @internal */
1712
+ export const ListAgentTasksPartsFile$inboundSchema: z.ZodType<
1713
+ ListAgentTasksPartsFile,
1714
+ z.ZodTypeDef,
1715
+ unknown
1716
+ > = z.union([
1717
+ z.lazy(() => ListAgentTasksFileBinaryFormat$inboundSchema),
1718
+ z.lazy(() => ListAgentTasksFileFileInURIFormat$inboundSchema),
1719
+ ]);
1720
+ /** @internal */
1721
+ export type ListAgentTasksPartsFile$Outbound =
1722
+ | ListAgentTasksFileBinaryFormat$Outbound
1723
+ | ListAgentTasksFileFileInURIFormat$Outbound;
1724
+
1725
+ /** @internal */
1726
+ export const ListAgentTasksPartsFile$outboundSchema: z.ZodType<
1727
+ ListAgentTasksPartsFile$Outbound,
1728
+ z.ZodTypeDef,
1729
+ ListAgentTasksPartsFile
1730
+ > = z.union([
1731
+ z.lazy(() => ListAgentTasksFileBinaryFormat$outboundSchema),
1732
+ z.lazy(() => ListAgentTasksFileFileInURIFormat$outboundSchema),
1733
+ ]);
1734
+
1735
+ export function listAgentTasksPartsFileToJSON(
1736
+ listAgentTasksPartsFile: ListAgentTasksPartsFile,
1737
+ ): string {
1738
+ return JSON.stringify(
1739
+ ListAgentTasksPartsFile$outboundSchema.parse(listAgentTasksPartsFile),
1740
+ );
1741
+ }
1742
+ export function listAgentTasksPartsFileFromJSON(
1743
+ jsonString: string,
1744
+ ): SafeParseResult<ListAgentTasksPartsFile, SDKValidationError> {
1745
+ return safeParse(
1746
+ jsonString,
1747
+ (x) => ListAgentTasksPartsFile$inboundSchema.parse(JSON.parse(x)),
1748
+ `Failed to parse 'ListAgentTasksPartsFile' from JSON`,
1749
+ );
1750
+ }
1751
+
1752
+ /** @internal */
1753
+ export const ListAgentTasksPartsFilePart$inboundSchema: z.ZodType<
1754
+ ListAgentTasksPartsFilePart,
1755
+ z.ZodTypeDef,
1756
+ unknown
1757
+ > = z.object({
1758
+ kind: ListAgentTasksPartsAgentsResponseKind$inboundSchema,
1759
+ file: z.union([
1760
+ z.lazy(() => ListAgentTasksFileBinaryFormat$inboundSchema),
1761
+ z.lazy(() => ListAgentTasksFileFileInURIFormat$inboundSchema),
1762
+ ]),
1763
+ metadata: z.record(z.any()).optional(),
1764
+ });
1765
+ /** @internal */
1766
+ export type ListAgentTasksPartsFilePart$Outbound = {
1767
+ kind: string;
1768
+ file:
1769
+ | ListAgentTasksFileBinaryFormat$Outbound
1770
+ | ListAgentTasksFileFileInURIFormat$Outbound;
1771
+ metadata?: { [k: string]: any } | undefined;
1772
+ };
1773
+
1774
+ /** @internal */
1775
+ export const ListAgentTasksPartsFilePart$outboundSchema: z.ZodType<
1776
+ ListAgentTasksPartsFilePart$Outbound,
1777
+ z.ZodTypeDef,
1778
+ ListAgentTasksPartsFilePart
1779
+ > = z.object({
1780
+ kind: ListAgentTasksPartsAgentsResponseKind$outboundSchema,
1781
+ file: z.union([
1782
+ z.lazy(() => ListAgentTasksFileBinaryFormat$outboundSchema),
1783
+ z.lazy(() => ListAgentTasksFileFileInURIFormat$outboundSchema),
1784
+ ]),
1785
+ metadata: z.record(z.any()).optional(),
1786
+ });
1787
+
1788
+ export function listAgentTasksPartsFilePartToJSON(
1789
+ listAgentTasksPartsFilePart: ListAgentTasksPartsFilePart,
1790
+ ): string {
1791
+ return JSON.stringify(
1792
+ ListAgentTasksPartsFilePart$outboundSchema.parse(
1793
+ listAgentTasksPartsFilePart,
1794
+ ),
1795
+ );
1796
+ }
1797
+ export function listAgentTasksPartsFilePartFromJSON(
1798
+ jsonString: string,
1799
+ ): SafeParseResult<ListAgentTasksPartsFilePart, SDKValidationError> {
1800
+ return safeParse(
1801
+ jsonString,
1802
+ (x) => ListAgentTasksPartsFilePart$inboundSchema.parse(JSON.parse(x)),
1803
+ `Failed to parse 'ListAgentTasksPartsFilePart' from JSON`,
1804
+ );
1805
+ }
1806
+
1807
+ /** @internal */
1808
+ export const ListAgentTasksPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
1809
+ typeof ListAgentTasksPartsAgentsKind
1810
+ > = z.nativeEnum(ListAgentTasksPartsAgentsKind);
1811
+ /** @internal */
1812
+ export const ListAgentTasksPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
1813
+ typeof ListAgentTasksPartsAgentsKind
1814
+ > = ListAgentTasksPartsAgentsKind$inboundSchema;
1815
+
1816
+ /** @internal */
1817
+ export const ListAgentTasksPartsAgentsDataPart$inboundSchema: z.ZodType<
1818
+ ListAgentTasksPartsAgentsDataPart,
1819
+ z.ZodTypeDef,
1820
+ unknown
1821
+ > = z.object({
1822
+ kind: ListAgentTasksPartsAgentsKind$inboundSchema,
1823
+ data: z.record(z.any()),
1824
+ metadata: z.record(z.any()).optional(),
1825
+ });
1826
+ /** @internal */
1827
+ export type ListAgentTasksPartsAgentsDataPart$Outbound = {
1828
+ kind: string;
1829
+ data: { [k: string]: any };
1830
+ metadata?: { [k: string]: any } | undefined;
1831
+ };
1832
+
1833
+ /** @internal */
1834
+ export const ListAgentTasksPartsAgentsDataPart$outboundSchema: z.ZodType<
1835
+ ListAgentTasksPartsAgentsDataPart$Outbound,
1836
+ z.ZodTypeDef,
1837
+ ListAgentTasksPartsAgentsDataPart
1838
+ > = z.object({
1839
+ kind: ListAgentTasksPartsAgentsKind$outboundSchema,
1840
+ data: z.record(z.any()),
1841
+ metadata: z.record(z.any()).optional(),
1842
+ });
1843
+
1844
+ export function listAgentTasksPartsAgentsDataPartToJSON(
1845
+ listAgentTasksPartsAgentsDataPart: ListAgentTasksPartsAgentsDataPart,
1846
+ ): string {
1847
+ return JSON.stringify(
1848
+ ListAgentTasksPartsAgentsDataPart$outboundSchema.parse(
1849
+ listAgentTasksPartsAgentsDataPart,
1850
+ ),
1851
+ );
1852
+ }
1853
+ export function listAgentTasksPartsAgentsDataPartFromJSON(
1854
+ jsonString: string,
1855
+ ): SafeParseResult<ListAgentTasksPartsAgentsDataPart, SDKValidationError> {
1856
+ return safeParse(
1857
+ jsonString,
1858
+ (x) => ListAgentTasksPartsAgentsDataPart$inboundSchema.parse(JSON.parse(x)),
1859
+ `Failed to parse 'ListAgentTasksPartsAgentsDataPart' from JSON`,
1860
+ );
1861
+ }
1862
+
1863
+ /** @internal */
1864
+ export const ListAgentTasksPartsKind$inboundSchema: z.ZodNativeEnum<
1865
+ typeof ListAgentTasksPartsKind
1866
+ > = z.nativeEnum(ListAgentTasksPartsKind);
1867
+ /** @internal */
1868
+ export const ListAgentTasksPartsKind$outboundSchema: z.ZodNativeEnum<
1869
+ typeof ListAgentTasksPartsKind
1870
+ > = ListAgentTasksPartsKind$inboundSchema;
1871
+
1872
+ /** @internal */
1873
+ export const ListAgentTasksPartsTextPart$inboundSchema: z.ZodType<
1874
+ ListAgentTasksPartsTextPart,
1875
+ z.ZodTypeDef,
1876
+ unknown
1877
+ > = z.object({
1878
+ kind: ListAgentTasksPartsKind$inboundSchema,
1879
+ text: z.string(),
1880
+ });
1881
+ /** @internal */
1882
+ export type ListAgentTasksPartsTextPart$Outbound = {
1883
+ kind: string;
1884
+ text: string;
1885
+ };
1886
+
1887
+ /** @internal */
1888
+ export const ListAgentTasksPartsTextPart$outboundSchema: z.ZodType<
1889
+ ListAgentTasksPartsTextPart$Outbound,
1890
+ z.ZodTypeDef,
1891
+ ListAgentTasksPartsTextPart
1892
+ > = z.object({
1893
+ kind: ListAgentTasksPartsKind$outboundSchema,
1894
+ text: z.string(),
1895
+ });
1896
+
1897
+ export function listAgentTasksPartsTextPartToJSON(
1898
+ listAgentTasksPartsTextPart: ListAgentTasksPartsTextPart,
1899
+ ): string {
1900
+ return JSON.stringify(
1901
+ ListAgentTasksPartsTextPart$outboundSchema.parse(
1902
+ listAgentTasksPartsTextPart,
1903
+ ),
1904
+ );
1905
+ }
1906
+ export function listAgentTasksPartsTextPartFromJSON(
1907
+ jsonString: string,
1908
+ ): SafeParseResult<ListAgentTasksPartsTextPart, SDKValidationError> {
1909
+ return safeParse(
1910
+ jsonString,
1911
+ (x) => ListAgentTasksPartsTextPart$inboundSchema.parse(JSON.parse(x)),
1912
+ `Failed to parse 'ListAgentTasksPartsTextPart' from JSON`,
1913
+ );
1914
+ }
1915
+
1916
+ /** @internal */
1917
+ export const ListAgentTasksParts$inboundSchema: z.ZodType<
1918
+ ListAgentTasksParts,
1919
+ z.ZodTypeDef,
1920
+ unknown
1921
+ > = z.union([
1922
+ z.lazy(() => PartsToolCallPart$inboundSchema),
1923
+ z.lazy(() => ListAgentTasksPartsTextPart$inboundSchema),
1924
+ z.lazy(() => ListAgentTasksPartsAgentsDataPart$inboundSchema),
1925
+ z.lazy(() => ListAgentTasksPartsFilePart$inboundSchema),
1926
+ z.lazy(() => ListAgentTasksPartsToolResultPart$inboundSchema),
1927
+ ]);
1928
+ /** @internal */
1929
+ export type ListAgentTasksParts$Outbound =
1930
+ | PartsToolCallPart$Outbound
1931
+ | ListAgentTasksPartsTextPart$Outbound
1932
+ | ListAgentTasksPartsAgentsDataPart$Outbound
1933
+ | ListAgentTasksPartsFilePart$Outbound
1934
+ | ListAgentTasksPartsToolResultPart$Outbound;
1935
+
1936
+ /** @internal */
1937
+ export const ListAgentTasksParts$outboundSchema: z.ZodType<
1938
+ ListAgentTasksParts$Outbound,
1939
+ z.ZodTypeDef,
1940
+ ListAgentTasksParts
1941
+ > = z.union([
1942
+ z.lazy(() => PartsToolCallPart$outboundSchema),
1943
+ z.lazy(() => ListAgentTasksPartsTextPart$outboundSchema),
1944
+ z.lazy(() => ListAgentTasksPartsAgentsDataPart$outboundSchema),
1945
+ z.lazy(() => ListAgentTasksPartsFilePart$outboundSchema),
1946
+ z.lazy(() => ListAgentTasksPartsToolResultPart$outboundSchema),
1947
+ ]);
1948
+
1949
+ export function listAgentTasksPartsToJSON(
1950
+ listAgentTasksParts: ListAgentTasksParts,
1951
+ ): string {
1952
+ return JSON.stringify(
1953
+ ListAgentTasksParts$outboundSchema.parse(listAgentTasksParts),
1954
+ );
1955
+ }
1956
+ export function listAgentTasksPartsFromJSON(
1957
+ jsonString: string,
1958
+ ): SafeParseResult<ListAgentTasksParts, SDKValidationError> {
1959
+ return safeParse(
1960
+ jsonString,
1961
+ (x) => ListAgentTasksParts$inboundSchema.parse(JSON.parse(x)),
1962
+ `Failed to parse 'ListAgentTasksParts' from JSON`,
1963
+ );
1964
+ }
1965
+
1966
+ /** @internal */
1967
+ export const ListAgentTasksExtendedA2AMessage$inboundSchema: z.ZodType<
1968
+ ListAgentTasksExtendedA2AMessage,
1969
+ z.ZodTypeDef,
1970
+ unknown
1971
+ > = z.object({
1972
+ kind: ListAgentTasksAgentsKind$inboundSchema,
1973
+ messageId: z.string(),
1974
+ role: ListAgentTasksExtendedMessageRole$inboundSchema,
1975
+ parts: z.array(
1976
+ z.union([
1977
+ z.lazy(() => PartsToolCallPart$inboundSchema),
1978
+ z.lazy(() => ListAgentTasksPartsTextPart$inboundSchema),
1979
+ z.lazy(() => ListAgentTasksPartsAgentsDataPart$inboundSchema),
1980
+ z.lazy(() => ListAgentTasksPartsFilePart$inboundSchema),
1981
+ z.lazy(() => ListAgentTasksPartsToolResultPart$inboundSchema),
1982
+ ]),
1983
+ ),
1984
+ taskId: z.string().optional(),
1985
+ contextId: z.string().optional(),
1986
+ metadata: z.record(z.any()).optional(),
1987
+ });
1988
+ /** @internal */
1989
+ export type ListAgentTasksExtendedA2AMessage$Outbound = {
421
1990
  kind: string;
422
- tool_call_id: string;
423
- result?: any | undefined;
1991
+ messageId: string;
1992
+ role: string;
1993
+ parts: Array<
1994
+ | PartsToolCallPart$Outbound
1995
+ | ListAgentTasksPartsTextPart$Outbound
1996
+ | ListAgentTasksPartsAgentsDataPart$Outbound
1997
+ | ListAgentTasksPartsFilePart$Outbound
1998
+ | ListAgentTasksPartsToolResultPart$Outbound
1999
+ >;
2000
+ taskId?: string | undefined;
2001
+ contextId?: string | undefined;
424
2002
  metadata?: { [k: string]: any } | undefined;
425
2003
  };
426
2004
 
427
2005
  /** @internal */
428
- export const ListAgentTasksParts5$outboundSchema: z.ZodType<
429
- ListAgentTasksParts5$Outbound,
2006
+ export const ListAgentTasksExtendedA2AMessage$outboundSchema: z.ZodType<
2007
+ ListAgentTasksExtendedA2AMessage$Outbound,
430
2008
  z.ZodTypeDef,
431
- ListAgentTasksParts5
2009
+ ListAgentTasksExtendedA2AMessage
432
2010
  > = z.object({
433
- kind: ListAgentTasksPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
434
- toolCallId: z.string(),
435
- result: z.any().optional(),
2011
+ kind: ListAgentTasksAgentsKind$outboundSchema,
2012
+ messageId: z.string(),
2013
+ role: ListAgentTasksExtendedMessageRole$outboundSchema,
2014
+ parts: z.array(
2015
+ z.union([
2016
+ z.lazy(() => PartsToolCallPart$outboundSchema),
2017
+ z.lazy(() => ListAgentTasksPartsTextPart$outboundSchema),
2018
+ z.lazy(() => ListAgentTasksPartsAgentsDataPart$outboundSchema),
2019
+ z.lazy(() => ListAgentTasksPartsFilePart$outboundSchema),
2020
+ z.lazy(() => ListAgentTasksPartsToolResultPart$outboundSchema),
2021
+ ]),
2022
+ ),
2023
+ taskId: z.string().optional(),
2024
+ contextId: z.string().optional(),
436
2025
  metadata: z.record(z.any()).optional(),
437
- }).transform((v) => {
438
- return remap$(v, {
439
- toolCallId: "tool_call_id",
440
- });
441
2026
  });
442
2027
 
443
- export function listAgentTasksParts5ToJSON(
444
- listAgentTasksParts5: ListAgentTasksParts5,
2028
+ export function listAgentTasksExtendedA2AMessageToJSON(
2029
+ listAgentTasksExtendedA2AMessage: ListAgentTasksExtendedA2AMessage,
445
2030
  ): string {
446
2031
  return JSON.stringify(
447
- ListAgentTasksParts5$outboundSchema.parse(listAgentTasksParts5),
2032
+ ListAgentTasksExtendedA2AMessage$outboundSchema.parse(
2033
+ listAgentTasksExtendedA2AMessage,
2034
+ ),
448
2035
  );
449
2036
  }
450
- export function listAgentTasksParts5FromJSON(
2037
+ export function listAgentTasksExtendedA2AMessageFromJSON(
451
2038
  jsonString: string,
452
- ): SafeParseResult<ListAgentTasksParts5, SDKValidationError> {
2039
+ ): SafeParseResult<ListAgentTasksExtendedA2AMessage, SDKValidationError> {
453
2040
  return safeParse(
454
2041
  jsonString,
455
- (x) => ListAgentTasksParts5$inboundSchema.parse(JSON.parse(x)),
456
- `Failed to parse 'ListAgentTasksParts5' from JSON`,
2042
+ (x) => ListAgentTasksExtendedA2AMessage$inboundSchema.parse(JSON.parse(x)),
2043
+ `Failed to parse 'ListAgentTasksExtendedA2AMessage' from JSON`,
457
2044
  );
458
2045
  }
459
2046
 
460
2047
  /** @internal */
461
- export const ListAgentTasksPartsAgentsResponse200Kind$inboundSchema:
462
- z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponse200Kind> = z
463
- .nativeEnum(ListAgentTasksPartsAgentsResponse200Kind);
2048
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind$inboundSchema:
2049
+ z.ZodNativeEnum<
2050
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind
2051
+ > = z.nativeEnum(
2052
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind,
2053
+ );
464
2054
  /** @internal */
465
- export const ListAgentTasksPartsAgentsResponse200Kind$outboundSchema:
466
- z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponse200Kind> =
467
- ListAgentTasksPartsAgentsResponse200Kind$inboundSchema;
2055
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind$outboundSchema:
2056
+ z.ZodNativeEnum<
2057
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind
2058
+ > =
2059
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind$inboundSchema;
468
2060
 
469
2061
  /** @internal */
470
- export const ListAgentTasksParts4$inboundSchema: z.ZodType<
471
- ListAgentTasksParts4,
2062
+ export const ListAgentTasksPartsDataPart$inboundSchema: z.ZodType<
2063
+ ListAgentTasksPartsDataPart,
472
2064
  z.ZodTypeDef,
473
2065
  unknown
474
2066
  > = z.object({
475
- kind: ListAgentTasksPartsAgentsResponse200Kind$inboundSchema,
476
- tool_name: z.string(),
477
- tool_call_id: z.string(),
478
- arguments: z.record(z.any()),
2067
+ kind:
2068
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind$inboundSchema,
2069
+ data: z.record(z.any()),
479
2070
  metadata: z.record(z.any()).optional(),
480
- }).transform((v) => {
481
- return remap$(v, {
482
- "tool_name": "toolName",
483
- "tool_call_id": "toolCallId",
484
- });
485
2071
  });
486
2072
  /** @internal */
487
- export type ListAgentTasksParts4$Outbound = {
2073
+ export type ListAgentTasksPartsDataPart$Outbound = {
488
2074
  kind: string;
489
- tool_name: string;
490
- tool_call_id: string;
491
- arguments: { [k: string]: any };
2075
+ data: { [k: string]: any };
492
2076
  metadata?: { [k: string]: any } | undefined;
493
2077
  };
494
2078
 
495
2079
  /** @internal */
496
- export const ListAgentTasksParts4$outboundSchema: z.ZodType<
497
- ListAgentTasksParts4$Outbound,
2080
+ export const ListAgentTasksPartsDataPart$outboundSchema: z.ZodType<
2081
+ ListAgentTasksPartsDataPart$Outbound,
498
2082
  z.ZodTypeDef,
499
- ListAgentTasksParts4
2083
+ ListAgentTasksPartsDataPart
500
2084
  > = z.object({
501
- kind: ListAgentTasksPartsAgentsResponse200Kind$outboundSchema,
502
- toolName: z.string(),
503
- toolCallId: z.string(),
504
- arguments: z.record(z.any()),
2085
+ kind:
2086
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksArtifactsKind$outboundSchema,
2087
+ data: z.record(z.any()),
505
2088
  metadata: z.record(z.any()).optional(),
506
- }).transform((v) => {
507
- return remap$(v, {
508
- toolName: "tool_name",
509
- toolCallId: "tool_call_id",
510
- });
511
2089
  });
512
2090
 
513
- export function listAgentTasksParts4ToJSON(
514
- listAgentTasksParts4: ListAgentTasksParts4,
2091
+ export function listAgentTasksPartsDataPartToJSON(
2092
+ listAgentTasksPartsDataPart: ListAgentTasksPartsDataPart,
515
2093
  ): string {
516
2094
  return JSON.stringify(
517
- ListAgentTasksParts4$outboundSchema.parse(listAgentTasksParts4),
2095
+ ListAgentTasksPartsDataPart$outboundSchema.parse(
2096
+ listAgentTasksPartsDataPart,
2097
+ ),
518
2098
  );
519
2099
  }
520
- export function listAgentTasksParts4FromJSON(
2100
+ export function listAgentTasksPartsDataPartFromJSON(
521
2101
  jsonString: string,
522
- ): SafeParseResult<ListAgentTasksParts4, SDKValidationError> {
2102
+ ): SafeParseResult<ListAgentTasksPartsDataPart, SDKValidationError> {
523
2103
  return safeParse(
524
2104
  jsonString,
525
- (x) => ListAgentTasksParts4$inboundSchema.parse(JSON.parse(x)),
526
- `Failed to parse 'ListAgentTasksParts4' from JSON`,
2105
+ (x) => ListAgentTasksPartsDataPart$inboundSchema.parse(JSON.parse(x)),
2106
+ `Failed to parse 'ListAgentTasksPartsDataPart' from JSON`,
527
2107
  );
528
2108
  }
529
2109
 
530
2110
  /** @internal */
531
- export const ListAgentTasksPartsAgentsResponseKind$inboundSchema:
532
- z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponseKind> = z.nativeEnum(
533
- ListAgentTasksPartsAgentsResponseKind,
2111
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind$inboundSchema:
2112
+ z.ZodNativeEnum<
2113
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind
2114
+ > = z.nativeEnum(
2115
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind,
534
2116
  );
535
2117
  /** @internal */
536
- export const ListAgentTasksPartsAgentsResponseKind$outboundSchema:
537
- z.ZodNativeEnum<typeof ListAgentTasksPartsAgentsResponseKind> =
538
- ListAgentTasksPartsAgentsResponseKind$inboundSchema;
2118
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind$outboundSchema:
2119
+ z.ZodNativeEnum<
2120
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind
2121
+ > =
2122
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind$inboundSchema;
539
2123
 
540
2124
  /** @internal */
541
- export const ListAgentTasksFileFileInURIFormat$inboundSchema: z.ZodType<
542
- ListAgentTasksFileFileInURIFormat,
2125
+ export const ListAgentTasksFileAgentsFileInURIFormat$inboundSchema: z.ZodType<
2126
+ ListAgentTasksFileAgentsFileInURIFormat,
543
2127
  z.ZodTypeDef,
544
2128
  unknown
545
2129
  > = z.object({
@@ -548,45 +2132,52 @@ export const ListAgentTasksFileFileInURIFormat$inboundSchema: z.ZodType<
548
2132
  name: z.string().optional(),
549
2133
  });
550
2134
  /** @internal */
551
- export type ListAgentTasksFileFileInURIFormat$Outbound = {
2135
+ export type ListAgentTasksFileAgentsFileInURIFormat$Outbound = {
552
2136
  uri: string;
553
2137
  mimeType?: string | undefined;
554
2138
  name?: string | undefined;
555
2139
  };
556
2140
 
557
2141
  /** @internal */
558
- export const ListAgentTasksFileFileInURIFormat$outboundSchema: z.ZodType<
559
- ListAgentTasksFileFileInURIFormat$Outbound,
2142
+ export const ListAgentTasksFileAgentsFileInURIFormat$outboundSchema: z.ZodType<
2143
+ ListAgentTasksFileAgentsFileInURIFormat$Outbound,
560
2144
  z.ZodTypeDef,
561
- ListAgentTasksFileFileInURIFormat
2145
+ ListAgentTasksFileAgentsFileInURIFormat
562
2146
  > = z.object({
563
2147
  uri: z.string(),
564
2148
  mimeType: z.string().optional(),
565
2149
  name: z.string().optional(),
566
2150
  });
567
2151
 
568
- export function listAgentTasksFileFileInURIFormatToJSON(
569
- listAgentTasksFileFileInURIFormat: ListAgentTasksFileFileInURIFormat,
2152
+ export function listAgentTasksFileAgentsFileInURIFormatToJSON(
2153
+ listAgentTasksFileAgentsFileInURIFormat:
2154
+ ListAgentTasksFileAgentsFileInURIFormat,
570
2155
  ): string {
571
2156
  return JSON.stringify(
572
- ListAgentTasksFileFileInURIFormat$outboundSchema.parse(
573
- listAgentTasksFileFileInURIFormat,
2157
+ ListAgentTasksFileAgentsFileInURIFormat$outboundSchema.parse(
2158
+ listAgentTasksFileAgentsFileInURIFormat,
574
2159
  ),
575
2160
  );
576
2161
  }
577
- export function listAgentTasksFileFileInURIFormatFromJSON(
2162
+ export function listAgentTasksFileAgentsFileInURIFormatFromJSON(
578
2163
  jsonString: string,
579
- ): SafeParseResult<ListAgentTasksFileFileInURIFormat, SDKValidationError> {
2164
+ ): SafeParseResult<
2165
+ ListAgentTasksFileAgentsFileInURIFormat,
2166
+ SDKValidationError
2167
+ > {
580
2168
  return safeParse(
581
2169
  jsonString,
582
- (x) => ListAgentTasksFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
583
- `Failed to parse 'ListAgentTasksFileFileInURIFormat' from JSON`,
2170
+ (x) =>
2171
+ ListAgentTasksFileAgentsFileInURIFormat$inboundSchema.parse(
2172
+ JSON.parse(x),
2173
+ ),
2174
+ `Failed to parse 'ListAgentTasksFileAgentsFileInURIFormat' from JSON`,
584
2175
  );
585
2176
  }
586
2177
 
587
2178
  /** @internal */
588
- export const ListAgentTasksFileBinaryFormat$inboundSchema: z.ZodType<
589
- ListAgentTasksFileBinaryFormat,
2179
+ export const ListAgentTasksFileAgentsBinaryFormat$inboundSchema: z.ZodType<
2180
+ ListAgentTasksFileAgentsBinaryFormat,
590
2181
  z.ZodTypeDef,
591
2182
  unknown
592
2183
  > = z.object({
@@ -595,492 +2186,387 @@ export const ListAgentTasksFileBinaryFormat$inboundSchema: z.ZodType<
595
2186
  name: z.string().optional(),
596
2187
  });
597
2188
  /** @internal */
598
- export type ListAgentTasksFileBinaryFormat$Outbound = {
2189
+ export type ListAgentTasksFileAgentsBinaryFormat$Outbound = {
599
2190
  bytes: string;
600
2191
  mimeType?: string | undefined;
601
2192
  name?: string | undefined;
602
2193
  };
603
2194
 
604
2195
  /** @internal */
605
- export const ListAgentTasksFileBinaryFormat$outboundSchema: z.ZodType<
606
- ListAgentTasksFileBinaryFormat$Outbound,
2196
+ export const ListAgentTasksFileAgentsBinaryFormat$outboundSchema: z.ZodType<
2197
+ ListAgentTasksFileAgentsBinaryFormat$Outbound,
607
2198
  z.ZodTypeDef,
608
- ListAgentTasksFileBinaryFormat
2199
+ ListAgentTasksFileAgentsBinaryFormat
609
2200
  > = z.object({
610
2201
  bytes: z.string(),
611
2202
  mimeType: z.string().optional(),
612
2203
  name: z.string().optional(),
613
2204
  });
614
2205
 
615
- export function listAgentTasksFileBinaryFormatToJSON(
616
- listAgentTasksFileBinaryFormat: ListAgentTasksFileBinaryFormat,
2206
+ export function listAgentTasksFileAgentsBinaryFormatToJSON(
2207
+ listAgentTasksFileAgentsBinaryFormat: ListAgentTasksFileAgentsBinaryFormat,
617
2208
  ): string {
618
2209
  return JSON.stringify(
619
- ListAgentTasksFileBinaryFormat$outboundSchema.parse(
620
- listAgentTasksFileBinaryFormat,
2210
+ ListAgentTasksFileAgentsBinaryFormat$outboundSchema.parse(
2211
+ listAgentTasksFileAgentsBinaryFormat,
621
2212
  ),
622
2213
  );
623
2214
  }
624
- export function listAgentTasksFileBinaryFormatFromJSON(
2215
+ export function listAgentTasksFileAgentsBinaryFormatFromJSON(
625
2216
  jsonString: string,
626
- ): SafeParseResult<ListAgentTasksFileBinaryFormat, SDKValidationError> {
2217
+ ): SafeParseResult<ListAgentTasksFileAgentsBinaryFormat, SDKValidationError> {
627
2218
  return safeParse(
628
2219
  jsonString,
629
- (x) => ListAgentTasksFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
630
- `Failed to parse 'ListAgentTasksFileBinaryFormat' from JSON`,
2220
+ (x) =>
2221
+ ListAgentTasksFileAgentsBinaryFormat$inboundSchema.parse(JSON.parse(x)),
2222
+ `Failed to parse 'ListAgentTasksFileAgentsBinaryFormat' from JSON`,
631
2223
  );
632
2224
  }
633
2225
 
634
2226
  /** @internal */
635
- export const ListAgentTasksPartsFile$inboundSchema: z.ZodType<
636
- ListAgentTasksPartsFile,
2227
+ export const ListAgentTasksPartsAgentsFile$inboundSchema: z.ZodType<
2228
+ ListAgentTasksPartsAgentsFile,
637
2229
  z.ZodTypeDef,
638
2230
  unknown
639
2231
  > = z.union([
640
- z.lazy(() => ListAgentTasksFileBinaryFormat$inboundSchema),
641
- z.lazy(() => ListAgentTasksFileFileInURIFormat$inboundSchema),
2232
+ z.lazy(() => ListAgentTasksFileAgentsBinaryFormat$inboundSchema),
2233
+ z.lazy(() => ListAgentTasksFileAgentsFileInURIFormat$inboundSchema),
642
2234
  ]);
643
2235
  /** @internal */
644
- export type ListAgentTasksPartsFile$Outbound =
645
- | ListAgentTasksFileBinaryFormat$Outbound
646
- | ListAgentTasksFileFileInURIFormat$Outbound;
2236
+ export type ListAgentTasksPartsAgentsFile$Outbound =
2237
+ | ListAgentTasksFileAgentsBinaryFormat$Outbound
2238
+ | ListAgentTasksFileAgentsFileInURIFormat$Outbound;
647
2239
 
648
2240
  /** @internal */
649
- export const ListAgentTasksPartsFile$outboundSchema: z.ZodType<
650
- ListAgentTasksPartsFile$Outbound,
2241
+ export const ListAgentTasksPartsAgentsFile$outboundSchema: z.ZodType<
2242
+ ListAgentTasksPartsAgentsFile$Outbound,
651
2243
  z.ZodTypeDef,
652
- ListAgentTasksPartsFile
2244
+ ListAgentTasksPartsAgentsFile
653
2245
  > = z.union([
654
- z.lazy(() => ListAgentTasksFileBinaryFormat$outboundSchema),
655
- z.lazy(() => ListAgentTasksFileFileInURIFormat$outboundSchema),
2246
+ z.lazy(() => ListAgentTasksFileAgentsBinaryFormat$outboundSchema),
2247
+ z.lazy(() => ListAgentTasksFileAgentsFileInURIFormat$outboundSchema),
656
2248
  ]);
657
2249
 
658
- export function listAgentTasksPartsFileToJSON(
659
- listAgentTasksPartsFile: ListAgentTasksPartsFile,
2250
+ export function listAgentTasksPartsAgentsFileToJSON(
2251
+ listAgentTasksPartsAgentsFile: ListAgentTasksPartsAgentsFile,
660
2252
  ): string {
661
2253
  return JSON.stringify(
662
- ListAgentTasksPartsFile$outboundSchema.parse(listAgentTasksPartsFile),
2254
+ ListAgentTasksPartsAgentsFile$outboundSchema.parse(
2255
+ listAgentTasksPartsAgentsFile,
2256
+ ),
663
2257
  );
664
2258
  }
665
- export function listAgentTasksPartsFileFromJSON(
2259
+ export function listAgentTasksPartsAgentsFileFromJSON(
666
2260
  jsonString: string,
667
- ): SafeParseResult<ListAgentTasksPartsFile, SDKValidationError> {
2261
+ ): SafeParseResult<ListAgentTasksPartsAgentsFile, SDKValidationError> {
668
2262
  return safeParse(
669
2263
  jsonString,
670
- (x) => ListAgentTasksPartsFile$inboundSchema.parse(JSON.parse(x)),
671
- `Failed to parse 'ListAgentTasksPartsFile' from JSON`,
2264
+ (x) => ListAgentTasksPartsAgentsFile$inboundSchema.parse(JSON.parse(x)),
2265
+ `Failed to parse 'ListAgentTasksPartsAgentsFile' from JSON`,
672
2266
  );
673
2267
  }
674
2268
 
675
2269
  /** @internal */
676
- export const ListAgentTasksParts3$inboundSchema: z.ZodType<
677
- ListAgentTasksParts3,
2270
+ export const ListAgentTasksPartsAgentsFilePart$inboundSchema: z.ZodType<
2271
+ ListAgentTasksPartsAgentsFilePart,
678
2272
  z.ZodTypeDef,
679
2273
  unknown
680
2274
  > = z.object({
681
- kind: ListAgentTasksPartsAgentsResponseKind$inboundSchema,
2275
+ kind:
2276
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind$inboundSchema,
682
2277
  file: z.union([
683
- z.lazy(() => ListAgentTasksFileBinaryFormat$inboundSchema),
684
- z.lazy(() => ListAgentTasksFileFileInURIFormat$inboundSchema),
2278
+ z.lazy(() => ListAgentTasksFileAgentsBinaryFormat$inboundSchema),
2279
+ z.lazy(() => ListAgentTasksFileAgentsFileInURIFormat$inboundSchema),
685
2280
  ]),
686
2281
  metadata: z.record(z.any()).optional(),
687
2282
  });
688
2283
  /** @internal */
689
- export type ListAgentTasksParts3$Outbound = {
2284
+ export type ListAgentTasksPartsAgentsFilePart$Outbound = {
690
2285
  kind: string;
691
2286
  file:
692
- | ListAgentTasksFileBinaryFormat$Outbound
693
- | ListAgentTasksFileFileInURIFormat$Outbound;
2287
+ | ListAgentTasksFileAgentsBinaryFormat$Outbound
2288
+ | ListAgentTasksFileAgentsFileInURIFormat$Outbound;
694
2289
  metadata?: { [k: string]: any } | undefined;
695
2290
  };
696
2291
 
697
2292
  /** @internal */
698
- export const ListAgentTasksParts3$outboundSchema: z.ZodType<
699
- ListAgentTasksParts3$Outbound,
2293
+ export const ListAgentTasksPartsAgentsFilePart$outboundSchema: z.ZodType<
2294
+ ListAgentTasksPartsAgentsFilePart$Outbound,
700
2295
  z.ZodTypeDef,
701
- ListAgentTasksParts3
2296
+ ListAgentTasksPartsAgentsFilePart
702
2297
  > = z.object({
703
- kind: ListAgentTasksPartsAgentsResponseKind$outboundSchema,
2298
+ kind:
2299
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyTasksKind$outboundSchema,
704
2300
  file: z.union([
705
- z.lazy(() => ListAgentTasksFileBinaryFormat$outboundSchema),
706
- z.lazy(() => ListAgentTasksFileFileInURIFormat$outboundSchema),
2301
+ z.lazy(() => ListAgentTasksFileAgentsBinaryFormat$outboundSchema),
2302
+ z.lazy(() => ListAgentTasksFileAgentsFileInURIFormat$outboundSchema),
707
2303
  ]),
708
2304
  metadata: z.record(z.any()).optional(),
709
2305
  });
710
2306
 
711
- export function listAgentTasksParts3ToJSON(
712
- listAgentTasksParts3: ListAgentTasksParts3,
2307
+ export function listAgentTasksPartsAgentsFilePartToJSON(
2308
+ listAgentTasksPartsAgentsFilePart: ListAgentTasksPartsAgentsFilePart,
713
2309
  ): string {
714
2310
  return JSON.stringify(
715
- ListAgentTasksParts3$outboundSchema.parse(listAgentTasksParts3),
2311
+ ListAgentTasksPartsAgentsFilePart$outboundSchema.parse(
2312
+ listAgentTasksPartsAgentsFilePart,
2313
+ ),
716
2314
  );
717
2315
  }
718
- export function listAgentTasksParts3FromJSON(
2316
+ export function listAgentTasksPartsAgentsFilePartFromJSON(
719
2317
  jsonString: string,
720
- ): SafeParseResult<ListAgentTasksParts3, SDKValidationError> {
2318
+ ): SafeParseResult<ListAgentTasksPartsAgentsFilePart, SDKValidationError> {
721
2319
  return safeParse(
722
2320
  jsonString,
723
- (x) => ListAgentTasksParts3$inboundSchema.parse(JSON.parse(x)),
724
- `Failed to parse 'ListAgentTasksParts3' from JSON`,
2321
+ (x) => ListAgentTasksPartsAgentsFilePart$inboundSchema.parse(JSON.parse(x)),
2322
+ `Failed to parse 'ListAgentTasksPartsAgentsFilePart' from JSON`,
725
2323
  );
726
2324
  }
727
2325
 
728
2326
  /** @internal */
729
- export const ListAgentTasksPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
730
- typeof ListAgentTasksPartsAgentsKind
731
- > = z.nativeEnum(ListAgentTasksPartsAgentsKind);
732
- /** @internal */
733
- export const ListAgentTasksPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
734
- typeof ListAgentTasksPartsAgentsKind
735
- > = ListAgentTasksPartsAgentsKind$inboundSchema;
736
-
737
- /** @internal */
738
- export const ListAgentTasksParts2$inboundSchema: z.ZodType<
739
- ListAgentTasksParts2,
740
- z.ZodTypeDef,
741
- unknown
742
- > = z.object({
743
- kind: ListAgentTasksPartsAgentsKind$inboundSchema,
744
- data: z.record(z.any()),
745
- metadata: z.record(z.any()).optional(),
746
- });
747
- /** @internal */
748
- export type ListAgentTasksParts2$Outbound = {
749
- kind: string;
750
- data: { [k: string]: any };
751
- metadata?: { [k: string]: any } | undefined;
752
- };
753
-
754
- /** @internal */
755
- export const ListAgentTasksParts2$outboundSchema: z.ZodType<
756
- ListAgentTasksParts2$Outbound,
757
- z.ZodTypeDef,
758
- ListAgentTasksParts2
759
- > = z.object({
760
- kind: ListAgentTasksPartsAgentsKind$outboundSchema,
761
- data: z.record(z.any()),
762
- metadata: z.record(z.any()).optional(),
763
- });
764
-
765
- export function listAgentTasksParts2ToJSON(
766
- listAgentTasksParts2: ListAgentTasksParts2,
767
- ): string {
768
- return JSON.stringify(
769
- ListAgentTasksParts2$outboundSchema.parse(listAgentTasksParts2),
770
- );
771
- }
772
- export function listAgentTasksParts2FromJSON(
773
- jsonString: string,
774
- ): SafeParseResult<ListAgentTasksParts2, SDKValidationError> {
775
- return safeParse(
776
- jsonString,
777
- (x) => ListAgentTasksParts2$inboundSchema.parse(JSON.parse(x)),
778
- `Failed to parse 'ListAgentTasksParts2' from JSON`,
2327
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema:
2328
+ z.ZodNativeEnum<
2329
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind
2330
+ > = z.nativeEnum(
2331
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind,
779
2332
  );
780
- }
781
-
782
- /** @internal */
783
- export const ListAgentTasksPartsKind$inboundSchema: z.ZodNativeEnum<
784
- typeof ListAgentTasksPartsKind
785
- > = z.nativeEnum(ListAgentTasksPartsKind);
786
2333
  /** @internal */
787
- export const ListAgentTasksPartsKind$outboundSchema: z.ZodNativeEnum<
788
- typeof ListAgentTasksPartsKind
789
- > = ListAgentTasksPartsKind$inboundSchema;
2334
+ export const ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema:
2335
+ z.ZodNativeEnum<
2336
+ typeof ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind
2337
+ > =
2338
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema;
790
2339
 
791
2340
  /** @internal */
792
- export const ListAgentTasksParts1$inboundSchema: z.ZodType<
793
- ListAgentTasksParts1,
2341
+ export const ListAgentTasksPartsAgentsTextPart$inboundSchema: z.ZodType<
2342
+ ListAgentTasksPartsAgentsTextPart,
794
2343
  z.ZodTypeDef,
795
2344
  unknown
796
2345
  > = z.object({
797
- kind: ListAgentTasksPartsKind$inboundSchema,
2346
+ kind:
2347
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema,
798
2348
  text: z.string(),
799
2349
  });
800
2350
  /** @internal */
801
- export type ListAgentTasksParts1$Outbound = {
2351
+ export type ListAgentTasksPartsAgentsTextPart$Outbound = {
802
2352
  kind: string;
803
2353
  text: string;
804
2354
  };
805
2355
 
806
2356
  /** @internal */
807
- export const ListAgentTasksParts1$outboundSchema: z.ZodType<
808
- ListAgentTasksParts1$Outbound,
2357
+ export const ListAgentTasksPartsAgentsTextPart$outboundSchema: z.ZodType<
2358
+ ListAgentTasksPartsAgentsTextPart$Outbound,
809
2359
  z.ZodTypeDef,
810
- ListAgentTasksParts1
2360
+ ListAgentTasksPartsAgentsTextPart
811
2361
  > = z.object({
812
- kind: ListAgentTasksPartsKind$outboundSchema,
2362
+ kind:
2363
+ ListAgentTasksPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema,
813
2364
  text: z.string(),
814
2365
  });
815
2366
 
816
- export function listAgentTasksParts1ToJSON(
817
- listAgentTasksParts1: ListAgentTasksParts1,
2367
+ export function listAgentTasksPartsAgentsTextPartToJSON(
2368
+ listAgentTasksPartsAgentsTextPart: ListAgentTasksPartsAgentsTextPart,
818
2369
  ): string {
819
2370
  return JSON.stringify(
820
- ListAgentTasksParts1$outboundSchema.parse(listAgentTasksParts1),
2371
+ ListAgentTasksPartsAgentsTextPart$outboundSchema.parse(
2372
+ listAgentTasksPartsAgentsTextPart,
2373
+ ),
821
2374
  );
822
2375
  }
823
- export function listAgentTasksParts1FromJSON(
2376
+ export function listAgentTasksPartsAgentsTextPartFromJSON(
824
2377
  jsonString: string,
825
- ): SafeParseResult<ListAgentTasksParts1, SDKValidationError> {
2378
+ ): SafeParseResult<ListAgentTasksPartsAgentsTextPart, SDKValidationError> {
826
2379
  return safeParse(
827
2380
  jsonString,
828
- (x) => ListAgentTasksParts1$inboundSchema.parse(JSON.parse(x)),
829
- `Failed to parse 'ListAgentTasksParts1' from JSON`,
2381
+ (x) => ListAgentTasksPartsAgentsTextPart$inboundSchema.parse(JSON.parse(x)),
2382
+ `Failed to parse 'ListAgentTasksPartsAgentsTextPart' from JSON`,
830
2383
  );
831
2384
  }
832
2385
 
833
2386
  /** @internal */
834
- export const ListAgentTasksParts$inboundSchema: z.ZodType<
835
- ListAgentTasksParts,
2387
+ export const ListAgentTasksAgentsParts$inboundSchema: z.ZodType<
2388
+ ListAgentTasksAgentsParts,
836
2389
  z.ZodTypeDef,
837
2390
  unknown
838
2391
  > = z.union([
839
- z.lazy(() => ListAgentTasksParts4$inboundSchema),
840
- z.lazy(() => ListAgentTasksParts1$inboundSchema),
841
- z.lazy(() => ListAgentTasksParts2$inboundSchema),
842
- z.lazy(() => ListAgentTasksParts3$inboundSchema),
843
- z.lazy(() => ListAgentTasksParts5$inboundSchema),
2392
+ z.lazy(() => ListAgentTasksPartsAgentsTextPart$inboundSchema),
2393
+ z.lazy(() => ListAgentTasksPartsAgentsFilePart$inboundSchema),
2394
+ z.lazy(() => ListAgentTasksPartsDataPart$inboundSchema),
844
2395
  ]);
845
2396
  /** @internal */
846
- export type ListAgentTasksParts$Outbound =
847
- | ListAgentTasksParts4$Outbound
848
- | ListAgentTasksParts1$Outbound
849
- | ListAgentTasksParts2$Outbound
850
- | ListAgentTasksParts3$Outbound
851
- | ListAgentTasksParts5$Outbound;
2397
+ export type ListAgentTasksAgentsParts$Outbound =
2398
+ | ListAgentTasksPartsAgentsTextPart$Outbound
2399
+ | ListAgentTasksPartsAgentsFilePart$Outbound
2400
+ | ListAgentTasksPartsDataPart$Outbound;
852
2401
 
853
2402
  /** @internal */
854
- export const ListAgentTasksParts$outboundSchema: z.ZodType<
855
- ListAgentTasksParts$Outbound,
2403
+ export const ListAgentTasksAgentsParts$outboundSchema: z.ZodType<
2404
+ ListAgentTasksAgentsParts$Outbound,
856
2405
  z.ZodTypeDef,
857
- ListAgentTasksParts
2406
+ ListAgentTasksAgentsParts
858
2407
  > = z.union([
859
- z.lazy(() => ListAgentTasksParts4$outboundSchema),
860
- z.lazy(() => ListAgentTasksParts1$outboundSchema),
861
- z.lazy(() => ListAgentTasksParts2$outboundSchema),
862
- z.lazy(() => ListAgentTasksParts3$outboundSchema),
863
- z.lazy(() => ListAgentTasksParts5$outboundSchema),
2408
+ z.lazy(() => ListAgentTasksPartsAgentsTextPart$outboundSchema),
2409
+ z.lazy(() => ListAgentTasksPartsAgentsFilePart$outboundSchema),
2410
+ z.lazy(() => ListAgentTasksPartsDataPart$outboundSchema),
864
2411
  ]);
865
2412
 
866
- export function listAgentTasksPartsToJSON(
867
- listAgentTasksParts: ListAgentTasksParts,
2413
+ export function listAgentTasksAgentsPartsToJSON(
2414
+ listAgentTasksAgentsParts: ListAgentTasksAgentsParts,
868
2415
  ): string {
869
2416
  return JSON.stringify(
870
- ListAgentTasksParts$outboundSchema.parse(listAgentTasksParts),
2417
+ ListAgentTasksAgentsParts$outboundSchema.parse(listAgentTasksAgentsParts),
871
2418
  );
872
2419
  }
873
- export function listAgentTasksPartsFromJSON(
2420
+ export function listAgentTasksAgentsPartsFromJSON(
874
2421
  jsonString: string,
875
- ): SafeParseResult<ListAgentTasksParts, SDKValidationError> {
2422
+ ): SafeParseResult<ListAgentTasksAgentsParts, SDKValidationError> {
876
2423
  return safeParse(
877
2424
  jsonString,
878
- (x) => ListAgentTasksParts$inboundSchema.parse(JSON.parse(x)),
879
- `Failed to parse 'ListAgentTasksParts' from JSON`,
2425
+ (x) => ListAgentTasksAgentsParts$inboundSchema.parse(JSON.parse(x)),
2426
+ `Failed to parse 'ListAgentTasksAgentsParts' from JSON`,
880
2427
  );
881
2428
  }
882
2429
 
883
2430
  /** @internal */
884
- export const ListAgentTasksHistory$inboundSchema: z.ZodType<
885
- ListAgentTasksHistory,
2431
+ export const ListAgentTasksTaskArtifact$inboundSchema: z.ZodType<
2432
+ ListAgentTasksTaskArtifact,
886
2433
  z.ZodTypeDef,
887
2434
  unknown
888
2435
  > = z.object({
889
- kind: ListAgentTasksAgentsKind$inboundSchema,
890
- messageId: z.string(),
891
- role: ListAgentTasksRole$inboundSchema,
2436
+ artifactId: z.string(),
2437
+ name: z.string(),
2438
+ description: z.string().optional(),
892
2439
  parts: z.array(
893
2440
  z.union([
894
- z.lazy(() => ListAgentTasksParts4$inboundSchema),
895
- z.lazy(() => ListAgentTasksParts1$inboundSchema),
896
- z.lazy(() => ListAgentTasksParts2$inboundSchema),
897
- z.lazy(() => ListAgentTasksParts3$inboundSchema),
898
- z.lazy(() => ListAgentTasksParts5$inboundSchema),
2441
+ z.lazy(() => ListAgentTasksPartsAgentsTextPart$inboundSchema),
2442
+ z.lazy(() => ListAgentTasksPartsAgentsFilePart$inboundSchema),
2443
+ z.lazy(() => ListAgentTasksPartsDataPart$inboundSchema),
899
2444
  ]),
900
2445
  ),
901
- taskId: z.string().optional(),
902
- contextId: z.string().optional(),
2446
+ extensions: z.array(z.string()).optional(),
903
2447
  metadata: z.record(z.any()).optional(),
904
2448
  });
905
2449
  /** @internal */
906
- export type ListAgentTasksHistory$Outbound = {
907
- kind: string;
908
- messageId: string;
909
- role: string;
2450
+ export type ListAgentTasksTaskArtifact$Outbound = {
2451
+ artifactId: string;
2452
+ name: string;
2453
+ description?: string | undefined;
910
2454
  parts: Array<
911
- | ListAgentTasksParts4$Outbound
912
- | ListAgentTasksParts1$Outbound
913
- | ListAgentTasksParts2$Outbound
914
- | ListAgentTasksParts3$Outbound
915
- | ListAgentTasksParts5$Outbound
2455
+ | ListAgentTasksPartsAgentsTextPart$Outbound
2456
+ | ListAgentTasksPartsAgentsFilePart$Outbound
2457
+ | ListAgentTasksPartsDataPart$Outbound
916
2458
  >;
917
- taskId?: string | undefined;
918
- contextId?: string | undefined;
2459
+ extensions?: Array<string> | undefined;
919
2460
  metadata?: { [k: string]: any } | undefined;
920
2461
  };
921
2462
 
922
2463
  /** @internal */
923
- export const ListAgentTasksHistory$outboundSchema: z.ZodType<
924
- ListAgentTasksHistory$Outbound,
2464
+ export const ListAgentTasksTaskArtifact$outboundSchema: z.ZodType<
2465
+ ListAgentTasksTaskArtifact$Outbound,
925
2466
  z.ZodTypeDef,
926
- ListAgentTasksHistory
2467
+ ListAgentTasksTaskArtifact
927
2468
  > = z.object({
928
- kind: ListAgentTasksAgentsKind$outboundSchema,
929
- messageId: z.string(),
930
- role: ListAgentTasksRole$outboundSchema,
2469
+ artifactId: z.string(),
2470
+ name: z.string(),
2471
+ description: z.string().optional(),
931
2472
  parts: z.array(
932
2473
  z.union([
933
- z.lazy(() => ListAgentTasksParts4$outboundSchema),
934
- z.lazy(() => ListAgentTasksParts1$outboundSchema),
935
- z.lazy(() => ListAgentTasksParts2$outboundSchema),
936
- z.lazy(() => ListAgentTasksParts3$outboundSchema),
937
- z.lazy(() => ListAgentTasksParts5$outboundSchema),
2474
+ z.lazy(() => ListAgentTasksPartsAgentsTextPart$outboundSchema),
2475
+ z.lazy(() => ListAgentTasksPartsAgentsFilePart$outboundSchema),
2476
+ z.lazy(() => ListAgentTasksPartsDataPart$outboundSchema),
938
2477
  ]),
939
2478
  ),
940
- taskId: z.string().optional(),
941
- contextId: z.string().optional(),
2479
+ extensions: z.array(z.string()).optional(),
942
2480
  metadata: z.record(z.any()).optional(),
943
2481
  });
944
2482
 
945
- export function listAgentTasksHistoryToJSON(
946
- listAgentTasksHistory: ListAgentTasksHistory,
2483
+ export function listAgentTasksTaskArtifactToJSON(
2484
+ listAgentTasksTaskArtifact: ListAgentTasksTaskArtifact,
947
2485
  ): string {
948
2486
  return JSON.stringify(
949
- ListAgentTasksHistory$outboundSchema.parse(listAgentTasksHistory),
2487
+ ListAgentTasksTaskArtifact$outboundSchema.parse(listAgentTasksTaskArtifact),
950
2488
  );
951
2489
  }
952
- export function listAgentTasksHistoryFromJSON(
2490
+ export function listAgentTasksTaskArtifactFromJSON(
953
2491
  jsonString: string,
954
- ): SafeParseResult<ListAgentTasksHistory, SDKValidationError> {
2492
+ ): SafeParseResult<ListAgentTasksTaskArtifact, SDKValidationError> {
955
2493
  return safeParse(
956
2494
  jsonString,
957
- (x) => ListAgentTasksHistory$inboundSchema.parse(JSON.parse(x)),
958
- `Failed to parse 'ListAgentTasksHistory' from JSON`,
2495
+ (x) => ListAgentTasksTaskArtifact$inboundSchema.parse(JSON.parse(x)),
2496
+ `Failed to parse 'ListAgentTasksTaskArtifact' from JSON`,
959
2497
  );
960
2498
  }
961
2499
 
962
2500
  /** @internal */
963
- export const ListAgentTasksAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
964
- typeof ListAgentTasksAgentsResponseKind
965
- > = z.nativeEnum(ListAgentTasksAgentsResponseKind);
966
- /** @internal */
967
- export const ListAgentTasksAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
968
- typeof ListAgentTasksAgentsResponseKind
969
- > = ListAgentTasksAgentsResponseKind$inboundSchema;
970
-
971
- /** @internal */
972
- export const ListAgentTasksArtifacts$inboundSchema: z.ZodType<
973
- ListAgentTasksArtifacts,
2501
+ export const ExtendedTaskResponse$inboundSchema: z.ZodType<
2502
+ ExtendedTaskResponse,
974
2503
  z.ZodTypeDef,
975
2504
  unknown
976
2505
  > = z.object({
977
- kind: ListAgentTasksAgentsResponseKind$inboundSchema,
978
- artifactId: z.string(),
979
- name: z.string(),
980
- type: z.string(),
981
- url: z.string().optional(),
982
- data: z.any().optional(),
983
- });
984
- /** @internal */
985
- export type ListAgentTasksArtifacts$Outbound = {
986
- kind: string;
987
- artifactId: string;
988
- name: string;
989
- type: string;
990
- url?: string | undefined;
991
- data?: any | undefined;
992
- };
993
-
994
- /** @internal */
995
- export const ListAgentTasksArtifacts$outboundSchema: z.ZodType<
996
- ListAgentTasksArtifacts$Outbound,
997
- z.ZodTypeDef,
998
- ListAgentTasksArtifacts
999
- > = z.object({
1000
- kind: ListAgentTasksAgentsResponseKind$outboundSchema,
1001
- artifactId: z.string(),
1002
- name: z.string(),
1003
- type: z.string(),
1004
- url: z.string().optional(),
1005
- data: z.any().optional(),
2506
+ id: z.string(),
2507
+ contextId: z.string(),
2508
+ kind: ListAgentTasksKind$inboundSchema,
2509
+ status: z.lazy(() => ListAgentTasksTaskStatus$inboundSchema),
2510
+ history: z.array(
2511
+ z.lazy(() => ListAgentTasksExtendedA2AMessage$inboundSchema),
2512
+ ),
2513
+ artifacts: z.array(z.lazy(() => ListAgentTasksTaskArtifact$inboundSchema))
2514
+ .optional(),
2515
+ metadata: z.record(z.any()).optional(),
1006
2516
  });
1007
-
1008
- export function listAgentTasksArtifactsToJSON(
1009
- listAgentTasksArtifacts: ListAgentTasksArtifacts,
1010
- ): string {
1011
- return JSON.stringify(
1012
- ListAgentTasksArtifacts$outboundSchema.parse(listAgentTasksArtifacts),
1013
- );
1014
- }
1015
- export function listAgentTasksArtifactsFromJSON(
1016
- jsonString: string,
1017
- ): SafeParseResult<ListAgentTasksArtifacts, SDKValidationError> {
1018
- return safeParse(
1019
- jsonString,
1020
- (x) => ListAgentTasksArtifacts$inboundSchema.parse(JSON.parse(x)),
1021
- `Failed to parse 'ListAgentTasksArtifacts' from JSON`,
1022
- );
1023
- }
1024
-
1025
2517
  /** @internal */
1026
- export const Tasks$inboundSchema: z.ZodType<Tasks, z.ZodTypeDef, unknown> = z
1027
- .object({
1028
- id: z.string(),
1029
- contextId: z.string(),
1030
- kind: ListAgentTasksKind$inboundSchema,
1031
- status: z.lazy(() => ListAgentTasksStatus$inboundSchema),
1032
- history: z.array(z.lazy(() => ListAgentTasksHistory$inboundSchema)),
1033
- artifacts: z.array(z.lazy(() => ListAgentTasksArtifacts$inboundSchema))
1034
- .optional(),
1035
- metadata: z.record(z.any()).optional(),
1036
- });
1037
- /** @internal */
1038
- export type Tasks$Outbound = {
2518
+ export type ExtendedTaskResponse$Outbound = {
1039
2519
  id: string;
1040
2520
  contextId: string;
1041
2521
  kind: string;
1042
- status: ListAgentTasksStatus$Outbound;
1043
- history: Array<ListAgentTasksHistory$Outbound>;
1044
- artifacts?: Array<ListAgentTasksArtifacts$Outbound> | undefined;
2522
+ status: ListAgentTasksTaskStatus$Outbound;
2523
+ history: Array<ListAgentTasksExtendedA2AMessage$Outbound>;
2524
+ artifacts?: Array<ListAgentTasksTaskArtifact$Outbound> | undefined;
1045
2525
  metadata?: { [k: string]: any } | undefined;
1046
2526
  };
1047
2527
 
1048
2528
  /** @internal */
1049
- export const Tasks$outboundSchema: z.ZodType<
1050
- Tasks$Outbound,
2529
+ export const ExtendedTaskResponse$outboundSchema: z.ZodType<
2530
+ ExtendedTaskResponse$Outbound,
1051
2531
  z.ZodTypeDef,
1052
- Tasks
2532
+ ExtendedTaskResponse
1053
2533
  > = z.object({
1054
2534
  id: z.string(),
1055
2535
  contextId: z.string(),
1056
2536
  kind: ListAgentTasksKind$outboundSchema,
1057
- status: z.lazy(() => ListAgentTasksStatus$outboundSchema),
1058
- history: z.array(z.lazy(() => ListAgentTasksHistory$outboundSchema)),
1059
- artifacts: z.array(z.lazy(() => ListAgentTasksArtifacts$outboundSchema))
2537
+ status: z.lazy(() => ListAgentTasksTaskStatus$outboundSchema),
2538
+ history: z.array(
2539
+ z.lazy(() => ListAgentTasksExtendedA2AMessage$outboundSchema),
2540
+ ),
2541
+ artifacts: z.array(z.lazy(() => ListAgentTasksTaskArtifact$outboundSchema))
1060
2542
  .optional(),
1061
2543
  metadata: z.record(z.any()).optional(),
1062
2544
  });
1063
2545
 
1064
- export function tasksToJSON(tasks: Tasks): string {
1065
- return JSON.stringify(Tasks$outboundSchema.parse(tasks));
2546
+ export function extendedTaskResponseToJSON(
2547
+ extendedTaskResponse: ExtendedTaskResponse,
2548
+ ): string {
2549
+ return JSON.stringify(
2550
+ ExtendedTaskResponse$outboundSchema.parse(extendedTaskResponse),
2551
+ );
1066
2552
  }
1067
- export function tasksFromJSON(
2553
+ export function extendedTaskResponseFromJSON(
1068
2554
  jsonString: string,
1069
- ): SafeParseResult<Tasks, SDKValidationError> {
2555
+ ): SafeParseResult<ExtendedTaskResponse, SDKValidationError> {
1070
2556
  return safeParse(
1071
2557
  jsonString,
1072
- (x) => Tasks$inboundSchema.parse(JSON.parse(x)),
1073
- `Failed to parse 'Tasks' from JSON`,
2558
+ (x) => ExtendedTaskResponse$inboundSchema.parse(JSON.parse(x)),
2559
+ `Failed to parse 'ExtendedTaskResponse' from JSON`,
1074
2560
  );
1075
2561
  }
1076
2562
 
1077
2563
  /** @internal */
1078
- export const ListAgentTasksResponseBody$inboundSchema: z.ZodType<
1079
- ListAgentTasksResponseBody,
2564
+ export const ListAgentTasksAgentTasksListResponse$inboundSchema: z.ZodType<
2565
+ ListAgentTasksAgentTasksListResponse,
1080
2566
  z.ZodTypeDef,
1081
2567
  unknown
1082
2568
  > = z.object({
1083
- tasks: z.array(z.lazy(() => Tasks$inboundSchema)),
2569
+ tasks: z.array(z.lazy(() => ExtendedTaskResponse$inboundSchema)),
1084
2570
  overall_total: z.number(),
1085
2571
  }).transform((v) => {
1086
2572
  return remap$(v, {
@@ -1088,18 +2574,18 @@ export const ListAgentTasksResponseBody$inboundSchema: z.ZodType<
1088
2574
  });
1089
2575
  });
1090
2576
  /** @internal */
1091
- export type ListAgentTasksResponseBody$Outbound = {
1092
- tasks: Array<Tasks$Outbound>;
2577
+ export type ListAgentTasksAgentTasksListResponse$Outbound = {
2578
+ tasks: Array<ExtendedTaskResponse$Outbound>;
1093
2579
  overall_total: number;
1094
2580
  };
1095
2581
 
1096
2582
  /** @internal */
1097
- export const ListAgentTasksResponseBody$outboundSchema: z.ZodType<
1098
- ListAgentTasksResponseBody$Outbound,
2583
+ export const ListAgentTasksAgentTasksListResponse$outboundSchema: z.ZodType<
2584
+ ListAgentTasksAgentTasksListResponse$Outbound,
1099
2585
  z.ZodTypeDef,
1100
- ListAgentTasksResponseBody
2586
+ ListAgentTasksAgentTasksListResponse
1101
2587
  > = z.object({
1102
- tasks: z.array(z.lazy(() => Tasks$outboundSchema)),
2588
+ tasks: z.array(z.lazy(() => ExtendedTaskResponse$outboundSchema)),
1103
2589
  overallTotal: z.number(),
1104
2590
  }).transform((v) => {
1105
2591
  return remap$(v, {
@@ -1107,19 +2593,22 @@ export const ListAgentTasksResponseBody$outboundSchema: z.ZodType<
1107
2593
  });
1108
2594
  });
1109
2595
 
1110
- export function listAgentTasksResponseBodyToJSON(
1111
- listAgentTasksResponseBody: ListAgentTasksResponseBody,
2596
+ export function listAgentTasksAgentTasksListResponseToJSON(
2597
+ listAgentTasksAgentTasksListResponse: ListAgentTasksAgentTasksListResponse,
1112
2598
  ): string {
1113
2599
  return JSON.stringify(
1114
- ListAgentTasksResponseBody$outboundSchema.parse(listAgentTasksResponseBody),
2600
+ ListAgentTasksAgentTasksListResponse$outboundSchema.parse(
2601
+ listAgentTasksAgentTasksListResponse,
2602
+ ),
1115
2603
  );
1116
2604
  }
1117
- export function listAgentTasksResponseBodyFromJSON(
2605
+ export function listAgentTasksAgentTasksListResponseFromJSON(
1118
2606
  jsonString: string,
1119
- ): SafeParseResult<ListAgentTasksResponseBody, SDKValidationError> {
2607
+ ): SafeParseResult<ListAgentTasksAgentTasksListResponse, SDKValidationError> {
1120
2608
  return safeParse(
1121
2609
  jsonString,
1122
- (x) => ListAgentTasksResponseBody$inboundSchema.parse(JSON.parse(x)),
1123
- `Failed to parse 'ListAgentTasksResponseBody' from JSON`,
2610
+ (x) =>
2611
+ ListAgentTasksAgentTasksListResponse$inboundSchema.parse(JSON.parse(x)),
2612
+ `Failed to parse 'ListAgentTasksAgentTasksListResponse' from JSON`,
1124
2613
  );
1125
2614
  }