@orq-ai/node 4.0.4 → 4.0.6

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 (170) hide show
  1. package/bin/mcp-server.js +213 -213
  2. package/bin/mcp-server.js.map +36 -36
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +8 -8
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +28 -28
  15. package/models/operations/createtool.js +12 -12
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getalltools.js +12 -12
  20. package/models/operations/getbudget.js +2 -2
  21. package/models/operations/getevals.js +28 -28
  22. package/models/operations/listbudgets.js +2 -2
  23. package/models/operations/listcontacts.js +2 -2
  24. package/models/operations/listdatasetdatapoints.js +8 -8
  25. package/models/operations/listdatasets.js +2 -2
  26. package/models/operations/listdatasources.js +2 -2
  27. package/models/operations/retrievecontact.js +2 -2
  28. package/models/operations/retrievedatapoint.js +8 -8
  29. package/models/operations/retrievedataset.js +2 -2
  30. package/models/operations/retrievedatasource.js +2 -2
  31. package/models/operations/retrievetool.js +12 -12
  32. package/models/operations/runagent.js +2 -2
  33. package/models/operations/streamrunagent.js +2 -2
  34. package/models/operations/updatebudget.js +2 -2
  35. package/models/operations/updatecontact.js +2 -2
  36. package/models/operations/updatedatapoint.js +8 -8
  37. package/models/operations/updatedataset.js +2 -2
  38. package/models/operations/updatedatasource.js +2 -2
  39. package/models/operations/updateeval.js +28 -28
  40. package/models/operations/updatetool.js +14 -14
  41. package/package.json +1 -1
  42. package/packages/orq-rc/README.md +38 -47
  43. package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
  44. package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
  45. package/packages/orq-rc/examples/package-lock.json +1 -1
  46. package/packages/orq-rc/jsr.json +1 -1
  47. package/packages/orq-rc/package-lock.json +2 -2
  48. package/packages/orq-rc/package.json +1 -1
  49. package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
  50. package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
  51. package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
  52. package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
  53. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
  54. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
  55. package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
  56. package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
  57. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
  58. package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
  59. package/packages/orq-rc/src/lib/config.ts +2 -2
  60. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  61. package/packages/orq-rc/src/mcp-server/server.ts +1 -9
  62. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
  63. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
  64. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
  65. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
  66. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
  67. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
  68. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
  69. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
  70. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
  71. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
  72. package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
  73. package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
  74. package/packages/orq-rc/src/models/errors/index.ts +2 -3
  75. package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
  76. package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
  78. package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
  79. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  83. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  85. package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
  86. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  87. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  91. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  93. package/packages/orq-rc/src/models/operations/index.ts +3 -7
  94. package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
  95. package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
  96. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  99. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
  102. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  104. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  107. package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
  108. package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
  109. package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
  110. package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
  111. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  114. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  117. package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
  118. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  119. package/packages/orq-rc/src/sdk/agents.ts +51 -99
  120. package/packages/orq-rc/src/sdk/responses.ts +7 -5
  121. package/src/lib/config.ts +2 -2
  122. package/src/mcp-server/mcp-server.ts +1 -1
  123. package/src/mcp-server/server.ts +1 -1
  124. package/src/models/operations/createbudget.ts +2 -2
  125. package/src/models/operations/createcontact.ts +2 -2
  126. package/src/models/operations/createdataset.ts +2 -2
  127. package/src/models/operations/createdatasetitem.ts +8 -8
  128. package/src/models/operations/createdatasource.ts +2 -2
  129. package/src/models/operations/createeval.ts +28 -28
  130. package/src/models/operations/createtool.ts +12 -12
  131. package/src/models/operations/fileget.ts +2 -2
  132. package/src/models/operations/filelist.ts +2 -2
  133. package/src/models/operations/fileupload.ts +2 -2
  134. package/src/models/operations/getalltools.ts +12 -12
  135. package/src/models/operations/getbudget.ts +2 -2
  136. package/src/models/operations/getevals.ts +28 -28
  137. package/src/models/operations/listbudgets.ts +2 -2
  138. package/src/models/operations/listcontacts.ts +2 -2
  139. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  140. package/src/models/operations/listdatasets.ts +2 -2
  141. package/src/models/operations/listdatasources.ts +2 -2
  142. package/src/models/operations/retrievecontact.ts +2 -2
  143. package/src/models/operations/retrievedatapoint.ts +8 -8
  144. package/src/models/operations/retrievedataset.ts +2 -2
  145. package/src/models/operations/retrievedatasource.ts +2 -2
  146. package/src/models/operations/retrievetool.ts +12 -12
  147. package/src/models/operations/runagent.ts +2 -2
  148. package/src/models/operations/streamrunagent.ts +2 -2
  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/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
  157. package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
  158. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
  159. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
  160. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
  161. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
  162. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
  163. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
  164. package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
  165. package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
  166. package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
  167. package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
  168. package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
  169. package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
  170. package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
