@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
@@ -14,16 +14,34 @@ export type GetAgentTaskRequest = {
14
14
  taskId: string;
15
15
  };
16
16
 
17
+ /**
18
+ * A2A entity type
19
+ */
17
20
  export const GetAgentTaskKind = {
18
21
  Task: "task",
19
22
  } as const;
23
+ /**
24
+ * A2A entity type
25
+ */
20
26
  export type GetAgentTaskKind = ClosedEnum<typeof GetAgentTaskKind>;
21
27
 
22
- export type GetAgentTaskStatus = {
23
- state: string;
24
- timestamp?: string | undefined;
25
- message?: any | undefined;
26
- };
28
+ /**
29
+ * 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.
30
+ */
31
+ export const GetAgentTaskTaskState = {
32
+ Submitted: "submitted",
33
+ Working: "working",
34
+ InputRequired: "input-required",
35
+ AuthRequired: "auth-required",
36
+ Completed: "completed",
37
+ Failed: "failed",
38
+ Canceled: "canceled",
39
+ Rejected: "rejected",
40
+ } as const;
41
+ /**
42
+ * 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.
43
+ */
44
+ export type GetAgentTaskTaskState = ClosedEnum<typeof GetAgentTaskTaskState>;
27
45
 
28
46
  export const GetAgentTaskAgentsResponseKind = {
29
47
  Message: "message",
@@ -33,18 +51,221 @@ export type GetAgentTaskAgentsResponseKind = ClosedEnum<
33
51
  >;
34
52
 
35
53
  /**
36
- * Extended A2A message role
54
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
55
+ */
56
+ export const GetAgentTaskExtendedMessageRole = {
57
+ User: "user",
58
+ Agent: "agent",
59
+ Tool: "tool",
60
+ System: "system",
61
+ } as const;
62
+ /**
63
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
64
+ */
65
+ export type GetAgentTaskExtendedMessageRole = ClosedEnum<
66
+ typeof GetAgentTaskExtendedMessageRole
67
+ >;
68
+
69
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind =
70
+ {
71
+ ToolResult: "tool_result",
72
+ } as const;
73
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind =
74
+ ClosedEnum<
75
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind
76
+ >;
77
+
78
+ /**
79
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
80
+ */
81
+ export type GetAgentTaskPartsToolResultPart = {
82
+ kind:
83
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind;
84
+ toolCallId: string;
85
+ result?: any | undefined;
86
+ metadata?: { [k: string]: any } | undefined;
87
+ };
88
+
89
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind =
90
+ {
91
+ ToolCall: "tool_call",
92
+ } as const;
93
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind =
94
+ ClosedEnum<
95
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind
96
+ >;
97
+
98
+ /**
99
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
100
+ */
101
+ export type GetAgentTaskPartsToolCallPart = {
102
+ kind:
103
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind;
104
+ toolName: string;
105
+ toolCallId: string;
106
+ arguments: { [k: string]: any };
107
+ metadata?: { [k: string]: any } | undefined;
108
+ };
109
+
110
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind =
111
+ {
112
+ File: "file",
113
+ } as const;
114
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind =
115
+ ClosedEnum<
116
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind
117
+ >;
118
+
119
+ /**
120
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
121
+ */
122
+ export type GetAgentTaskFileAgentsResponseFileInURIFormat = {
123
+ /**
124
+ * URL for the File content
125
+ */
126
+ uri: string;
127
+ /**
128
+ * Optional mimeType for the file
129
+ */
130
+ mimeType?: string | undefined;
131
+ /**
132
+ * Optional name for the file
133
+ */
134
+ name?: string | undefined;
135
+ };
136
+
137
+ /**
138
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
139
+ */
140
+ export type GetAgentTaskFileAgentsResponseBinaryFormat = {
141
+ /**
142
+ * base64 encoded content of the file
143
+ */
144
+ bytes: string;
145
+ /**
146
+ * Optional mimeType for the file
147
+ */
148
+ mimeType?: string | undefined;
149
+ /**
150
+ * Optional name for the file
151
+ */
152
+ name?: string | undefined;
153
+ };
154
+
155
+ export type GetAgentTaskPartsAgentsFile =
156
+ | GetAgentTaskFileAgentsResponseBinaryFormat
157
+ | GetAgentTaskFileAgentsResponseFileInURIFormat;
158
+
159
+ /**
160
+ * 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.
161
+ */
162
+ export type GetAgentTaskPartsAgentsFilePart = {
163
+ kind:
164
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind;
165
+ file:
166
+ | GetAgentTaskFileAgentsResponseBinaryFormat
167
+ | GetAgentTaskFileAgentsResponseFileInURIFormat;
168
+ metadata?: { [k: string]: any } | undefined;
169
+ };
170
+
171
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind =
172
+ {
173
+ Data: "data",
174
+ } as const;
175
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind =
176
+ ClosedEnum<
177
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind
178
+ >;
179
+
180
+ /**
181
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
182
+ */
183
+ export type GetAgentTaskPartsDataPart = {
184
+ kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind;
185
+ data: { [k: string]: any };
186
+ metadata?: { [k: string]: any } | undefined;
187
+ };
188
+
189
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind =
190
+ {
191
+ Text: "text",
192
+ } as const;
193
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind =
194
+ ClosedEnum<
195
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind
196
+ >;
197
+
198
+ /**
199
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
200
+ */
201
+ export type GetAgentTaskPartsAgentsTextPart = {
202
+ kind:
203
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind;
204
+ text: string;
205
+ };
206
+
207
+ export type GetAgentTaskAgentsParts =
208
+ | GetAgentTaskPartsToolCallPart
209
+ | GetAgentTaskPartsAgentsTextPart
210
+ | GetAgentTaskPartsDataPart
211
+ | GetAgentTaskPartsAgentsFilePart
212
+ | GetAgentTaskPartsToolResultPart;
213
+
214
+ /**
215
+ * Optional A2A message providing additional context about the current status
216
+ */
217
+ export type GetAgentTaskTaskStatusMessage = {
218
+ kind: GetAgentTaskAgentsResponseKind;
219
+ messageId: string;
220
+ /**
221
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
222
+ */
223
+ role: GetAgentTaskExtendedMessageRole;
224
+ parts: Array<
225
+ | GetAgentTaskPartsToolCallPart
226
+ | GetAgentTaskPartsAgentsTextPart
227
+ | GetAgentTaskPartsDataPart
228
+ | GetAgentTaskPartsAgentsFilePart
229
+ | GetAgentTaskPartsToolResultPart
230
+ >;
231
+ };
232
+
233
+ /**
234
+ * Current task execution status
235
+ */
236
+ export type GetAgentTaskTaskStatus = {
237
+ /**
238
+ * 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.
239
+ */
240
+ state: GetAgentTaskTaskState;
241
+ /**
242
+ * ISO 8601 timestamp of when the status was updated
243
+ */
244
+ timestamp?: string | undefined;
245
+ /**
246
+ * Optional A2A message providing additional context about the current status
247
+ */
248
+ message?: GetAgentTaskTaskStatusMessage | undefined;
249
+ };
250
+
251
+ export const GetAgentTaskAgentsKind = {
252
+ Message: "message",
253
+ } as const;
254
+ export type GetAgentTaskAgentsKind = ClosedEnum<typeof GetAgentTaskAgentsKind>;
255
+
256
+ /**
257
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
37
258
  */
38
- export const GetAgentTaskRole = {
259
+ export const ExtendedMessageRole = {
39
260
  User: "user",
40
261
  Agent: "agent",
41
262
  Tool: "tool",
42
263
  System: "system",
43
264
  } as const;
44
265
  /**
45
- * Extended A2A message role
266
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
46
267
  */
47
- export type GetAgentTaskRole = ClosedEnum<typeof GetAgentTaskRole>;
268
+ export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
48
269
 
49
270
  export const GetAgentTaskPartsAgentsResponse200Kind = {
50
271
  ToolResult: "tool_result",
@@ -53,7 +274,10 @@ export type GetAgentTaskPartsAgentsResponse200Kind = ClosedEnum<
53
274
  typeof GetAgentTaskPartsAgentsResponse200Kind
54
275
  >;
55
276
 
56
- export type Parts5 = {
277
+ /**
278
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
279
+ */
280
+ export type PartsToolResultPart = {
57
281
  kind: GetAgentTaskPartsAgentsResponse200Kind;
58
282
  toolCallId: string;
59
283
  result?: any | undefined;
@@ -67,7 +291,10 @@ export type GetAgentTaskPartsAgentsResponseKind = ClosedEnum<
67
291
  typeof GetAgentTaskPartsAgentsResponseKind
68
292
  >;
69
293
 
70
- export type Parts4 = {
294
+ /**
295
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
296
+ */
297
+ export type ToolCallPart = {
71
298
  kind: GetAgentTaskPartsAgentsResponseKind;
72
299
  toolName: string;
73
300
  toolCallId: string;
@@ -85,7 +312,7 @@ export type GetAgentTaskPartsAgentsKind = ClosedEnum<
85
312
  /**
86
313
  * File in URI format. Check in the model's documentation for the supported mime types for the URI format
87
314
  */
88
- export type GetAgentTaskFileFileInURIFormat = {
315
+ export type GetAgentTaskFileAgentsFileInURIFormat = {
89
316
  /**
90
317
  * URL for the File content
91
318
  */
@@ -103,7 +330,7 @@ export type GetAgentTaskFileFileInURIFormat = {
103
330
  /**
104
331
  * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
105
332
  */
106
- export type GetAgentTaskFileBinaryFormat = {
333
+ export type GetAgentTaskFileAgentsBinaryFormat = {
107
334
  /**
108
335
  * base64 encoded content of the file
109
336
  */
@@ -119,12 +346,17 @@ export type GetAgentTaskFileBinaryFormat = {
119
346
  };
120
347
 
121
348
  export type PartsFile =
122
- | GetAgentTaskFileBinaryFormat
123
- | GetAgentTaskFileFileInURIFormat;
349
+ | GetAgentTaskFileAgentsBinaryFormat
350
+ | GetAgentTaskFileAgentsFileInURIFormat;
124
351
 
125
- export type Parts3 = {
352
+ /**
353
+ * 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.
354
+ */
355
+ export type PartsFilePart = {
126
356
  kind: GetAgentTaskPartsAgentsKind;
127
- file: GetAgentTaskFileBinaryFormat | GetAgentTaskFileFileInURIFormat;
357
+ file:
358
+ | GetAgentTaskFileAgentsBinaryFormat
359
+ | GetAgentTaskFileAgentsFileInURIFormat;
128
360
  metadata?: { [k: string]: any } | undefined;
129
361
  };
130
362
 
@@ -133,7 +365,10 @@ export const GetAgentTaskPartsKind = {
133
365
  } as const;
134
366
  export type GetAgentTaskPartsKind = ClosedEnum<typeof GetAgentTaskPartsKind>;
135
367
 
136
- export type Parts2 = {
368
+ /**
369
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
370
+ */
371
+ export type DataPart = {
137
372
  kind: GetAgentTaskPartsKind;
138
373
  data: { [k: string]: any };
139
374
  metadata?: { [k: string]: any } | undefined;
@@ -144,50 +379,218 @@ export const PartsKind = {
144
379
  } as const;
145
380
  export type PartsKind = ClosedEnum<typeof PartsKind>;
146
381
 
147
- export type Parts1 = {
382
+ /**
383
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
384
+ */
385
+ export type PartsTextPart = {
148
386
  kind: PartsKind;
149
387
  text: string;
150
388
  };
151
389
 
152
- export type Parts = Parts4 | Parts1 | Parts2 | Parts3 | Parts5;
390
+ export type Parts =
391
+ | ToolCallPart
392
+ | PartsTextPart
393
+ | DataPart
394
+ | PartsFilePart
395
+ | PartsToolResultPart;
153
396
 
154
- export type History = {
155
- kind: GetAgentTaskAgentsResponseKind;
397
+ /**
398
+ * Extended Agent-to-Agent protocol message with support for tool calls and tool results. Extends the base A2A message format with Orquesta-specific features.
399
+ */
400
+ export type ExtendedA2AMessage = {
401
+ kind: GetAgentTaskAgentsKind;
402
+ /**
403
+ * Unique identifier for the message
404
+ */
156
405
  messageId: string;
157
406
  /**
158
- * Extended A2A message role
407
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
408
+ */
409
+ role: ExtendedMessageRole;
410
+ /**
411
+ * Array of message parts (text, file, tool_call, tool_result)
412
+ */
413
+ parts: Array<
414
+ | ToolCallPart
415
+ | PartsTextPart
416
+ | DataPart
417
+ | PartsFilePart
418
+ | PartsToolResultPart
419
+ >;
420
+ /**
421
+ * Associated task ID if applicable
159
422
  */
160
- role: GetAgentTaskRole;
161
- parts: Array<Parts4 | Parts1 | Parts2 | Parts3 | Parts5>;
162
423
  taskId?: string | undefined;
424
+ /**
425
+ * Correlation ID for execution tracking
426
+ */
163
427
  contextId?: string | undefined;
428
+ /**
429
+ * Additional message metadata
430
+ */
164
431
  metadata?: { [k: string]: any } | undefined;
165
432
  };
166
433
 
167
- export const GetAgentTaskAgentsKind = {
168
- Artifact: "artifact",
434
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind =
435
+ {
436
+ Data: "data",
437
+ } as const;
438
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind =
439
+ ClosedEnum<
440
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
441
+ >;
442
+
443
+ /**
444
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
445
+ */
446
+ export type PartsDataPart = {
447
+ kind:
448
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind;
449
+ data: { [k: string]: any };
450
+ metadata?: { [k: string]: any } | undefined;
451
+ };
452
+
453
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind =
454
+ {
455
+ File: "file",
456
+ } as const;
457
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind =
458
+ ClosedEnum<
459
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
460
+ >;
461
+
462
+ /**
463
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
464
+ */
465
+ export type GetAgentTaskFileFileInURIFormat = {
466
+ /**
467
+ * URL for the File content
468
+ */
469
+ uri: string;
470
+ /**
471
+ * Optional mimeType for the file
472
+ */
473
+ mimeType?: string | undefined;
474
+ /**
475
+ * Optional name for the file
476
+ */
477
+ name?: string | undefined;
478
+ };
479
+
480
+ /**
481
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
482
+ */
483
+ export type GetAgentTaskFileBinaryFormat = {
484
+ /**
485
+ * base64 encoded content of the file
486
+ */
487
+ bytes: string;
488
+ /**
489
+ * Optional mimeType for the file
490
+ */
491
+ mimeType?: string | undefined;
492
+ /**
493
+ * Optional name for the file
494
+ */
495
+ name?: string | undefined;
496
+ };
497
+
498
+ export type GetAgentTaskPartsFile =
499
+ | GetAgentTaskFileBinaryFormat
500
+ | GetAgentTaskFileFileInURIFormat;
501
+
502
+ /**
503
+ * 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.
504
+ */
505
+ export type GetAgentTaskPartsFilePart = {
506
+ kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind;
507
+ file: GetAgentTaskFileBinaryFormat | GetAgentTaskFileFileInURIFormat;
508
+ metadata?: { [k: string]: any } | undefined;
509
+ };
510
+
511
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind = {
512
+ Text: "text",
169
513
  } as const;
170
- export type GetAgentTaskAgentsKind = ClosedEnum<typeof GetAgentTaskAgentsKind>;
514
+ export type GetAgentTaskPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
515
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
516
+ >;
171
517
 
172
- export type Artifacts = {
173
- kind: GetAgentTaskAgentsKind;
518
+ /**
519
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
520
+ */
521
+ export type GetAgentTaskPartsTextPart = {
522
+ kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONKind;
523
+ text: string;
524
+ };
525
+
526
+ export type GetAgentTaskParts =
527
+ | GetAgentTaskPartsTextPart
528
+ | GetAgentTaskPartsFilePart
529
+ | PartsDataPart;
530
+
531
+ /**
532
+ * A file or data artifact produced by the agent during task execution. Follows the A2A SDK Artifact structure with required name field.
533
+ */
534
+ export type TaskArtifact = {
535
+ /**
536
+ * Unique identifier for the artifact (ULID format)
537
+ */
174
538
  artifactId: string;
539
+ /**
540
+ * Required name for the artifact (e.g., filename or descriptive title)
541
+ */
175
542
  name: string;
176
- type: string;
177
- url?: string | undefined;
178
- data?: any | undefined;
543
+ /**
544
+ * Optional human-readable description of the artifact
545
+ */
546
+ description?: string | undefined;
547
+ /**
548
+ * Array of artifact content parts (text, file, or data). Does not include tool_call or tool_result parts.
549
+ */
550
+ parts: Array<
551
+ GetAgentTaskPartsTextPart | GetAgentTaskPartsFilePart | PartsDataPart
552
+ >;
553
+ /**
554
+ * File extensions associated with this artifact (e.g., [".pdf"])
555
+ */
556
+ extensions?: Array<string> | undefined;
557
+ /**
558
+ * Additional artifact metadata as key-value pairs
559
+ */
560
+ metadata?: { [k: string]: any } | undefined;
179
561
  };
180
562
 
181
563
  /**
182
- * Agent task retrieved
564
+ * Agent task execution response format with full conversation history and artifacts. Used for API responses when retrieving task details.
183
565
  */
184
- export type GetAgentTaskResponseBody = {
566
+ export type GetAgentTaskExtendedTaskResponse = {
567
+ /**
568
+ * Unique task execution identifier
569
+ */
185
570
  id: string;
571
+ /**
572
+ * Correlation ID for tracking
573
+ */
186
574
  contextId: string;
575
+ /**
576
+ * A2A entity type
577
+ */
187
578
  kind: GetAgentTaskKind;
188
- status: GetAgentTaskStatus;
189
- history: Array<History>;
190
- artifacts?: Array<Artifacts> | undefined;
579
+ /**
580
+ * Current task execution status
581
+ */
582
+ status: GetAgentTaskTaskStatus;
583
+ /**
584
+ * Conversation history with all messages exchanged
585
+ */
586
+ history: Array<ExtendedA2AMessage>;
587
+ /**
588
+ * Optional files or data produced during execution
589
+ */
590
+ artifacts?: Array<TaskArtifact> | undefined;
591
+ /**
592
+ * Additional task metadata
593
+ */
191
594
  metadata?: { [k: string]: any } | undefined;
192
595
  };
193
596
 
@@ -253,198 +656,1325 @@ export const GetAgentTaskKind$outboundSchema: z.ZodNativeEnum<
253
656
  > = GetAgentTaskKind$inboundSchema;
254
657
 
255
658
  /** @internal */
256
- export const GetAgentTaskStatus$inboundSchema: z.ZodType<
257
- GetAgentTaskStatus,
659
+ export const GetAgentTaskTaskState$inboundSchema: z.ZodNativeEnum<
660
+ typeof GetAgentTaskTaskState
661
+ > = z.nativeEnum(GetAgentTaskTaskState);
662
+ /** @internal */
663
+ export const GetAgentTaskTaskState$outboundSchema: z.ZodNativeEnum<
664
+ typeof GetAgentTaskTaskState
665
+ > = GetAgentTaskTaskState$inboundSchema;
666
+
667
+ /** @internal */
668
+ export const GetAgentTaskAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
669
+ typeof GetAgentTaskAgentsResponseKind
670
+ > = z.nativeEnum(GetAgentTaskAgentsResponseKind);
671
+ /** @internal */
672
+ export const GetAgentTaskAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
673
+ typeof GetAgentTaskAgentsResponseKind
674
+ > = GetAgentTaskAgentsResponseKind$inboundSchema;
675
+
676
+ /** @internal */
677
+ export const GetAgentTaskExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
678
+ typeof GetAgentTaskExtendedMessageRole
679
+ > = z.nativeEnum(GetAgentTaskExtendedMessageRole);
680
+ /** @internal */
681
+ export const GetAgentTaskExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
682
+ typeof GetAgentTaskExtendedMessageRole
683
+ > = GetAgentTaskExtendedMessageRole$inboundSchema;
684
+
685
+ /** @internal */
686
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind$inboundSchema:
687
+ z.ZodNativeEnum<
688
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind
689
+ > = z.nativeEnum(
690
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind,
691
+ );
692
+ /** @internal */
693
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind$outboundSchema:
694
+ z.ZodNativeEnum<
695
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind
696
+ > =
697
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind$inboundSchema;
698
+
699
+ /** @internal */
700
+ export const GetAgentTaskPartsToolResultPart$inboundSchema: z.ZodType<
701
+ GetAgentTaskPartsToolResultPart,
702
+ z.ZodTypeDef,
703
+ unknown
704
+ > = z.object({
705
+ kind:
706
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind$inboundSchema,
707
+ tool_call_id: z.string(),
708
+ result: z.any().optional(),
709
+ metadata: z.record(z.any()).optional(),
710
+ }).transform((v) => {
711
+ return remap$(v, {
712
+ "tool_call_id": "toolCallId",
713
+ });
714
+ });
715
+ /** @internal */
716
+ export type GetAgentTaskPartsToolResultPart$Outbound = {
717
+ kind: string;
718
+ tool_call_id: string;
719
+ result?: any | undefined;
720
+ metadata?: { [k: string]: any } | undefined;
721
+ };
722
+
723
+ /** @internal */
724
+ export const GetAgentTaskPartsToolResultPart$outboundSchema: z.ZodType<
725
+ GetAgentTaskPartsToolResultPart$Outbound,
726
+ z.ZodTypeDef,
727
+ GetAgentTaskPartsToolResultPart
728
+ > = z.object({
729
+ kind:
730
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage5Kind$outboundSchema,
731
+ toolCallId: z.string(),
732
+ result: z.any().optional(),
733
+ metadata: z.record(z.any()).optional(),
734
+ }).transform((v) => {
735
+ return remap$(v, {
736
+ toolCallId: "tool_call_id",
737
+ });
738
+ });
739
+
740
+ export function getAgentTaskPartsToolResultPartToJSON(
741
+ getAgentTaskPartsToolResultPart: GetAgentTaskPartsToolResultPart,
742
+ ): string {
743
+ return JSON.stringify(
744
+ GetAgentTaskPartsToolResultPart$outboundSchema.parse(
745
+ getAgentTaskPartsToolResultPart,
746
+ ),
747
+ );
748
+ }
749
+ export function getAgentTaskPartsToolResultPartFromJSON(
750
+ jsonString: string,
751
+ ): SafeParseResult<GetAgentTaskPartsToolResultPart, SDKValidationError> {
752
+ return safeParse(
753
+ jsonString,
754
+ (x) => GetAgentTaskPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
755
+ `Failed to parse 'GetAgentTaskPartsToolResultPart' from JSON`,
756
+ );
757
+ }
758
+
759
+ /** @internal */
760
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind$inboundSchema:
761
+ z.ZodNativeEnum<
762
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind
763
+ > = z.nativeEnum(
764
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind,
765
+ );
766
+ /** @internal */
767
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind$outboundSchema:
768
+ z.ZodNativeEnum<
769
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind
770
+ > =
771
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind$inboundSchema;
772
+
773
+ /** @internal */
774
+ export const GetAgentTaskPartsToolCallPart$inboundSchema: z.ZodType<
775
+ GetAgentTaskPartsToolCallPart,
776
+ z.ZodTypeDef,
777
+ unknown
778
+ > = z.object({
779
+ kind:
780
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind$inboundSchema,
781
+ tool_name: z.string(),
782
+ tool_call_id: z.string(),
783
+ arguments: z.record(z.any()),
784
+ metadata: z.record(z.any()).optional(),
785
+ }).transform((v) => {
786
+ return remap$(v, {
787
+ "tool_name": "toolName",
788
+ "tool_call_id": "toolCallId",
789
+ });
790
+ });
791
+ /** @internal */
792
+ export type GetAgentTaskPartsToolCallPart$Outbound = {
793
+ kind: string;
794
+ tool_name: string;
795
+ tool_call_id: string;
796
+ arguments: { [k: string]: any };
797
+ metadata?: { [k: string]: any } | undefined;
798
+ };
799
+
800
+ /** @internal */
801
+ export const GetAgentTaskPartsToolCallPart$outboundSchema: z.ZodType<
802
+ GetAgentTaskPartsToolCallPart$Outbound,
803
+ z.ZodTypeDef,
804
+ GetAgentTaskPartsToolCallPart
805
+ > = z.object({
806
+ kind:
807
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage4Kind$outboundSchema,
808
+ toolName: z.string(),
809
+ toolCallId: z.string(),
810
+ arguments: z.record(z.any()),
811
+ metadata: z.record(z.any()).optional(),
812
+ }).transform((v) => {
813
+ return remap$(v, {
814
+ toolName: "tool_name",
815
+ toolCallId: "tool_call_id",
816
+ });
817
+ });
818
+
819
+ export function getAgentTaskPartsToolCallPartToJSON(
820
+ getAgentTaskPartsToolCallPart: GetAgentTaskPartsToolCallPart,
821
+ ): string {
822
+ return JSON.stringify(
823
+ GetAgentTaskPartsToolCallPart$outboundSchema.parse(
824
+ getAgentTaskPartsToolCallPart,
825
+ ),
826
+ );
827
+ }
828
+ export function getAgentTaskPartsToolCallPartFromJSON(
829
+ jsonString: string,
830
+ ): SafeParseResult<GetAgentTaskPartsToolCallPart, SDKValidationError> {
831
+ return safeParse(
832
+ jsonString,
833
+ (x) => GetAgentTaskPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
834
+ `Failed to parse 'GetAgentTaskPartsToolCallPart' from JSON`,
835
+ );
836
+ }
837
+
838
+ /** @internal */
839
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind$inboundSchema:
840
+ z.ZodNativeEnum<
841
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind
842
+ > = z.nativeEnum(
843
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind,
844
+ );
845
+ /** @internal */
846
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind$outboundSchema:
847
+ z.ZodNativeEnum<
848
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind
849
+ > =
850
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind$inboundSchema;
851
+
852
+ /** @internal */
853
+ export const GetAgentTaskFileAgentsResponseFileInURIFormat$inboundSchema:
854
+ z.ZodType<
855
+ GetAgentTaskFileAgentsResponseFileInURIFormat,
856
+ z.ZodTypeDef,
857
+ unknown
858
+ > = z.object({
859
+ uri: z.string(),
860
+ mimeType: z.string().optional(),
861
+ name: z.string().optional(),
862
+ });
863
+ /** @internal */
864
+ export type GetAgentTaskFileAgentsResponseFileInURIFormat$Outbound = {
865
+ uri: string;
866
+ mimeType?: string | undefined;
867
+ name?: string | undefined;
868
+ };
869
+
870
+ /** @internal */
871
+ export const GetAgentTaskFileAgentsResponseFileInURIFormat$outboundSchema:
872
+ z.ZodType<
873
+ GetAgentTaskFileAgentsResponseFileInURIFormat$Outbound,
874
+ z.ZodTypeDef,
875
+ GetAgentTaskFileAgentsResponseFileInURIFormat
876
+ > = z.object({
877
+ uri: z.string(),
878
+ mimeType: z.string().optional(),
879
+ name: z.string().optional(),
880
+ });
881
+
882
+ export function getAgentTaskFileAgentsResponseFileInURIFormatToJSON(
883
+ getAgentTaskFileAgentsResponseFileInURIFormat:
884
+ GetAgentTaskFileAgentsResponseFileInURIFormat,
885
+ ): string {
886
+ return JSON.stringify(
887
+ GetAgentTaskFileAgentsResponseFileInURIFormat$outboundSchema.parse(
888
+ getAgentTaskFileAgentsResponseFileInURIFormat,
889
+ ),
890
+ );
891
+ }
892
+ export function getAgentTaskFileAgentsResponseFileInURIFormatFromJSON(
893
+ jsonString: string,
894
+ ): SafeParseResult<
895
+ GetAgentTaskFileAgentsResponseFileInURIFormat,
896
+ SDKValidationError
897
+ > {
898
+ return safeParse(
899
+ jsonString,
900
+ (x) =>
901
+ GetAgentTaskFileAgentsResponseFileInURIFormat$inboundSchema.parse(
902
+ JSON.parse(x),
903
+ ),
904
+ `Failed to parse 'GetAgentTaskFileAgentsResponseFileInURIFormat' from JSON`,
905
+ );
906
+ }
907
+
908
+ /** @internal */
909
+ export const GetAgentTaskFileAgentsResponseBinaryFormat$inboundSchema:
910
+ z.ZodType<GetAgentTaskFileAgentsResponseBinaryFormat, z.ZodTypeDef, unknown> =
911
+ z.object({
912
+ bytes: z.string(),
913
+ mimeType: z.string().optional(),
914
+ name: z.string().optional(),
915
+ });
916
+ /** @internal */
917
+ export type GetAgentTaskFileAgentsResponseBinaryFormat$Outbound = {
918
+ bytes: string;
919
+ mimeType?: string | undefined;
920
+ name?: string | undefined;
921
+ };
922
+
923
+ /** @internal */
924
+ export const GetAgentTaskFileAgentsResponseBinaryFormat$outboundSchema:
925
+ z.ZodType<
926
+ GetAgentTaskFileAgentsResponseBinaryFormat$Outbound,
927
+ z.ZodTypeDef,
928
+ GetAgentTaskFileAgentsResponseBinaryFormat
929
+ > = z.object({
930
+ bytes: z.string(),
931
+ mimeType: z.string().optional(),
932
+ name: z.string().optional(),
933
+ });
934
+
935
+ export function getAgentTaskFileAgentsResponseBinaryFormatToJSON(
936
+ getAgentTaskFileAgentsResponseBinaryFormat:
937
+ GetAgentTaskFileAgentsResponseBinaryFormat,
938
+ ): string {
939
+ return JSON.stringify(
940
+ GetAgentTaskFileAgentsResponseBinaryFormat$outboundSchema.parse(
941
+ getAgentTaskFileAgentsResponseBinaryFormat,
942
+ ),
943
+ );
944
+ }
945
+ export function getAgentTaskFileAgentsResponseBinaryFormatFromJSON(
946
+ jsonString: string,
947
+ ): SafeParseResult<
948
+ GetAgentTaskFileAgentsResponseBinaryFormat,
949
+ SDKValidationError
950
+ > {
951
+ return safeParse(
952
+ jsonString,
953
+ (x) =>
954
+ GetAgentTaskFileAgentsResponseBinaryFormat$inboundSchema.parse(
955
+ JSON.parse(x),
956
+ ),
957
+ `Failed to parse 'GetAgentTaskFileAgentsResponseBinaryFormat' from JSON`,
958
+ );
959
+ }
960
+
961
+ /** @internal */
962
+ export const GetAgentTaskPartsAgentsFile$inboundSchema: z.ZodType<
963
+ GetAgentTaskPartsAgentsFile,
964
+ z.ZodTypeDef,
965
+ unknown
966
+ > = z.union([
967
+ z.lazy(() => GetAgentTaskFileAgentsResponseBinaryFormat$inboundSchema),
968
+ z.lazy(() => GetAgentTaskFileAgentsResponseFileInURIFormat$inboundSchema),
969
+ ]);
970
+ /** @internal */
971
+ export type GetAgentTaskPartsAgentsFile$Outbound =
972
+ | GetAgentTaskFileAgentsResponseBinaryFormat$Outbound
973
+ | GetAgentTaskFileAgentsResponseFileInURIFormat$Outbound;
974
+
975
+ /** @internal */
976
+ export const GetAgentTaskPartsAgentsFile$outboundSchema: z.ZodType<
977
+ GetAgentTaskPartsAgentsFile$Outbound,
978
+ z.ZodTypeDef,
979
+ GetAgentTaskPartsAgentsFile
980
+ > = z.union([
981
+ z.lazy(() => GetAgentTaskFileAgentsResponseBinaryFormat$outboundSchema),
982
+ z.lazy(() => GetAgentTaskFileAgentsResponseFileInURIFormat$outboundSchema),
983
+ ]);
984
+
985
+ export function getAgentTaskPartsAgentsFileToJSON(
986
+ getAgentTaskPartsAgentsFile: GetAgentTaskPartsAgentsFile,
987
+ ): string {
988
+ return JSON.stringify(
989
+ GetAgentTaskPartsAgentsFile$outboundSchema.parse(
990
+ getAgentTaskPartsAgentsFile,
991
+ ),
992
+ );
993
+ }
994
+ export function getAgentTaskPartsAgentsFileFromJSON(
995
+ jsonString: string,
996
+ ): SafeParseResult<GetAgentTaskPartsAgentsFile, SDKValidationError> {
997
+ return safeParse(
998
+ jsonString,
999
+ (x) => GetAgentTaskPartsAgentsFile$inboundSchema.parse(JSON.parse(x)),
1000
+ `Failed to parse 'GetAgentTaskPartsAgentsFile' from JSON`,
1001
+ );
1002
+ }
1003
+
1004
+ /** @internal */
1005
+ export const GetAgentTaskPartsAgentsFilePart$inboundSchema: z.ZodType<
1006
+ GetAgentTaskPartsAgentsFilePart,
1007
+ z.ZodTypeDef,
1008
+ unknown
1009
+ > = z.object({
1010
+ kind:
1011
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind$inboundSchema,
1012
+ file: z.union([
1013
+ z.lazy(() => GetAgentTaskFileAgentsResponseBinaryFormat$inboundSchema),
1014
+ z.lazy(() => GetAgentTaskFileAgentsResponseFileInURIFormat$inboundSchema),
1015
+ ]),
1016
+ metadata: z.record(z.any()).optional(),
1017
+ });
1018
+ /** @internal */
1019
+ export type GetAgentTaskPartsAgentsFilePart$Outbound = {
1020
+ kind: string;
1021
+ file:
1022
+ | GetAgentTaskFileAgentsResponseBinaryFormat$Outbound
1023
+ | GetAgentTaskFileAgentsResponseFileInURIFormat$Outbound;
1024
+ metadata?: { [k: string]: any } | undefined;
1025
+ };
1026
+
1027
+ /** @internal */
1028
+ export const GetAgentTaskPartsAgentsFilePart$outboundSchema: z.ZodType<
1029
+ GetAgentTaskPartsAgentsFilePart$Outbound,
1030
+ z.ZodTypeDef,
1031
+ GetAgentTaskPartsAgentsFilePart
1032
+ > = z.object({
1033
+ kind:
1034
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessageKind$outboundSchema,
1035
+ file: z.union([
1036
+ z.lazy(() => GetAgentTaskFileAgentsResponseBinaryFormat$outboundSchema),
1037
+ z.lazy(() => GetAgentTaskFileAgentsResponseFileInURIFormat$outboundSchema),
1038
+ ]),
1039
+ metadata: z.record(z.any()).optional(),
1040
+ });
1041
+
1042
+ export function getAgentTaskPartsAgentsFilePartToJSON(
1043
+ getAgentTaskPartsAgentsFilePart: GetAgentTaskPartsAgentsFilePart,
1044
+ ): string {
1045
+ return JSON.stringify(
1046
+ GetAgentTaskPartsAgentsFilePart$outboundSchema.parse(
1047
+ getAgentTaskPartsAgentsFilePart,
1048
+ ),
1049
+ );
1050
+ }
1051
+ export function getAgentTaskPartsAgentsFilePartFromJSON(
1052
+ jsonString: string,
1053
+ ): SafeParseResult<GetAgentTaskPartsAgentsFilePart, SDKValidationError> {
1054
+ return safeParse(
1055
+ jsonString,
1056
+ (x) => GetAgentTaskPartsAgentsFilePart$inboundSchema.parse(JSON.parse(x)),
1057
+ `Failed to parse 'GetAgentTaskPartsAgentsFilePart' from JSON`,
1058
+ );
1059
+ }
1060
+
1061
+ /** @internal */
1062
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind$inboundSchema:
1063
+ z.ZodNativeEnum<
1064
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind
1065
+ > = z.nativeEnum(
1066
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind,
1067
+ );
1068
+ /** @internal */
1069
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind$outboundSchema:
1070
+ z.ZodNativeEnum<
1071
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind
1072
+ > =
1073
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind$inboundSchema;
1074
+
1075
+ /** @internal */
1076
+ export const GetAgentTaskPartsDataPart$inboundSchema: z.ZodType<
1077
+ GetAgentTaskPartsDataPart,
1078
+ z.ZodTypeDef,
1079
+ unknown
1080
+ > = z.object({
1081
+ kind:
1082
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind$inboundSchema,
1083
+ data: z.record(z.any()),
1084
+ metadata: z.record(z.any()).optional(),
1085
+ });
1086
+ /** @internal */
1087
+ export type GetAgentTaskPartsDataPart$Outbound = {
1088
+ kind: string;
1089
+ data: { [k: string]: any };
1090
+ metadata?: { [k: string]: any } | undefined;
1091
+ };
1092
+
1093
+ /** @internal */
1094
+ export const GetAgentTaskPartsDataPart$outboundSchema: z.ZodType<
1095
+ GetAgentTaskPartsDataPart$Outbound,
1096
+ z.ZodTypeDef,
1097
+ GetAgentTaskPartsDataPart
1098
+ > = z.object({
1099
+ kind:
1100
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusKind$outboundSchema,
1101
+ data: z.record(z.any()),
1102
+ metadata: z.record(z.any()).optional(),
1103
+ });
1104
+
1105
+ export function getAgentTaskPartsDataPartToJSON(
1106
+ getAgentTaskPartsDataPart: GetAgentTaskPartsDataPart,
1107
+ ): string {
1108
+ return JSON.stringify(
1109
+ GetAgentTaskPartsDataPart$outboundSchema.parse(getAgentTaskPartsDataPart),
1110
+ );
1111
+ }
1112
+ export function getAgentTaskPartsDataPartFromJSON(
1113
+ jsonString: string,
1114
+ ): SafeParseResult<GetAgentTaskPartsDataPart, SDKValidationError> {
1115
+ return safeParse(
1116
+ jsonString,
1117
+ (x) => GetAgentTaskPartsDataPart$inboundSchema.parse(JSON.parse(x)),
1118
+ `Failed to parse 'GetAgentTaskPartsDataPart' from JSON`,
1119
+ );
1120
+ }
1121
+
1122
+ /** @internal */
1123
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind$inboundSchema:
1124
+ z.ZodNativeEnum<
1125
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind
1126
+ > = z.nativeEnum(
1127
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind,
1128
+ );
1129
+ /** @internal */
1130
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind$outboundSchema:
1131
+ z.ZodNativeEnum<
1132
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind
1133
+ > =
1134
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind$inboundSchema;
1135
+
1136
+ /** @internal */
1137
+ export const GetAgentTaskPartsAgentsTextPart$inboundSchema: z.ZodType<
1138
+ GetAgentTaskPartsAgentsTextPart,
1139
+ z.ZodTypeDef,
1140
+ unknown
1141
+ > = z.object({
1142
+ kind:
1143
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind$inboundSchema,
1144
+ text: z.string(),
1145
+ });
1146
+ /** @internal */
1147
+ export type GetAgentTaskPartsAgentsTextPart$Outbound = {
1148
+ kind: string;
1149
+ text: string;
1150
+ };
1151
+
1152
+ /** @internal */
1153
+ export const GetAgentTaskPartsAgentsTextPart$outboundSchema: z.ZodType<
1154
+ GetAgentTaskPartsAgentsTextPart$Outbound,
1155
+ z.ZodTypeDef,
1156
+ GetAgentTaskPartsAgentsTextPart
1157
+ > = z.object({
1158
+ kind:
1159
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyStatusMessage1Kind$outboundSchema,
1160
+ text: z.string(),
1161
+ });
1162
+
1163
+ export function getAgentTaskPartsAgentsTextPartToJSON(
1164
+ getAgentTaskPartsAgentsTextPart: GetAgentTaskPartsAgentsTextPart,
1165
+ ): string {
1166
+ return JSON.stringify(
1167
+ GetAgentTaskPartsAgentsTextPart$outboundSchema.parse(
1168
+ getAgentTaskPartsAgentsTextPart,
1169
+ ),
1170
+ );
1171
+ }
1172
+ export function getAgentTaskPartsAgentsTextPartFromJSON(
1173
+ jsonString: string,
1174
+ ): SafeParseResult<GetAgentTaskPartsAgentsTextPart, SDKValidationError> {
1175
+ return safeParse(
1176
+ jsonString,
1177
+ (x) => GetAgentTaskPartsAgentsTextPart$inboundSchema.parse(JSON.parse(x)),
1178
+ `Failed to parse 'GetAgentTaskPartsAgentsTextPart' from JSON`,
1179
+ );
1180
+ }
1181
+
1182
+ /** @internal */
1183
+ export const GetAgentTaskAgentsParts$inboundSchema: z.ZodType<
1184
+ GetAgentTaskAgentsParts,
1185
+ z.ZodTypeDef,
1186
+ unknown
1187
+ > = z.union([
1188
+ z.lazy(() => GetAgentTaskPartsToolCallPart$inboundSchema),
1189
+ z.lazy(() => GetAgentTaskPartsAgentsTextPart$inboundSchema),
1190
+ z.lazy(() => GetAgentTaskPartsDataPart$inboundSchema),
1191
+ z.lazy(() => GetAgentTaskPartsAgentsFilePart$inboundSchema),
1192
+ z.lazy(() => GetAgentTaskPartsToolResultPart$inboundSchema),
1193
+ ]);
1194
+ /** @internal */
1195
+ export type GetAgentTaskAgentsParts$Outbound =
1196
+ | GetAgentTaskPartsToolCallPart$Outbound
1197
+ | GetAgentTaskPartsAgentsTextPart$Outbound
1198
+ | GetAgentTaskPartsDataPart$Outbound
1199
+ | GetAgentTaskPartsAgentsFilePart$Outbound
1200
+ | GetAgentTaskPartsToolResultPart$Outbound;
1201
+
1202
+ /** @internal */
1203
+ export const GetAgentTaskAgentsParts$outboundSchema: z.ZodType<
1204
+ GetAgentTaskAgentsParts$Outbound,
1205
+ z.ZodTypeDef,
1206
+ GetAgentTaskAgentsParts
1207
+ > = z.union([
1208
+ z.lazy(() => GetAgentTaskPartsToolCallPart$outboundSchema),
1209
+ z.lazy(() => GetAgentTaskPartsAgentsTextPart$outboundSchema),
1210
+ z.lazy(() => GetAgentTaskPartsDataPart$outboundSchema),
1211
+ z.lazy(() => GetAgentTaskPartsAgentsFilePart$outboundSchema),
1212
+ z.lazy(() => GetAgentTaskPartsToolResultPart$outboundSchema),
1213
+ ]);
1214
+
1215
+ export function getAgentTaskAgentsPartsToJSON(
1216
+ getAgentTaskAgentsParts: GetAgentTaskAgentsParts,
1217
+ ): string {
1218
+ return JSON.stringify(
1219
+ GetAgentTaskAgentsParts$outboundSchema.parse(getAgentTaskAgentsParts),
1220
+ );
1221
+ }
1222
+ export function getAgentTaskAgentsPartsFromJSON(
1223
+ jsonString: string,
1224
+ ): SafeParseResult<GetAgentTaskAgentsParts, SDKValidationError> {
1225
+ return safeParse(
1226
+ jsonString,
1227
+ (x) => GetAgentTaskAgentsParts$inboundSchema.parse(JSON.parse(x)),
1228
+ `Failed to parse 'GetAgentTaskAgentsParts' from JSON`,
1229
+ );
1230
+ }
1231
+
1232
+ /** @internal */
1233
+ export const GetAgentTaskTaskStatusMessage$inboundSchema: z.ZodType<
1234
+ GetAgentTaskTaskStatusMessage,
1235
+ z.ZodTypeDef,
1236
+ unknown
1237
+ > = z.object({
1238
+ kind: GetAgentTaskAgentsResponseKind$inboundSchema,
1239
+ messageId: z.string(),
1240
+ role: GetAgentTaskExtendedMessageRole$inboundSchema,
1241
+ parts: z.array(
1242
+ z.union([
1243
+ z.lazy(() => GetAgentTaskPartsToolCallPart$inboundSchema),
1244
+ z.lazy(() => GetAgentTaskPartsAgentsTextPart$inboundSchema),
1245
+ z.lazy(() => GetAgentTaskPartsDataPart$inboundSchema),
1246
+ z.lazy(() => GetAgentTaskPartsAgentsFilePart$inboundSchema),
1247
+ z.lazy(() => GetAgentTaskPartsToolResultPart$inboundSchema),
1248
+ ]),
1249
+ ),
1250
+ });
1251
+ /** @internal */
1252
+ export type GetAgentTaskTaskStatusMessage$Outbound = {
1253
+ kind: string;
1254
+ messageId: string;
1255
+ role: string;
1256
+ parts: Array<
1257
+ | GetAgentTaskPartsToolCallPart$Outbound
1258
+ | GetAgentTaskPartsAgentsTextPart$Outbound
1259
+ | GetAgentTaskPartsDataPart$Outbound
1260
+ | GetAgentTaskPartsAgentsFilePart$Outbound
1261
+ | GetAgentTaskPartsToolResultPart$Outbound
1262
+ >;
1263
+ };
1264
+
1265
+ /** @internal */
1266
+ export const GetAgentTaskTaskStatusMessage$outboundSchema: z.ZodType<
1267
+ GetAgentTaskTaskStatusMessage$Outbound,
1268
+ z.ZodTypeDef,
1269
+ GetAgentTaskTaskStatusMessage
1270
+ > = z.object({
1271
+ kind: GetAgentTaskAgentsResponseKind$outboundSchema,
1272
+ messageId: z.string(),
1273
+ role: GetAgentTaskExtendedMessageRole$outboundSchema,
1274
+ parts: z.array(
1275
+ z.union([
1276
+ z.lazy(() => GetAgentTaskPartsToolCallPart$outboundSchema),
1277
+ z.lazy(() => GetAgentTaskPartsAgentsTextPart$outboundSchema),
1278
+ z.lazy(() => GetAgentTaskPartsDataPart$outboundSchema),
1279
+ z.lazy(() => GetAgentTaskPartsAgentsFilePart$outboundSchema),
1280
+ z.lazy(() => GetAgentTaskPartsToolResultPart$outboundSchema),
1281
+ ]),
1282
+ ),
1283
+ });
1284
+
1285
+ export function getAgentTaskTaskStatusMessageToJSON(
1286
+ getAgentTaskTaskStatusMessage: GetAgentTaskTaskStatusMessage,
1287
+ ): string {
1288
+ return JSON.stringify(
1289
+ GetAgentTaskTaskStatusMessage$outboundSchema.parse(
1290
+ getAgentTaskTaskStatusMessage,
1291
+ ),
1292
+ );
1293
+ }
1294
+ export function getAgentTaskTaskStatusMessageFromJSON(
1295
+ jsonString: string,
1296
+ ): SafeParseResult<GetAgentTaskTaskStatusMessage, SDKValidationError> {
1297
+ return safeParse(
1298
+ jsonString,
1299
+ (x) => GetAgentTaskTaskStatusMessage$inboundSchema.parse(JSON.parse(x)),
1300
+ `Failed to parse 'GetAgentTaskTaskStatusMessage' from JSON`,
1301
+ );
1302
+ }
1303
+
1304
+ /** @internal */
1305
+ export const GetAgentTaskTaskStatus$inboundSchema: z.ZodType<
1306
+ GetAgentTaskTaskStatus,
1307
+ z.ZodTypeDef,
1308
+ unknown
1309
+ > = z.object({
1310
+ state: GetAgentTaskTaskState$inboundSchema,
1311
+ timestamp: z.string().optional(),
1312
+ message: z.lazy(() => GetAgentTaskTaskStatusMessage$inboundSchema).optional(),
1313
+ });
1314
+ /** @internal */
1315
+ export type GetAgentTaskTaskStatus$Outbound = {
1316
+ state: string;
1317
+ timestamp?: string | undefined;
1318
+ message?: GetAgentTaskTaskStatusMessage$Outbound | undefined;
1319
+ };
1320
+
1321
+ /** @internal */
1322
+ export const GetAgentTaskTaskStatus$outboundSchema: z.ZodType<
1323
+ GetAgentTaskTaskStatus$Outbound,
1324
+ z.ZodTypeDef,
1325
+ GetAgentTaskTaskStatus
1326
+ > = z.object({
1327
+ state: GetAgentTaskTaskState$outboundSchema,
1328
+ timestamp: z.string().optional(),
1329
+ message: z.lazy(() => GetAgentTaskTaskStatusMessage$outboundSchema)
1330
+ .optional(),
1331
+ });
1332
+
1333
+ export function getAgentTaskTaskStatusToJSON(
1334
+ getAgentTaskTaskStatus: GetAgentTaskTaskStatus,
1335
+ ): string {
1336
+ return JSON.stringify(
1337
+ GetAgentTaskTaskStatus$outboundSchema.parse(getAgentTaskTaskStatus),
1338
+ );
1339
+ }
1340
+ export function getAgentTaskTaskStatusFromJSON(
1341
+ jsonString: string,
1342
+ ): SafeParseResult<GetAgentTaskTaskStatus, SDKValidationError> {
1343
+ return safeParse(
1344
+ jsonString,
1345
+ (x) => GetAgentTaskTaskStatus$inboundSchema.parse(JSON.parse(x)),
1346
+ `Failed to parse 'GetAgentTaskTaskStatus' from JSON`,
1347
+ );
1348
+ }
1349
+
1350
+ /** @internal */
1351
+ export const GetAgentTaskAgentsKind$inboundSchema: z.ZodNativeEnum<
1352
+ typeof GetAgentTaskAgentsKind
1353
+ > = z.nativeEnum(GetAgentTaskAgentsKind);
1354
+ /** @internal */
1355
+ export const GetAgentTaskAgentsKind$outboundSchema: z.ZodNativeEnum<
1356
+ typeof GetAgentTaskAgentsKind
1357
+ > = GetAgentTaskAgentsKind$inboundSchema;
1358
+
1359
+ /** @internal */
1360
+ export const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
1361
+ typeof ExtendedMessageRole
1362
+ > = z.nativeEnum(ExtendedMessageRole);
1363
+ /** @internal */
1364
+ export const ExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
1365
+ typeof ExtendedMessageRole
1366
+ > = ExtendedMessageRole$inboundSchema;
1367
+
1368
+ /** @internal */
1369
+ export const GetAgentTaskPartsAgentsResponse200Kind$inboundSchema:
1370
+ z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponse200Kind> = z.nativeEnum(
1371
+ GetAgentTaskPartsAgentsResponse200Kind,
1372
+ );
1373
+ /** @internal */
1374
+ export const GetAgentTaskPartsAgentsResponse200Kind$outboundSchema:
1375
+ z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponse200Kind> =
1376
+ GetAgentTaskPartsAgentsResponse200Kind$inboundSchema;
1377
+
1378
+ /** @internal */
1379
+ export const PartsToolResultPart$inboundSchema: z.ZodType<
1380
+ PartsToolResultPart,
1381
+ z.ZodTypeDef,
1382
+ unknown
1383
+ > = z.object({
1384
+ kind: GetAgentTaskPartsAgentsResponse200Kind$inboundSchema,
1385
+ tool_call_id: z.string(),
1386
+ result: z.any().optional(),
1387
+ metadata: z.record(z.any()).optional(),
1388
+ }).transform((v) => {
1389
+ return remap$(v, {
1390
+ "tool_call_id": "toolCallId",
1391
+ });
1392
+ });
1393
+ /** @internal */
1394
+ export type PartsToolResultPart$Outbound = {
1395
+ kind: string;
1396
+ tool_call_id: string;
1397
+ result?: any | undefined;
1398
+ metadata?: { [k: string]: any } | undefined;
1399
+ };
1400
+
1401
+ /** @internal */
1402
+ export const PartsToolResultPart$outboundSchema: z.ZodType<
1403
+ PartsToolResultPart$Outbound,
1404
+ z.ZodTypeDef,
1405
+ PartsToolResultPart
1406
+ > = z.object({
1407
+ kind: GetAgentTaskPartsAgentsResponse200Kind$outboundSchema,
1408
+ toolCallId: z.string(),
1409
+ result: z.any().optional(),
1410
+ metadata: z.record(z.any()).optional(),
1411
+ }).transform((v) => {
1412
+ return remap$(v, {
1413
+ toolCallId: "tool_call_id",
1414
+ });
1415
+ });
1416
+
1417
+ export function partsToolResultPartToJSON(
1418
+ partsToolResultPart: PartsToolResultPart,
1419
+ ): string {
1420
+ return JSON.stringify(
1421
+ PartsToolResultPart$outboundSchema.parse(partsToolResultPart),
1422
+ );
1423
+ }
1424
+ export function partsToolResultPartFromJSON(
1425
+ jsonString: string,
1426
+ ): SafeParseResult<PartsToolResultPart, SDKValidationError> {
1427
+ return safeParse(
1428
+ jsonString,
1429
+ (x) => PartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
1430
+ `Failed to parse 'PartsToolResultPart' from JSON`,
1431
+ );
1432
+ }
1433
+
1434
+ /** @internal */
1435
+ export const GetAgentTaskPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
1436
+ typeof GetAgentTaskPartsAgentsResponseKind
1437
+ > = z.nativeEnum(GetAgentTaskPartsAgentsResponseKind);
1438
+ /** @internal */
1439
+ export const GetAgentTaskPartsAgentsResponseKind$outboundSchema:
1440
+ z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponseKind> =
1441
+ GetAgentTaskPartsAgentsResponseKind$inboundSchema;
1442
+
1443
+ /** @internal */
1444
+ export const ToolCallPart$inboundSchema: z.ZodType<
1445
+ ToolCallPart,
1446
+ z.ZodTypeDef,
1447
+ unknown
1448
+ > = z.object({
1449
+ kind: GetAgentTaskPartsAgentsResponseKind$inboundSchema,
1450
+ tool_name: z.string(),
1451
+ tool_call_id: z.string(),
1452
+ arguments: z.record(z.any()),
1453
+ metadata: z.record(z.any()).optional(),
1454
+ }).transform((v) => {
1455
+ return remap$(v, {
1456
+ "tool_name": "toolName",
1457
+ "tool_call_id": "toolCallId",
1458
+ });
1459
+ });
1460
+ /** @internal */
1461
+ export type ToolCallPart$Outbound = {
1462
+ kind: string;
1463
+ tool_name: string;
1464
+ tool_call_id: string;
1465
+ arguments: { [k: string]: any };
1466
+ metadata?: { [k: string]: any } | undefined;
1467
+ };
1468
+
1469
+ /** @internal */
1470
+ export const ToolCallPart$outboundSchema: z.ZodType<
1471
+ ToolCallPart$Outbound,
1472
+ z.ZodTypeDef,
1473
+ ToolCallPart
1474
+ > = z.object({
1475
+ kind: GetAgentTaskPartsAgentsResponseKind$outboundSchema,
1476
+ toolName: z.string(),
1477
+ toolCallId: z.string(),
1478
+ arguments: z.record(z.any()),
1479
+ metadata: z.record(z.any()).optional(),
1480
+ }).transform((v) => {
1481
+ return remap$(v, {
1482
+ toolName: "tool_name",
1483
+ toolCallId: "tool_call_id",
1484
+ });
1485
+ });
1486
+
1487
+ export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
1488
+ return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
1489
+ }
1490
+ export function toolCallPartFromJSON(
1491
+ jsonString: string,
1492
+ ): SafeParseResult<ToolCallPart, SDKValidationError> {
1493
+ return safeParse(
1494
+ jsonString,
1495
+ (x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
1496
+ `Failed to parse 'ToolCallPart' from JSON`,
1497
+ );
1498
+ }
1499
+
1500
+ /** @internal */
1501
+ export const GetAgentTaskPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
1502
+ typeof GetAgentTaskPartsAgentsKind
1503
+ > = z.nativeEnum(GetAgentTaskPartsAgentsKind);
1504
+ /** @internal */
1505
+ export const GetAgentTaskPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
1506
+ typeof GetAgentTaskPartsAgentsKind
1507
+ > = GetAgentTaskPartsAgentsKind$inboundSchema;
1508
+
1509
+ /** @internal */
1510
+ export const GetAgentTaskFileAgentsFileInURIFormat$inboundSchema: z.ZodType<
1511
+ GetAgentTaskFileAgentsFileInURIFormat,
1512
+ z.ZodTypeDef,
1513
+ unknown
1514
+ > = z.object({
1515
+ uri: z.string(),
1516
+ mimeType: z.string().optional(),
1517
+ name: z.string().optional(),
1518
+ });
1519
+ /** @internal */
1520
+ export type GetAgentTaskFileAgentsFileInURIFormat$Outbound = {
1521
+ uri: string;
1522
+ mimeType?: string | undefined;
1523
+ name?: string | undefined;
1524
+ };
1525
+
1526
+ /** @internal */
1527
+ export const GetAgentTaskFileAgentsFileInURIFormat$outboundSchema: z.ZodType<
1528
+ GetAgentTaskFileAgentsFileInURIFormat$Outbound,
1529
+ z.ZodTypeDef,
1530
+ GetAgentTaskFileAgentsFileInURIFormat
1531
+ > = z.object({
1532
+ uri: z.string(),
1533
+ mimeType: z.string().optional(),
1534
+ name: z.string().optional(),
1535
+ });
1536
+
1537
+ export function getAgentTaskFileAgentsFileInURIFormatToJSON(
1538
+ getAgentTaskFileAgentsFileInURIFormat: GetAgentTaskFileAgentsFileInURIFormat,
1539
+ ): string {
1540
+ return JSON.stringify(
1541
+ GetAgentTaskFileAgentsFileInURIFormat$outboundSchema.parse(
1542
+ getAgentTaskFileAgentsFileInURIFormat,
1543
+ ),
1544
+ );
1545
+ }
1546
+ export function getAgentTaskFileAgentsFileInURIFormatFromJSON(
1547
+ jsonString: string,
1548
+ ): SafeParseResult<GetAgentTaskFileAgentsFileInURIFormat, SDKValidationError> {
1549
+ return safeParse(
1550
+ jsonString,
1551
+ (x) =>
1552
+ GetAgentTaskFileAgentsFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
1553
+ `Failed to parse 'GetAgentTaskFileAgentsFileInURIFormat' from JSON`,
1554
+ );
1555
+ }
1556
+
1557
+ /** @internal */
1558
+ export const GetAgentTaskFileAgentsBinaryFormat$inboundSchema: z.ZodType<
1559
+ GetAgentTaskFileAgentsBinaryFormat,
1560
+ z.ZodTypeDef,
1561
+ unknown
1562
+ > = z.object({
1563
+ bytes: z.string(),
1564
+ mimeType: z.string().optional(),
1565
+ name: z.string().optional(),
1566
+ });
1567
+ /** @internal */
1568
+ export type GetAgentTaskFileAgentsBinaryFormat$Outbound = {
1569
+ bytes: string;
1570
+ mimeType?: string | undefined;
1571
+ name?: string | undefined;
1572
+ };
1573
+
1574
+ /** @internal */
1575
+ export const GetAgentTaskFileAgentsBinaryFormat$outboundSchema: z.ZodType<
1576
+ GetAgentTaskFileAgentsBinaryFormat$Outbound,
1577
+ z.ZodTypeDef,
1578
+ GetAgentTaskFileAgentsBinaryFormat
1579
+ > = z.object({
1580
+ bytes: z.string(),
1581
+ mimeType: z.string().optional(),
1582
+ name: z.string().optional(),
1583
+ });
1584
+
1585
+ export function getAgentTaskFileAgentsBinaryFormatToJSON(
1586
+ getAgentTaskFileAgentsBinaryFormat: GetAgentTaskFileAgentsBinaryFormat,
1587
+ ): string {
1588
+ return JSON.stringify(
1589
+ GetAgentTaskFileAgentsBinaryFormat$outboundSchema.parse(
1590
+ getAgentTaskFileAgentsBinaryFormat,
1591
+ ),
1592
+ );
1593
+ }
1594
+ export function getAgentTaskFileAgentsBinaryFormatFromJSON(
1595
+ jsonString: string,
1596
+ ): SafeParseResult<GetAgentTaskFileAgentsBinaryFormat, SDKValidationError> {
1597
+ return safeParse(
1598
+ jsonString,
1599
+ (x) =>
1600
+ GetAgentTaskFileAgentsBinaryFormat$inboundSchema.parse(JSON.parse(x)),
1601
+ `Failed to parse 'GetAgentTaskFileAgentsBinaryFormat' from JSON`,
1602
+ );
1603
+ }
1604
+
1605
+ /** @internal */
1606
+ export const PartsFile$inboundSchema: z.ZodType<
1607
+ PartsFile,
1608
+ z.ZodTypeDef,
1609
+ unknown
1610
+ > = z.union([
1611
+ z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$inboundSchema),
1612
+ z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$inboundSchema),
1613
+ ]);
1614
+ /** @internal */
1615
+ export type PartsFile$Outbound =
1616
+ | GetAgentTaskFileAgentsBinaryFormat$Outbound
1617
+ | GetAgentTaskFileAgentsFileInURIFormat$Outbound;
1618
+
1619
+ /** @internal */
1620
+ export const PartsFile$outboundSchema: z.ZodType<
1621
+ PartsFile$Outbound,
1622
+ z.ZodTypeDef,
1623
+ PartsFile
1624
+ > = z.union([
1625
+ z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$outboundSchema),
1626
+ z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$outboundSchema),
1627
+ ]);
1628
+
1629
+ export function partsFileToJSON(partsFile: PartsFile): string {
1630
+ return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
1631
+ }
1632
+ export function partsFileFromJSON(
1633
+ jsonString: string,
1634
+ ): SafeParseResult<PartsFile, SDKValidationError> {
1635
+ return safeParse(
1636
+ jsonString,
1637
+ (x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
1638
+ `Failed to parse 'PartsFile' from JSON`,
1639
+ );
1640
+ }
1641
+
1642
+ /** @internal */
1643
+ export const PartsFilePart$inboundSchema: z.ZodType<
1644
+ PartsFilePart,
1645
+ z.ZodTypeDef,
1646
+ unknown
1647
+ > = z.object({
1648
+ kind: GetAgentTaskPartsAgentsKind$inboundSchema,
1649
+ file: z.union([
1650
+ z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$inboundSchema),
1651
+ z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$inboundSchema),
1652
+ ]),
1653
+ metadata: z.record(z.any()).optional(),
1654
+ });
1655
+ /** @internal */
1656
+ export type PartsFilePart$Outbound = {
1657
+ kind: string;
1658
+ file:
1659
+ | GetAgentTaskFileAgentsBinaryFormat$Outbound
1660
+ | GetAgentTaskFileAgentsFileInURIFormat$Outbound;
1661
+ metadata?: { [k: string]: any } | undefined;
1662
+ };
1663
+
1664
+ /** @internal */
1665
+ export const PartsFilePart$outboundSchema: z.ZodType<
1666
+ PartsFilePart$Outbound,
1667
+ z.ZodTypeDef,
1668
+ PartsFilePart
1669
+ > = z.object({
1670
+ kind: GetAgentTaskPartsAgentsKind$outboundSchema,
1671
+ file: z.union([
1672
+ z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$outboundSchema),
1673
+ z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$outboundSchema),
1674
+ ]),
1675
+ metadata: z.record(z.any()).optional(),
1676
+ });
1677
+
1678
+ export function partsFilePartToJSON(partsFilePart: PartsFilePart): string {
1679
+ return JSON.stringify(PartsFilePart$outboundSchema.parse(partsFilePart));
1680
+ }
1681
+ export function partsFilePartFromJSON(
1682
+ jsonString: string,
1683
+ ): SafeParseResult<PartsFilePart, SDKValidationError> {
1684
+ return safeParse(
1685
+ jsonString,
1686
+ (x) => PartsFilePart$inboundSchema.parse(JSON.parse(x)),
1687
+ `Failed to parse 'PartsFilePart' from JSON`,
1688
+ );
1689
+ }
1690
+
1691
+ /** @internal */
1692
+ export const GetAgentTaskPartsKind$inboundSchema: z.ZodNativeEnum<
1693
+ typeof GetAgentTaskPartsKind
1694
+ > = z.nativeEnum(GetAgentTaskPartsKind);
1695
+ /** @internal */
1696
+ export const GetAgentTaskPartsKind$outboundSchema: z.ZodNativeEnum<
1697
+ typeof GetAgentTaskPartsKind
1698
+ > = GetAgentTaskPartsKind$inboundSchema;
1699
+
1700
+ /** @internal */
1701
+ export const DataPart$inboundSchema: z.ZodType<
1702
+ DataPart,
1703
+ z.ZodTypeDef,
1704
+ unknown
1705
+ > = z.object({
1706
+ kind: GetAgentTaskPartsKind$inboundSchema,
1707
+ data: z.record(z.any()),
1708
+ metadata: z.record(z.any()).optional(),
1709
+ });
1710
+ /** @internal */
1711
+ export type DataPart$Outbound = {
1712
+ kind: string;
1713
+ data: { [k: string]: any };
1714
+ metadata?: { [k: string]: any } | undefined;
1715
+ };
1716
+
1717
+ /** @internal */
1718
+ export const DataPart$outboundSchema: z.ZodType<
1719
+ DataPart$Outbound,
1720
+ z.ZodTypeDef,
1721
+ DataPart
1722
+ > = z.object({
1723
+ kind: GetAgentTaskPartsKind$outboundSchema,
1724
+ data: z.record(z.any()),
1725
+ metadata: z.record(z.any()).optional(),
1726
+ });
1727
+
1728
+ export function dataPartToJSON(dataPart: DataPart): string {
1729
+ return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
1730
+ }
1731
+ export function dataPartFromJSON(
1732
+ jsonString: string,
1733
+ ): SafeParseResult<DataPart, SDKValidationError> {
1734
+ return safeParse(
1735
+ jsonString,
1736
+ (x) => DataPart$inboundSchema.parse(JSON.parse(x)),
1737
+ `Failed to parse 'DataPart' from JSON`,
1738
+ );
1739
+ }
1740
+
1741
+ /** @internal */
1742
+ export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
1743
+ .nativeEnum(PartsKind);
1744
+ /** @internal */
1745
+ export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
1746
+ PartsKind$inboundSchema;
1747
+
1748
+ /** @internal */
1749
+ export const PartsTextPart$inboundSchema: z.ZodType<
1750
+ PartsTextPart,
1751
+ z.ZodTypeDef,
1752
+ unknown
1753
+ > = z.object({
1754
+ kind: PartsKind$inboundSchema,
1755
+ text: z.string(),
1756
+ });
1757
+ /** @internal */
1758
+ export type PartsTextPart$Outbound = {
1759
+ kind: string;
1760
+ text: string;
1761
+ };
1762
+
1763
+ /** @internal */
1764
+ export const PartsTextPart$outboundSchema: z.ZodType<
1765
+ PartsTextPart$Outbound,
1766
+ z.ZodTypeDef,
1767
+ PartsTextPart
1768
+ > = z.object({
1769
+ kind: PartsKind$outboundSchema,
1770
+ text: z.string(),
1771
+ });
1772
+
1773
+ export function partsTextPartToJSON(partsTextPart: PartsTextPart): string {
1774
+ return JSON.stringify(PartsTextPart$outboundSchema.parse(partsTextPart));
1775
+ }
1776
+ export function partsTextPartFromJSON(
1777
+ jsonString: string,
1778
+ ): SafeParseResult<PartsTextPart, SDKValidationError> {
1779
+ return safeParse(
1780
+ jsonString,
1781
+ (x) => PartsTextPart$inboundSchema.parse(JSON.parse(x)),
1782
+ `Failed to parse 'PartsTextPart' from JSON`,
1783
+ );
1784
+ }
1785
+
1786
+ /** @internal */
1787
+ export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
1788
+ .union([
1789
+ z.lazy(() => ToolCallPart$inboundSchema),
1790
+ z.lazy(() => PartsTextPart$inboundSchema),
1791
+ z.lazy(() => DataPart$inboundSchema),
1792
+ z.lazy(() => PartsFilePart$inboundSchema),
1793
+ z.lazy(() => PartsToolResultPart$inboundSchema),
1794
+ ]);
1795
+ /** @internal */
1796
+ export type Parts$Outbound =
1797
+ | ToolCallPart$Outbound
1798
+ | PartsTextPart$Outbound
1799
+ | DataPart$Outbound
1800
+ | PartsFilePart$Outbound
1801
+ | PartsToolResultPart$Outbound;
1802
+
1803
+ /** @internal */
1804
+ export const Parts$outboundSchema: z.ZodType<
1805
+ Parts$Outbound,
1806
+ z.ZodTypeDef,
1807
+ Parts
1808
+ > = z.union([
1809
+ z.lazy(() => ToolCallPart$outboundSchema),
1810
+ z.lazy(() => PartsTextPart$outboundSchema),
1811
+ z.lazy(() => DataPart$outboundSchema),
1812
+ z.lazy(() => PartsFilePart$outboundSchema),
1813
+ z.lazy(() => PartsToolResultPart$outboundSchema),
1814
+ ]);
1815
+
1816
+ export function partsToJSON(parts: Parts): string {
1817
+ return JSON.stringify(Parts$outboundSchema.parse(parts));
1818
+ }
1819
+ export function partsFromJSON(
1820
+ jsonString: string,
1821
+ ): SafeParseResult<Parts, SDKValidationError> {
1822
+ return safeParse(
1823
+ jsonString,
1824
+ (x) => Parts$inboundSchema.parse(JSON.parse(x)),
1825
+ `Failed to parse 'Parts' from JSON`,
1826
+ );
1827
+ }
1828
+
1829
+ /** @internal */
1830
+ export const ExtendedA2AMessage$inboundSchema: z.ZodType<
1831
+ ExtendedA2AMessage,
258
1832
  z.ZodTypeDef,
259
1833
  unknown
260
1834
  > = z.object({
261
- state: z.string(),
262
- timestamp: z.string().optional(),
263
- message: z.any().optional(),
1835
+ kind: GetAgentTaskAgentsKind$inboundSchema,
1836
+ messageId: z.string(),
1837
+ role: ExtendedMessageRole$inboundSchema,
1838
+ parts: z.array(
1839
+ z.union([
1840
+ z.lazy(() => ToolCallPart$inboundSchema),
1841
+ z.lazy(() => PartsTextPart$inboundSchema),
1842
+ z.lazy(() => DataPart$inboundSchema),
1843
+ z.lazy(() => PartsFilePart$inboundSchema),
1844
+ z.lazy(() => PartsToolResultPart$inboundSchema),
1845
+ ]),
1846
+ ),
1847
+ taskId: z.string().optional(),
1848
+ contextId: z.string().optional(),
1849
+ metadata: z.record(z.any()).optional(),
264
1850
  });
265
1851
  /** @internal */
266
- export type GetAgentTaskStatus$Outbound = {
267
- state: string;
268
- timestamp?: string | undefined;
269
- message?: any | undefined;
1852
+ export type ExtendedA2AMessage$Outbound = {
1853
+ kind: string;
1854
+ messageId: string;
1855
+ role: string;
1856
+ parts: Array<
1857
+ | ToolCallPart$Outbound
1858
+ | PartsTextPart$Outbound
1859
+ | DataPart$Outbound
1860
+ | PartsFilePart$Outbound
1861
+ | PartsToolResultPart$Outbound
1862
+ >;
1863
+ taskId?: string | undefined;
1864
+ contextId?: string | undefined;
1865
+ metadata?: { [k: string]: any } | undefined;
270
1866
  };
271
1867
 
272
1868
  /** @internal */
273
- export const GetAgentTaskStatus$outboundSchema: z.ZodType<
274
- GetAgentTaskStatus$Outbound,
1869
+ export const ExtendedA2AMessage$outboundSchema: z.ZodType<
1870
+ ExtendedA2AMessage$Outbound,
275
1871
  z.ZodTypeDef,
276
- GetAgentTaskStatus
1872
+ ExtendedA2AMessage
277
1873
  > = z.object({
278
- state: z.string(),
279
- timestamp: z.string().optional(),
280
- message: z.any().optional(),
1874
+ kind: GetAgentTaskAgentsKind$outboundSchema,
1875
+ messageId: z.string(),
1876
+ role: ExtendedMessageRole$outboundSchema,
1877
+ parts: z.array(
1878
+ z.union([
1879
+ z.lazy(() => ToolCallPart$outboundSchema),
1880
+ z.lazy(() => PartsTextPart$outboundSchema),
1881
+ z.lazy(() => DataPart$outboundSchema),
1882
+ z.lazy(() => PartsFilePart$outboundSchema),
1883
+ z.lazy(() => PartsToolResultPart$outboundSchema),
1884
+ ]),
1885
+ ),
1886
+ taskId: z.string().optional(),
1887
+ contextId: z.string().optional(),
1888
+ metadata: z.record(z.any()).optional(),
281
1889
  });
282
1890
 
283
- export function getAgentTaskStatusToJSON(
284
- getAgentTaskStatus: GetAgentTaskStatus,
1891
+ export function extendedA2AMessageToJSON(
1892
+ extendedA2AMessage: ExtendedA2AMessage,
285
1893
  ): string {
286
1894
  return JSON.stringify(
287
- GetAgentTaskStatus$outboundSchema.parse(getAgentTaskStatus),
1895
+ ExtendedA2AMessage$outboundSchema.parse(extendedA2AMessage),
288
1896
  );
289
1897
  }
290
- export function getAgentTaskStatusFromJSON(
1898
+ export function extendedA2AMessageFromJSON(
291
1899
  jsonString: string,
292
- ): SafeParseResult<GetAgentTaskStatus, SDKValidationError> {
1900
+ ): SafeParseResult<ExtendedA2AMessage, SDKValidationError> {
293
1901
  return safeParse(
294
1902
  jsonString,
295
- (x) => GetAgentTaskStatus$inboundSchema.parse(JSON.parse(x)),
296
- `Failed to parse 'GetAgentTaskStatus' from JSON`,
1903
+ (x) => ExtendedA2AMessage$inboundSchema.parse(JSON.parse(x)),
1904
+ `Failed to parse 'ExtendedA2AMessage' from JSON`,
297
1905
  );
298
1906
  }
299
1907
 
300
1908
  /** @internal */
301
- export const GetAgentTaskAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
302
- typeof GetAgentTaskAgentsResponseKind
303
- > = z.nativeEnum(GetAgentTaskAgentsResponseKind);
304
- /** @internal */
305
- export const GetAgentTaskAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
306
- typeof GetAgentTaskAgentsResponseKind
307
- > = GetAgentTaskAgentsResponseKind$inboundSchema;
308
-
309
- /** @internal */
310
- export const GetAgentTaskRole$inboundSchema: z.ZodNativeEnum<
311
- typeof GetAgentTaskRole
312
- > = z.nativeEnum(GetAgentTaskRole);
313
- /** @internal */
314
- export const GetAgentTaskRole$outboundSchema: z.ZodNativeEnum<
315
- typeof GetAgentTaskRole
316
- > = GetAgentTaskRole$inboundSchema;
317
-
318
- /** @internal */
319
- export const GetAgentTaskPartsAgentsResponse200Kind$inboundSchema:
320
- z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponse200Kind> = z.nativeEnum(
321
- GetAgentTaskPartsAgentsResponse200Kind,
1909
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema:
1910
+ z.ZodNativeEnum<
1911
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
1912
+ > = z.nativeEnum(
1913
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind,
322
1914
  );
323
1915
  /** @internal */
324
- export const GetAgentTaskPartsAgentsResponse200Kind$outboundSchema:
325
- z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponse200Kind> =
326
- GetAgentTaskPartsAgentsResponse200Kind$inboundSchema;
327
-
328
- /** @internal */
329
- export const Parts5$inboundSchema: z.ZodType<Parts5, z.ZodTypeDef, unknown> = z
330
- .object({
331
- kind: GetAgentTaskPartsAgentsResponse200Kind$inboundSchema,
332
- tool_call_id: z.string(),
333
- result: z.any().optional(),
334
- metadata: z.record(z.any()).optional(),
335
- }).transform((v) => {
336
- return remap$(v, {
337
- "tool_call_id": "toolCallId",
338
- });
339
- });
340
- /** @internal */
341
- export type Parts5$Outbound = {
342
- kind: string;
343
- tool_call_id: string;
344
- result?: any | undefined;
345
- metadata?: { [k: string]: any } | undefined;
346
- };
1916
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$outboundSchema:
1917
+ z.ZodNativeEnum<
1918
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
1919
+ > =
1920
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema;
347
1921
 
348
1922
  /** @internal */
349
- export const Parts5$outboundSchema: z.ZodType<
350
- Parts5$Outbound,
1923
+ export const PartsDataPart$inboundSchema: z.ZodType<
1924
+ PartsDataPart,
351
1925
  z.ZodTypeDef,
352
- Parts5
1926
+ unknown
353
1927
  > = z.object({
354
- kind: GetAgentTaskPartsAgentsResponse200Kind$outboundSchema,
355
- toolCallId: z.string(),
356
- result: z.any().optional(),
1928
+ kind:
1929
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema,
1930
+ data: z.record(z.any()),
357
1931
  metadata: z.record(z.any()).optional(),
358
- }).transform((v) => {
359
- return remap$(v, {
360
- toolCallId: "tool_call_id",
361
- });
362
1932
  });
363
-
364
- export function parts5ToJSON(parts5: Parts5): string {
365
- return JSON.stringify(Parts5$outboundSchema.parse(parts5));
366
- }
367
- export function parts5FromJSON(
368
- jsonString: string,
369
- ): SafeParseResult<Parts5, SDKValidationError> {
370
- return safeParse(
371
- jsonString,
372
- (x) => Parts5$inboundSchema.parse(JSON.parse(x)),
373
- `Failed to parse 'Parts5' from JSON`,
374
- );
375
- }
376
-
377
- /** @internal */
378
- export const GetAgentTaskPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
379
- typeof GetAgentTaskPartsAgentsResponseKind
380
- > = z.nativeEnum(GetAgentTaskPartsAgentsResponseKind);
381
- /** @internal */
382
- export const GetAgentTaskPartsAgentsResponseKind$outboundSchema:
383
- z.ZodNativeEnum<typeof GetAgentTaskPartsAgentsResponseKind> =
384
- GetAgentTaskPartsAgentsResponseKind$inboundSchema;
385
-
386
- /** @internal */
387
- export const Parts4$inboundSchema: z.ZodType<Parts4, z.ZodTypeDef, unknown> = z
388
- .object({
389
- kind: GetAgentTaskPartsAgentsResponseKind$inboundSchema,
390
- tool_name: z.string(),
391
- tool_call_id: z.string(),
392
- arguments: z.record(z.any()),
393
- metadata: z.record(z.any()).optional(),
394
- }).transform((v) => {
395
- return remap$(v, {
396
- "tool_name": "toolName",
397
- "tool_call_id": "toolCallId",
398
- });
399
- });
400
1933
  /** @internal */
401
- export type Parts4$Outbound = {
1934
+ export type PartsDataPart$Outbound = {
402
1935
  kind: string;
403
- tool_name: string;
404
- tool_call_id: string;
405
- arguments: { [k: string]: any };
1936
+ data: { [k: string]: any };
406
1937
  metadata?: { [k: string]: any } | undefined;
407
1938
  };
408
1939
 
409
1940
  /** @internal */
410
- export const Parts4$outboundSchema: z.ZodType<
411
- Parts4$Outbound,
1941
+ export const PartsDataPart$outboundSchema: z.ZodType<
1942
+ PartsDataPart$Outbound,
412
1943
  z.ZodTypeDef,
413
- Parts4
1944
+ PartsDataPart
414
1945
  > = z.object({
415
- kind: GetAgentTaskPartsAgentsResponseKind$outboundSchema,
416
- toolName: z.string(),
417
- toolCallId: z.string(),
418
- arguments: z.record(z.any()),
1946
+ kind:
1947
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$outboundSchema,
1948
+ data: z.record(z.any()),
419
1949
  metadata: z.record(z.any()).optional(),
420
- }).transform((v) => {
421
- return remap$(v, {
422
- toolName: "tool_name",
423
- toolCallId: "tool_call_id",
424
- });
425
1950
  });
426
1951
 
427
- export function parts4ToJSON(parts4: Parts4): string {
428
- return JSON.stringify(Parts4$outboundSchema.parse(parts4));
1952
+ export function partsDataPartToJSON(partsDataPart: PartsDataPart): string {
1953
+ return JSON.stringify(PartsDataPart$outboundSchema.parse(partsDataPart));
429
1954
  }
430
- export function parts4FromJSON(
1955
+ export function partsDataPartFromJSON(
431
1956
  jsonString: string,
432
- ): SafeParseResult<Parts4, SDKValidationError> {
1957
+ ): SafeParseResult<PartsDataPart, SDKValidationError> {
433
1958
  return safeParse(
434
1959
  jsonString,
435
- (x) => Parts4$inboundSchema.parse(JSON.parse(x)),
436
- `Failed to parse 'Parts4' from JSON`,
1960
+ (x) => PartsDataPart$inboundSchema.parse(JSON.parse(x)),
1961
+ `Failed to parse 'PartsDataPart' from JSON`,
437
1962
  );
438
1963
  }
439
1964
 
440
1965
  /** @internal */
441
- export const GetAgentTaskPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
442
- typeof GetAgentTaskPartsAgentsKind
443
- > = z.nativeEnum(GetAgentTaskPartsAgentsKind);
1966
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema:
1967
+ z.ZodNativeEnum<
1968
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
1969
+ > = z.nativeEnum(
1970
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind,
1971
+ );
444
1972
  /** @internal */
445
- export const GetAgentTaskPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
446
- typeof GetAgentTaskPartsAgentsKind
447
- > = GetAgentTaskPartsAgentsKind$inboundSchema;
1973
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema:
1974
+ z.ZodNativeEnum<
1975
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
1976
+ > =
1977
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema;
448
1978
 
449
1979
  /** @internal */
450
1980
  export const GetAgentTaskFileFileInURIFormat$inboundSchema: z.ZodType<
@@ -541,8 +2071,8 @@ export function getAgentTaskFileBinaryFormatFromJSON(
541
2071
  }
542
2072
 
543
2073
  /** @internal */
544
- export const PartsFile$inboundSchema: z.ZodType<
545
- PartsFile,
2074
+ export const GetAgentTaskPartsFile$inboundSchema: z.ZodType<
2075
+ GetAgentTaskPartsFile,
546
2076
  z.ZodTypeDef,
547
2077
  unknown
548
2078
  > = z.union([
@@ -550,45 +2080,53 @@ export const PartsFile$inboundSchema: z.ZodType<
550
2080
  z.lazy(() => GetAgentTaskFileFileInURIFormat$inboundSchema),
551
2081
  ]);
552
2082
  /** @internal */
553
- export type PartsFile$Outbound =
2083
+ export type GetAgentTaskPartsFile$Outbound =
554
2084
  | GetAgentTaskFileBinaryFormat$Outbound
555
2085
  | GetAgentTaskFileFileInURIFormat$Outbound;
556
2086
 
557
2087
  /** @internal */
558
- export const PartsFile$outboundSchema: z.ZodType<
559
- PartsFile$Outbound,
2088
+ export const GetAgentTaskPartsFile$outboundSchema: z.ZodType<
2089
+ GetAgentTaskPartsFile$Outbound,
560
2090
  z.ZodTypeDef,
561
- PartsFile
2091
+ GetAgentTaskPartsFile
562
2092
  > = z.union([
563
2093
  z.lazy(() => GetAgentTaskFileBinaryFormat$outboundSchema),
564
2094
  z.lazy(() => GetAgentTaskFileFileInURIFormat$outboundSchema),
565
2095
  ]);
566
2096
 
567
- export function partsFileToJSON(partsFile: PartsFile): string {
568
- return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
2097
+ export function getAgentTaskPartsFileToJSON(
2098
+ getAgentTaskPartsFile: GetAgentTaskPartsFile,
2099
+ ): string {
2100
+ return JSON.stringify(
2101
+ GetAgentTaskPartsFile$outboundSchema.parse(getAgentTaskPartsFile),
2102
+ );
569
2103
  }
570
- export function partsFileFromJSON(
2104
+ export function getAgentTaskPartsFileFromJSON(
571
2105
  jsonString: string,
572
- ): SafeParseResult<PartsFile, SDKValidationError> {
2106
+ ): SafeParseResult<GetAgentTaskPartsFile, SDKValidationError> {
573
2107
  return safeParse(
574
2108
  jsonString,
575
- (x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
576
- `Failed to parse 'PartsFile' from JSON`,
2109
+ (x) => GetAgentTaskPartsFile$inboundSchema.parse(JSON.parse(x)),
2110
+ `Failed to parse 'GetAgentTaskPartsFile' from JSON`,
577
2111
  );
578
2112
  }
579
2113
 
580
2114
  /** @internal */
581
- export const Parts3$inboundSchema: z.ZodType<Parts3, z.ZodTypeDef, unknown> = z
582
- .object({
583
- kind: GetAgentTaskPartsAgentsKind$inboundSchema,
584
- file: z.union([
585
- z.lazy(() => GetAgentTaskFileBinaryFormat$inboundSchema),
586
- z.lazy(() => GetAgentTaskFileFileInURIFormat$inboundSchema),
587
- ]),
588
- metadata: z.record(z.any()).optional(),
589
- });
2115
+ export const GetAgentTaskPartsFilePart$inboundSchema: z.ZodType<
2116
+ GetAgentTaskPartsFilePart,
2117
+ z.ZodTypeDef,
2118
+ unknown
2119
+ > = z.object({
2120
+ kind:
2121
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema,
2122
+ file: z.union([
2123
+ z.lazy(() => GetAgentTaskFileBinaryFormat$inboundSchema),
2124
+ z.lazy(() => GetAgentTaskFileFileInURIFormat$inboundSchema),
2125
+ ]),
2126
+ metadata: z.record(z.any()).optional(),
2127
+ });
590
2128
  /** @internal */
591
- export type Parts3$Outbound = {
2129
+ export type GetAgentTaskPartsFilePart$Outbound = {
592
2130
  kind: string;
593
2131
  file:
594
2132
  | GetAgentTaskFileBinaryFormat$Outbound
@@ -597,12 +2135,13 @@ export type Parts3$Outbound = {
597
2135
  };
598
2136
 
599
2137
  /** @internal */
600
- export const Parts3$outboundSchema: z.ZodType<
601
- Parts3$Outbound,
2138
+ export const GetAgentTaskPartsFilePart$outboundSchema: z.ZodType<
2139
+ GetAgentTaskPartsFilePart$Outbound,
602
2140
  z.ZodTypeDef,
603
- Parts3
2141
+ GetAgentTaskPartsFilePart
604
2142
  > = z.object({
605
- kind: GetAgentTaskPartsAgentsKind$outboundSchema,
2143
+ kind:
2144
+ GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema,
606
2145
  file: z.union([
607
2146
  z.lazy(() => GetAgentTaskFileBinaryFormat$outboundSchema),
608
2147
  z.lazy(() => GetAgentTaskFileFileInURIFormat$outboundSchema),
@@ -610,335 +2149,241 @@ export const Parts3$outboundSchema: z.ZodType<
610
2149
  metadata: z.record(z.any()).optional(),
611
2150
  });
612
2151
 
613
- export function parts3ToJSON(parts3: Parts3): string {
614
- return JSON.stringify(Parts3$outboundSchema.parse(parts3));
2152
+ export function getAgentTaskPartsFilePartToJSON(
2153
+ getAgentTaskPartsFilePart: GetAgentTaskPartsFilePart,
2154
+ ): string {
2155
+ return JSON.stringify(
2156
+ GetAgentTaskPartsFilePart$outboundSchema.parse(getAgentTaskPartsFilePart),
2157
+ );
615
2158
  }
616
- export function parts3FromJSON(
2159
+ export function getAgentTaskPartsFilePartFromJSON(
617
2160
  jsonString: string,
618
- ): SafeParseResult<Parts3, SDKValidationError> {
2161
+ ): SafeParseResult<GetAgentTaskPartsFilePart, SDKValidationError> {
619
2162
  return safeParse(
620
2163
  jsonString,
621
- (x) => Parts3$inboundSchema.parse(JSON.parse(x)),
622
- `Failed to parse 'Parts3' from JSON`,
2164
+ (x) => GetAgentTaskPartsFilePart$inboundSchema.parse(JSON.parse(x)),
2165
+ `Failed to parse 'GetAgentTaskPartsFilePart' from JSON`,
623
2166
  );
624
2167
  }
625
2168
 
626
2169
  /** @internal */
627
- export const GetAgentTaskPartsKind$inboundSchema: z.ZodNativeEnum<
628
- typeof GetAgentTaskPartsKind
629
- > = z.nativeEnum(GetAgentTaskPartsKind);
630
- /** @internal */
631
- export const GetAgentTaskPartsKind$outboundSchema: z.ZodNativeEnum<
632
- typeof GetAgentTaskPartsKind
633
- > = GetAgentTaskPartsKind$inboundSchema;
634
-
635
- /** @internal */
636
- export const Parts2$inboundSchema: z.ZodType<Parts2, z.ZodTypeDef, unknown> = z
637
- .object({
638
- kind: GetAgentTaskPartsKind$inboundSchema,
639
- data: z.record(z.any()),
640
- metadata: z.record(z.any()).optional(),
641
- });
2170
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
2171
+ z.ZodNativeEnum<
2172
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
2173
+ > = z.nativeEnum(GetAgentTaskPartsAgentsResponse200ApplicationJSONKind);
642
2174
  /** @internal */
643
- export type Parts2$Outbound = {
644
- kind: string;
645
- data: { [k: string]: any };
646
- metadata?: { [k: string]: any } | undefined;
647
- };
2175
+ export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
2176
+ z.ZodNativeEnum<
2177
+ typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
2178
+ > = GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
648
2179
 
649
2180
  /** @internal */
650
- export const Parts2$outboundSchema: z.ZodType<
651
- Parts2$Outbound,
2181
+ export const GetAgentTaskPartsTextPart$inboundSchema: z.ZodType<
2182
+ GetAgentTaskPartsTextPart,
652
2183
  z.ZodTypeDef,
653
- Parts2
2184
+ unknown
654
2185
  > = z.object({
655
- kind: GetAgentTaskPartsKind$outboundSchema,
656
- data: z.record(z.any()),
657
- metadata: z.record(z.any()).optional(),
2186
+ kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
2187
+ text: z.string(),
658
2188
  });
659
-
660
- export function parts2ToJSON(parts2: Parts2): string {
661
- return JSON.stringify(Parts2$outboundSchema.parse(parts2));
662
- }
663
- export function parts2FromJSON(
664
- jsonString: string,
665
- ): SafeParseResult<Parts2, SDKValidationError> {
666
- return safeParse(
667
- jsonString,
668
- (x) => Parts2$inboundSchema.parse(JSON.parse(x)),
669
- `Failed to parse 'Parts2' from JSON`,
670
- );
671
- }
672
-
673
- /** @internal */
674
- export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
675
- .nativeEnum(PartsKind);
676
- /** @internal */
677
- export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
678
- PartsKind$inboundSchema;
679
-
680
- /** @internal */
681
- export const Parts1$inboundSchema: z.ZodType<Parts1, z.ZodTypeDef, unknown> = z
682
- .object({
683
- kind: PartsKind$inboundSchema,
684
- text: z.string(),
685
- });
686
2189
  /** @internal */
687
- export type Parts1$Outbound = {
2190
+ export type GetAgentTaskPartsTextPart$Outbound = {
688
2191
  kind: string;
689
2192
  text: string;
690
2193
  };
691
2194
 
692
2195
  /** @internal */
693
- export const Parts1$outboundSchema: z.ZodType<
694
- Parts1$Outbound,
2196
+ export const GetAgentTaskPartsTextPart$outboundSchema: z.ZodType<
2197
+ GetAgentTaskPartsTextPart$Outbound,
695
2198
  z.ZodTypeDef,
696
- Parts1
2199
+ GetAgentTaskPartsTextPart
697
2200
  > = z.object({
698
- kind: PartsKind$outboundSchema,
2201
+ kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
699
2202
  text: z.string(),
700
2203
  });
701
2204
 
702
- export function parts1ToJSON(parts1: Parts1): string {
703
- return JSON.stringify(Parts1$outboundSchema.parse(parts1));
2205
+ export function getAgentTaskPartsTextPartToJSON(
2206
+ getAgentTaskPartsTextPart: GetAgentTaskPartsTextPart,
2207
+ ): string {
2208
+ return JSON.stringify(
2209
+ GetAgentTaskPartsTextPart$outboundSchema.parse(getAgentTaskPartsTextPart),
2210
+ );
704
2211
  }
705
- export function parts1FromJSON(
2212
+ export function getAgentTaskPartsTextPartFromJSON(
706
2213
  jsonString: string,
707
- ): SafeParseResult<Parts1, SDKValidationError> {
2214
+ ): SafeParseResult<GetAgentTaskPartsTextPart, SDKValidationError> {
708
2215
  return safeParse(
709
2216
  jsonString,
710
- (x) => Parts1$inboundSchema.parse(JSON.parse(x)),
711
- `Failed to parse 'Parts1' from JSON`,
2217
+ (x) => GetAgentTaskPartsTextPart$inboundSchema.parse(JSON.parse(x)),
2218
+ `Failed to parse 'GetAgentTaskPartsTextPart' from JSON`,
712
2219
  );
713
2220
  }
714
2221
 
715
2222
  /** @internal */
716
- export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
717
- .union([
718
- z.lazy(() => Parts4$inboundSchema),
719
- z.lazy(() => Parts1$inboundSchema),
720
- z.lazy(() => Parts2$inboundSchema),
721
- z.lazy(() => Parts3$inboundSchema),
722
- z.lazy(() => Parts5$inboundSchema),
723
- ]);
2223
+ export const GetAgentTaskParts$inboundSchema: z.ZodType<
2224
+ GetAgentTaskParts,
2225
+ z.ZodTypeDef,
2226
+ unknown
2227
+ > = z.union([
2228
+ z.lazy(() => GetAgentTaskPartsTextPart$inboundSchema),
2229
+ z.lazy(() => GetAgentTaskPartsFilePart$inboundSchema),
2230
+ z.lazy(() => PartsDataPart$inboundSchema),
2231
+ ]);
724
2232
  /** @internal */
725
- export type Parts$Outbound =
726
- | Parts4$Outbound
727
- | Parts1$Outbound
728
- | Parts2$Outbound
729
- | Parts3$Outbound
730
- | Parts5$Outbound;
2233
+ export type GetAgentTaskParts$Outbound =
2234
+ | GetAgentTaskPartsTextPart$Outbound
2235
+ | GetAgentTaskPartsFilePart$Outbound
2236
+ | PartsDataPart$Outbound;
731
2237
 
732
2238
  /** @internal */
733
- export const Parts$outboundSchema: z.ZodType<
734
- Parts$Outbound,
2239
+ export const GetAgentTaskParts$outboundSchema: z.ZodType<
2240
+ GetAgentTaskParts$Outbound,
735
2241
  z.ZodTypeDef,
736
- Parts
2242
+ GetAgentTaskParts
737
2243
  > = z.union([
738
- z.lazy(() => Parts4$outboundSchema),
739
- z.lazy(() => Parts1$outboundSchema),
740
- z.lazy(() => Parts2$outboundSchema),
741
- z.lazy(() => Parts3$outboundSchema),
742
- z.lazy(() => Parts5$outboundSchema),
2244
+ z.lazy(() => GetAgentTaskPartsTextPart$outboundSchema),
2245
+ z.lazy(() => GetAgentTaskPartsFilePart$outboundSchema),
2246
+ z.lazy(() => PartsDataPart$outboundSchema),
743
2247
  ]);
744
2248
 
745
- export function partsToJSON(parts: Parts): string {
746
- return JSON.stringify(Parts$outboundSchema.parse(parts));
2249
+ export function getAgentTaskPartsToJSON(
2250
+ getAgentTaskParts: GetAgentTaskParts,
2251
+ ): string {
2252
+ return JSON.stringify(
2253
+ GetAgentTaskParts$outboundSchema.parse(getAgentTaskParts),
2254
+ );
747
2255
  }
748
- export function partsFromJSON(
2256
+ export function getAgentTaskPartsFromJSON(
749
2257
  jsonString: string,
750
- ): SafeParseResult<Parts, SDKValidationError> {
2258
+ ): SafeParseResult<GetAgentTaskParts, SDKValidationError> {
751
2259
  return safeParse(
752
2260
  jsonString,
753
- (x) => Parts$inboundSchema.parse(JSON.parse(x)),
754
- `Failed to parse 'Parts' from JSON`,
2261
+ (x) => GetAgentTaskParts$inboundSchema.parse(JSON.parse(x)),
2262
+ `Failed to parse 'GetAgentTaskParts' from JSON`,
755
2263
  );
756
2264
  }
757
2265
 
758
2266
  /** @internal */
759
- export const History$inboundSchema: z.ZodType<History, z.ZodTypeDef, unknown> =
760
- z.object({
761
- kind: GetAgentTaskAgentsResponseKind$inboundSchema,
762
- messageId: z.string(),
763
- role: GetAgentTaskRole$inboundSchema,
764
- parts: z.array(
765
- z.union([
766
- z.lazy(() => Parts4$inboundSchema),
767
- z.lazy(() => Parts1$inboundSchema),
768
- z.lazy(() => Parts2$inboundSchema),
769
- z.lazy(() => Parts3$inboundSchema),
770
- z.lazy(() => Parts5$inboundSchema),
771
- ]),
772
- ),
773
- taskId: z.string().optional(),
774
- contextId: z.string().optional(),
775
- metadata: z.record(z.any()).optional(),
776
- });
777
- /** @internal */
778
- export type History$Outbound = {
779
- kind: string;
780
- messageId: string;
781
- role: string;
782
- parts: Array<
783
- | Parts4$Outbound
784
- | Parts1$Outbound
785
- | Parts2$Outbound
786
- | Parts3$Outbound
787
- | Parts5$Outbound
788
- >;
789
- taskId?: string | undefined;
790
- contextId?: string | undefined;
791
- metadata?: { [k: string]: any } | undefined;
792
- };
793
-
794
- /** @internal */
795
- export const History$outboundSchema: z.ZodType<
796
- History$Outbound,
2267
+ export const TaskArtifact$inboundSchema: z.ZodType<
2268
+ TaskArtifact,
797
2269
  z.ZodTypeDef,
798
- History
2270
+ unknown
799
2271
  > = z.object({
800
- kind: GetAgentTaskAgentsResponseKind$outboundSchema,
801
- messageId: z.string(),
802
- role: GetAgentTaskRole$outboundSchema,
2272
+ artifactId: z.string(),
2273
+ name: z.string(),
2274
+ description: z.string().optional(),
803
2275
  parts: z.array(
804
2276
  z.union([
805
- z.lazy(() => Parts4$outboundSchema),
806
- z.lazy(() => Parts1$outboundSchema),
807
- z.lazy(() => Parts2$outboundSchema),
808
- z.lazy(() => Parts3$outboundSchema),
809
- z.lazy(() => Parts5$outboundSchema),
2277
+ z.lazy(() => GetAgentTaskPartsTextPart$inboundSchema),
2278
+ z.lazy(() => GetAgentTaskPartsFilePart$inboundSchema),
2279
+ z.lazy(() => PartsDataPart$inboundSchema),
810
2280
  ]),
811
2281
  ),
812
- taskId: z.string().optional(),
813
- contextId: z.string().optional(),
2282
+ extensions: z.array(z.string()).optional(),
814
2283
  metadata: z.record(z.any()).optional(),
815
2284
  });
816
-
817
- export function historyToJSON(history: History): string {
818
- return JSON.stringify(History$outboundSchema.parse(history));
819
- }
820
- export function historyFromJSON(
821
- jsonString: string,
822
- ): SafeParseResult<History, SDKValidationError> {
823
- return safeParse(
824
- jsonString,
825
- (x) => History$inboundSchema.parse(JSON.parse(x)),
826
- `Failed to parse 'History' from JSON`,
827
- );
828
- }
829
-
830
- /** @internal */
831
- export const GetAgentTaskAgentsKind$inboundSchema: z.ZodNativeEnum<
832
- typeof GetAgentTaskAgentsKind
833
- > = z.nativeEnum(GetAgentTaskAgentsKind);
834
- /** @internal */
835
- export const GetAgentTaskAgentsKind$outboundSchema: z.ZodNativeEnum<
836
- typeof GetAgentTaskAgentsKind
837
- > = GetAgentTaskAgentsKind$inboundSchema;
838
-
839
- /** @internal */
840
- export const Artifacts$inboundSchema: z.ZodType<
841
- Artifacts,
842
- z.ZodTypeDef,
843
- unknown
844
- > = z.object({
845
- kind: GetAgentTaskAgentsKind$inboundSchema,
846
- artifactId: z.string(),
847
- name: z.string(),
848
- type: z.string(),
849
- url: z.string().optional(),
850
- data: z.any().optional(),
851
- });
852
2285
  /** @internal */
853
- export type Artifacts$Outbound = {
854
- kind: string;
2286
+ export type TaskArtifact$Outbound = {
855
2287
  artifactId: string;
856
2288
  name: string;
857
- type: string;
858
- url?: string | undefined;
859
- data?: any | undefined;
2289
+ description?: string | undefined;
2290
+ parts: Array<
2291
+ | GetAgentTaskPartsTextPart$Outbound
2292
+ | GetAgentTaskPartsFilePart$Outbound
2293
+ | PartsDataPart$Outbound
2294
+ >;
2295
+ extensions?: Array<string> | undefined;
2296
+ metadata?: { [k: string]: any } | undefined;
860
2297
  };
861
2298
 
862
2299
  /** @internal */
863
- export const Artifacts$outboundSchema: z.ZodType<
864
- Artifacts$Outbound,
2300
+ export const TaskArtifact$outboundSchema: z.ZodType<
2301
+ TaskArtifact$Outbound,
865
2302
  z.ZodTypeDef,
866
- Artifacts
2303
+ TaskArtifact
867
2304
  > = z.object({
868
- kind: GetAgentTaskAgentsKind$outboundSchema,
869
2305
  artifactId: z.string(),
870
2306
  name: z.string(),
871
- type: z.string(),
872
- url: z.string().optional(),
873
- data: z.any().optional(),
2307
+ description: z.string().optional(),
2308
+ parts: z.array(
2309
+ z.union([
2310
+ z.lazy(() => GetAgentTaskPartsTextPart$outboundSchema),
2311
+ z.lazy(() => GetAgentTaskPartsFilePart$outboundSchema),
2312
+ z.lazy(() => PartsDataPart$outboundSchema),
2313
+ ]),
2314
+ ),
2315
+ extensions: z.array(z.string()).optional(),
2316
+ metadata: z.record(z.any()).optional(),
874
2317
  });
875
2318
 
876
- export function artifactsToJSON(artifacts: Artifacts): string {
877
- return JSON.stringify(Artifacts$outboundSchema.parse(artifacts));
2319
+ export function taskArtifactToJSON(taskArtifact: TaskArtifact): string {
2320
+ return JSON.stringify(TaskArtifact$outboundSchema.parse(taskArtifact));
878
2321
  }
879
- export function artifactsFromJSON(
2322
+ export function taskArtifactFromJSON(
880
2323
  jsonString: string,
881
- ): SafeParseResult<Artifacts, SDKValidationError> {
2324
+ ): SafeParseResult<TaskArtifact, SDKValidationError> {
882
2325
  return safeParse(
883
2326
  jsonString,
884
- (x) => Artifacts$inboundSchema.parse(JSON.parse(x)),
885
- `Failed to parse 'Artifacts' from JSON`,
2327
+ (x) => TaskArtifact$inboundSchema.parse(JSON.parse(x)),
2328
+ `Failed to parse 'TaskArtifact' from JSON`,
886
2329
  );
887
2330
  }
888
2331
 
889
2332
  /** @internal */
890
- export const GetAgentTaskResponseBody$inboundSchema: z.ZodType<
891
- GetAgentTaskResponseBody,
2333
+ export const GetAgentTaskExtendedTaskResponse$inboundSchema: z.ZodType<
2334
+ GetAgentTaskExtendedTaskResponse,
892
2335
  z.ZodTypeDef,
893
2336
  unknown
894
2337
  > = z.object({
895
2338
  id: z.string(),
896
2339
  contextId: z.string(),
897
2340
  kind: GetAgentTaskKind$inboundSchema,
898
- status: z.lazy(() => GetAgentTaskStatus$inboundSchema),
899
- history: z.array(z.lazy(() => History$inboundSchema)),
900
- artifacts: z.array(z.lazy(() => Artifacts$inboundSchema)).optional(),
2341
+ status: z.lazy(() => GetAgentTaskTaskStatus$inboundSchema),
2342
+ history: z.array(z.lazy(() => ExtendedA2AMessage$inboundSchema)),
2343
+ artifacts: z.array(z.lazy(() => TaskArtifact$inboundSchema)).optional(),
901
2344
  metadata: z.record(z.any()).optional(),
902
2345
  });
903
2346
  /** @internal */
904
- export type GetAgentTaskResponseBody$Outbound = {
2347
+ export type GetAgentTaskExtendedTaskResponse$Outbound = {
905
2348
  id: string;
906
2349
  contextId: string;
907
2350
  kind: string;
908
- status: GetAgentTaskStatus$Outbound;
909
- history: Array<History$Outbound>;
910
- artifacts?: Array<Artifacts$Outbound> | undefined;
2351
+ status: GetAgentTaskTaskStatus$Outbound;
2352
+ history: Array<ExtendedA2AMessage$Outbound>;
2353
+ artifacts?: Array<TaskArtifact$Outbound> | undefined;
911
2354
  metadata?: { [k: string]: any } | undefined;
912
2355
  };
913
2356
 
914
2357
  /** @internal */
915
- export const GetAgentTaskResponseBody$outboundSchema: z.ZodType<
916
- GetAgentTaskResponseBody$Outbound,
2358
+ export const GetAgentTaskExtendedTaskResponse$outboundSchema: z.ZodType<
2359
+ GetAgentTaskExtendedTaskResponse$Outbound,
917
2360
  z.ZodTypeDef,
918
- GetAgentTaskResponseBody
2361
+ GetAgentTaskExtendedTaskResponse
919
2362
  > = z.object({
920
2363
  id: z.string(),
921
2364
  contextId: z.string(),
922
2365
  kind: GetAgentTaskKind$outboundSchema,
923
- status: z.lazy(() => GetAgentTaskStatus$outboundSchema),
924
- history: z.array(z.lazy(() => History$outboundSchema)),
925
- artifacts: z.array(z.lazy(() => Artifacts$outboundSchema)).optional(),
2366
+ status: z.lazy(() => GetAgentTaskTaskStatus$outboundSchema),
2367
+ history: z.array(z.lazy(() => ExtendedA2AMessage$outboundSchema)),
2368
+ artifacts: z.array(z.lazy(() => TaskArtifact$outboundSchema)).optional(),
926
2369
  metadata: z.record(z.any()).optional(),
927
2370
  });
928
2371
 
929
- export function getAgentTaskResponseBodyToJSON(
930
- getAgentTaskResponseBody: GetAgentTaskResponseBody,
2372
+ export function getAgentTaskExtendedTaskResponseToJSON(
2373
+ getAgentTaskExtendedTaskResponse: GetAgentTaskExtendedTaskResponse,
931
2374
  ): string {
932
2375
  return JSON.stringify(
933
- GetAgentTaskResponseBody$outboundSchema.parse(getAgentTaskResponseBody),
2376
+ GetAgentTaskExtendedTaskResponse$outboundSchema.parse(
2377
+ getAgentTaskExtendedTaskResponse,
2378
+ ),
934
2379
  );
935
2380
  }
936
- export function getAgentTaskResponseBodyFromJSON(
2381
+ export function getAgentTaskExtendedTaskResponseFromJSON(
937
2382
  jsonString: string,
938
- ): SafeParseResult<GetAgentTaskResponseBody, SDKValidationError> {
2383
+ ): SafeParseResult<GetAgentTaskExtendedTaskResponse, SDKValidationError> {
939
2384
  return safeParse(
940
2385
  jsonString,
941
- (x) => GetAgentTaskResponseBody$inboundSchema.parse(JSON.parse(x)),
942
- `Failed to parse 'GetAgentTaskResponseBody' from JSON`,
2386
+ (x) => GetAgentTaskExtendedTaskResponse$inboundSchema.parse(JSON.parse(x)),
2387
+ `Failed to parse 'GetAgentTaskExtendedTaskResponse' from JSON`,
943
2388
  );
944
2389
  }