@@ -1,2389 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- export type GetAgentTaskRequest = {
13
- agentKey: string;
14
- taskId: string;
15
- };
16
-
17
- /**
18
- * A2A entity type
19
- */
20
- export const GetAgentTaskKind = {
21
- Task: "task",
22
- } as const;
23
- /**
24
- * A2A entity type
25
- */
26
- export type GetAgentTaskKind = ClosedEnum<typeof GetAgentTaskKind>;
27
-
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>;
45
-
46
- export const GetAgentTaskAgentsResponseKind = {
47
- Message: "message",
48
- } as const;
49
- export type GetAgentTaskAgentsResponseKind = ClosedEnum<
50
- typeof GetAgentTaskAgentsResponseKind
51
- >;
52
-
53
- /**
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).
258
- */
259
- export const ExtendedMessageRole = {
260
- User: "user",
261
- Agent: "agent",
262
- Tool: "tool",
263
- System: "system",
264
- } as const;
265
- /**
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).
267
- */
268
- export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
269
-
270
- export const GetAgentTaskPartsAgentsResponse200Kind = {
271
- ToolResult: "tool_result",
272
- } as const;
273
- export type GetAgentTaskPartsAgentsResponse200Kind = ClosedEnum<
274
- typeof GetAgentTaskPartsAgentsResponse200Kind
275
- >;
276
-
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 = {
281
- kind: GetAgentTaskPartsAgentsResponse200Kind;
282
- toolCallId: string;
283
- result?: any | undefined;
284
- metadata?: { [k: string]: any } | undefined;
285
- };
286
-
287
- export const GetAgentTaskPartsAgentsResponseKind = {
288
- ToolCall: "tool_call",
289
- } as const;
290
- export type GetAgentTaskPartsAgentsResponseKind = ClosedEnum<
291
- typeof GetAgentTaskPartsAgentsResponseKind
292
- >;
293
-
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 = {
298
- kind: GetAgentTaskPartsAgentsResponseKind;
299
- toolName: string;
300
- toolCallId: string;
301
- arguments: { [k: string]: any };
302
- metadata?: { [k: string]: any } | undefined;
303
- };
304
-
305
- export const GetAgentTaskPartsAgentsKind = {
306
- File: "file",
307
- } as const;
308
- export type GetAgentTaskPartsAgentsKind = ClosedEnum<
309
- typeof GetAgentTaskPartsAgentsKind
310
- >;
311
-
312
- /**
313
- * File in URI format. Check in the model's documentation for the supported mime types for the URI format
314
- */
315
- export type GetAgentTaskFileFileInURIFormat = {
316
- /**
317
- * URL for the File content
318
- */
319
- uri: string;
320
- /**
321
- * Optional mimeType for the file
322
- */
323
- mimeType?: string | undefined;
324
- /**
325
- * Optional name for the file
326
- */
327
- name?: string | undefined;
328
- };
329
-
330
- /**
331
- * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
332
- */
333
- export type GetAgentTaskFileBinaryFormat = {
334
- /**
335
- * base64 encoded content of the file
336
- */
337
- bytes: string;
338
- /**
339
- * Optional mimeType for the file
340
- */
341
- mimeType?: string | undefined;
342
- /**
343
- * Optional name for the file
344
- */
345
- name?: string | undefined;
346
- };
347
-
348
- export type PartsFile =
349
- | GetAgentTaskFileBinaryFormat
350
- | GetAgentTaskFileFileInURIFormat;
351
-
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 = {
356
- kind: GetAgentTaskPartsAgentsKind;
357
- file: GetAgentTaskFileBinaryFormat | GetAgentTaskFileFileInURIFormat;
358
- metadata?: { [k: string]: any } | undefined;
359
- };
360
-
361
- export const GetAgentTaskPartsKind = {
362
- Data: "data",
363
- } as const;
364
- export type GetAgentTaskPartsKind = ClosedEnum<typeof GetAgentTaskPartsKind>;
365
-
366
- /**
367
- * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
368
- */
369
- export type DataPart = {
370
- kind: GetAgentTaskPartsKind;
371
- data: { [k: string]: any };
372
- metadata?: { [k: string]: any } | undefined;
373
- };
374
-
375
- export const PartsKind = {
376
- Text: "text",
377
- } as const;
378
- export type PartsKind = ClosedEnum<typeof PartsKind>;
379
-
380
- /**
381
- * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
382
- */
383
- export type PartsTextPart = {
384
- kind: PartsKind;
385
- text: string;
386
- };
387
-
388
- export type Parts =
389
- | ToolCallPart
390
- | PartsTextPart
391
- | DataPart
392
- | PartsFilePart
393
- | PartsToolResultPart;
394
-
395
- /**
396
- * Extended Agent-to-Agent protocol message with support for tool calls and tool results. Extends the base A2A message format with Orquesta-specific features.
397
- */
398
- export type ExtendedA2AMessage = {
399
- kind: GetAgentTaskAgentsKind;
400
- /**
401
- * Unique identifier for the message
402
- */
403
- messageId: string;
404
- /**
405
- * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
406
- */
407
- role: ExtendedMessageRole;
408
- /**
409
- * Array of message parts (text, file, tool_call, tool_result)
410
- */
411
- parts: Array<
412
- | ToolCallPart
413
- | PartsTextPart
414
- | DataPart
415
- | PartsFilePart
416
- | PartsToolResultPart
417
- >;
418
- /**
419
- * Associated task ID if applicable
420
- */
421
- taskId?: string | undefined;
422
- /**
423
- * Correlation ID for execution tracking
424
- */
425
- contextId?: string | undefined;
426
- /**
427
- * Additional message metadata
428
- */
429
- metadata?: { [k: string]: any } | undefined;
430
- };
431
-
432
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind =
433
- {
434
- Data: "data",
435
- } as const;
436
- export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind =
437
- ClosedEnum<
438
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
439
- >;
440
-
441
- /**
442
- * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
443
- */
444
- export type PartsDataPart = {
445
- kind:
446
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind;
447
- data: { [k: string]: any };
448
- metadata?: { [k: string]: any } | undefined;
449
- };
450
-
451
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind =
452
- {
453
- File: "file",
454
- } as const;
455
- export type GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind =
456
- ClosedEnum<
457
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
458
- >;
459
-
460
- /**
461
- * File in URI format. Check in the model's documentation for the supported mime types for the URI format
462
- */
463
- export type GetAgentTaskFileAgentsFileInURIFormat = {
464
- /**
465
- * URL for the File content
466
- */
467
- uri: string;
468
- /**
469
- * Optional mimeType for the file
470
- */
471
- mimeType?: string | undefined;
472
- /**
473
- * Optional name for the file
474
- */
475
- name?: string | undefined;
476
- };
477
-
478
- /**
479
- * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
480
- */
481
- export type GetAgentTaskFileAgentsBinaryFormat = {
482
- /**
483
- * base64 encoded content of the file
484
- */
485
- bytes: string;
486
- /**
487
- * Optional mimeType for the file
488
- */
489
- mimeType?: string | undefined;
490
- /**
491
- * Optional name for the file
492
- */
493
- name?: string | undefined;
494
- };
495
-
496
- export type GetAgentTaskPartsFile =
497
- | GetAgentTaskFileAgentsBinaryFormat
498
- | GetAgentTaskFileAgentsFileInURIFormat;
499
-
500
- /**
501
- * 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.
502
- */
503
- export type GetAgentTaskPartsFilePart = {
504
- kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind;
505
- file:
506
- | GetAgentTaskFileAgentsBinaryFormat
507
- | GetAgentTaskFileAgentsFileInURIFormat;
508
- metadata?: { [k: string]: any } | undefined;
509
- };
510
-
511
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind = {
512
- Text: "text",
513
- } as const;
514
- export type GetAgentTaskPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
515
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
516
- >;
517
-
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
- */
538
- artifactId: string;
539
- /**
540
- * Required name for the artifact (e.g., filename or descriptive title)
541
- */
542
- name: string;
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;
561
- };
562
-
563
- /**
564
- * Agent task execution response format with full conversation history and artifacts. Used for API responses when retrieving task details.
565
- */
566
- export type GetAgentTaskExtendedTaskResponse = {
567
- /**
568
- * Unique task execution identifier
569
- */
570
- id: string;
571
- /**
572
- * Correlation ID for tracking
573
- */
574
- contextId: string;
575
- /**
576
- * A2A entity type
577
- */
578
- kind: GetAgentTaskKind;
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
- */
594
- metadata?: { [k: string]: any } | undefined;
595
- };
596
-
597
- /** @internal */
598
- export const GetAgentTaskRequest$inboundSchema: z.ZodType<
599
- GetAgentTaskRequest,
600
- z.ZodTypeDef,
601
- unknown
602
- > = z.object({
603
- agent_key: z.string(),
604
- task_id: z.string(),
605
- }).transform((v) => {
606
- return remap$(v, {
607
- "agent_key": "agentKey",
608
- "task_id": "taskId",
609
- });
610
- });
611
- /** @internal */
612
- export type GetAgentTaskRequest$Outbound = {
613
- agent_key: string;
614
- task_id: string;
615
- };
616
-
617
- /** @internal */
618
- export const GetAgentTaskRequest$outboundSchema: z.ZodType<
619
- GetAgentTaskRequest$Outbound,
620
- z.ZodTypeDef,
621
- GetAgentTaskRequest
622
- > = z.object({
623
- agentKey: z.string(),
624
- taskId: z.string(),
625
- }).transform((v) => {
626
- return remap$(v, {
627
- agentKey: "agent_key",
628
- taskId: "task_id",
629
- });
630
- });
631
-
632
- export function getAgentTaskRequestToJSON(
633
- getAgentTaskRequest: GetAgentTaskRequest,
634
- ): string {
635
- return JSON.stringify(
636
- GetAgentTaskRequest$outboundSchema.parse(getAgentTaskRequest),
637
- );
638
- }
639
- export function getAgentTaskRequestFromJSON(
640
- jsonString: string,
641
- ): SafeParseResult<GetAgentTaskRequest, SDKValidationError> {
642
- return safeParse(
643
- jsonString,
644
- (x) => GetAgentTaskRequest$inboundSchema.parse(JSON.parse(x)),
645
- `Failed to parse 'GetAgentTaskRequest' from JSON`,
646
- );
647
- }
648
-
649
- /** @internal */
650
- export const GetAgentTaskKind$inboundSchema: z.ZodNativeEnum<
651
- typeof GetAgentTaskKind
652
- > = z.nativeEnum(GetAgentTaskKind);
653
- /** @internal */
654
- export const GetAgentTaskKind$outboundSchema: z.ZodNativeEnum<
655
- typeof GetAgentTaskKind
656
- > = GetAgentTaskKind$inboundSchema;
657
-
658
- /** @internal */
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 GetAgentTaskFileFileInURIFormat$inboundSchema: z.ZodType<
1511
- GetAgentTaskFileFileInURIFormat,
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 GetAgentTaskFileFileInURIFormat$Outbound = {
1521
- uri: string;
1522
- mimeType?: string | undefined;
1523
- name?: string | undefined;
1524
- };
1525
-
1526
- /** @internal */
1527
- export const GetAgentTaskFileFileInURIFormat$outboundSchema: z.ZodType<
1528
- GetAgentTaskFileFileInURIFormat$Outbound,
1529
- z.ZodTypeDef,
1530
- GetAgentTaskFileFileInURIFormat
1531
- > = z.object({
1532
- uri: z.string(),
1533
- mimeType: z.string().optional(),
1534
- name: z.string().optional(),
1535
- });
1536
-
1537
- export function getAgentTaskFileFileInURIFormatToJSON(
1538
- getAgentTaskFileFileInURIFormat: GetAgentTaskFileFileInURIFormat,
1539
- ): string {
1540
- return JSON.stringify(
1541
- GetAgentTaskFileFileInURIFormat$outboundSchema.parse(
1542
- getAgentTaskFileFileInURIFormat,
1543
- ),
1544
- );
1545
- }
1546
- export function getAgentTaskFileFileInURIFormatFromJSON(
1547
- jsonString: string,
1548
- ): SafeParseResult<GetAgentTaskFileFileInURIFormat, SDKValidationError> {
1549
- return safeParse(
1550
- jsonString,
1551
- (x) => GetAgentTaskFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
1552
- `Failed to parse 'GetAgentTaskFileFileInURIFormat' from JSON`,
1553
- );
1554
- }
1555
-
1556
- /** @internal */
1557
- export const GetAgentTaskFileBinaryFormat$inboundSchema: z.ZodType<
1558
- GetAgentTaskFileBinaryFormat,
1559
- z.ZodTypeDef,
1560
- unknown
1561
- > = z.object({
1562
- bytes: z.string(),
1563
- mimeType: z.string().optional(),
1564
- name: z.string().optional(),
1565
- });
1566
- /** @internal */
1567
- export type GetAgentTaskFileBinaryFormat$Outbound = {
1568
- bytes: string;
1569
- mimeType?: string | undefined;
1570
- name?: string | undefined;
1571
- };
1572
-
1573
- /** @internal */
1574
- export const GetAgentTaskFileBinaryFormat$outboundSchema: z.ZodType<
1575
- GetAgentTaskFileBinaryFormat$Outbound,
1576
- z.ZodTypeDef,
1577
- GetAgentTaskFileBinaryFormat
1578
- > = z.object({
1579
- bytes: z.string(),
1580
- mimeType: z.string().optional(),
1581
- name: z.string().optional(),
1582
- });
1583
-
1584
- export function getAgentTaskFileBinaryFormatToJSON(
1585
- getAgentTaskFileBinaryFormat: GetAgentTaskFileBinaryFormat,
1586
- ): string {
1587
- return JSON.stringify(
1588
- GetAgentTaskFileBinaryFormat$outboundSchema.parse(
1589
- getAgentTaskFileBinaryFormat,
1590
- ),
1591
- );
1592
- }
1593
- export function getAgentTaskFileBinaryFormatFromJSON(
1594
- jsonString: string,
1595
- ): SafeParseResult<GetAgentTaskFileBinaryFormat, SDKValidationError> {
1596
- return safeParse(
1597
- jsonString,
1598
- (x) => GetAgentTaskFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
1599
- `Failed to parse 'GetAgentTaskFileBinaryFormat' from JSON`,
1600
- );
1601
- }
1602
-
1603
- /** @internal */
1604
- export const PartsFile$inboundSchema: z.ZodType<
1605
- PartsFile,
1606
- z.ZodTypeDef,
1607
- unknown
1608
- > = z.union([
1609
- z.lazy(() => GetAgentTaskFileBinaryFormat$inboundSchema),
1610
- z.lazy(() => GetAgentTaskFileFileInURIFormat$inboundSchema),
1611
- ]);
1612
- /** @internal */
1613
- export type PartsFile$Outbound =
1614
- | GetAgentTaskFileBinaryFormat$Outbound
1615
- | GetAgentTaskFileFileInURIFormat$Outbound;
1616
-
1617
- /** @internal */
1618
- export const PartsFile$outboundSchema: z.ZodType<
1619
- PartsFile$Outbound,
1620
- z.ZodTypeDef,
1621
- PartsFile
1622
- > = z.union([
1623
- z.lazy(() => GetAgentTaskFileBinaryFormat$outboundSchema),
1624
- z.lazy(() => GetAgentTaskFileFileInURIFormat$outboundSchema),
1625
- ]);
1626
-
1627
- export function partsFileToJSON(partsFile: PartsFile): string {
1628
- return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
1629
- }
1630
- export function partsFileFromJSON(
1631
- jsonString: string,
1632
- ): SafeParseResult<PartsFile, SDKValidationError> {
1633
- return safeParse(
1634
- jsonString,
1635
- (x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
1636
- `Failed to parse 'PartsFile' from JSON`,
1637
- );
1638
- }
1639
-
1640
- /** @internal */
1641
- export const PartsFilePart$inboundSchema: z.ZodType<
1642
- PartsFilePart,
1643
- z.ZodTypeDef,
1644
- unknown
1645
- > = z.object({
1646
- kind: GetAgentTaskPartsAgentsKind$inboundSchema,
1647
- file: z.union([
1648
- z.lazy(() => GetAgentTaskFileBinaryFormat$inboundSchema),
1649
- z.lazy(() => GetAgentTaskFileFileInURIFormat$inboundSchema),
1650
- ]),
1651
- metadata: z.record(z.any()).optional(),
1652
- });
1653
- /** @internal */
1654
- export type PartsFilePart$Outbound = {
1655
- kind: string;
1656
- file:
1657
- | GetAgentTaskFileBinaryFormat$Outbound
1658
- | GetAgentTaskFileFileInURIFormat$Outbound;
1659
- metadata?: { [k: string]: any } | undefined;
1660
- };
1661
-
1662
- /** @internal */
1663
- export const PartsFilePart$outboundSchema: z.ZodType<
1664
- PartsFilePart$Outbound,
1665
- z.ZodTypeDef,
1666
- PartsFilePart
1667
- > = z.object({
1668
- kind: GetAgentTaskPartsAgentsKind$outboundSchema,
1669
- file: z.union([
1670
- z.lazy(() => GetAgentTaskFileBinaryFormat$outboundSchema),
1671
- z.lazy(() => GetAgentTaskFileFileInURIFormat$outboundSchema),
1672
- ]),
1673
- metadata: z.record(z.any()).optional(),
1674
- });
1675
-
1676
- export function partsFilePartToJSON(partsFilePart: PartsFilePart): string {
1677
- return JSON.stringify(PartsFilePart$outboundSchema.parse(partsFilePart));
1678
- }
1679
- export function partsFilePartFromJSON(
1680
- jsonString: string,
1681
- ): SafeParseResult<PartsFilePart, SDKValidationError> {
1682
- return safeParse(
1683
- jsonString,
1684
- (x) => PartsFilePart$inboundSchema.parse(JSON.parse(x)),
1685
- `Failed to parse 'PartsFilePart' from JSON`,
1686
- );
1687
- }
1688
-
1689
- /** @internal */
1690
- export const GetAgentTaskPartsKind$inboundSchema: z.ZodNativeEnum<
1691
- typeof GetAgentTaskPartsKind
1692
- > = z.nativeEnum(GetAgentTaskPartsKind);
1693
- /** @internal */
1694
- export const GetAgentTaskPartsKind$outboundSchema: z.ZodNativeEnum<
1695
- typeof GetAgentTaskPartsKind
1696
- > = GetAgentTaskPartsKind$inboundSchema;
1697
-
1698
- /** @internal */
1699
- export const DataPart$inboundSchema: z.ZodType<
1700
- DataPart,
1701
- z.ZodTypeDef,
1702
- unknown
1703
- > = z.object({
1704
- kind: GetAgentTaskPartsKind$inboundSchema,
1705
- data: z.record(z.any()),
1706
- metadata: z.record(z.any()).optional(),
1707
- });
1708
- /** @internal */
1709
- export type DataPart$Outbound = {
1710
- kind: string;
1711
- data: { [k: string]: any };
1712
- metadata?: { [k: string]: any } | undefined;
1713
- };
1714
-
1715
- /** @internal */
1716
- export const DataPart$outboundSchema: z.ZodType<
1717
- DataPart$Outbound,
1718
- z.ZodTypeDef,
1719
- DataPart
1720
- > = z.object({
1721
- kind: GetAgentTaskPartsKind$outboundSchema,
1722
- data: z.record(z.any()),
1723
- metadata: z.record(z.any()).optional(),
1724
- });
1725
-
1726
- export function dataPartToJSON(dataPart: DataPart): string {
1727
- return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
1728
- }
1729
- export function dataPartFromJSON(
1730
- jsonString: string,
1731
- ): SafeParseResult<DataPart, SDKValidationError> {
1732
- return safeParse(
1733
- jsonString,
1734
- (x) => DataPart$inboundSchema.parse(JSON.parse(x)),
1735
- `Failed to parse 'DataPart' from JSON`,
1736
- );
1737
- }
1738
-
1739
- /** @internal */
1740
- export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
1741
- .nativeEnum(PartsKind);
1742
- /** @internal */
1743
- export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
1744
- PartsKind$inboundSchema;
1745
-
1746
- /** @internal */
1747
- export const PartsTextPart$inboundSchema: z.ZodType<
1748
- PartsTextPart,
1749
- z.ZodTypeDef,
1750
- unknown
1751
- > = z.object({
1752
- kind: PartsKind$inboundSchema,
1753
- text: z.string(),
1754
- });
1755
- /** @internal */
1756
- export type PartsTextPart$Outbound = {
1757
- kind: string;
1758
- text: string;
1759
- };
1760
-
1761
- /** @internal */
1762
- export const PartsTextPart$outboundSchema: z.ZodType<
1763
- PartsTextPart$Outbound,
1764
- z.ZodTypeDef,
1765
- PartsTextPart
1766
- > = z.object({
1767
- kind: PartsKind$outboundSchema,
1768
- text: z.string(),
1769
- });
1770
-
1771
- export function partsTextPartToJSON(partsTextPart: PartsTextPart): string {
1772
- return JSON.stringify(PartsTextPart$outboundSchema.parse(partsTextPart));
1773
- }
1774
- export function partsTextPartFromJSON(
1775
- jsonString: string,
1776
- ): SafeParseResult<PartsTextPart, SDKValidationError> {
1777
- return safeParse(
1778
- jsonString,
1779
- (x) => PartsTextPart$inboundSchema.parse(JSON.parse(x)),
1780
- `Failed to parse 'PartsTextPart' from JSON`,
1781
- );
1782
- }
1783
-
1784
- /** @internal */
1785
- export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
1786
- .union([
1787
- z.lazy(() => ToolCallPart$inboundSchema),
1788
- z.lazy(() => PartsTextPart$inboundSchema),
1789
- z.lazy(() => DataPart$inboundSchema),
1790
- z.lazy(() => PartsFilePart$inboundSchema),
1791
- z.lazy(() => PartsToolResultPart$inboundSchema),
1792
- ]);
1793
- /** @internal */
1794
- export type Parts$Outbound =
1795
- | ToolCallPart$Outbound
1796
- | PartsTextPart$Outbound
1797
- | DataPart$Outbound
1798
- | PartsFilePart$Outbound
1799
- | PartsToolResultPart$Outbound;
1800
-
1801
- /** @internal */
1802
- export const Parts$outboundSchema: z.ZodType<
1803
- Parts$Outbound,
1804
- z.ZodTypeDef,
1805
- Parts
1806
- > = z.union([
1807
- z.lazy(() => ToolCallPart$outboundSchema),
1808
- z.lazy(() => PartsTextPart$outboundSchema),
1809
- z.lazy(() => DataPart$outboundSchema),
1810
- z.lazy(() => PartsFilePart$outboundSchema),
1811
- z.lazy(() => PartsToolResultPart$outboundSchema),
1812
- ]);
1813
-
1814
- export function partsToJSON(parts: Parts): string {
1815
- return JSON.stringify(Parts$outboundSchema.parse(parts));
1816
- }
1817
- export function partsFromJSON(
1818
- jsonString: string,
1819
- ): SafeParseResult<Parts, SDKValidationError> {
1820
- return safeParse(
1821
- jsonString,
1822
- (x) => Parts$inboundSchema.parse(JSON.parse(x)),
1823
- `Failed to parse 'Parts' from JSON`,
1824
- );
1825
- }
1826
-
1827
- /** @internal */
1828
- export const ExtendedA2AMessage$inboundSchema: z.ZodType<
1829
- ExtendedA2AMessage,
1830
- z.ZodTypeDef,
1831
- unknown
1832
- > = z.object({
1833
- kind: GetAgentTaskAgentsKind$inboundSchema,
1834
- messageId: z.string(),
1835
- role: ExtendedMessageRole$inboundSchema,
1836
- parts: z.array(
1837
- z.union([
1838
- z.lazy(() => ToolCallPart$inboundSchema),
1839
- z.lazy(() => PartsTextPart$inboundSchema),
1840
- z.lazy(() => DataPart$inboundSchema),
1841
- z.lazy(() => PartsFilePart$inboundSchema),
1842
- z.lazy(() => PartsToolResultPart$inboundSchema),
1843
- ]),
1844
- ),
1845
- taskId: z.string().optional(),
1846
- contextId: z.string().optional(),
1847
- metadata: z.record(z.any()).optional(),
1848
- });
1849
- /** @internal */
1850
- export type ExtendedA2AMessage$Outbound = {
1851
- kind: string;
1852
- messageId: string;
1853
- role: string;
1854
- parts: Array<
1855
- | ToolCallPart$Outbound
1856
- | PartsTextPart$Outbound
1857
- | DataPart$Outbound
1858
- | PartsFilePart$Outbound
1859
- | PartsToolResultPart$Outbound
1860
- >;
1861
- taskId?: string | undefined;
1862
- contextId?: string | undefined;
1863
- metadata?: { [k: string]: any } | undefined;
1864
- };
1865
-
1866
- /** @internal */
1867
- export const ExtendedA2AMessage$outboundSchema: z.ZodType<
1868
- ExtendedA2AMessage$Outbound,
1869
- z.ZodTypeDef,
1870
- ExtendedA2AMessage
1871
- > = z.object({
1872
- kind: GetAgentTaskAgentsKind$outboundSchema,
1873
- messageId: z.string(),
1874
- role: ExtendedMessageRole$outboundSchema,
1875
- parts: z.array(
1876
- z.union([
1877
- z.lazy(() => ToolCallPart$outboundSchema),
1878
- z.lazy(() => PartsTextPart$outboundSchema),
1879
- z.lazy(() => DataPart$outboundSchema),
1880
- z.lazy(() => PartsFilePart$outboundSchema),
1881
- z.lazy(() => PartsToolResultPart$outboundSchema),
1882
- ]),
1883
- ),
1884
- taskId: z.string().optional(),
1885
- contextId: z.string().optional(),
1886
- metadata: z.record(z.any()).optional(),
1887
- });
1888
-
1889
- export function extendedA2AMessageToJSON(
1890
- extendedA2AMessage: ExtendedA2AMessage,
1891
- ): string {
1892
- return JSON.stringify(
1893
- ExtendedA2AMessage$outboundSchema.parse(extendedA2AMessage),
1894
- );
1895
- }
1896
- export function extendedA2AMessageFromJSON(
1897
- jsonString: string,
1898
- ): SafeParseResult<ExtendedA2AMessage, SDKValidationError> {
1899
- return safeParse(
1900
- jsonString,
1901
- (x) => ExtendedA2AMessage$inboundSchema.parse(JSON.parse(x)),
1902
- `Failed to parse 'ExtendedA2AMessage' from JSON`,
1903
- );
1904
- }
1905
-
1906
- /** @internal */
1907
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema:
1908
- z.ZodNativeEnum<
1909
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
1910
- > = z.nativeEnum(
1911
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind,
1912
- );
1913
- /** @internal */
1914
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$outboundSchema:
1915
- z.ZodNativeEnum<
1916
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind
1917
- > =
1918
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema;
1919
-
1920
- /** @internal */
1921
- export const PartsDataPart$inboundSchema: z.ZodType<
1922
- PartsDataPart,
1923
- z.ZodTypeDef,
1924
- unknown
1925
- > = z.object({
1926
- kind:
1927
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$inboundSchema,
1928
- data: z.record(z.any()),
1929
- metadata: z.record(z.any()).optional(),
1930
- });
1931
- /** @internal */
1932
- export type PartsDataPart$Outbound = {
1933
- kind: string;
1934
- data: { [k: string]: any };
1935
- metadata?: { [k: string]: any } | undefined;
1936
- };
1937
-
1938
- /** @internal */
1939
- export const PartsDataPart$outboundSchema: z.ZodType<
1940
- PartsDataPart$Outbound,
1941
- z.ZodTypeDef,
1942
- PartsDataPart
1943
- > = z.object({
1944
- kind:
1945
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyArtifactsKind$outboundSchema,
1946
- data: z.record(z.any()),
1947
- metadata: z.record(z.any()).optional(),
1948
- });
1949
-
1950
- export function partsDataPartToJSON(partsDataPart: PartsDataPart): string {
1951
- return JSON.stringify(PartsDataPart$outboundSchema.parse(partsDataPart));
1952
- }
1953
- export function partsDataPartFromJSON(
1954
- jsonString: string,
1955
- ): SafeParseResult<PartsDataPart, SDKValidationError> {
1956
- return safeParse(
1957
- jsonString,
1958
- (x) => PartsDataPart$inboundSchema.parse(JSON.parse(x)),
1959
- `Failed to parse 'PartsDataPart' from JSON`,
1960
- );
1961
- }
1962
-
1963
- /** @internal */
1964
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema:
1965
- z.ZodNativeEnum<
1966
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
1967
- > = z.nativeEnum(
1968
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind,
1969
- );
1970
- /** @internal */
1971
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema:
1972
- z.ZodNativeEnum<
1973
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind
1974
- > =
1975
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$inboundSchema;
1976
-
1977
- /** @internal */
1978
- export const GetAgentTaskFileAgentsFileInURIFormat$inboundSchema: z.ZodType<
1979
- GetAgentTaskFileAgentsFileInURIFormat,
1980
- z.ZodTypeDef,
1981
- unknown
1982
- > = z.object({
1983
- uri: z.string(),
1984
- mimeType: z.string().optional(),
1985
- name: z.string().optional(),
1986
- });
1987
- /** @internal */
1988
- export type GetAgentTaskFileAgentsFileInURIFormat$Outbound = {
1989
- uri: string;
1990
- mimeType?: string | undefined;
1991
- name?: string | undefined;
1992
- };
1993
-
1994
- /** @internal */
1995
- export const GetAgentTaskFileAgentsFileInURIFormat$outboundSchema: z.ZodType<
1996
- GetAgentTaskFileAgentsFileInURIFormat$Outbound,
1997
- z.ZodTypeDef,
1998
- GetAgentTaskFileAgentsFileInURIFormat
1999
- > = z.object({
2000
- uri: z.string(),
2001
- mimeType: z.string().optional(),
2002
- name: z.string().optional(),
2003
- });
2004
-
2005
- export function getAgentTaskFileAgentsFileInURIFormatToJSON(
2006
- getAgentTaskFileAgentsFileInURIFormat: GetAgentTaskFileAgentsFileInURIFormat,
2007
- ): string {
2008
- return JSON.stringify(
2009
- GetAgentTaskFileAgentsFileInURIFormat$outboundSchema.parse(
2010
- getAgentTaskFileAgentsFileInURIFormat,
2011
- ),
2012
- );
2013
- }
2014
- export function getAgentTaskFileAgentsFileInURIFormatFromJSON(
2015
- jsonString: string,
2016
- ): SafeParseResult<GetAgentTaskFileAgentsFileInURIFormat, SDKValidationError> {
2017
- return safeParse(
2018
- jsonString,
2019
- (x) =>
2020
- GetAgentTaskFileAgentsFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
2021
- `Failed to parse 'GetAgentTaskFileAgentsFileInURIFormat' from JSON`,
2022
- );
2023
- }
2024
-
2025
- /** @internal */
2026
- export const GetAgentTaskFileAgentsBinaryFormat$inboundSchema: z.ZodType<
2027
- GetAgentTaskFileAgentsBinaryFormat,
2028
- z.ZodTypeDef,
2029
- unknown
2030
- > = z.object({
2031
- bytes: z.string(),
2032
- mimeType: z.string().optional(),
2033
- name: z.string().optional(),
2034
- });
2035
- /** @internal */
2036
- export type GetAgentTaskFileAgentsBinaryFormat$Outbound = {
2037
- bytes: string;
2038
- mimeType?: string | undefined;
2039
- name?: string | undefined;
2040
- };
2041
-
2042
- /** @internal */
2043
- export const GetAgentTaskFileAgentsBinaryFormat$outboundSchema: z.ZodType<
2044
- GetAgentTaskFileAgentsBinaryFormat$Outbound,
2045
- z.ZodTypeDef,
2046
- GetAgentTaskFileAgentsBinaryFormat
2047
- > = z.object({
2048
- bytes: z.string(),
2049
- mimeType: z.string().optional(),
2050
- name: z.string().optional(),
2051
- });
2052
-
2053
- export function getAgentTaskFileAgentsBinaryFormatToJSON(
2054
- getAgentTaskFileAgentsBinaryFormat: GetAgentTaskFileAgentsBinaryFormat,
2055
- ): string {
2056
- return JSON.stringify(
2057
- GetAgentTaskFileAgentsBinaryFormat$outboundSchema.parse(
2058
- getAgentTaskFileAgentsBinaryFormat,
2059
- ),
2060
- );
2061
- }
2062
- export function getAgentTaskFileAgentsBinaryFormatFromJSON(
2063
- jsonString: string,
2064
- ): SafeParseResult<GetAgentTaskFileAgentsBinaryFormat, SDKValidationError> {
2065
- return safeParse(
2066
- jsonString,
2067
- (x) =>
2068
- GetAgentTaskFileAgentsBinaryFormat$inboundSchema.parse(JSON.parse(x)),
2069
- `Failed to parse 'GetAgentTaskFileAgentsBinaryFormat' from JSON`,
2070
- );
2071
- }
2072
-
2073
- /** @internal */
2074
- export const GetAgentTaskPartsFile$inboundSchema: z.ZodType<
2075
- GetAgentTaskPartsFile,
2076
- z.ZodTypeDef,
2077
- unknown
2078
- > = z.union([
2079
- z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$inboundSchema),
2080
- z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$inboundSchema),
2081
- ]);
2082
- /** @internal */
2083
- export type GetAgentTaskPartsFile$Outbound =
2084
- | GetAgentTaskFileAgentsBinaryFormat$Outbound
2085
- | GetAgentTaskFileAgentsFileInURIFormat$Outbound;
2086
-
2087
- /** @internal */
2088
- export const GetAgentTaskPartsFile$outboundSchema: z.ZodType<
2089
- GetAgentTaskPartsFile$Outbound,
2090
- z.ZodTypeDef,
2091
- GetAgentTaskPartsFile
2092
- > = z.union([
2093
- z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$outboundSchema),
2094
- z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$outboundSchema),
2095
- ]);
2096
-
2097
- export function getAgentTaskPartsFileToJSON(
2098
- getAgentTaskPartsFile: GetAgentTaskPartsFile,
2099
- ): string {
2100
- return JSON.stringify(
2101
- GetAgentTaskPartsFile$outboundSchema.parse(getAgentTaskPartsFile),
2102
- );
2103
- }
2104
- export function getAgentTaskPartsFileFromJSON(
2105
- jsonString: string,
2106
- ): SafeParseResult<GetAgentTaskPartsFile, SDKValidationError> {
2107
- return safeParse(
2108
- jsonString,
2109
- (x) => GetAgentTaskPartsFile$inboundSchema.parse(JSON.parse(x)),
2110
- `Failed to parse 'GetAgentTaskPartsFile' from JSON`,
2111
- );
2112
- }
2113
-
2114
- /** @internal */
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(() => GetAgentTaskFileAgentsBinaryFormat$inboundSchema),
2124
- z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$inboundSchema),
2125
- ]),
2126
- metadata: z.record(z.any()).optional(),
2127
- });
2128
- /** @internal */
2129
- export type GetAgentTaskPartsFilePart$Outbound = {
2130
- kind: string;
2131
- file:
2132
- | GetAgentTaskFileAgentsBinaryFormat$Outbound
2133
- | GetAgentTaskFileAgentsFileInURIFormat$Outbound;
2134
- metadata?: { [k: string]: any } | undefined;
2135
- };
2136
-
2137
- /** @internal */
2138
- export const GetAgentTaskPartsFilePart$outboundSchema: z.ZodType<
2139
- GetAgentTaskPartsFilePart$Outbound,
2140
- z.ZodTypeDef,
2141
- GetAgentTaskPartsFilePart
2142
- > = z.object({
2143
- kind:
2144
- GetAgentTaskPartsAgentsResponse200ApplicationJSONResponseBodyKind$outboundSchema,
2145
- file: z.union([
2146
- z.lazy(() => GetAgentTaskFileAgentsBinaryFormat$outboundSchema),
2147
- z.lazy(() => GetAgentTaskFileAgentsFileInURIFormat$outboundSchema),
2148
- ]),
2149
- metadata: z.record(z.any()).optional(),
2150
- });
2151
-
2152
- export function getAgentTaskPartsFilePartToJSON(
2153
- getAgentTaskPartsFilePart: GetAgentTaskPartsFilePart,
2154
- ): string {
2155
- return JSON.stringify(
2156
- GetAgentTaskPartsFilePart$outboundSchema.parse(getAgentTaskPartsFilePart),
2157
- );
2158
- }
2159
- export function getAgentTaskPartsFilePartFromJSON(
2160
- jsonString: string,
2161
- ): SafeParseResult<GetAgentTaskPartsFilePart, SDKValidationError> {
2162
- return safeParse(
2163
- jsonString,
2164
- (x) => GetAgentTaskPartsFilePart$inboundSchema.parse(JSON.parse(x)),
2165
- `Failed to parse 'GetAgentTaskPartsFilePart' from JSON`,
2166
- );
2167
- }
2168
-
2169
- /** @internal */
2170
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
2171
- z.ZodNativeEnum<
2172
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
2173
- > = z.nativeEnum(GetAgentTaskPartsAgentsResponse200ApplicationJSONKind);
2174
- /** @internal */
2175
- export const GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
2176
- z.ZodNativeEnum<
2177
- typeof GetAgentTaskPartsAgentsResponse200ApplicationJSONKind
2178
- > = GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
2179
-
2180
- /** @internal */
2181
- export const GetAgentTaskPartsTextPart$inboundSchema: z.ZodType<
2182
- GetAgentTaskPartsTextPart,
2183
- z.ZodTypeDef,
2184
- unknown
2185
- > = z.object({
2186
- kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
2187
- text: z.string(),
2188
- });
2189
- /** @internal */
2190
- export type GetAgentTaskPartsTextPart$Outbound = {
2191
- kind: string;
2192
- text: string;
2193
- };
2194
-
2195
- /** @internal */
2196
- export const GetAgentTaskPartsTextPart$outboundSchema: z.ZodType<
2197
- GetAgentTaskPartsTextPart$Outbound,
2198
- z.ZodTypeDef,
2199
- GetAgentTaskPartsTextPart
2200
- > = z.object({
2201
- kind: GetAgentTaskPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
2202
- text: z.string(),
2203
- });
2204
-
2205
- export function getAgentTaskPartsTextPartToJSON(
2206
- getAgentTaskPartsTextPart: GetAgentTaskPartsTextPart,
2207
- ): string {
2208
- return JSON.stringify(
2209
- GetAgentTaskPartsTextPart$outboundSchema.parse(getAgentTaskPartsTextPart),
2210
- );
2211
- }
2212
- export function getAgentTaskPartsTextPartFromJSON(
2213
- jsonString: string,
2214
- ): SafeParseResult<GetAgentTaskPartsTextPart, SDKValidationError> {
2215
- return safeParse(
2216
- jsonString,
2217
- (x) => GetAgentTaskPartsTextPart$inboundSchema.parse(JSON.parse(x)),
2218
- `Failed to parse 'GetAgentTaskPartsTextPart' from JSON`,
2219
- );
2220
- }
2221
-
2222
- /** @internal */
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
- ]);
2232
- /** @internal */
2233
- export type GetAgentTaskParts$Outbound =
2234
- | GetAgentTaskPartsTextPart$Outbound
2235
- | GetAgentTaskPartsFilePart$Outbound
2236
- | PartsDataPart$Outbound;
2237
-
2238
- /** @internal */
2239
- export const GetAgentTaskParts$outboundSchema: z.ZodType<
2240
- GetAgentTaskParts$Outbound,
2241
- z.ZodTypeDef,
2242
- GetAgentTaskParts
2243
- > = z.union([
2244
- z.lazy(() => GetAgentTaskPartsTextPart$outboundSchema),
2245
- z.lazy(() => GetAgentTaskPartsFilePart$outboundSchema),
2246
- z.lazy(() => PartsDataPart$outboundSchema),
2247
- ]);
2248
-
2249
- export function getAgentTaskPartsToJSON(
2250
- getAgentTaskParts: GetAgentTaskParts,
2251
- ): string {
2252
- return JSON.stringify(
2253
- GetAgentTaskParts$outboundSchema.parse(getAgentTaskParts),
2254
- );
2255
- }
2256
- export function getAgentTaskPartsFromJSON(
2257
- jsonString: string,
2258
- ): SafeParseResult<GetAgentTaskParts, SDKValidationError> {
2259
- return safeParse(
2260
- jsonString,
2261
- (x) => GetAgentTaskParts$inboundSchema.parse(JSON.parse(x)),
2262
- `Failed to parse 'GetAgentTaskParts' from JSON`,
2263
- );
2264
- }
2265
-
2266
- /** @internal */
2267
- export const TaskArtifact$inboundSchema: z.ZodType<
2268
- TaskArtifact,
2269
- z.ZodTypeDef,
2270
- unknown
2271
- > = z.object({
2272
- artifactId: z.string(),
2273
- name: z.string(),
2274
- description: z.string().optional(),
2275
- parts: z.array(
2276
- z.union([
2277
- z.lazy(() => GetAgentTaskPartsTextPart$inboundSchema),
2278
- z.lazy(() => GetAgentTaskPartsFilePart$inboundSchema),
2279
- z.lazy(() => PartsDataPart$inboundSchema),
2280
- ]),
2281
- ),
2282
- extensions: z.array(z.string()).optional(),
2283
- metadata: z.record(z.any()).optional(),
2284
- });
2285
- /** @internal */
2286
- export type TaskArtifact$Outbound = {
2287
- artifactId: string;
2288
- name: string;
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;
2297
- };
2298
-
2299
- /** @internal */
2300
- export const TaskArtifact$outboundSchema: z.ZodType<
2301
- TaskArtifact$Outbound,
2302
- z.ZodTypeDef,
2303
- TaskArtifact
2304
- > = z.object({
2305
- artifactId: z.string(),
2306
- name: z.string(),
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(),
2317
- });
2318
-
2319
- export function taskArtifactToJSON(taskArtifact: TaskArtifact): string {
2320
- return JSON.stringify(TaskArtifact$outboundSchema.parse(taskArtifact));
2321
- }
2322
- export function taskArtifactFromJSON(
2323
- jsonString: string,
2324
- ): SafeParseResult<TaskArtifact, SDKValidationError> {
2325
- return safeParse(
2326
- jsonString,
2327
- (x) => TaskArtifact$inboundSchema.parse(JSON.parse(x)),
2328
- `Failed to parse 'TaskArtifact' from JSON`,
2329
- );
2330
- }
2331
-
2332
- /** @internal */
2333
- export const GetAgentTaskExtendedTaskResponse$inboundSchema: z.ZodType<
2334
- GetAgentTaskExtendedTaskResponse,
2335
- z.ZodTypeDef,
2336
- unknown
2337
- > = z.object({
2338
- id: z.string(),
2339
- contextId: z.string(),
2340
- kind: GetAgentTaskKind$inboundSchema,
2341
- status: z.lazy(() => GetAgentTaskTaskStatus$inboundSchema),
2342
- history: z.array(z.lazy(() => ExtendedA2AMessage$inboundSchema)),
2343
- artifacts: z.array(z.lazy(() => TaskArtifact$inboundSchema)).optional(),
2344
- metadata: z.record(z.any()).optional(),
2345
- });
2346
- /** @internal */
2347
- export type GetAgentTaskExtendedTaskResponse$Outbound = {
2348
- id: string;
2349
- contextId: string;
2350
- kind: string;
2351
- status: GetAgentTaskTaskStatus$Outbound;
2352
- history: Array<ExtendedA2AMessage$Outbound>;
2353
- artifacts?: Array<TaskArtifact$Outbound> | undefined;
2354
- metadata?: { [k: string]: any } | undefined;
2355
- };
2356
-
2357
- /** @internal */
2358
- export const GetAgentTaskExtendedTaskResponse$outboundSchema: z.ZodType<
2359
- GetAgentTaskExtendedTaskResponse$Outbound,
2360
- z.ZodTypeDef,
2361
- GetAgentTaskExtendedTaskResponse
2362
- > = z.object({
2363
- id: z.string(),
2364
- contextId: z.string(),
2365
- kind: GetAgentTaskKind$outboundSchema,
2366
- status: z.lazy(() => GetAgentTaskTaskStatus$outboundSchema),
2367
- history: z.array(z.lazy(() => ExtendedA2AMessage$outboundSchema)),
2368
- artifacts: z.array(z.lazy(() => TaskArtifact$outboundSchema)).optional(),
2369
- metadata: z.record(z.any()).optional(),
2370
- });
2371
-
2372
- export function getAgentTaskExtendedTaskResponseToJSON(
2373
- getAgentTaskExtendedTaskResponse: GetAgentTaskExtendedTaskResponse,
2374
- ): string {
2375
- return JSON.stringify(
2376
- GetAgentTaskExtendedTaskResponse$outboundSchema.parse(
2377
- getAgentTaskExtendedTaskResponse,
2378
- ),
2379
- );
2380
- }
2381
- export function getAgentTaskExtendedTaskResponseFromJSON(
2382
- jsonString: string,
2383
- ): SafeParseResult<GetAgentTaskExtendedTaskResponse, SDKValidationError> {
2384
- return safeParse(
2385
- jsonString,
2386
- (x) => GetAgentTaskExtendedTaskResponse$inboundSchema.parse(JSON.parse(x)),
2387
- `Failed to parse 'GetAgentTaskExtendedTaskResponse' from JSON`,
2388
- );
2389
- }