@orq-ai/node 3.12.4 → 3.12.5

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 (196) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  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 +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +16 -16
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/getbudget.js +2 -2
  19. package/models/operations/getevals.js +28 -28
  20. package/models/operations/listbudgets.js +2 -2
  21. package/models/operations/listcontacts.js +2 -2
  22. package/models/operations/listdatasetdatapoints.js +2 -2
  23. package/models/operations/listdatasets.js +2 -2
  24. package/models/operations/listdatasources.js +2 -2
  25. package/models/operations/retrievecontact.js +2 -2
  26. package/models/operations/retrievedatapoint.js +2 -2
  27. package/models/operations/retrievedataset.js +2 -2
  28. package/models/operations/retrievedatasource.js +2 -2
  29. package/models/operations/updatebudget.js +2 -2
  30. package/models/operations/updatecontact.js +2 -2
  31. package/models/operations/updatedatapoint.js +2 -2
  32. package/models/operations/updatedataset.js +2 -2
  33. package/models/operations/updatedatasource.js +2 -2
  34. package/models/operations/updateeval.js +16 -16
  35. package/package.json +1 -1
  36. package/packages/orq-rc/FUNCTIONS.md +9 -19
  37. package/packages/orq-rc/README.md +180 -181
  38. package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
  39. package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
  40. package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
  41. package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
  42. package/packages/orq-rc/examples/package-lock.json +1 -1
  43. package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -0
  44. package/packages/orq-rc/jsr.json +1 -1
  45. package/packages/orq-rc/package-lock.json +2 -2
  46. package/packages/orq-rc/package.json +1 -1
  47. package/packages/orq-rc/src/funcs/agentsList.ts +167 -0
  48. package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
  49. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
  50. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
  51. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
  52. package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
  53. package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
  54. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
  55. package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
  56. package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
  57. package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
  58. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
  59. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  60. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
  61. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
  62. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  63. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  64. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  65. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
  66. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  67. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
  68. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  69. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  70. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
  71. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  72. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  73. package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
  74. package/packages/orq-rc/src/lib/config.ts +3 -3
  75. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  76. package/packages/orq-rc/src/mcp-server/server.ts +49 -1
  77. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
  78. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
  79. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
  80. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
  81. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
  82. package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
  83. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
  84. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
  85. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
  86. package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
  87. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
  88. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
  89. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
  90. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
  91. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
  92. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
  93. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
  94. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
  95. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
  96. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
  97. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
  98. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
  99. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
  100. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
  101. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
  102. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
  103. package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +33 -0
  104. package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
  105. package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
  106. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  107. package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
  108. package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
  109. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  110. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
  114. package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
  115. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
  116. package/packages/orq-rc/src/models/operations/creatememorystore.ts +1956 -0
  117. package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
  118. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
  119. package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
  120. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +36 -27
  121. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
  122. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  125. package/packages/orq-rc/src/models/operations/getagent.ts +1171 -0
  126. package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
  127. package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
  128. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
  129. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1241 -0
  130. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
  131. package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
  132. package/packages/orq-rc/src/models/operations/index.ts +24 -0
  133. package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
  134. package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
  135. package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
  136. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  137. package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
  138. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  139. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
  141. package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
  142. package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
  143. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  144. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  145. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  146. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  147. package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
  148. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
  149. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
  150. package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
  151. package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
  152. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
  153. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
  154. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  155. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  156. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  157. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  158. package/packages/orq-rc/src/models/operations/updateeval.ts +6627 -1224
  159. package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
  160. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
  161. package/packages/orq-rc/src/models/operations/updatememorystore.ts +1348 -0
  162. package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
  163. package/packages/orq-rc/src/sdk/agents.ts +148 -0
  164. package/packages/orq-rc/src/sdk/budgets.ts +5 -5
  165. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  166. package/packages/orq-rc/src/sdk/sdk.ts +27 -1
  167. package/src/lib/config.ts +3 -3
  168. package/src/mcp-server/mcp-server.ts +1 -1
  169. package/src/mcp-server/server.ts +1 -1
  170. package/src/models/operations/createbudget.ts +2 -2
  171. package/src/models/operations/createcontact.ts +2 -2
  172. package/src/models/operations/createdataset.ts +2 -2
  173. package/src/models/operations/createdatasetitem.ts +2 -2
  174. package/src/models/operations/createdatasource.ts +2 -2
  175. package/src/models/operations/createeval.ts +16 -16
  176. package/src/models/operations/fileget.ts +2 -2
  177. package/src/models/operations/filelist.ts +2 -2
  178. package/src/models/operations/fileupload.ts +2 -2
  179. package/src/models/operations/getbudget.ts +2 -2
  180. package/src/models/operations/getevals.ts +28 -28
  181. package/src/models/operations/listbudgets.ts +2 -2
  182. package/src/models/operations/listcontacts.ts +2 -2
  183. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  184. package/src/models/operations/listdatasets.ts +2 -2
  185. package/src/models/operations/listdatasources.ts +2 -2
  186. package/src/models/operations/retrievecontact.ts +2 -2
  187. package/src/models/operations/retrievedatapoint.ts +2 -2
  188. package/src/models/operations/retrievedataset.ts +2 -2
  189. package/src/models/operations/retrievedatasource.ts +2 -2
  190. package/src/models/operations/updatebudget.ts +2 -2
  191. package/src/models/operations/updatecontact.ts +2 -2
  192. package/src/models/operations/updatedatapoint.ts +2 -2
  193. package/src/models/operations/updatedataset.ts +2 -2
  194. package/src/models/operations/updatedatasource.ts +2 -2
  195. package/src/models/operations/updateeval.ts +16 -16
  196. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
@@ -0,0 +1,3428 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 const Role2 = {
13
+ Tool: "tool",
14
+ } as const;
15
+ export type Role2 = ClosedEnum<typeof Role2>;
16
+
17
+ export const Role1 = {
18
+ User: "user",
19
+ } as const;
20
+ export type Role1 = ClosedEnum<typeof Role1>;
21
+
22
+ /**
23
+ * Message role (user or tool for continuing executions)
24
+ */
25
+ export type RunAgentRole = Role1 | Role2;
26
+
27
+ export const RunAgentPartsAgentsRequestKind = {
28
+ ToolResult: "tool_result",
29
+ } as const;
30
+ export type RunAgentPartsAgentsRequestKind = ClosedEnum<
31
+ typeof RunAgentPartsAgentsRequestKind
32
+ >;
33
+
34
+ export type Five = {
35
+ kind: RunAgentPartsAgentsRequestKind;
36
+ toolCallId: string;
37
+ result?: any | undefined;
38
+ metadata?: { [k: string]: any } | undefined;
39
+ };
40
+
41
+ export const RunAgentPartsAgentsKind = {
42
+ ToolCall: "tool_call",
43
+ } as const;
44
+ export type RunAgentPartsAgentsKind = ClosedEnum<
45
+ typeof RunAgentPartsAgentsKind
46
+ >;
47
+
48
+ export type Parts4 = {
49
+ kind: RunAgentPartsAgentsKind;
50
+ toolName: string;
51
+ toolCallId: string;
52
+ arguments: { [k: string]: any };
53
+ metadata?: { [k: string]: any } | undefined;
54
+ };
55
+
56
+ export const RunAgentPartsKind = {
57
+ File: "file",
58
+ } as const;
59
+ export type RunAgentPartsKind = ClosedEnum<typeof RunAgentPartsKind>;
60
+
61
+ export type File2 = {
62
+ /**
63
+ * URL for the File content
64
+ */
65
+ uri: string;
66
+ /**
67
+ * Optional mimeType for the file
68
+ */
69
+ mimeType?: string | undefined;
70
+ /**
71
+ * Optional name for the file
72
+ */
73
+ name?: string | undefined;
74
+ };
75
+
76
+ export type File1 = {
77
+ /**
78
+ * base64 encoded content of the file
79
+ */
80
+ bytes: string;
81
+ /**
82
+ * Optional mimeType for the file
83
+ */
84
+ mimeType?: string | undefined;
85
+ /**
86
+ * Optional name for the file
87
+ */
88
+ name?: string | undefined;
89
+ };
90
+
91
+ export type PartsFile = File1 | File2;
92
+
93
+ export type Parts3 = {
94
+ kind: RunAgentPartsKind;
95
+ file: File1 | File2;
96
+ metadata?: { [k: string]: any } | undefined;
97
+ };
98
+
99
+ export const PartsKind = {
100
+ Data: "data",
101
+ } as const;
102
+ export type PartsKind = ClosedEnum<typeof PartsKind>;
103
+
104
+ export type Parts2 = {
105
+ kind: PartsKind;
106
+ data?: any | undefined;
107
+ metadata?: { [k: string]: any } | undefined;
108
+ };
109
+
110
+ export const Kind = {
111
+ Text: "text",
112
+ } as const;
113
+ export type Kind = ClosedEnum<typeof Kind>;
114
+
115
+ export type Parts1 = {
116
+ kind: Kind;
117
+ text: string;
118
+ };
119
+
120
+ export type Parts = Parts4 | Parts1 | Parts3 | Five | Parts2;
121
+
122
+ /**
123
+ * The A2A format message containing the task for the agent to perform.
124
+ */
125
+ export type Message = {
126
+ /**
127
+ * Optional A2A message ID in ULID format
128
+ */
129
+ messageId?: string | undefined;
130
+ /**
131
+ * Message role (user or tool for continuing executions)
132
+ */
133
+ role: Role1 | Role2;
134
+ /**
135
+ * A2A message parts
136
+ */
137
+ parts: Array<Parts4 | Parts1 | Parts3 | Five | Parts2>;
138
+ /**
139
+ * Optional message metadata
140
+ */
141
+ metadata?: { [k: string]: any } | undefined;
142
+ };
143
+
144
+ export type TeamOfAgents = {
145
+ id: string;
146
+ /**
147
+ * The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
148
+ */
149
+ role?: string | undefined;
150
+ };
151
+
152
+ export const RunAgentToolsAgentsRequestRequestBodySettings12Type = {
153
+ Function: "function",
154
+ } as const;
155
+ export type RunAgentToolsAgentsRequestRequestBodySettings12Type = ClosedEnum<
156
+ typeof RunAgentToolsAgentsRequestRequestBodySettings12Type
157
+ >;
158
+
159
+ export type ToolsFunction = {
160
+ name: string;
161
+ description?: string | undefined;
162
+ strict?: boolean | undefined;
163
+ parameters?: { [k: string]: any } | undefined;
164
+ };
165
+
166
+ export type Twelve = {
167
+ type: RunAgentToolsAgentsRequestRequestBodySettings12Type;
168
+ id?: string | undefined;
169
+ key: string;
170
+ displayName?: string | undefined;
171
+ description?: string | undefined;
172
+ requiresApproval?: boolean | undefined;
173
+ function: ToolsFunction;
174
+ };
175
+
176
+ /**
177
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
178
+ */
179
+ export const Status = {
180
+ Live: "live",
181
+ Draft: "draft",
182
+ Pending: "pending",
183
+ Published: "published",
184
+ } as const;
185
+ /**
186
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
187
+ */
188
+ export type Status = ClosedEnum<typeof Status>;
189
+
190
+ export const RunAgentToolsAgentsRequestRequestBodySettings11Type = {
191
+ Http: "http",
192
+ } as const;
193
+ export type RunAgentToolsAgentsRequestRequestBodySettings11Type = ClosedEnum<
194
+ typeof RunAgentToolsAgentsRequestRequestBodySettings11Type
195
+ >;
196
+
197
+ /**
198
+ * The HTTP method to use.
199
+ */
200
+ export const Method = {
201
+ Get: "GET",
202
+ Post: "POST",
203
+ Put: "PUT",
204
+ Delete: "DELETE",
205
+ } as const;
206
+ /**
207
+ * The HTTP method to use.
208
+ */
209
+ export type Method = ClosedEnum<typeof Method>;
210
+
211
+ /**
212
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
213
+ */
214
+ export type Blueprint = {
215
+ /**
216
+ * The URL to send the request to.
217
+ */
218
+ url: string;
219
+ /**
220
+ * The HTTP method to use.
221
+ */
222
+ method: Method;
223
+ /**
224
+ * The headers to send with the request.
225
+ */
226
+ headers?: { [k: string]: string } | undefined;
227
+ /**
228
+ * The body to send with the request.
229
+ */
230
+ body?: { [k: string]: any } | undefined;
231
+ };
232
+
233
+ /**
234
+ * The type of the argument.
235
+ */
236
+ export const RunAgentToolsAgentsRequestRequestBodySettings11HttpType = {
237
+ String: "string",
238
+ Number: "number",
239
+ Boolean: "boolean",
240
+ } as const;
241
+ /**
242
+ * The type of the argument.
243
+ */
244
+ export type RunAgentToolsAgentsRequestRequestBodySettings11HttpType =
245
+ ClosedEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings11HttpType>;
246
+
247
+ /**
248
+ * The default value of the argument.
249
+ */
250
+ export type DefaultValue = string | number | boolean;
251
+
252
+ export type Arguments = {
253
+ /**
254
+ * The type of the argument.
255
+ */
256
+ type: RunAgentToolsAgentsRequestRequestBodySettings11HttpType;
257
+ /**
258
+ * A description of the argument.
259
+ */
260
+ description: string;
261
+ /**
262
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
263
+ */
264
+ sendToModel?: boolean | undefined;
265
+ /**
266
+ * The default value of the argument.
267
+ */
268
+ defaultValue?: string | number | boolean | undefined;
269
+ };
270
+
271
+ export type Http = {
272
+ /**
273
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
274
+ */
275
+ blueprint: Blueprint;
276
+ /**
277
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
278
+ */
279
+ arguments?: { [k: string]: Arguments } | undefined;
280
+ };
281
+
282
+ export type Eleven = {
283
+ id?: string | undefined;
284
+ /**
285
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
286
+ */
287
+ path: string;
288
+ /**
289
+ * Unique key of the tool as it will be displayed in the UI
290
+ */
291
+ key: string;
292
+ /**
293
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
294
+ */
295
+ displayName: string;
296
+ /**
297
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
298
+ */
299
+ description: string;
300
+ /**
301
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
302
+ */
303
+ status?: Status | undefined;
304
+ versionHash?: string | undefined;
305
+ type: RunAgentToolsAgentsRequestRequestBodySettings11Type;
306
+ http: Http;
307
+ requiresApproval?: boolean | undefined;
308
+ };
309
+
310
+ export const RunAgentToolsAgentsRequestRequestBodySettings10Type = {
311
+ CurrentDate: "current_date",
312
+ } as const;
313
+ export type RunAgentToolsAgentsRequestRequestBodySettings10Type = ClosedEnum<
314
+ typeof RunAgentToolsAgentsRequestRequestBodySettings10Type
315
+ >;
316
+
317
+ export type Ten = {
318
+ type: RunAgentToolsAgentsRequestRequestBodySettings10Type;
319
+ requiresApproval?: boolean | undefined;
320
+ };
321
+
322
+ export const RunAgentToolsAgentsRequestRequestBodySettings9Type = {
323
+ QueryKnowledgeBase: "query_knowledge_base",
324
+ } as const;
325
+ export type RunAgentToolsAgentsRequestRequestBodySettings9Type = ClosedEnum<
326
+ typeof RunAgentToolsAgentsRequestRequestBodySettings9Type
327
+ >;
328
+
329
+ export type Nine = {
330
+ type: RunAgentToolsAgentsRequestRequestBodySettings9Type;
331
+ requiresApproval?: boolean | undefined;
332
+ };
333
+
334
+ export const RunAgentToolsAgentsRequestRequestBodySettings8Type = {
335
+ RetrieveKnowledgeBases: "retrieve_knowledge_bases",
336
+ } as const;
337
+ export type RunAgentToolsAgentsRequestRequestBodySettings8Type = ClosedEnum<
338
+ typeof RunAgentToolsAgentsRequestRequestBodySettings8Type
339
+ >;
340
+
341
+ export type Eight = {
342
+ type: RunAgentToolsAgentsRequestRequestBodySettings8Type;
343
+ requiresApproval?: boolean | undefined;
344
+ };
345
+
346
+ export const RunAgentToolsAgentsRequestRequestBodySettings7Type = {
347
+ RetrieveMemoryStores: "retrieve_memory_stores",
348
+ } as const;
349
+ export type RunAgentToolsAgentsRequestRequestBodySettings7Type = ClosedEnum<
350
+ typeof RunAgentToolsAgentsRequestRequestBodySettings7Type
351
+ >;
352
+
353
+ export type Seven = {
354
+ type: RunAgentToolsAgentsRequestRequestBodySettings7Type;
355
+ requiresApproval?: boolean | undefined;
356
+ };
357
+
358
+ export const RunAgentToolsAgentsRequestRequestBodySettingsType = {
359
+ WriteMemoryStore: "write_memory_store",
360
+ } as const;
361
+ export type RunAgentToolsAgentsRequestRequestBodySettingsType = ClosedEnum<
362
+ typeof RunAgentToolsAgentsRequestRequestBodySettingsType
363
+ >;
364
+
365
+ export type Six = {
366
+ type: RunAgentToolsAgentsRequestRequestBodySettingsType;
367
+ requiresApproval?: boolean | undefined;
368
+ };
369
+
370
+ export const RunAgentToolsAgentsRequestRequestBodyType = {
371
+ QueryMemoryStore: "query_memory_store",
372
+ } as const;
373
+ export type RunAgentToolsAgentsRequestRequestBodyType = ClosedEnum<
374
+ typeof RunAgentToolsAgentsRequestRequestBodyType
375
+ >;
376
+
377
+ export type Tools5 = {
378
+ type: RunAgentToolsAgentsRequestRequestBodyType;
379
+ requiresApproval?: boolean | undefined;
380
+ };
381
+
382
+ export const RunAgentToolsAgentsRequestType = {
383
+ RetrieveAgents: "retrieve_agents",
384
+ } as const;
385
+ export type RunAgentToolsAgentsRequestType = ClosedEnum<
386
+ typeof RunAgentToolsAgentsRequestType
387
+ >;
388
+
389
+ export type Tools4 = {
390
+ type: RunAgentToolsAgentsRequestType;
391
+ requiresApproval?: boolean | undefined;
392
+ };
393
+
394
+ export const RunAgentToolsAgentsType = {
395
+ CallSubAgent: "call_sub_agent",
396
+ } as const;
397
+ export type RunAgentToolsAgentsType = ClosedEnum<
398
+ typeof RunAgentToolsAgentsType
399
+ >;
400
+
401
+ export type Tools3 = {
402
+ type: RunAgentToolsAgentsType;
403
+ requiresApproval?: boolean | undefined;
404
+ };
405
+
406
+ export const RunAgentToolsType = {
407
+ WebScraper: "web_scraper",
408
+ } as const;
409
+ export type RunAgentToolsType = ClosedEnum<typeof RunAgentToolsType>;
410
+
411
+ export type Tools2 = {
412
+ type: RunAgentToolsType;
413
+ requiresApproval?: boolean | undefined;
414
+ };
415
+
416
+ export const ToolsType = {
417
+ GoogleSearch: "google_search",
418
+ } as const;
419
+ export type ToolsType = ClosedEnum<typeof ToolsType>;
420
+
421
+ export type Tools1 = {
422
+ type: ToolsType;
423
+ requiresApproval?: boolean | undefined;
424
+ };
425
+
426
+ export type Tools =
427
+ | Eleven
428
+ | Twelve
429
+ | Tools1
430
+ | Tools2
431
+ | Tools3
432
+ | Tools4
433
+ | Tools5
434
+ | Six
435
+ | Seven
436
+ | Eight
437
+ | Nine
438
+ | Ten;
439
+
440
+ /**
441
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
442
+ */
443
+ export const ToolApprovalRequired = {
444
+ All: "all",
445
+ RespectTool: "respect_tool",
446
+ None: "none",
447
+ } as const;
448
+ /**
449
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
450
+ */
451
+ export type ToolApprovalRequired = ClosedEnum<typeof ToolApprovalRequired>;
452
+
453
+ export type Settings = {
454
+ tools: Array<
455
+ | Eleven
456
+ | Twelve
457
+ | Tools1
458
+ | Tools2
459
+ | Tools3
460
+ | Tools4
461
+ | Tools5
462
+ | Six
463
+ | Seven
464
+ | Eight
465
+ | Nine
466
+ | Ten
467
+ >;
468
+ /**
469
+ * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
470
+ */
471
+ toolApprovalRequired?: ToolApprovalRequired | undefined;
472
+ /**
473
+ * Maximum iterations before the agent must provide its best answer.
474
+ */
475
+ maxIterations?: number | undefined;
476
+ /**
477
+ * Maximum time (in seconds) for task execution.
478
+ */
479
+ maxExecutionTime?: number | undefined;
480
+ };
481
+
482
+ export type RunAgentRequestBody = {
483
+ /**
484
+ * A unique identifier for the agent. This key must be unique within the same workspace and cannot be reused. When executing the agent, this key determines if the agent already exists. If the agent version differs, a new version is created at the end of the execution, except for the task. All agent parameters are evaluated to decide if a new version is needed. To prevent new version creation and update the latest version instead, use the `prevent_version_creation` parameter in the settings.
485
+ */
486
+ key: string;
487
+ /**
488
+ * Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
489
+ */
490
+ taskId?: string | undefined;
491
+ /**
492
+ * The language model that powers the agent. Currently, private models are not supported.
493
+ */
494
+ model: string;
495
+ /**
496
+ * Optional array of fallback model IDs to use when the primary model fails. Models are tried in order. All models must support tool calling capabilities.
497
+ */
498
+ fallbackModels?: Array<string> | undefined;
499
+ /**
500
+ * Specifies the agent's function and area of expertise.
501
+ */
502
+ role: string;
503
+ /**
504
+ * Provides context and purpose for the agent. Combined with the system prompt template to generate the agent's instructions.
505
+ */
506
+ instructions: string;
507
+ /**
508
+ * The A2A format message containing the task for the agent to perform.
509
+ */
510
+ message: Message;
511
+ /**
512
+ * Optional variables for template replacement in system prompt, instructions, and messages
513
+ */
514
+ variables?: { [k: string]: any } | undefined;
515
+ /**
516
+ * Optional context ID that maps to thread_id
517
+ */
518
+ contextId?: string | undefined;
519
+ /**
520
+ * An external id for the agent execution. This can be used to associate a specific user with the agent execution.
521
+ */
522
+ externalId?: string | undefined;
523
+ /**
524
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
525
+ */
526
+ path: string;
527
+ /**
528
+ * A brief summary of the agent's purpose.
529
+ */
530
+ description?: string | undefined;
531
+ /**
532
+ * Optional URL to an icon for the agent
533
+ */
534
+ iconUrl?: string | undefined;
535
+ /**
536
+ * A custom system prompt template for the agent. If omitted, the default template is used.
537
+ */
538
+ systemPrompt?: string | undefined;
539
+ memoryStores?: Array<string> | undefined;
540
+ knowledgeBases?: Array<string> | undefined;
541
+ /**
542
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
543
+ */
544
+ teamOfAgents?: Array<TeamOfAgents> | undefined;
545
+ settings: Settings;
546
+ };
547
+
548
+ /**
549
+ * A2A entity type
550
+ */
551
+ export const RunAgentKind = {
552
+ Task: "task",
553
+ } as const;
554
+ /**
555
+ * A2A entity type
556
+ */
557
+ export type RunAgentKind = ClosedEnum<typeof RunAgentKind>;
558
+
559
+ /**
560
+ * Current task state
561
+ */
562
+ export const RunAgentState = {
563
+ Submitted: "submitted",
564
+ Working: "working",
565
+ InputRequired: "input-required",
566
+ Completed: "completed",
567
+ Failed: "failed",
568
+ Canceled: "canceled",
569
+ Rejected: "rejected",
570
+ AuthRequired: "auth-required",
571
+ Unknown: "unknown",
572
+ } as const;
573
+ /**
574
+ * Current task state
575
+ */
576
+ export type RunAgentState = ClosedEnum<typeof RunAgentState>;
577
+
578
+ export const RunAgentAgentsKind = {
579
+ Message: "message",
580
+ } as const;
581
+ export type RunAgentAgentsKind = ClosedEnum<typeof RunAgentAgentsKind>;
582
+
583
+ /**
584
+ * Extended A2A message role
585
+ */
586
+ export const RunAgentAgentsRole = {
587
+ User: "user",
588
+ Agent: "agent",
589
+ Tool: "tool",
590
+ System: "system",
591
+ } as const;
592
+ /**
593
+ * Extended A2A message role
594
+ */
595
+ export type RunAgentAgentsRole = ClosedEnum<typeof RunAgentAgentsRole>;
596
+
597
+ /**
598
+ * Optional status message
599
+ */
600
+ export type RunAgentMessage = {
601
+ kind: RunAgentAgentsKind;
602
+ messageId: string;
603
+ /**
604
+ * Extended A2A message role
605
+ */
606
+ role: RunAgentAgentsRole;
607
+ parts: Array<any>;
608
+ };
609
+
610
+ /**
611
+ * Task status information
612
+ */
613
+ export type RunAgentStatus = {
614
+ /**
615
+ * Current task state
616
+ */
617
+ state: RunAgentState;
618
+ /**
619
+ * ISO timestamp of status update
620
+ */
621
+ timestamp?: string | undefined;
622
+ /**
623
+ * Optional status message
624
+ */
625
+ message?: RunAgentMessage | undefined;
626
+ };
627
+
628
+ /**
629
+ * A2A Task response format
630
+ */
631
+ export type RunAgentResponseBody = {
632
+ /**
633
+ * The ID of the created agent execution task
634
+ */
635
+ id: string;
636
+ /**
637
+ * The context ID (workspace ID)
638
+ */
639
+ contextId: string;
640
+ /**
641
+ * A2A entity type
642
+ */
643
+ kind: RunAgentKind;
644
+ /**
645
+ * Task status information
646
+ */
647
+ status: RunAgentStatus;
648
+ /**
649
+ * Task metadata
650
+ */
651
+ metadata?: { [k: string]: any } | undefined;
652
+ };
653
+
654
+ /** @internal */
655
+ export const Role2$inboundSchema: z.ZodNativeEnum<typeof Role2> = z.nativeEnum(
656
+ Role2,
657
+ );
658
+
659
+ /** @internal */
660
+ export const Role2$outboundSchema: z.ZodNativeEnum<typeof Role2> =
661
+ Role2$inboundSchema;
662
+
663
+ /**
664
+ * @internal
665
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
666
+ */
667
+ export namespace Role2$ {
668
+ /** @deprecated use `Role2$inboundSchema` instead. */
669
+ export const inboundSchema = Role2$inboundSchema;
670
+ /** @deprecated use `Role2$outboundSchema` instead. */
671
+ export const outboundSchema = Role2$outboundSchema;
672
+ }
673
+
674
+ /** @internal */
675
+ export const Role1$inboundSchema: z.ZodNativeEnum<typeof Role1> = z.nativeEnum(
676
+ Role1,
677
+ );
678
+
679
+ /** @internal */
680
+ export const Role1$outboundSchema: z.ZodNativeEnum<typeof Role1> =
681
+ Role1$inboundSchema;
682
+
683
+ /**
684
+ * @internal
685
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
686
+ */
687
+ export namespace Role1$ {
688
+ /** @deprecated use `Role1$inboundSchema` instead. */
689
+ export const inboundSchema = Role1$inboundSchema;
690
+ /** @deprecated use `Role1$outboundSchema` instead. */
691
+ export const outboundSchema = Role1$outboundSchema;
692
+ }
693
+
694
+ /** @internal */
695
+ export const RunAgentRole$inboundSchema: z.ZodType<
696
+ RunAgentRole,
697
+ z.ZodTypeDef,
698
+ unknown
699
+ > = z.union([Role1$inboundSchema, Role2$inboundSchema]);
700
+
701
+ /** @internal */
702
+ export type RunAgentRole$Outbound = string | string;
703
+
704
+ /** @internal */
705
+ export const RunAgentRole$outboundSchema: z.ZodType<
706
+ RunAgentRole$Outbound,
707
+ z.ZodTypeDef,
708
+ RunAgentRole
709
+ > = z.union([Role1$outboundSchema, Role2$outboundSchema]);
710
+
711
+ /**
712
+ * @internal
713
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
714
+ */
715
+ export namespace RunAgentRole$ {
716
+ /** @deprecated use `RunAgentRole$inboundSchema` instead. */
717
+ export const inboundSchema = RunAgentRole$inboundSchema;
718
+ /** @deprecated use `RunAgentRole$outboundSchema` instead. */
719
+ export const outboundSchema = RunAgentRole$outboundSchema;
720
+ /** @deprecated use `RunAgentRole$Outbound` instead. */
721
+ export type Outbound = RunAgentRole$Outbound;
722
+ }
723
+
724
+ export function runAgentRoleToJSON(runAgentRole: RunAgentRole): string {
725
+ return JSON.stringify(RunAgentRole$outboundSchema.parse(runAgentRole));
726
+ }
727
+
728
+ export function runAgentRoleFromJSON(
729
+ jsonString: string,
730
+ ): SafeParseResult<RunAgentRole, SDKValidationError> {
731
+ return safeParse(
732
+ jsonString,
733
+ (x) => RunAgentRole$inboundSchema.parse(JSON.parse(x)),
734
+ `Failed to parse 'RunAgentRole' from JSON`,
735
+ );
736
+ }
737
+
738
+ /** @internal */
739
+ export const RunAgentPartsAgentsRequestKind$inboundSchema: z.ZodNativeEnum<
740
+ typeof RunAgentPartsAgentsRequestKind
741
+ > = z.nativeEnum(RunAgentPartsAgentsRequestKind);
742
+
743
+ /** @internal */
744
+ export const RunAgentPartsAgentsRequestKind$outboundSchema: z.ZodNativeEnum<
745
+ typeof RunAgentPartsAgentsRequestKind
746
+ > = RunAgentPartsAgentsRequestKind$inboundSchema;
747
+
748
+ /**
749
+ * @internal
750
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
751
+ */
752
+ export namespace RunAgentPartsAgentsRequestKind$ {
753
+ /** @deprecated use `RunAgentPartsAgentsRequestKind$inboundSchema` instead. */
754
+ export const inboundSchema = RunAgentPartsAgentsRequestKind$inboundSchema;
755
+ /** @deprecated use `RunAgentPartsAgentsRequestKind$outboundSchema` instead. */
756
+ export const outboundSchema = RunAgentPartsAgentsRequestKind$outboundSchema;
757
+ }
758
+
759
+ /** @internal */
760
+ export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
761
+ .object({
762
+ kind: RunAgentPartsAgentsRequestKind$inboundSchema,
763
+ tool_call_id: z.string(),
764
+ result: z.any().optional(),
765
+ metadata: z.record(z.any()).optional(),
766
+ }).transform((v) => {
767
+ return remap$(v, {
768
+ "tool_call_id": "toolCallId",
769
+ });
770
+ });
771
+
772
+ /** @internal */
773
+ export type Five$Outbound = {
774
+ kind: string;
775
+ tool_call_id: string;
776
+ result?: any | undefined;
777
+ metadata?: { [k: string]: any } | undefined;
778
+ };
779
+
780
+ /** @internal */
781
+ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
782
+ z.object({
783
+ kind: RunAgentPartsAgentsRequestKind$outboundSchema,
784
+ toolCallId: z.string(),
785
+ result: z.any().optional(),
786
+ metadata: z.record(z.any()).optional(),
787
+ }).transform((v) => {
788
+ return remap$(v, {
789
+ toolCallId: "tool_call_id",
790
+ });
791
+ });
792
+
793
+ /**
794
+ * @internal
795
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
796
+ */
797
+ export namespace Five$ {
798
+ /** @deprecated use `Five$inboundSchema` instead. */
799
+ export const inboundSchema = Five$inboundSchema;
800
+ /** @deprecated use `Five$outboundSchema` instead. */
801
+ export const outboundSchema = Five$outboundSchema;
802
+ /** @deprecated use `Five$Outbound` instead. */
803
+ export type Outbound = Five$Outbound;
804
+ }
805
+
806
+ export function fiveToJSON(five: Five): string {
807
+ return JSON.stringify(Five$outboundSchema.parse(five));
808
+ }
809
+
810
+ export function fiveFromJSON(
811
+ jsonString: string,
812
+ ): SafeParseResult<Five, SDKValidationError> {
813
+ return safeParse(
814
+ jsonString,
815
+ (x) => Five$inboundSchema.parse(JSON.parse(x)),
816
+ `Failed to parse 'Five' from JSON`,
817
+ );
818
+ }
819
+
820
+ /** @internal */
821
+ export const RunAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
822
+ typeof RunAgentPartsAgentsKind
823
+ > = z.nativeEnum(RunAgentPartsAgentsKind);
824
+
825
+ /** @internal */
826
+ export const RunAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
827
+ typeof RunAgentPartsAgentsKind
828
+ > = RunAgentPartsAgentsKind$inboundSchema;
829
+
830
+ /**
831
+ * @internal
832
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
833
+ */
834
+ export namespace RunAgentPartsAgentsKind$ {
835
+ /** @deprecated use `RunAgentPartsAgentsKind$inboundSchema` instead. */
836
+ export const inboundSchema = RunAgentPartsAgentsKind$inboundSchema;
837
+ /** @deprecated use `RunAgentPartsAgentsKind$outboundSchema` instead. */
838
+ export const outboundSchema = RunAgentPartsAgentsKind$outboundSchema;
839
+ }
840
+
841
+ /** @internal */
842
+ export const Parts4$inboundSchema: z.ZodType<Parts4, z.ZodTypeDef, unknown> = z
843
+ .object({
844
+ kind: RunAgentPartsAgentsKind$inboundSchema,
845
+ tool_name: z.string(),
846
+ tool_call_id: z.string(),
847
+ arguments: z.record(z.any()),
848
+ metadata: z.record(z.any()).optional(),
849
+ }).transform((v) => {
850
+ return remap$(v, {
851
+ "tool_name": "toolName",
852
+ "tool_call_id": "toolCallId",
853
+ });
854
+ });
855
+
856
+ /** @internal */
857
+ export type Parts4$Outbound = {
858
+ kind: string;
859
+ tool_name: string;
860
+ tool_call_id: string;
861
+ arguments: { [k: string]: any };
862
+ metadata?: { [k: string]: any } | undefined;
863
+ };
864
+
865
+ /** @internal */
866
+ export const Parts4$outboundSchema: z.ZodType<
867
+ Parts4$Outbound,
868
+ z.ZodTypeDef,
869
+ Parts4
870
+ > = z.object({
871
+ kind: RunAgentPartsAgentsKind$outboundSchema,
872
+ toolName: z.string(),
873
+ toolCallId: z.string(),
874
+ arguments: z.record(z.any()),
875
+ metadata: z.record(z.any()).optional(),
876
+ }).transform((v) => {
877
+ return remap$(v, {
878
+ toolName: "tool_name",
879
+ toolCallId: "tool_call_id",
880
+ });
881
+ });
882
+
883
+ /**
884
+ * @internal
885
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
886
+ */
887
+ export namespace Parts4$ {
888
+ /** @deprecated use `Parts4$inboundSchema` instead. */
889
+ export const inboundSchema = Parts4$inboundSchema;
890
+ /** @deprecated use `Parts4$outboundSchema` instead. */
891
+ export const outboundSchema = Parts4$outboundSchema;
892
+ /** @deprecated use `Parts4$Outbound` instead. */
893
+ export type Outbound = Parts4$Outbound;
894
+ }
895
+
896
+ export function parts4ToJSON(parts4: Parts4): string {
897
+ return JSON.stringify(Parts4$outboundSchema.parse(parts4));
898
+ }
899
+
900
+ export function parts4FromJSON(
901
+ jsonString: string,
902
+ ): SafeParseResult<Parts4, SDKValidationError> {
903
+ return safeParse(
904
+ jsonString,
905
+ (x) => Parts4$inboundSchema.parse(JSON.parse(x)),
906
+ `Failed to parse 'Parts4' from JSON`,
907
+ );
908
+ }
909
+
910
+ /** @internal */
911
+ export const RunAgentPartsKind$inboundSchema: z.ZodNativeEnum<
912
+ typeof RunAgentPartsKind
913
+ > = z.nativeEnum(RunAgentPartsKind);
914
+
915
+ /** @internal */
916
+ export const RunAgentPartsKind$outboundSchema: z.ZodNativeEnum<
917
+ typeof RunAgentPartsKind
918
+ > = RunAgentPartsKind$inboundSchema;
919
+
920
+ /**
921
+ * @internal
922
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
923
+ */
924
+ export namespace RunAgentPartsKind$ {
925
+ /** @deprecated use `RunAgentPartsKind$inboundSchema` instead. */
926
+ export const inboundSchema = RunAgentPartsKind$inboundSchema;
927
+ /** @deprecated use `RunAgentPartsKind$outboundSchema` instead. */
928
+ export const outboundSchema = RunAgentPartsKind$outboundSchema;
929
+ }
930
+
931
+ /** @internal */
932
+ export const File2$inboundSchema: z.ZodType<File2, z.ZodTypeDef, unknown> = z
933
+ .object({
934
+ uri: z.string(),
935
+ mimeType: z.string().optional(),
936
+ name: z.string().optional(),
937
+ });
938
+
939
+ /** @internal */
940
+ export type File2$Outbound = {
941
+ uri: string;
942
+ mimeType?: string | undefined;
943
+ name?: string | undefined;
944
+ };
945
+
946
+ /** @internal */
947
+ export const File2$outboundSchema: z.ZodType<
948
+ File2$Outbound,
949
+ z.ZodTypeDef,
950
+ File2
951
+ > = z.object({
952
+ uri: z.string(),
953
+ mimeType: z.string().optional(),
954
+ name: z.string().optional(),
955
+ });
956
+
957
+ /**
958
+ * @internal
959
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
960
+ */
961
+ export namespace File2$ {
962
+ /** @deprecated use `File2$inboundSchema` instead. */
963
+ export const inboundSchema = File2$inboundSchema;
964
+ /** @deprecated use `File2$outboundSchema` instead. */
965
+ export const outboundSchema = File2$outboundSchema;
966
+ /** @deprecated use `File2$Outbound` instead. */
967
+ export type Outbound = File2$Outbound;
968
+ }
969
+
970
+ export function file2ToJSON(file2: File2): string {
971
+ return JSON.stringify(File2$outboundSchema.parse(file2));
972
+ }
973
+
974
+ export function file2FromJSON(
975
+ jsonString: string,
976
+ ): SafeParseResult<File2, SDKValidationError> {
977
+ return safeParse(
978
+ jsonString,
979
+ (x) => File2$inboundSchema.parse(JSON.parse(x)),
980
+ `Failed to parse 'File2' from JSON`,
981
+ );
982
+ }
983
+
984
+ /** @internal */
985
+ export const File1$inboundSchema: z.ZodType<File1, z.ZodTypeDef, unknown> = z
986
+ .object({
987
+ bytes: z.string(),
988
+ mimeType: z.string().optional(),
989
+ name: z.string().optional(),
990
+ });
991
+
992
+ /** @internal */
993
+ export type File1$Outbound = {
994
+ bytes: string;
995
+ mimeType?: string | undefined;
996
+ name?: string | undefined;
997
+ };
998
+
999
+ /** @internal */
1000
+ export const File1$outboundSchema: z.ZodType<
1001
+ File1$Outbound,
1002
+ z.ZodTypeDef,
1003
+ File1
1004
+ > = z.object({
1005
+ bytes: z.string(),
1006
+ mimeType: z.string().optional(),
1007
+ name: z.string().optional(),
1008
+ });
1009
+
1010
+ /**
1011
+ * @internal
1012
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1013
+ */
1014
+ export namespace File1$ {
1015
+ /** @deprecated use `File1$inboundSchema` instead. */
1016
+ export const inboundSchema = File1$inboundSchema;
1017
+ /** @deprecated use `File1$outboundSchema` instead. */
1018
+ export const outboundSchema = File1$outboundSchema;
1019
+ /** @deprecated use `File1$Outbound` instead. */
1020
+ export type Outbound = File1$Outbound;
1021
+ }
1022
+
1023
+ export function file1ToJSON(file1: File1): string {
1024
+ return JSON.stringify(File1$outboundSchema.parse(file1));
1025
+ }
1026
+
1027
+ export function file1FromJSON(
1028
+ jsonString: string,
1029
+ ): SafeParseResult<File1, SDKValidationError> {
1030
+ return safeParse(
1031
+ jsonString,
1032
+ (x) => File1$inboundSchema.parse(JSON.parse(x)),
1033
+ `Failed to parse 'File1' from JSON`,
1034
+ );
1035
+ }
1036
+
1037
+ /** @internal */
1038
+ export const PartsFile$inboundSchema: z.ZodType<
1039
+ PartsFile,
1040
+ z.ZodTypeDef,
1041
+ unknown
1042
+ > = z.union([
1043
+ z.lazy(() => File1$inboundSchema),
1044
+ z.lazy(() => File2$inboundSchema),
1045
+ ]);
1046
+
1047
+ /** @internal */
1048
+ export type PartsFile$Outbound = File1$Outbound | File2$Outbound;
1049
+
1050
+ /** @internal */
1051
+ export const PartsFile$outboundSchema: z.ZodType<
1052
+ PartsFile$Outbound,
1053
+ z.ZodTypeDef,
1054
+ PartsFile
1055
+ > = z.union([
1056
+ z.lazy(() => File1$outboundSchema),
1057
+ z.lazy(() => File2$outboundSchema),
1058
+ ]);
1059
+
1060
+ /**
1061
+ * @internal
1062
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1063
+ */
1064
+ export namespace PartsFile$ {
1065
+ /** @deprecated use `PartsFile$inboundSchema` instead. */
1066
+ export const inboundSchema = PartsFile$inboundSchema;
1067
+ /** @deprecated use `PartsFile$outboundSchema` instead. */
1068
+ export const outboundSchema = PartsFile$outboundSchema;
1069
+ /** @deprecated use `PartsFile$Outbound` instead. */
1070
+ export type Outbound = PartsFile$Outbound;
1071
+ }
1072
+
1073
+ export function partsFileToJSON(partsFile: PartsFile): string {
1074
+ return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
1075
+ }
1076
+
1077
+ export function partsFileFromJSON(
1078
+ jsonString: string,
1079
+ ): SafeParseResult<PartsFile, SDKValidationError> {
1080
+ return safeParse(
1081
+ jsonString,
1082
+ (x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
1083
+ `Failed to parse 'PartsFile' from JSON`,
1084
+ );
1085
+ }
1086
+
1087
+ /** @internal */
1088
+ export const Parts3$inboundSchema: z.ZodType<Parts3, z.ZodTypeDef, unknown> = z
1089
+ .object({
1090
+ kind: RunAgentPartsKind$inboundSchema,
1091
+ file: z.union([
1092
+ z.lazy(() => File1$inboundSchema),
1093
+ z.lazy(() => File2$inboundSchema),
1094
+ ]),
1095
+ metadata: z.record(z.any()).optional(),
1096
+ });
1097
+
1098
+ /** @internal */
1099
+ export type Parts3$Outbound = {
1100
+ kind: string;
1101
+ file: File1$Outbound | File2$Outbound;
1102
+ metadata?: { [k: string]: any } | undefined;
1103
+ };
1104
+
1105
+ /** @internal */
1106
+ export const Parts3$outboundSchema: z.ZodType<
1107
+ Parts3$Outbound,
1108
+ z.ZodTypeDef,
1109
+ Parts3
1110
+ > = z.object({
1111
+ kind: RunAgentPartsKind$outboundSchema,
1112
+ file: z.union([
1113
+ z.lazy(() => File1$outboundSchema),
1114
+ z.lazy(() => File2$outboundSchema),
1115
+ ]),
1116
+ metadata: z.record(z.any()).optional(),
1117
+ });
1118
+
1119
+ /**
1120
+ * @internal
1121
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1122
+ */
1123
+ export namespace Parts3$ {
1124
+ /** @deprecated use `Parts3$inboundSchema` instead. */
1125
+ export const inboundSchema = Parts3$inboundSchema;
1126
+ /** @deprecated use `Parts3$outboundSchema` instead. */
1127
+ export const outboundSchema = Parts3$outboundSchema;
1128
+ /** @deprecated use `Parts3$Outbound` instead. */
1129
+ export type Outbound = Parts3$Outbound;
1130
+ }
1131
+
1132
+ export function parts3ToJSON(parts3: Parts3): string {
1133
+ return JSON.stringify(Parts3$outboundSchema.parse(parts3));
1134
+ }
1135
+
1136
+ export function parts3FromJSON(
1137
+ jsonString: string,
1138
+ ): SafeParseResult<Parts3, SDKValidationError> {
1139
+ return safeParse(
1140
+ jsonString,
1141
+ (x) => Parts3$inboundSchema.parse(JSON.parse(x)),
1142
+ `Failed to parse 'Parts3' from JSON`,
1143
+ );
1144
+ }
1145
+
1146
+ /** @internal */
1147
+ export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
1148
+ .nativeEnum(PartsKind);
1149
+
1150
+ /** @internal */
1151
+ export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
1152
+ PartsKind$inboundSchema;
1153
+
1154
+ /**
1155
+ * @internal
1156
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1157
+ */
1158
+ export namespace PartsKind$ {
1159
+ /** @deprecated use `PartsKind$inboundSchema` instead. */
1160
+ export const inboundSchema = PartsKind$inboundSchema;
1161
+ /** @deprecated use `PartsKind$outboundSchema` instead. */
1162
+ export const outboundSchema = PartsKind$outboundSchema;
1163
+ }
1164
+
1165
+ /** @internal */
1166
+ export const Parts2$inboundSchema: z.ZodType<Parts2, z.ZodTypeDef, unknown> = z
1167
+ .object({
1168
+ kind: PartsKind$inboundSchema,
1169
+ data: z.any().optional(),
1170
+ metadata: z.record(z.any()).optional(),
1171
+ });
1172
+
1173
+ /** @internal */
1174
+ export type Parts2$Outbound = {
1175
+ kind: string;
1176
+ data?: any | undefined;
1177
+ metadata?: { [k: string]: any } | undefined;
1178
+ };
1179
+
1180
+ /** @internal */
1181
+ export const Parts2$outboundSchema: z.ZodType<
1182
+ Parts2$Outbound,
1183
+ z.ZodTypeDef,
1184
+ Parts2
1185
+ > = z.object({
1186
+ kind: PartsKind$outboundSchema,
1187
+ data: z.any().optional(),
1188
+ metadata: z.record(z.any()).optional(),
1189
+ });
1190
+
1191
+ /**
1192
+ * @internal
1193
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1194
+ */
1195
+ export namespace Parts2$ {
1196
+ /** @deprecated use `Parts2$inboundSchema` instead. */
1197
+ export const inboundSchema = Parts2$inboundSchema;
1198
+ /** @deprecated use `Parts2$outboundSchema` instead. */
1199
+ export const outboundSchema = Parts2$outboundSchema;
1200
+ /** @deprecated use `Parts2$Outbound` instead. */
1201
+ export type Outbound = Parts2$Outbound;
1202
+ }
1203
+
1204
+ export function parts2ToJSON(parts2: Parts2): string {
1205
+ return JSON.stringify(Parts2$outboundSchema.parse(parts2));
1206
+ }
1207
+
1208
+ export function parts2FromJSON(
1209
+ jsonString: string,
1210
+ ): SafeParseResult<Parts2, SDKValidationError> {
1211
+ return safeParse(
1212
+ jsonString,
1213
+ (x) => Parts2$inboundSchema.parse(JSON.parse(x)),
1214
+ `Failed to parse 'Parts2' from JSON`,
1215
+ );
1216
+ }
1217
+
1218
+ /** @internal */
1219
+ export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
1220
+ Kind,
1221
+ );
1222
+
1223
+ /** @internal */
1224
+ export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
1225
+ Kind$inboundSchema;
1226
+
1227
+ /**
1228
+ * @internal
1229
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1230
+ */
1231
+ export namespace Kind$ {
1232
+ /** @deprecated use `Kind$inboundSchema` instead. */
1233
+ export const inboundSchema = Kind$inboundSchema;
1234
+ /** @deprecated use `Kind$outboundSchema` instead. */
1235
+ export const outboundSchema = Kind$outboundSchema;
1236
+ }
1237
+
1238
+ /** @internal */
1239
+ export const Parts1$inboundSchema: z.ZodType<Parts1, z.ZodTypeDef, unknown> = z
1240
+ .object({
1241
+ kind: Kind$inboundSchema,
1242
+ text: z.string(),
1243
+ });
1244
+
1245
+ /** @internal */
1246
+ export type Parts1$Outbound = {
1247
+ kind: string;
1248
+ text: string;
1249
+ };
1250
+
1251
+ /** @internal */
1252
+ export const Parts1$outboundSchema: z.ZodType<
1253
+ Parts1$Outbound,
1254
+ z.ZodTypeDef,
1255
+ Parts1
1256
+ > = z.object({
1257
+ kind: Kind$outboundSchema,
1258
+ text: z.string(),
1259
+ });
1260
+
1261
+ /**
1262
+ * @internal
1263
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1264
+ */
1265
+ export namespace Parts1$ {
1266
+ /** @deprecated use `Parts1$inboundSchema` instead. */
1267
+ export const inboundSchema = Parts1$inboundSchema;
1268
+ /** @deprecated use `Parts1$outboundSchema` instead. */
1269
+ export const outboundSchema = Parts1$outboundSchema;
1270
+ /** @deprecated use `Parts1$Outbound` instead. */
1271
+ export type Outbound = Parts1$Outbound;
1272
+ }
1273
+
1274
+ export function parts1ToJSON(parts1: Parts1): string {
1275
+ return JSON.stringify(Parts1$outboundSchema.parse(parts1));
1276
+ }
1277
+
1278
+ export function parts1FromJSON(
1279
+ jsonString: string,
1280
+ ): SafeParseResult<Parts1, SDKValidationError> {
1281
+ return safeParse(
1282
+ jsonString,
1283
+ (x) => Parts1$inboundSchema.parse(JSON.parse(x)),
1284
+ `Failed to parse 'Parts1' from JSON`,
1285
+ );
1286
+ }
1287
+
1288
+ /** @internal */
1289
+ export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
1290
+ .union([
1291
+ z.lazy(() => Parts4$inboundSchema),
1292
+ z.lazy(() => Parts1$inboundSchema),
1293
+ z.lazy(() => Parts3$inboundSchema),
1294
+ z.lazy(() => Five$inboundSchema),
1295
+ z.lazy(() => Parts2$inboundSchema),
1296
+ ]);
1297
+
1298
+ /** @internal */
1299
+ export type Parts$Outbound =
1300
+ | Parts4$Outbound
1301
+ | Parts1$Outbound
1302
+ | Parts3$Outbound
1303
+ | Five$Outbound
1304
+ | Parts2$Outbound;
1305
+
1306
+ /** @internal */
1307
+ export const Parts$outboundSchema: z.ZodType<
1308
+ Parts$Outbound,
1309
+ z.ZodTypeDef,
1310
+ Parts
1311
+ > = z.union([
1312
+ z.lazy(() => Parts4$outboundSchema),
1313
+ z.lazy(() => Parts1$outboundSchema),
1314
+ z.lazy(() => Parts3$outboundSchema),
1315
+ z.lazy(() => Five$outboundSchema),
1316
+ z.lazy(() => Parts2$outboundSchema),
1317
+ ]);
1318
+
1319
+ /**
1320
+ * @internal
1321
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1322
+ */
1323
+ export namespace Parts$ {
1324
+ /** @deprecated use `Parts$inboundSchema` instead. */
1325
+ export const inboundSchema = Parts$inboundSchema;
1326
+ /** @deprecated use `Parts$outboundSchema` instead. */
1327
+ export const outboundSchema = Parts$outboundSchema;
1328
+ /** @deprecated use `Parts$Outbound` instead. */
1329
+ export type Outbound = Parts$Outbound;
1330
+ }
1331
+
1332
+ export function partsToJSON(parts: Parts): string {
1333
+ return JSON.stringify(Parts$outboundSchema.parse(parts));
1334
+ }
1335
+
1336
+ export function partsFromJSON(
1337
+ jsonString: string,
1338
+ ): SafeParseResult<Parts, SDKValidationError> {
1339
+ return safeParse(
1340
+ jsonString,
1341
+ (x) => Parts$inboundSchema.parse(JSON.parse(x)),
1342
+ `Failed to parse 'Parts' from JSON`,
1343
+ );
1344
+ }
1345
+
1346
+ /** @internal */
1347
+ export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
1348
+ z.object({
1349
+ messageId: z.string().optional(),
1350
+ role: z.union([Role1$inboundSchema, Role2$inboundSchema]),
1351
+ parts: z.array(
1352
+ z.union([
1353
+ z.lazy(() => Parts4$inboundSchema),
1354
+ z.lazy(() => Parts1$inboundSchema),
1355
+ z.lazy(() => Parts3$inboundSchema),
1356
+ z.lazy(() => Five$inboundSchema),
1357
+ z.lazy(() => Parts2$inboundSchema),
1358
+ ]),
1359
+ ),
1360
+ metadata: z.record(z.any()).optional(),
1361
+ });
1362
+
1363
+ /** @internal */
1364
+ export type Message$Outbound = {
1365
+ messageId?: string | undefined;
1366
+ role: string | string;
1367
+ parts: Array<
1368
+ | Parts4$Outbound
1369
+ | Parts1$Outbound
1370
+ | Parts3$Outbound
1371
+ | Five$Outbound
1372
+ | Parts2$Outbound
1373
+ >;
1374
+ metadata?: { [k: string]: any } | undefined;
1375
+ };
1376
+
1377
+ /** @internal */
1378
+ export const Message$outboundSchema: z.ZodType<
1379
+ Message$Outbound,
1380
+ z.ZodTypeDef,
1381
+ Message
1382
+ > = z.object({
1383
+ messageId: z.string().optional(),
1384
+ role: z.union([Role1$outboundSchema, Role2$outboundSchema]),
1385
+ parts: z.array(
1386
+ z.union([
1387
+ z.lazy(() => Parts4$outboundSchema),
1388
+ z.lazy(() => Parts1$outboundSchema),
1389
+ z.lazy(() => Parts3$outboundSchema),
1390
+ z.lazy(() => Five$outboundSchema),
1391
+ z.lazy(() => Parts2$outboundSchema),
1392
+ ]),
1393
+ ),
1394
+ metadata: z.record(z.any()).optional(),
1395
+ });
1396
+
1397
+ /**
1398
+ * @internal
1399
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1400
+ */
1401
+ export namespace Message$ {
1402
+ /** @deprecated use `Message$inboundSchema` instead. */
1403
+ export const inboundSchema = Message$inboundSchema;
1404
+ /** @deprecated use `Message$outboundSchema` instead. */
1405
+ export const outboundSchema = Message$outboundSchema;
1406
+ /** @deprecated use `Message$Outbound` instead. */
1407
+ export type Outbound = Message$Outbound;
1408
+ }
1409
+
1410
+ export function messageToJSON(message: Message): string {
1411
+ return JSON.stringify(Message$outboundSchema.parse(message));
1412
+ }
1413
+
1414
+ export function messageFromJSON(
1415
+ jsonString: string,
1416
+ ): SafeParseResult<Message, SDKValidationError> {
1417
+ return safeParse(
1418
+ jsonString,
1419
+ (x) => Message$inboundSchema.parse(JSON.parse(x)),
1420
+ `Failed to parse 'Message' from JSON`,
1421
+ );
1422
+ }
1423
+
1424
+ /** @internal */
1425
+ export const TeamOfAgents$inboundSchema: z.ZodType<
1426
+ TeamOfAgents,
1427
+ z.ZodTypeDef,
1428
+ unknown
1429
+ > = z.object({
1430
+ _id: z.string(),
1431
+ role: z.string().optional(),
1432
+ }).transform((v) => {
1433
+ return remap$(v, {
1434
+ "_id": "id",
1435
+ });
1436
+ });
1437
+
1438
+ /** @internal */
1439
+ export type TeamOfAgents$Outbound = {
1440
+ _id: string;
1441
+ role?: string | undefined;
1442
+ };
1443
+
1444
+ /** @internal */
1445
+ export const TeamOfAgents$outboundSchema: z.ZodType<
1446
+ TeamOfAgents$Outbound,
1447
+ z.ZodTypeDef,
1448
+ TeamOfAgents
1449
+ > = z.object({
1450
+ id: z.string(),
1451
+ role: z.string().optional(),
1452
+ }).transform((v) => {
1453
+ return remap$(v, {
1454
+ id: "_id",
1455
+ });
1456
+ });
1457
+
1458
+ /**
1459
+ * @internal
1460
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1461
+ */
1462
+ export namespace TeamOfAgents$ {
1463
+ /** @deprecated use `TeamOfAgents$inboundSchema` instead. */
1464
+ export const inboundSchema = TeamOfAgents$inboundSchema;
1465
+ /** @deprecated use `TeamOfAgents$outboundSchema` instead. */
1466
+ export const outboundSchema = TeamOfAgents$outboundSchema;
1467
+ /** @deprecated use `TeamOfAgents$Outbound` instead. */
1468
+ export type Outbound = TeamOfAgents$Outbound;
1469
+ }
1470
+
1471
+ export function teamOfAgentsToJSON(teamOfAgents: TeamOfAgents): string {
1472
+ return JSON.stringify(TeamOfAgents$outboundSchema.parse(teamOfAgents));
1473
+ }
1474
+
1475
+ export function teamOfAgentsFromJSON(
1476
+ jsonString: string,
1477
+ ): SafeParseResult<TeamOfAgents, SDKValidationError> {
1478
+ return safeParse(
1479
+ jsonString,
1480
+ (x) => TeamOfAgents$inboundSchema.parse(JSON.parse(x)),
1481
+ `Failed to parse 'TeamOfAgents' from JSON`,
1482
+ );
1483
+ }
1484
+
1485
+ /** @internal */
1486
+ export const RunAgentToolsAgentsRequestRequestBodySettings12Type$inboundSchema:
1487
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings12Type> =
1488
+ z.nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings12Type);
1489
+
1490
+ /** @internal */
1491
+ export const RunAgentToolsAgentsRequestRequestBodySettings12Type$outboundSchema:
1492
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings12Type> =
1493
+ RunAgentToolsAgentsRequestRequestBodySettings12Type$inboundSchema;
1494
+
1495
+ /**
1496
+ * @internal
1497
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1498
+ */
1499
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings12Type$ {
1500
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings12Type$inboundSchema` instead. */
1501
+ export const inboundSchema =
1502
+ RunAgentToolsAgentsRequestRequestBodySettings12Type$inboundSchema;
1503
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings12Type$outboundSchema` instead. */
1504
+ export const outboundSchema =
1505
+ RunAgentToolsAgentsRequestRequestBodySettings12Type$outboundSchema;
1506
+ }
1507
+
1508
+ /** @internal */
1509
+ export const ToolsFunction$inboundSchema: z.ZodType<
1510
+ ToolsFunction,
1511
+ z.ZodTypeDef,
1512
+ unknown
1513
+ > = z.object({
1514
+ name: z.string(),
1515
+ description: z.string().optional(),
1516
+ strict: z.boolean().optional(),
1517
+ parameters: z.record(z.any()).optional(),
1518
+ });
1519
+
1520
+ /** @internal */
1521
+ export type ToolsFunction$Outbound = {
1522
+ name: string;
1523
+ description?: string | undefined;
1524
+ strict?: boolean | undefined;
1525
+ parameters?: { [k: string]: any } | undefined;
1526
+ };
1527
+
1528
+ /** @internal */
1529
+ export const ToolsFunction$outboundSchema: z.ZodType<
1530
+ ToolsFunction$Outbound,
1531
+ z.ZodTypeDef,
1532
+ ToolsFunction
1533
+ > = z.object({
1534
+ name: z.string(),
1535
+ description: z.string().optional(),
1536
+ strict: z.boolean().optional(),
1537
+ parameters: z.record(z.any()).optional(),
1538
+ });
1539
+
1540
+ /**
1541
+ * @internal
1542
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1543
+ */
1544
+ export namespace ToolsFunction$ {
1545
+ /** @deprecated use `ToolsFunction$inboundSchema` instead. */
1546
+ export const inboundSchema = ToolsFunction$inboundSchema;
1547
+ /** @deprecated use `ToolsFunction$outboundSchema` instead. */
1548
+ export const outboundSchema = ToolsFunction$outboundSchema;
1549
+ /** @deprecated use `ToolsFunction$Outbound` instead. */
1550
+ export type Outbound = ToolsFunction$Outbound;
1551
+ }
1552
+
1553
+ export function toolsFunctionToJSON(toolsFunction: ToolsFunction): string {
1554
+ return JSON.stringify(ToolsFunction$outboundSchema.parse(toolsFunction));
1555
+ }
1556
+
1557
+ export function toolsFunctionFromJSON(
1558
+ jsonString: string,
1559
+ ): SafeParseResult<ToolsFunction, SDKValidationError> {
1560
+ return safeParse(
1561
+ jsonString,
1562
+ (x) => ToolsFunction$inboundSchema.parse(JSON.parse(x)),
1563
+ `Failed to parse 'ToolsFunction' from JSON`,
1564
+ );
1565
+ }
1566
+
1567
+ /** @internal */
1568
+ export const Twelve$inboundSchema: z.ZodType<Twelve, z.ZodTypeDef, unknown> = z
1569
+ .object({
1570
+ type: RunAgentToolsAgentsRequestRequestBodySettings12Type$inboundSchema,
1571
+ _id: z.string().optional(),
1572
+ key: z.string(),
1573
+ display_name: z.string().optional(),
1574
+ description: z.string().optional(),
1575
+ requires_approval: z.boolean().default(false),
1576
+ function: z.lazy(() => ToolsFunction$inboundSchema),
1577
+ }).transform((v) => {
1578
+ return remap$(v, {
1579
+ "_id": "id",
1580
+ "display_name": "displayName",
1581
+ "requires_approval": "requiresApproval",
1582
+ });
1583
+ });
1584
+
1585
+ /** @internal */
1586
+ export type Twelve$Outbound = {
1587
+ type: string;
1588
+ _id?: string | undefined;
1589
+ key: string;
1590
+ display_name?: string | undefined;
1591
+ description?: string | undefined;
1592
+ requires_approval: boolean;
1593
+ function: ToolsFunction$Outbound;
1594
+ };
1595
+
1596
+ /** @internal */
1597
+ export const Twelve$outboundSchema: z.ZodType<
1598
+ Twelve$Outbound,
1599
+ z.ZodTypeDef,
1600
+ Twelve
1601
+ > = z.object({
1602
+ type: RunAgentToolsAgentsRequestRequestBodySettings12Type$outboundSchema,
1603
+ id: z.string().optional(),
1604
+ key: z.string(),
1605
+ displayName: z.string().optional(),
1606
+ description: z.string().optional(),
1607
+ requiresApproval: z.boolean().default(false),
1608
+ function: z.lazy(() => ToolsFunction$outboundSchema),
1609
+ }).transform((v) => {
1610
+ return remap$(v, {
1611
+ id: "_id",
1612
+ displayName: "display_name",
1613
+ requiresApproval: "requires_approval",
1614
+ });
1615
+ });
1616
+
1617
+ /**
1618
+ * @internal
1619
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1620
+ */
1621
+ export namespace Twelve$ {
1622
+ /** @deprecated use `Twelve$inboundSchema` instead. */
1623
+ export const inboundSchema = Twelve$inboundSchema;
1624
+ /** @deprecated use `Twelve$outboundSchema` instead. */
1625
+ export const outboundSchema = Twelve$outboundSchema;
1626
+ /** @deprecated use `Twelve$Outbound` instead. */
1627
+ export type Outbound = Twelve$Outbound;
1628
+ }
1629
+
1630
+ export function twelveToJSON(twelve: Twelve): string {
1631
+ return JSON.stringify(Twelve$outboundSchema.parse(twelve));
1632
+ }
1633
+
1634
+ export function twelveFromJSON(
1635
+ jsonString: string,
1636
+ ): SafeParseResult<Twelve, SDKValidationError> {
1637
+ return safeParse(
1638
+ jsonString,
1639
+ (x) => Twelve$inboundSchema.parse(JSON.parse(x)),
1640
+ `Failed to parse 'Twelve' from JSON`,
1641
+ );
1642
+ }
1643
+
1644
+ /** @internal */
1645
+ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
1646
+ .nativeEnum(Status);
1647
+
1648
+ /** @internal */
1649
+ export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
1650
+ Status$inboundSchema;
1651
+
1652
+ /**
1653
+ * @internal
1654
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1655
+ */
1656
+ export namespace Status$ {
1657
+ /** @deprecated use `Status$inboundSchema` instead. */
1658
+ export const inboundSchema = Status$inboundSchema;
1659
+ /** @deprecated use `Status$outboundSchema` instead. */
1660
+ export const outboundSchema = Status$outboundSchema;
1661
+ }
1662
+
1663
+ /** @internal */
1664
+ export const RunAgentToolsAgentsRequestRequestBodySettings11Type$inboundSchema:
1665
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings11Type> =
1666
+ z.nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings11Type);
1667
+
1668
+ /** @internal */
1669
+ export const RunAgentToolsAgentsRequestRequestBodySettings11Type$outboundSchema:
1670
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings11Type> =
1671
+ RunAgentToolsAgentsRequestRequestBodySettings11Type$inboundSchema;
1672
+
1673
+ /**
1674
+ * @internal
1675
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1676
+ */
1677
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings11Type$ {
1678
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings11Type$inboundSchema` instead. */
1679
+ export const inboundSchema =
1680
+ RunAgentToolsAgentsRequestRequestBodySettings11Type$inboundSchema;
1681
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings11Type$outboundSchema` instead. */
1682
+ export const outboundSchema =
1683
+ RunAgentToolsAgentsRequestRequestBodySettings11Type$outboundSchema;
1684
+ }
1685
+
1686
+ /** @internal */
1687
+ export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
1688
+ .nativeEnum(Method);
1689
+
1690
+ /** @internal */
1691
+ export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
1692
+ Method$inboundSchema;
1693
+
1694
+ /**
1695
+ * @internal
1696
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1697
+ */
1698
+ export namespace Method$ {
1699
+ /** @deprecated use `Method$inboundSchema` instead. */
1700
+ export const inboundSchema = Method$inboundSchema;
1701
+ /** @deprecated use `Method$outboundSchema` instead. */
1702
+ export const outboundSchema = Method$outboundSchema;
1703
+ }
1704
+
1705
+ /** @internal */
1706
+ export const Blueprint$inboundSchema: z.ZodType<
1707
+ Blueprint,
1708
+ z.ZodTypeDef,
1709
+ unknown
1710
+ > = z.object({
1711
+ url: z.string(),
1712
+ method: Method$inboundSchema,
1713
+ headers: z.record(z.string()).optional(),
1714
+ body: z.record(z.any()).optional(),
1715
+ });
1716
+
1717
+ /** @internal */
1718
+ export type Blueprint$Outbound = {
1719
+ url: string;
1720
+ method: string;
1721
+ headers?: { [k: string]: string } | undefined;
1722
+ body?: { [k: string]: any } | undefined;
1723
+ };
1724
+
1725
+ /** @internal */
1726
+ export const Blueprint$outboundSchema: z.ZodType<
1727
+ Blueprint$Outbound,
1728
+ z.ZodTypeDef,
1729
+ Blueprint
1730
+ > = z.object({
1731
+ url: z.string(),
1732
+ method: Method$outboundSchema,
1733
+ headers: z.record(z.string()).optional(),
1734
+ body: z.record(z.any()).optional(),
1735
+ });
1736
+
1737
+ /**
1738
+ * @internal
1739
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1740
+ */
1741
+ export namespace Blueprint$ {
1742
+ /** @deprecated use `Blueprint$inboundSchema` instead. */
1743
+ export const inboundSchema = Blueprint$inboundSchema;
1744
+ /** @deprecated use `Blueprint$outboundSchema` instead. */
1745
+ export const outboundSchema = Blueprint$outboundSchema;
1746
+ /** @deprecated use `Blueprint$Outbound` instead. */
1747
+ export type Outbound = Blueprint$Outbound;
1748
+ }
1749
+
1750
+ export function blueprintToJSON(blueprint: Blueprint): string {
1751
+ return JSON.stringify(Blueprint$outboundSchema.parse(blueprint));
1752
+ }
1753
+
1754
+ export function blueprintFromJSON(
1755
+ jsonString: string,
1756
+ ): SafeParseResult<Blueprint, SDKValidationError> {
1757
+ return safeParse(
1758
+ jsonString,
1759
+ (x) => Blueprint$inboundSchema.parse(JSON.parse(x)),
1760
+ `Failed to parse 'Blueprint' from JSON`,
1761
+ );
1762
+ }
1763
+
1764
+ /** @internal */
1765
+ export const RunAgentToolsAgentsRequestRequestBodySettings11HttpType$inboundSchema:
1766
+ z.ZodNativeEnum<
1767
+ typeof RunAgentToolsAgentsRequestRequestBodySettings11HttpType
1768
+ > = z.nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings11HttpType);
1769
+
1770
+ /** @internal */
1771
+ export const RunAgentToolsAgentsRequestRequestBodySettings11HttpType$outboundSchema:
1772
+ z.ZodNativeEnum<
1773
+ typeof RunAgentToolsAgentsRequestRequestBodySettings11HttpType
1774
+ > = RunAgentToolsAgentsRequestRequestBodySettings11HttpType$inboundSchema;
1775
+
1776
+ /**
1777
+ * @internal
1778
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1779
+ */
1780
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings11HttpType$ {
1781
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings11HttpType$inboundSchema` instead. */
1782
+ export const inboundSchema =
1783
+ RunAgentToolsAgentsRequestRequestBodySettings11HttpType$inboundSchema;
1784
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings11HttpType$outboundSchema` instead. */
1785
+ export const outboundSchema =
1786
+ RunAgentToolsAgentsRequestRequestBodySettings11HttpType$outboundSchema;
1787
+ }
1788
+
1789
+ /** @internal */
1790
+ export const DefaultValue$inboundSchema: z.ZodType<
1791
+ DefaultValue,
1792
+ z.ZodTypeDef,
1793
+ unknown
1794
+ > = z.union([z.string(), z.number(), z.boolean()]);
1795
+
1796
+ /** @internal */
1797
+ export type DefaultValue$Outbound = string | number | boolean;
1798
+
1799
+ /** @internal */
1800
+ export const DefaultValue$outboundSchema: z.ZodType<
1801
+ DefaultValue$Outbound,
1802
+ z.ZodTypeDef,
1803
+ DefaultValue
1804
+ > = z.union([z.string(), z.number(), z.boolean()]);
1805
+
1806
+ /**
1807
+ * @internal
1808
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1809
+ */
1810
+ export namespace DefaultValue$ {
1811
+ /** @deprecated use `DefaultValue$inboundSchema` instead. */
1812
+ export const inboundSchema = DefaultValue$inboundSchema;
1813
+ /** @deprecated use `DefaultValue$outboundSchema` instead. */
1814
+ export const outboundSchema = DefaultValue$outboundSchema;
1815
+ /** @deprecated use `DefaultValue$Outbound` instead. */
1816
+ export type Outbound = DefaultValue$Outbound;
1817
+ }
1818
+
1819
+ export function defaultValueToJSON(defaultValue: DefaultValue): string {
1820
+ return JSON.stringify(DefaultValue$outboundSchema.parse(defaultValue));
1821
+ }
1822
+
1823
+ export function defaultValueFromJSON(
1824
+ jsonString: string,
1825
+ ): SafeParseResult<DefaultValue, SDKValidationError> {
1826
+ return safeParse(
1827
+ jsonString,
1828
+ (x) => DefaultValue$inboundSchema.parse(JSON.parse(x)),
1829
+ `Failed to parse 'DefaultValue' from JSON`,
1830
+ );
1831
+ }
1832
+
1833
+ /** @internal */
1834
+ export const Arguments$inboundSchema: z.ZodType<
1835
+ Arguments,
1836
+ z.ZodTypeDef,
1837
+ unknown
1838
+ > = z.object({
1839
+ type: RunAgentToolsAgentsRequestRequestBodySettings11HttpType$inboundSchema,
1840
+ description: z.string(),
1841
+ send_to_model: z.boolean().default(true),
1842
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
1843
+ }).transform((v) => {
1844
+ return remap$(v, {
1845
+ "send_to_model": "sendToModel",
1846
+ "default_value": "defaultValue",
1847
+ });
1848
+ });
1849
+
1850
+ /** @internal */
1851
+ export type Arguments$Outbound = {
1852
+ type: string;
1853
+ description: string;
1854
+ send_to_model: boolean;
1855
+ default_value?: string | number | boolean | undefined;
1856
+ };
1857
+
1858
+ /** @internal */
1859
+ export const Arguments$outboundSchema: z.ZodType<
1860
+ Arguments$Outbound,
1861
+ z.ZodTypeDef,
1862
+ Arguments
1863
+ > = z.object({
1864
+ type: RunAgentToolsAgentsRequestRequestBodySettings11HttpType$outboundSchema,
1865
+ description: z.string(),
1866
+ sendToModel: z.boolean().default(true),
1867
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1868
+ }).transform((v) => {
1869
+ return remap$(v, {
1870
+ sendToModel: "send_to_model",
1871
+ defaultValue: "default_value",
1872
+ });
1873
+ });
1874
+
1875
+ /**
1876
+ * @internal
1877
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1878
+ */
1879
+ export namespace Arguments$ {
1880
+ /** @deprecated use `Arguments$inboundSchema` instead. */
1881
+ export const inboundSchema = Arguments$inboundSchema;
1882
+ /** @deprecated use `Arguments$outboundSchema` instead. */
1883
+ export const outboundSchema = Arguments$outboundSchema;
1884
+ /** @deprecated use `Arguments$Outbound` instead. */
1885
+ export type Outbound = Arguments$Outbound;
1886
+ }
1887
+
1888
+ export function argumentsToJSON(value: Arguments): string {
1889
+ return JSON.stringify(Arguments$outboundSchema.parse(value));
1890
+ }
1891
+
1892
+ export function argumentsFromJSON(
1893
+ jsonString: string,
1894
+ ): SafeParseResult<Arguments, SDKValidationError> {
1895
+ return safeParse(
1896
+ jsonString,
1897
+ (x) => Arguments$inboundSchema.parse(JSON.parse(x)),
1898
+ `Failed to parse 'Arguments' from JSON`,
1899
+ );
1900
+ }
1901
+
1902
+ /** @internal */
1903
+ export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
1904
+ .object({
1905
+ blueprint: z.lazy(() => Blueprint$inboundSchema),
1906
+ arguments: z.record(z.lazy(() => Arguments$inboundSchema)).optional(),
1907
+ });
1908
+
1909
+ /** @internal */
1910
+ export type Http$Outbound = {
1911
+ blueprint: Blueprint$Outbound;
1912
+ arguments?: { [k: string]: Arguments$Outbound } | undefined;
1913
+ };
1914
+
1915
+ /** @internal */
1916
+ export const Http$outboundSchema: z.ZodType<Http$Outbound, z.ZodTypeDef, Http> =
1917
+ z.object({
1918
+ blueprint: z.lazy(() => Blueprint$outboundSchema),
1919
+ arguments: z.record(z.lazy(() => Arguments$outboundSchema)).optional(),
1920
+ });
1921
+
1922
+ /**
1923
+ * @internal
1924
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1925
+ */
1926
+ export namespace Http$ {
1927
+ /** @deprecated use `Http$inboundSchema` instead. */
1928
+ export const inboundSchema = Http$inboundSchema;
1929
+ /** @deprecated use `Http$outboundSchema` instead. */
1930
+ export const outboundSchema = Http$outboundSchema;
1931
+ /** @deprecated use `Http$Outbound` instead. */
1932
+ export type Outbound = Http$Outbound;
1933
+ }
1934
+
1935
+ export function httpToJSON(http: Http): string {
1936
+ return JSON.stringify(Http$outboundSchema.parse(http));
1937
+ }
1938
+
1939
+ export function httpFromJSON(
1940
+ jsonString: string,
1941
+ ): SafeParseResult<Http, SDKValidationError> {
1942
+ return safeParse(
1943
+ jsonString,
1944
+ (x) => Http$inboundSchema.parse(JSON.parse(x)),
1945
+ `Failed to parse 'Http' from JSON`,
1946
+ );
1947
+ }
1948
+
1949
+ /** @internal */
1950
+ export const Eleven$inboundSchema: z.ZodType<Eleven, z.ZodTypeDef, unknown> = z
1951
+ .object({
1952
+ _id: z.string().default("01K4PX8V31JHBM3THN5S024KJE"),
1953
+ path: z.string(),
1954
+ key: z.string(),
1955
+ display_name: z.string(),
1956
+ description: z.string(),
1957
+ status: Status$inboundSchema.default("live"),
1958
+ version_hash: z.string().optional(),
1959
+ type: RunAgentToolsAgentsRequestRequestBodySettings11Type$inboundSchema,
1960
+ http: z.lazy(() => Http$inboundSchema),
1961
+ requires_approval: z.boolean().default(false),
1962
+ }).transform((v) => {
1963
+ return remap$(v, {
1964
+ "_id": "id",
1965
+ "display_name": "displayName",
1966
+ "version_hash": "versionHash",
1967
+ "requires_approval": "requiresApproval",
1968
+ });
1969
+ });
1970
+
1971
+ /** @internal */
1972
+ export type Eleven$Outbound = {
1973
+ _id: string;
1974
+ path: string;
1975
+ key: string;
1976
+ display_name: string;
1977
+ description: string;
1978
+ status: string;
1979
+ version_hash?: string | undefined;
1980
+ type: string;
1981
+ http: Http$Outbound;
1982
+ requires_approval: boolean;
1983
+ };
1984
+
1985
+ /** @internal */
1986
+ export const Eleven$outboundSchema: z.ZodType<
1987
+ Eleven$Outbound,
1988
+ z.ZodTypeDef,
1989
+ Eleven
1990
+ > = z.object({
1991
+ id: z.string().default("01K4PX8V31JHBM3THN5S024KJE"),
1992
+ path: z.string(),
1993
+ key: z.string(),
1994
+ displayName: z.string(),
1995
+ description: z.string(),
1996
+ status: Status$outboundSchema.default("live"),
1997
+ versionHash: z.string().optional(),
1998
+ type: RunAgentToolsAgentsRequestRequestBodySettings11Type$outboundSchema,
1999
+ http: z.lazy(() => Http$outboundSchema),
2000
+ requiresApproval: z.boolean().default(false),
2001
+ }).transform((v) => {
2002
+ return remap$(v, {
2003
+ id: "_id",
2004
+ displayName: "display_name",
2005
+ versionHash: "version_hash",
2006
+ requiresApproval: "requires_approval",
2007
+ });
2008
+ });
2009
+
2010
+ /**
2011
+ * @internal
2012
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2013
+ */
2014
+ export namespace Eleven$ {
2015
+ /** @deprecated use `Eleven$inboundSchema` instead. */
2016
+ export const inboundSchema = Eleven$inboundSchema;
2017
+ /** @deprecated use `Eleven$outboundSchema` instead. */
2018
+ export const outboundSchema = Eleven$outboundSchema;
2019
+ /** @deprecated use `Eleven$Outbound` instead. */
2020
+ export type Outbound = Eleven$Outbound;
2021
+ }
2022
+
2023
+ export function elevenToJSON(eleven: Eleven): string {
2024
+ return JSON.stringify(Eleven$outboundSchema.parse(eleven));
2025
+ }
2026
+
2027
+ export function elevenFromJSON(
2028
+ jsonString: string,
2029
+ ): SafeParseResult<Eleven, SDKValidationError> {
2030
+ return safeParse(
2031
+ jsonString,
2032
+ (x) => Eleven$inboundSchema.parse(JSON.parse(x)),
2033
+ `Failed to parse 'Eleven' from JSON`,
2034
+ );
2035
+ }
2036
+
2037
+ /** @internal */
2038
+ export const RunAgentToolsAgentsRequestRequestBodySettings10Type$inboundSchema:
2039
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings10Type> =
2040
+ z.nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings10Type);
2041
+
2042
+ /** @internal */
2043
+ export const RunAgentToolsAgentsRequestRequestBodySettings10Type$outboundSchema:
2044
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings10Type> =
2045
+ RunAgentToolsAgentsRequestRequestBodySettings10Type$inboundSchema;
2046
+
2047
+ /**
2048
+ * @internal
2049
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2050
+ */
2051
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings10Type$ {
2052
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings10Type$inboundSchema` instead. */
2053
+ export const inboundSchema =
2054
+ RunAgentToolsAgentsRequestRequestBodySettings10Type$inboundSchema;
2055
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings10Type$outboundSchema` instead. */
2056
+ export const outboundSchema =
2057
+ RunAgentToolsAgentsRequestRequestBodySettings10Type$outboundSchema;
2058
+ }
2059
+
2060
+ /** @internal */
2061
+ export const Ten$inboundSchema: z.ZodType<Ten, z.ZodTypeDef, unknown> = z
2062
+ .object({
2063
+ type: RunAgentToolsAgentsRequestRequestBodySettings10Type$inboundSchema,
2064
+ requires_approval: z.boolean().default(false),
2065
+ }).transform((v) => {
2066
+ return remap$(v, {
2067
+ "requires_approval": "requiresApproval",
2068
+ });
2069
+ });
2070
+
2071
+ /** @internal */
2072
+ export type Ten$Outbound = {
2073
+ type: string;
2074
+ requires_approval: boolean;
2075
+ };
2076
+
2077
+ /** @internal */
2078
+ export const Ten$outboundSchema: z.ZodType<Ten$Outbound, z.ZodTypeDef, Ten> = z
2079
+ .object({
2080
+ type: RunAgentToolsAgentsRequestRequestBodySettings10Type$outboundSchema,
2081
+ requiresApproval: z.boolean().default(false),
2082
+ }).transform((v) => {
2083
+ return remap$(v, {
2084
+ requiresApproval: "requires_approval",
2085
+ });
2086
+ });
2087
+
2088
+ /**
2089
+ * @internal
2090
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2091
+ */
2092
+ export namespace Ten$ {
2093
+ /** @deprecated use `Ten$inboundSchema` instead. */
2094
+ export const inboundSchema = Ten$inboundSchema;
2095
+ /** @deprecated use `Ten$outboundSchema` instead. */
2096
+ export const outboundSchema = Ten$outboundSchema;
2097
+ /** @deprecated use `Ten$Outbound` instead. */
2098
+ export type Outbound = Ten$Outbound;
2099
+ }
2100
+
2101
+ export function tenToJSON(ten: Ten): string {
2102
+ return JSON.stringify(Ten$outboundSchema.parse(ten));
2103
+ }
2104
+
2105
+ export function tenFromJSON(
2106
+ jsonString: string,
2107
+ ): SafeParseResult<Ten, SDKValidationError> {
2108
+ return safeParse(
2109
+ jsonString,
2110
+ (x) => Ten$inboundSchema.parse(JSON.parse(x)),
2111
+ `Failed to parse 'Ten' from JSON`,
2112
+ );
2113
+ }
2114
+
2115
+ /** @internal */
2116
+ export const RunAgentToolsAgentsRequestRequestBodySettings9Type$inboundSchema:
2117
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings9Type> = z
2118
+ .nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings9Type);
2119
+
2120
+ /** @internal */
2121
+ export const RunAgentToolsAgentsRequestRequestBodySettings9Type$outboundSchema:
2122
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings9Type> =
2123
+ RunAgentToolsAgentsRequestRequestBodySettings9Type$inboundSchema;
2124
+
2125
+ /**
2126
+ * @internal
2127
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2128
+ */
2129
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings9Type$ {
2130
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings9Type$inboundSchema` instead. */
2131
+ export const inboundSchema =
2132
+ RunAgentToolsAgentsRequestRequestBodySettings9Type$inboundSchema;
2133
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings9Type$outboundSchema` instead. */
2134
+ export const outboundSchema =
2135
+ RunAgentToolsAgentsRequestRequestBodySettings9Type$outboundSchema;
2136
+ }
2137
+
2138
+ /** @internal */
2139
+ export const Nine$inboundSchema: z.ZodType<Nine, z.ZodTypeDef, unknown> = z
2140
+ .object({
2141
+ type: RunAgentToolsAgentsRequestRequestBodySettings9Type$inboundSchema,
2142
+ requires_approval: z.boolean().default(false),
2143
+ }).transform((v) => {
2144
+ return remap$(v, {
2145
+ "requires_approval": "requiresApproval",
2146
+ });
2147
+ });
2148
+
2149
+ /** @internal */
2150
+ export type Nine$Outbound = {
2151
+ type: string;
2152
+ requires_approval: boolean;
2153
+ };
2154
+
2155
+ /** @internal */
2156
+ export const Nine$outboundSchema: z.ZodType<Nine$Outbound, z.ZodTypeDef, Nine> =
2157
+ z.object({
2158
+ type: RunAgentToolsAgentsRequestRequestBodySettings9Type$outboundSchema,
2159
+ requiresApproval: z.boolean().default(false),
2160
+ }).transform((v) => {
2161
+ return remap$(v, {
2162
+ requiresApproval: "requires_approval",
2163
+ });
2164
+ });
2165
+
2166
+ /**
2167
+ * @internal
2168
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2169
+ */
2170
+ export namespace Nine$ {
2171
+ /** @deprecated use `Nine$inboundSchema` instead. */
2172
+ export const inboundSchema = Nine$inboundSchema;
2173
+ /** @deprecated use `Nine$outboundSchema` instead. */
2174
+ export const outboundSchema = Nine$outboundSchema;
2175
+ /** @deprecated use `Nine$Outbound` instead. */
2176
+ export type Outbound = Nine$Outbound;
2177
+ }
2178
+
2179
+ export function nineToJSON(nine: Nine): string {
2180
+ return JSON.stringify(Nine$outboundSchema.parse(nine));
2181
+ }
2182
+
2183
+ export function nineFromJSON(
2184
+ jsonString: string,
2185
+ ): SafeParseResult<Nine, SDKValidationError> {
2186
+ return safeParse(
2187
+ jsonString,
2188
+ (x) => Nine$inboundSchema.parse(JSON.parse(x)),
2189
+ `Failed to parse 'Nine' from JSON`,
2190
+ );
2191
+ }
2192
+
2193
+ /** @internal */
2194
+ export const RunAgentToolsAgentsRequestRequestBodySettings8Type$inboundSchema:
2195
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings8Type> = z
2196
+ .nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings8Type);
2197
+
2198
+ /** @internal */
2199
+ export const RunAgentToolsAgentsRequestRequestBodySettings8Type$outboundSchema:
2200
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings8Type> =
2201
+ RunAgentToolsAgentsRequestRequestBodySettings8Type$inboundSchema;
2202
+
2203
+ /**
2204
+ * @internal
2205
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2206
+ */
2207
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings8Type$ {
2208
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings8Type$inboundSchema` instead. */
2209
+ export const inboundSchema =
2210
+ RunAgentToolsAgentsRequestRequestBodySettings8Type$inboundSchema;
2211
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings8Type$outboundSchema` instead. */
2212
+ export const outboundSchema =
2213
+ RunAgentToolsAgentsRequestRequestBodySettings8Type$outboundSchema;
2214
+ }
2215
+
2216
+ /** @internal */
2217
+ export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
2218
+ .object({
2219
+ type: RunAgentToolsAgentsRequestRequestBodySettings8Type$inboundSchema,
2220
+ requires_approval: z.boolean().default(false),
2221
+ }).transform((v) => {
2222
+ return remap$(v, {
2223
+ "requires_approval": "requiresApproval",
2224
+ });
2225
+ });
2226
+
2227
+ /** @internal */
2228
+ export type Eight$Outbound = {
2229
+ type: string;
2230
+ requires_approval: boolean;
2231
+ };
2232
+
2233
+ /** @internal */
2234
+ export const Eight$outboundSchema: z.ZodType<
2235
+ Eight$Outbound,
2236
+ z.ZodTypeDef,
2237
+ Eight
2238
+ > = z.object({
2239
+ type: RunAgentToolsAgentsRequestRequestBodySettings8Type$outboundSchema,
2240
+ requiresApproval: z.boolean().default(false),
2241
+ }).transform((v) => {
2242
+ return remap$(v, {
2243
+ requiresApproval: "requires_approval",
2244
+ });
2245
+ });
2246
+
2247
+ /**
2248
+ * @internal
2249
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2250
+ */
2251
+ export namespace Eight$ {
2252
+ /** @deprecated use `Eight$inboundSchema` instead. */
2253
+ export const inboundSchema = Eight$inboundSchema;
2254
+ /** @deprecated use `Eight$outboundSchema` instead. */
2255
+ export const outboundSchema = Eight$outboundSchema;
2256
+ /** @deprecated use `Eight$Outbound` instead. */
2257
+ export type Outbound = Eight$Outbound;
2258
+ }
2259
+
2260
+ export function eightToJSON(eight: Eight): string {
2261
+ return JSON.stringify(Eight$outboundSchema.parse(eight));
2262
+ }
2263
+
2264
+ export function eightFromJSON(
2265
+ jsonString: string,
2266
+ ): SafeParseResult<Eight, SDKValidationError> {
2267
+ return safeParse(
2268
+ jsonString,
2269
+ (x) => Eight$inboundSchema.parse(JSON.parse(x)),
2270
+ `Failed to parse 'Eight' from JSON`,
2271
+ );
2272
+ }
2273
+
2274
+ /** @internal */
2275
+ export const RunAgentToolsAgentsRequestRequestBodySettings7Type$inboundSchema:
2276
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings7Type> = z
2277
+ .nativeEnum(RunAgentToolsAgentsRequestRequestBodySettings7Type);
2278
+
2279
+ /** @internal */
2280
+ export const RunAgentToolsAgentsRequestRequestBodySettings7Type$outboundSchema:
2281
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettings7Type> =
2282
+ RunAgentToolsAgentsRequestRequestBodySettings7Type$inboundSchema;
2283
+
2284
+ /**
2285
+ * @internal
2286
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2287
+ */
2288
+ export namespace RunAgentToolsAgentsRequestRequestBodySettings7Type$ {
2289
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings7Type$inboundSchema` instead. */
2290
+ export const inboundSchema =
2291
+ RunAgentToolsAgentsRequestRequestBodySettings7Type$inboundSchema;
2292
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettings7Type$outboundSchema` instead. */
2293
+ export const outboundSchema =
2294
+ RunAgentToolsAgentsRequestRequestBodySettings7Type$outboundSchema;
2295
+ }
2296
+
2297
+ /** @internal */
2298
+ export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
2299
+ .object({
2300
+ type: RunAgentToolsAgentsRequestRequestBodySettings7Type$inboundSchema,
2301
+ requires_approval: z.boolean().default(false),
2302
+ }).transform((v) => {
2303
+ return remap$(v, {
2304
+ "requires_approval": "requiresApproval",
2305
+ });
2306
+ });
2307
+
2308
+ /** @internal */
2309
+ export type Seven$Outbound = {
2310
+ type: string;
2311
+ requires_approval: boolean;
2312
+ };
2313
+
2314
+ /** @internal */
2315
+ export const Seven$outboundSchema: z.ZodType<
2316
+ Seven$Outbound,
2317
+ z.ZodTypeDef,
2318
+ Seven
2319
+ > = z.object({
2320
+ type: RunAgentToolsAgentsRequestRequestBodySettings7Type$outboundSchema,
2321
+ requiresApproval: z.boolean().default(false),
2322
+ }).transform((v) => {
2323
+ return remap$(v, {
2324
+ requiresApproval: "requires_approval",
2325
+ });
2326
+ });
2327
+
2328
+ /**
2329
+ * @internal
2330
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2331
+ */
2332
+ export namespace Seven$ {
2333
+ /** @deprecated use `Seven$inboundSchema` instead. */
2334
+ export const inboundSchema = Seven$inboundSchema;
2335
+ /** @deprecated use `Seven$outboundSchema` instead. */
2336
+ export const outboundSchema = Seven$outboundSchema;
2337
+ /** @deprecated use `Seven$Outbound` instead. */
2338
+ export type Outbound = Seven$Outbound;
2339
+ }
2340
+
2341
+ export function sevenToJSON(seven: Seven): string {
2342
+ return JSON.stringify(Seven$outboundSchema.parse(seven));
2343
+ }
2344
+
2345
+ export function sevenFromJSON(
2346
+ jsonString: string,
2347
+ ): SafeParseResult<Seven, SDKValidationError> {
2348
+ return safeParse(
2349
+ jsonString,
2350
+ (x) => Seven$inboundSchema.parse(JSON.parse(x)),
2351
+ `Failed to parse 'Seven' from JSON`,
2352
+ );
2353
+ }
2354
+
2355
+ /** @internal */
2356
+ export const RunAgentToolsAgentsRequestRequestBodySettingsType$inboundSchema:
2357
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettingsType> = z
2358
+ .nativeEnum(RunAgentToolsAgentsRequestRequestBodySettingsType);
2359
+
2360
+ /** @internal */
2361
+ export const RunAgentToolsAgentsRequestRequestBodySettingsType$outboundSchema:
2362
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodySettingsType> =
2363
+ RunAgentToolsAgentsRequestRequestBodySettingsType$inboundSchema;
2364
+
2365
+ /**
2366
+ * @internal
2367
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2368
+ */
2369
+ export namespace RunAgentToolsAgentsRequestRequestBodySettingsType$ {
2370
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettingsType$inboundSchema` instead. */
2371
+ export const inboundSchema =
2372
+ RunAgentToolsAgentsRequestRequestBodySettingsType$inboundSchema;
2373
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodySettingsType$outboundSchema` instead. */
2374
+ export const outboundSchema =
2375
+ RunAgentToolsAgentsRequestRequestBodySettingsType$outboundSchema;
2376
+ }
2377
+
2378
+ /** @internal */
2379
+ export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
2380
+ .object({
2381
+ type: RunAgentToolsAgentsRequestRequestBodySettingsType$inboundSchema,
2382
+ requires_approval: z.boolean().default(false),
2383
+ }).transform((v) => {
2384
+ return remap$(v, {
2385
+ "requires_approval": "requiresApproval",
2386
+ });
2387
+ });
2388
+
2389
+ /** @internal */
2390
+ export type Six$Outbound = {
2391
+ type: string;
2392
+ requires_approval: boolean;
2393
+ };
2394
+
2395
+ /** @internal */
2396
+ export const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six> = z
2397
+ .object({
2398
+ type: RunAgentToolsAgentsRequestRequestBodySettingsType$outboundSchema,
2399
+ requiresApproval: z.boolean().default(false),
2400
+ }).transform((v) => {
2401
+ return remap$(v, {
2402
+ requiresApproval: "requires_approval",
2403
+ });
2404
+ });
2405
+
2406
+ /**
2407
+ * @internal
2408
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2409
+ */
2410
+ export namespace Six$ {
2411
+ /** @deprecated use `Six$inboundSchema` instead. */
2412
+ export const inboundSchema = Six$inboundSchema;
2413
+ /** @deprecated use `Six$outboundSchema` instead. */
2414
+ export const outboundSchema = Six$outboundSchema;
2415
+ /** @deprecated use `Six$Outbound` instead. */
2416
+ export type Outbound = Six$Outbound;
2417
+ }
2418
+
2419
+ export function sixToJSON(six: Six): string {
2420
+ return JSON.stringify(Six$outboundSchema.parse(six));
2421
+ }
2422
+
2423
+ export function sixFromJSON(
2424
+ jsonString: string,
2425
+ ): SafeParseResult<Six, SDKValidationError> {
2426
+ return safeParse(
2427
+ jsonString,
2428
+ (x) => Six$inboundSchema.parse(JSON.parse(x)),
2429
+ `Failed to parse 'Six' from JSON`,
2430
+ );
2431
+ }
2432
+
2433
+ /** @internal */
2434
+ export const RunAgentToolsAgentsRequestRequestBodyType$inboundSchema:
2435
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodyType> = z
2436
+ .nativeEnum(RunAgentToolsAgentsRequestRequestBodyType);
2437
+
2438
+ /** @internal */
2439
+ export const RunAgentToolsAgentsRequestRequestBodyType$outboundSchema:
2440
+ z.ZodNativeEnum<typeof RunAgentToolsAgentsRequestRequestBodyType> =
2441
+ RunAgentToolsAgentsRequestRequestBodyType$inboundSchema;
2442
+
2443
+ /**
2444
+ * @internal
2445
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2446
+ */
2447
+ export namespace RunAgentToolsAgentsRequestRequestBodyType$ {
2448
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodyType$inboundSchema` instead. */
2449
+ export const inboundSchema =
2450
+ RunAgentToolsAgentsRequestRequestBodyType$inboundSchema;
2451
+ /** @deprecated use `RunAgentToolsAgentsRequestRequestBodyType$outboundSchema` instead. */
2452
+ export const outboundSchema =
2453
+ RunAgentToolsAgentsRequestRequestBodyType$outboundSchema;
2454
+ }
2455
+
2456
+ /** @internal */
2457
+ export const Tools5$inboundSchema: z.ZodType<Tools5, z.ZodTypeDef, unknown> = z
2458
+ .object({
2459
+ type: RunAgentToolsAgentsRequestRequestBodyType$inboundSchema,
2460
+ requires_approval: z.boolean().default(false),
2461
+ }).transform((v) => {
2462
+ return remap$(v, {
2463
+ "requires_approval": "requiresApproval",
2464
+ });
2465
+ });
2466
+
2467
+ /** @internal */
2468
+ export type Tools5$Outbound = {
2469
+ type: string;
2470
+ requires_approval: boolean;
2471
+ };
2472
+
2473
+ /** @internal */
2474
+ export const Tools5$outboundSchema: z.ZodType<
2475
+ Tools5$Outbound,
2476
+ z.ZodTypeDef,
2477
+ Tools5
2478
+ > = z.object({
2479
+ type: RunAgentToolsAgentsRequestRequestBodyType$outboundSchema,
2480
+ requiresApproval: z.boolean().default(false),
2481
+ }).transform((v) => {
2482
+ return remap$(v, {
2483
+ requiresApproval: "requires_approval",
2484
+ });
2485
+ });
2486
+
2487
+ /**
2488
+ * @internal
2489
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2490
+ */
2491
+ export namespace Tools5$ {
2492
+ /** @deprecated use `Tools5$inboundSchema` instead. */
2493
+ export const inboundSchema = Tools5$inboundSchema;
2494
+ /** @deprecated use `Tools5$outboundSchema` instead. */
2495
+ export const outboundSchema = Tools5$outboundSchema;
2496
+ /** @deprecated use `Tools5$Outbound` instead. */
2497
+ export type Outbound = Tools5$Outbound;
2498
+ }
2499
+
2500
+ export function tools5ToJSON(tools5: Tools5): string {
2501
+ return JSON.stringify(Tools5$outboundSchema.parse(tools5));
2502
+ }
2503
+
2504
+ export function tools5FromJSON(
2505
+ jsonString: string,
2506
+ ): SafeParseResult<Tools5, SDKValidationError> {
2507
+ return safeParse(
2508
+ jsonString,
2509
+ (x) => Tools5$inboundSchema.parse(JSON.parse(x)),
2510
+ `Failed to parse 'Tools5' from JSON`,
2511
+ );
2512
+ }
2513
+
2514
+ /** @internal */
2515
+ export const RunAgentToolsAgentsRequestType$inboundSchema: z.ZodNativeEnum<
2516
+ typeof RunAgentToolsAgentsRequestType
2517
+ > = z.nativeEnum(RunAgentToolsAgentsRequestType);
2518
+
2519
+ /** @internal */
2520
+ export const RunAgentToolsAgentsRequestType$outboundSchema: z.ZodNativeEnum<
2521
+ typeof RunAgentToolsAgentsRequestType
2522
+ > = RunAgentToolsAgentsRequestType$inboundSchema;
2523
+
2524
+ /**
2525
+ * @internal
2526
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2527
+ */
2528
+ export namespace RunAgentToolsAgentsRequestType$ {
2529
+ /** @deprecated use `RunAgentToolsAgentsRequestType$inboundSchema` instead. */
2530
+ export const inboundSchema = RunAgentToolsAgentsRequestType$inboundSchema;
2531
+ /** @deprecated use `RunAgentToolsAgentsRequestType$outboundSchema` instead. */
2532
+ export const outboundSchema = RunAgentToolsAgentsRequestType$outboundSchema;
2533
+ }
2534
+
2535
+ /** @internal */
2536
+ export const Tools4$inboundSchema: z.ZodType<Tools4, z.ZodTypeDef, unknown> = z
2537
+ .object({
2538
+ type: RunAgentToolsAgentsRequestType$inboundSchema,
2539
+ requires_approval: z.boolean().default(false),
2540
+ }).transform((v) => {
2541
+ return remap$(v, {
2542
+ "requires_approval": "requiresApproval",
2543
+ });
2544
+ });
2545
+
2546
+ /** @internal */
2547
+ export type Tools4$Outbound = {
2548
+ type: string;
2549
+ requires_approval: boolean;
2550
+ };
2551
+
2552
+ /** @internal */
2553
+ export const Tools4$outboundSchema: z.ZodType<
2554
+ Tools4$Outbound,
2555
+ z.ZodTypeDef,
2556
+ Tools4
2557
+ > = z.object({
2558
+ type: RunAgentToolsAgentsRequestType$outboundSchema,
2559
+ requiresApproval: z.boolean().default(false),
2560
+ }).transform((v) => {
2561
+ return remap$(v, {
2562
+ requiresApproval: "requires_approval",
2563
+ });
2564
+ });
2565
+
2566
+ /**
2567
+ * @internal
2568
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2569
+ */
2570
+ export namespace Tools4$ {
2571
+ /** @deprecated use `Tools4$inboundSchema` instead. */
2572
+ export const inboundSchema = Tools4$inboundSchema;
2573
+ /** @deprecated use `Tools4$outboundSchema` instead. */
2574
+ export const outboundSchema = Tools4$outboundSchema;
2575
+ /** @deprecated use `Tools4$Outbound` instead. */
2576
+ export type Outbound = Tools4$Outbound;
2577
+ }
2578
+
2579
+ export function tools4ToJSON(tools4: Tools4): string {
2580
+ return JSON.stringify(Tools4$outboundSchema.parse(tools4));
2581
+ }
2582
+
2583
+ export function tools4FromJSON(
2584
+ jsonString: string,
2585
+ ): SafeParseResult<Tools4, SDKValidationError> {
2586
+ return safeParse(
2587
+ jsonString,
2588
+ (x) => Tools4$inboundSchema.parse(JSON.parse(x)),
2589
+ `Failed to parse 'Tools4' from JSON`,
2590
+ );
2591
+ }
2592
+
2593
+ /** @internal */
2594
+ export const RunAgentToolsAgentsType$inboundSchema: z.ZodNativeEnum<
2595
+ typeof RunAgentToolsAgentsType
2596
+ > = z.nativeEnum(RunAgentToolsAgentsType);
2597
+
2598
+ /** @internal */
2599
+ export const RunAgentToolsAgentsType$outboundSchema: z.ZodNativeEnum<
2600
+ typeof RunAgentToolsAgentsType
2601
+ > = RunAgentToolsAgentsType$inboundSchema;
2602
+
2603
+ /**
2604
+ * @internal
2605
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2606
+ */
2607
+ export namespace RunAgentToolsAgentsType$ {
2608
+ /** @deprecated use `RunAgentToolsAgentsType$inboundSchema` instead. */
2609
+ export const inboundSchema = RunAgentToolsAgentsType$inboundSchema;
2610
+ /** @deprecated use `RunAgentToolsAgentsType$outboundSchema` instead. */
2611
+ export const outboundSchema = RunAgentToolsAgentsType$outboundSchema;
2612
+ }
2613
+
2614
+ /** @internal */
2615
+ export const Tools3$inboundSchema: z.ZodType<Tools3, z.ZodTypeDef, unknown> = z
2616
+ .object({
2617
+ type: RunAgentToolsAgentsType$inboundSchema,
2618
+ requires_approval: z.boolean().default(false),
2619
+ }).transform((v) => {
2620
+ return remap$(v, {
2621
+ "requires_approval": "requiresApproval",
2622
+ });
2623
+ });
2624
+
2625
+ /** @internal */
2626
+ export type Tools3$Outbound = {
2627
+ type: string;
2628
+ requires_approval: boolean;
2629
+ };
2630
+
2631
+ /** @internal */
2632
+ export const Tools3$outboundSchema: z.ZodType<
2633
+ Tools3$Outbound,
2634
+ z.ZodTypeDef,
2635
+ Tools3
2636
+ > = z.object({
2637
+ type: RunAgentToolsAgentsType$outboundSchema,
2638
+ requiresApproval: z.boolean().default(false),
2639
+ }).transform((v) => {
2640
+ return remap$(v, {
2641
+ requiresApproval: "requires_approval",
2642
+ });
2643
+ });
2644
+
2645
+ /**
2646
+ * @internal
2647
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2648
+ */
2649
+ export namespace Tools3$ {
2650
+ /** @deprecated use `Tools3$inboundSchema` instead. */
2651
+ export const inboundSchema = Tools3$inboundSchema;
2652
+ /** @deprecated use `Tools3$outboundSchema` instead. */
2653
+ export const outboundSchema = Tools3$outboundSchema;
2654
+ /** @deprecated use `Tools3$Outbound` instead. */
2655
+ export type Outbound = Tools3$Outbound;
2656
+ }
2657
+
2658
+ export function tools3ToJSON(tools3: Tools3): string {
2659
+ return JSON.stringify(Tools3$outboundSchema.parse(tools3));
2660
+ }
2661
+
2662
+ export function tools3FromJSON(
2663
+ jsonString: string,
2664
+ ): SafeParseResult<Tools3, SDKValidationError> {
2665
+ return safeParse(
2666
+ jsonString,
2667
+ (x) => Tools3$inboundSchema.parse(JSON.parse(x)),
2668
+ `Failed to parse 'Tools3' from JSON`,
2669
+ );
2670
+ }
2671
+
2672
+ /** @internal */
2673
+ export const RunAgentToolsType$inboundSchema: z.ZodNativeEnum<
2674
+ typeof RunAgentToolsType
2675
+ > = z.nativeEnum(RunAgentToolsType);
2676
+
2677
+ /** @internal */
2678
+ export const RunAgentToolsType$outboundSchema: z.ZodNativeEnum<
2679
+ typeof RunAgentToolsType
2680
+ > = RunAgentToolsType$inboundSchema;
2681
+
2682
+ /**
2683
+ * @internal
2684
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2685
+ */
2686
+ export namespace RunAgentToolsType$ {
2687
+ /** @deprecated use `RunAgentToolsType$inboundSchema` instead. */
2688
+ export const inboundSchema = RunAgentToolsType$inboundSchema;
2689
+ /** @deprecated use `RunAgentToolsType$outboundSchema` instead. */
2690
+ export const outboundSchema = RunAgentToolsType$outboundSchema;
2691
+ }
2692
+
2693
+ /** @internal */
2694
+ export const Tools2$inboundSchema: z.ZodType<Tools2, z.ZodTypeDef, unknown> = z
2695
+ .object({
2696
+ type: RunAgentToolsType$inboundSchema,
2697
+ requires_approval: z.boolean().default(false),
2698
+ }).transform((v) => {
2699
+ return remap$(v, {
2700
+ "requires_approval": "requiresApproval",
2701
+ });
2702
+ });
2703
+
2704
+ /** @internal */
2705
+ export type Tools2$Outbound = {
2706
+ type: string;
2707
+ requires_approval: boolean;
2708
+ };
2709
+
2710
+ /** @internal */
2711
+ export const Tools2$outboundSchema: z.ZodType<
2712
+ Tools2$Outbound,
2713
+ z.ZodTypeDef,
2714
+ Tools2
2715
+ > = z.object({
2716
+ type: RunAgentToolsType$outboundSchema,
2717
+ requiresApproval: z.boolean().default(false),
2718
+ }).transform((v) => {
2719
+ return remap$(v, {
2720
+ requiresApproval: "requires_approval",
2721
+ });
2722
+ });
2723
+
2724
+ /**
2725
+ * @internal
2726
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2727
+ */
2728
+ export namespace Tools2$ {
2729
+ /** @deprecated use `Tools2$inboundSchema` instead. */
2730
+ export const inboundSchema = Tools2$inboundSchema;
2731
+ /** @deprecated use `Tools2$outboundSchema` instead. */
2732
+ export const outboundSchema = Tools2$outboundSchema;
2733
+ /** @deprecated use `Tools2$Outbound` instead. */
2734
+ export type Outbound = Tools2$Outbound;
2735
+ }
2736
+
2737
+ export function tools2ToJSON(tools2: Tools2): string {
2738
+ return JSON.stringify(Tools2$outboundSchema.parse(tools2));
2739
+ }
2740
+
2741
+ export function tools2FromJSON(
2742
+ jsonString: string,
2743
+ ): SafeParseResult<Tools2, SDKValidationError> {
2744
+ return safeParse(
2745
+ jsonString,
2746
+ (x) => Tools2$inboundSchema.parse(JSON.parse(x)),
2747
+ `Failed to parse 'Tools2' from JSON`,
2748
+ );
2749
+ }
2750
+
2751
+ /** @internal */
2752
+ export const ToolsType$inboundSchema: z.ZodNativeEnum<typeof ToolsType> = z
2753
+ .nativeEnum(ToolsType);
2754
+
2755
+ /** @internal */
2756
+ export const ToolsType$outboundSchema: z.ZodNativeEnum<typeof ToolsType> =
2757
+ ToolsType$inboundSchema;
2758
+
2759
+ /**
2760
+ * @internal
2761
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2762
+ */
2763
+ export namespace ToolsType$ {
2764
+ /** @deprecated use `ToolsType$inboundSchema` instead. */
2765
+ export const inboundSchema = ToolsType$inboundSchema;
2766
+ /** @deprecated use `ToolsType$outboundSchema` instead. */
2767
+ export const outboundSchema = ToolsType$outboundSchema;
2768
+ }
2769
+
2770
+ /** @internal */
2771
+ export const Tools1$inboundSchema: z.ZodType<Tools1, z.ZodTypeDef, unknown> = z
2772
+ .object({
2773
+ type: ToolsType$inboundSchema,
2774
+ requires_approval: z.boolean().default(false),
2775
+ }).transform((v) => {
2776
+ return remap$(v, {
2777
+ "requires_approval": "requiresApproval",
2778
+ });
2779
+ });
2780
+
2781
+ /** @internal */
2782
+ export type Tools1$Outbound = {
2783
+ type: string;
2784
+ requires_approval: boolean;
2785
+ };
2786
+
2787
+ /** @internal */
2788
+ export const Tools1$outboundSchema: z.ZodType<
2789
+ Tools1$Outbound,
2790
+ z.ZodTypeDef,
2791
+ Tools1
2792
+ > = z.object({
2793
+ type: ToolsType$outboundSchema,
2794
+ requiresApproval: z.boolean().default(false),
2795
+ }).transform((v) => {
2796
+ return remap$(v, {
2797
+ requiresApproval: "requires_approval",
2798
+ });
2799
+ });
2800
+
2801
+ /**
2802
+ * @internal
2803
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2804
+ */
2805
+ export namespace Tools1$ {
2806
+ /** @deprecated use `Tools1$inboundSchema` instead. */
2807
+ export const inboundSchema = Tools1$inboundSchema;
2808
+ /** @deprecated use `Tools1$outboundSchema` instead. */
2809
+ export const outboundSchema = Tools1$outboundSchema;
2810
+ /** @deprecated use `Tools1$Outbound` instead. */
2811
+ export type Outbound = Tools1$Outbound;
2812
+ }
2813
+
2814
+ export function tools1ToJSON(tools1: Tools1): string {
2815
+ return JSON.stringify(Tools1$outboundSchema.parse(tools1));
2816
+ }
2817
+
2818
+ export function tools1FromJSON(
2819
+ jsonString: string,
2820
+ ): SafeParseResult<Tools1, SDKValidationError> {
2821
+ return safeParse(
2822
+ jsonString,
2823
+ (x) => Tools1$inboundSchema.parse(JSON.parse(x)),
2824
+ `Failed to parse 'Tools1' from JSON`,
2825
+ );
2826
+ }
2827
+
2828
+ /** @internal */
2829
+ export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
2830
+ .union([
2831
+ z.lazy(() => Eleven$inboundSchema),
2832
+ z.lazy(() => Twelve$inboundSchema),
2833
+ z.lazy(() => Tools1$inboundSchema),
2834
+ z.lazy(() => Tools2$inboundSchema),
2835
+ z.lazy(() => Tools3$inboundSchema),
2836
+ z.lazy(() => Tools4$inboundSchema),
2837
+ z.lazy(() => Tools5$inboundSchema),
2838
+ z.lazy(() => Six$inboundSchema),
2839
+ z.lazy(() => Seven$inboundSchema),
2840
+ z.lazy(() => Eight$inboundSchema),
2841
+ z.lazy(() => Nine$inboundSchema),
2842
+ z.lazy(() => Ten$inboundSchema),
2843
+ ]);
2844
+
2845
+ /** @internal */
2846
+ export type Tools$Outbound =
2847
+ | Eleven$Outbound
2848
+ | Twelve$Outbound
2849
+ | Tools1$Outbound
2850
+ | Tools2$Outbound
2851
+ | Tools3$Outbound
2852
+ | Tools4$Outbound
2853
+ | Tools5$Outbound
2854
+ | Six$Outbound
2855
+ | Seven$Outbound
2856
+ | Eight$Outbound
2857
+ | Nine$Outbound
2858
+ | Ten$Outbound;
2859
+
2860
+ /** @internal */
2861
+ export const Tools$outboundSchema: z.ZodType<
2862
+ Tools$Outbound,
2863
+ z.ZodTypeDef,
2864
+ Tools
2865
+ > = z.union([
2866
+ z.lazy(() => Eleven$outboundSchema),
2867
+ z.lazy(() => Twelve$outboundSchema),
2868
+ z.lazy(() => Tools1$outboundSchema),
2869
+ z.lazy(() => Tools2$outboundSchema),
2870
+ z.lazy(() => Tools3$outboundSchema),
2871
+ z.lazy(() => Tools4$outboundSchema),
2872
+ z.lazy(() => Tools5$outboundSchema),
2873
+ z.lazy(() => Six$outboundSchema),
2874
+ z.lazy(() => Seven$outboundSchema),
2875
+ z.lazy(() => Eight$outboundSchema),
2876
+ z.lazy(() => Nine$outboundSchema),
2877
+ z.lazy(() => Ten$outboundSchema),
2878
+ ]);
2879
+
2880
+ /**
2881
+ * @internal
2882
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2883
+ */
2884
+ export namespace Tools$ {
2885
+ /** @deprecated use `Tools$inboundSchema` instead. */
2886
+ export const inboundSchema = Tools$inboundSchema;
2887
+ /** @deprecated use `Tools$outboundSchema` instead. */
2888
+ export const outboundSchema = Tools$outboundSchema;
2889
+ /** @deprecated use `Tools$Outbound` instead. */
2890
+ export type Outbound = Tools$Outbound;
2891
+ }
2892
+
2893
+ export function toolsToJSON(tools: Tools): string {
2894
+ return JSON.stringify(Tools$outboundSchema.parse(tools));
2895
+ }
2896
+
2897
+ export function toolsFromJSON(
2898
+ jsonString: string,
2899
+ ): SafeParseResult<Tools, SDKValidationError> {
2900
+ return safeParse(
2901
+ jsonString,
2902
+ (x) => Tools$inboundSchema.parse(JSON.parse(x)),
2903
+ `Failed to parse 'Tools' from JSON`,
2904
+ );
2905
+ }
2906
+
2907
+ /** @internal */
2908
+ export const ToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
2909
+ typeof ToolApprovalRequired
2910
+ > = z.nativeEnum(ToolApprovalRequired);
2911
+
2912
+ /** @internal */
2913
+ export const ToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
2914
+ typeof ToolApprovalRequired
2915
+ > = ToolApprovalRequired$inboundSchema;
2916
+
2917
+ /**
2918
+ * @internal
2919
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2920
+ */
2921
+ export namespace ToolApprovalRequired$ {
2922
+ /** @deprecated use `ToolApprovalRequired$inboundSchema` instead. */
2923
+ export const inboundSchema = ToolApprovalRequired$inboundSchema;
2924
+ /** @deprecated use `ToolApprovalRequired$outboundSchema` instead. */
2925
+ export const outboundSchema = ToolApprovalRequired$outboundSchema;
2926
+ }
2927
+
2928
+ /** @internal */
2929
+ export const Settings$inboundSchema: z.ZodType<
2930
+ Settings,
2931
+ z.ZodTypeDef,
2932
+ unknown
2933
+ > = z.object({
2934
+ tools: z.array(
2935
+ z.union([
2936
+ z.lazy(() => Eleven$inboundSchema),
2937
+ z.lazy(() => Twelve$inboundSchema),
2938
+ z.lazy(() => Tools1$inboundSchema),
2939
+ z.lazy(() => Tools2$inboundSchema),
2940
+ z.lazy(() => Tools3$inboundSchema),
2941
+ z.lazy(() => Tools4$inboundSchema),
2942
+ z.lazy(() => Tools5$inboundSchema),
2943
+ z.lazy(() => Six$inboundSchema),
2944
+ z.lazy(() => Seven$inboundSchema),
2945
+ z.lazy(() => Eight$inboundSchema),
2946
+ z.lazy(() => Nine$inboundSchema),
2947
+ z.lazy(() => Ten$inboundSchema),
2948
+ ]),
2949
+ ),
2950
+ tool_approval_required: ToolApprovalRequired$inboundSchema.default("none"),
2951
+ max_iterations: z.number().default(15),
2952
+ max_execution_time: z.number().default(120),
2953
+ }).transform((v) => {
2954
+ return remap$(v, {
2955
+ "tool_approval_required": "toolApprovalRequired",
2956
+ "max_iterations": "maxIterations",
2957
+ "max_execution_time": "maxExecutionTime",
2958
+ });
2959
+ });
2960
+
2961
+ /** @internal */
2962
+ export type Settings$Outbound = {
2963
+ tools: Array<
2964
+ | Eleven$Outbound
2965
+ | Twelve$Outbound
2966
+ | Tools1$Outbound
2967
+ | Tools2$Outbound
2968
+ | Tools3$Outbound
2969
+ | Tools4$Outbound
2970
+ | Tools5$Outbound
2971
+ | Six$Outbound
2972
+ | Seven$Outbound
2973
+ | Eight$Outbound
2974
+ | Nine$Outbound
2975
+ | Ten$Outbound
2976
+ >;
2977
+ tool_approval_required: string;
2978
+ max_iterations: number;
2979
+ max_execution_time: number;
2980
+ };
2981
+
2982
+ /** @internal */
2983
+ export const Settings$outboundSchema: z.ZodType<
2984
+ Settings$Outbound,
2985
+ z.ZodTypeDef,
2986
+ Settings
2987
+ > = z.object({
2988
+ tools: z.array(
2989
+ z.union([
2990
+ z.lazy(() => Eleven$outboundSchema),
2991
+ z.lazy(() => Twelve$outboundSchema),
2992
+ z.lazy(() => Tools1$outboundSchema),
2993
+ z.lazy(() => Tools2$outboundSchema),
2994
+ z.lazy(() => Tools3$outboundSchema),
2995
+ z.lazy(() => Tools4$outboundSchema),
2996
+ z.lazy(() => Tools5$outboundSchema),
2997
+ z.lazy(() => Six$outboundSchema),
2998
+ z.lazy(() => Seven$outboundSchema),
2999
+ z.lazy(() => Eight$outboundSchema),
3000
+ z.lazy(() => Nine$outboundSchema),
3001
+ z.lazy(() => Ten$outboundSchema),
3002
+ ]),
3003
+ ),
3004
+ toolApprovalRequired: ToolApprovalRequired$outboundSchema.default("none"),
3005
+ maxIterations: z.number().default(15),
3006
+ maxExecutionTime: z.number().default(120),
3007
+ }).transform((v) => {
3008
+ return remap$(v, {
3009
+ toolApprovalRequired: "tool_approval_required",
3010
+ maxIterations: "max_iterations",
3011
+ maxExecutionTime: "max_execution_time",
3012
+ });
3013
+ });
3014
+
3015
+ /**
3016
+ * @internal
3017
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3018
+ */
3019
+ export namespace Settings$ {
3020
+ /** @deprecated use `Settings$inboundSchema` instead. */
3021
+ export const inboundSchema = Settings$inboundSchema;
3022
+ /** @deprecated use `Settings$outboundSchema` instead. */
3023
+ export const outboundSchema = Settings$outboundSchema;
3024
+ /** @deprecated use `Settings$Outbound` instead. */
3025
+ export type Outbound = Settings$Outbound;
3026
+ }
3027
+
3028
+ export function settingsToJSON(settings: Settings): string {
3029
+ return JSON.stringify(Settings$outboundSchema.parse(settings));
3030
+ }
3031
+
3032
+ export function settingsFromJSON(
3033
+ jsonString: string,
3034
+ ): SafeParseResult<Settings, SDKValidationError> {
3035
+ return safeParse(
3036
+ jsonString,
3037
+ (x) => Settings$inboundSchema.parse(JSON.parse(x)),
3038
+ `Failed to parse 'Settings' from JSON`,
3039
+ );
3040
+ }
3041
+
3042
+ /** @internal */
3043
+ export const RunAgentRequestBody$inboundSchema: z.ZodType<
3044
+ RunAgentRequestBody,
3045
+ z.ZodTypeDef,
3046
+ unknown
3047
+ > = z.object({
3048
+ key: z.string(),
3049
+ taskId: z.string().optional(),
3050
+ model: z.string(),
3051
+ fallback_models: z.array(z.string()).optional(),
3052
+ role: z.string(),
3053
+ instructions: z.string(),
3054
+ message: z.lazy(() => Message$inboundSchema),
3055
+ variables: z.record(z.any()).optional(),
3056
+ contextId: z.string().optional(),
3057
+ external_id: z.string().optional(),
3058
+ path: z.string(),
3059
+ description: z.string().optional(),
3060
+ iconUrl: z.string().optional(),
3061
+ system_prompt: z.string().optional(),
3062
+ memory_stores: z.array(z.string()).optional(),
3063
+ knowledge_bases: z.array(z.string()).optional(),
3064
+ team_of_agents: z.array(z.lazy(() => TeamOfAgents$inboundSchema)).optional(),
3065
+ settings: z.lazy(() => Settings$inboundSchema),
3066
+ }).transform((v) => {
3067
+ return remap$(v, {
3068
+ "fallback_models": "fallbackModels",
3069
+ "external_id": "externalId",
3070
+ "system_prompt": "systemPrompt",
3071
+ "memory_stores": "memoryStores",
3072
+ "knowledge_bases": "knowledgeBases",
3073
+ "team_of_agents": "teamOfAgents",
3074
+ });
3075
+ });
3076
+
3077
+ /** @internal */
3078
+ export type RunAgentRequestBody$Outbound = {
3079
+ key: string;
3080
+ taskId?: string | undefined;
3081
+ model: string;
3082
+ fallback_models?: Array<string> | undefined;
3083
+ role: string;
3084
+ instructions: string;
3085
+ message: Message$Outbound;
3086
+ variables?: { [k: string]: any } | undefined;
3087
+ contextId?: string | undefined;
3088
+ external_id?: string | undefined;
3089
+ path: string;
3090
+ description?: string | undefined;
3091
+ iconUrl?: string | undefined;
3092
+ system_prompt?: string | undefined;
3093
+ memory_stores?: Array<string> | undefined;
3094
+ knowledge_bases?: Array<string> | undefined;
3095
+ team_of_agents?: Array<TeamOfAgents$Outbound> | undefined;
3096
+ settings: Settings$Outbound;
3097
+ };
3098
+
3099
+ /** @internal */
3100
+ export const RunAgentRequestBody$outboundSchema: z.ZodType<
3101
+ RunAgentRequestBody$Outbound,
3102
+ z.ZodTypeDef,
3103
+ RunAgentRequestBody
3104
+ > = z.object({
3105
+ key: z.string(),
3106
+ taskId: z.string().optional(),
3107
+ model: z.string(),
3108
+ fallbackModels: z.array(z.string()).optional(),
3109
+ role: z.string(),
3110
+ instructions: z.string(),
3111
+ message: z.lazy(() => Message$outboundSchema),
3112
+ variables: z.record(z.any()).optional(),
3113
+ contextId: z.string().optional(),
3114
+ externalId: z.string().optional(),
3115
+ path: z.string(),
3116
+ description: z.string().optional(),
3117
+ iconUrl: z.string().optional(),
3118
+ systemPrompt: z.string().optional(),
3119
+ memoryStores: z.array(z.string()).optional(),
3120
+ knowledgeBases: z.array(z.string()).optional(),
3121
+ teamOfAgents: z.array(z.lazy(() => TeamOfAgents$outboundSchema)).optional(),
3122
+ settings: z.lazy(() => Settings$outboundSchema),
3123
+ }).transform((v) => {
3124
+ return remap$(v, {
3125
+ fallbackModels: "fallback_models",
3126
+ externalId: "external_id",
3127
+ systemPrompt: "system_prompt",
3128
+ memoryStores: "memory_stores",
3129
+ knowledgeBases: "knowledge_bases",
3130
+ teamOfAgents: "team_of_agents",
3131
+ });
3132
+ });
3133
+
3134
+ /**
3135
+ * @internal
3136
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3137
+ */
3138
+ export namespace RunAgentRequestBody$ {
3139
+ /** @deprecated use `RunAgentRequestBody$inboundSchema` instead. */
3140
+ export const inboundSchema = RunAgentRequestBody$inboundSchema;
3141
+ /** @deprecated use `RunAgentRequestBody$outboundSchema` instead. */
3142
+ export const outboundSchema = RunAgentRequestBody$outboundSchema;
3143
+ /** @deprecated use `RunAgentRequestBody$Outbound` instead. */
3144
+ export type Outbound = RunAgentRequestBody$Outbound;
3145
+ }
3146
+
3147
+ export function runAgentRequestBodyToJSON(
3148
+ runAgentRequestBody: RunAgentRequestBody,
3149
+ ): string {
3150
+ return JSON.stringify(
3151
+ RunAgentRequestBody$outboundSchema.parse(runAgentRequestBody),
3152
+ );
3153
+ }
3154
+
3155
+ export function runAgentRequestBodyFromJSON(
3156
+ jsonString: string,
3157
+ ): SafeParseResult<RunAgentRequestBody, SDKValidationError> {
3158
+ return safeParse(
3159
+ jsonString,
3160
+ (x) => RunAgentRequestBody$inboundSchema.parse(JSON.parse(x)),
3161
+ `Failed to parse 'RunAgentRequestBody' from JSON`,
3162
+ );
3163
+ }
3164
+
3165
+ /** @internal */
3166
+ export const RunAgentKind$inboundSchema: z.ZodNativeEnum<typeof RunAgentKind> =
3167
+ z.nativeEnum(RunAgentKind);
3168
+
3169
+ /** @internal */
3170
+ export const RunAgentKind$outboundSchema: z.ZodNativeEnum<typeof RunAgentKind> =
3171
+ RunAgentKind$inboundSchema;
3172
+
3173
+ /**
3174
+ * @internal
3175
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3176
+ */
3177
+ export namespace RunAgentKind$ {
3178
+ /** @deprecated use `RunAgentKind$inboundSchema` instead. */
3179
+ export const inboundSchema = RunAgentKind$inboundSchema;
3180
+ /** @deprecated use `RunAgentKind$outboundSchema` instead. */
3181
+ export const outboundSchema = RunAgentKind$outboundSchema;
3182
+ }
3183
+
3184
+ /** @internal */
3185
+ export const RunAgentState$inboundSchema: z.ZodNativeEnum<
3186
+ typeof RunAgentState
3187
+ > = z.nativeEnum(RunAgentState);
3188
+
3189
+ /** @internal */
3190
+ export const RunAgentState$outboundSchema: z.ZodNativeEnum<
3191
+ typeof RunAgentState
3192
+ > = RunAgentState$inboundSchema;
3193
+
3194
+ /**
3195
+ * @internal
3196
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3197
+ */
3198
+ export namespace RunAgentState$ {
3199
+ /** @deprecated use `RunAgentState$inboundSchema` instead. */
3200
+ export const inboundSchema = RunAgentState$inboundSchema;
3201
+ /** @deprecated use `RunAgentState$outboundSchema` instead. */
3202
+ export const outboundSchema = RunAgentState$outboundSchema;
3203
+ }
3204
+
3205
+ /** @internal */
3206
+ export const RunAgentAgentsKind$inboundSchema: z.ZodNativeEnum<
3207
+ typeof RunAgentAgentsKind
3208
+ > = z.nativeEnum(RunAgentAgentsKind);
3209
+
3210
+ /** @internal */
3211
+ export const RunAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
3212
+ typeof RunAgentAgentsKind
3213
+ > = RunAgentAgentsKind$inboundSchema;
3214
+
3215
+ /**
3216
+ * @internal
3217
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3218
+ */
3219
+ export namespace RunAgentAgentsKind$ {
3220
+ /** @deprecated use `RunAgentAgentsKind$inboundSchema` instead. */
3221
+ export const inboundSchema = RunAgentAgentsKind$inboundSchema;
3222
+ /** @deprecated use `RunAgentAgentsKind$outboundSchema` instead. */
3223
+ export const outboundSchema = RunAgentAgentsKind$outboundSchema;
3224
+ }
3225
+
3226
+ /** @internal */
3227
+ export const RunAgentAgentsRole$inboundSchema: z.ZodNativeEnum<
3228
+ typeof RunAgentAgentsRole
3229
+ > = z.nativeEnum(RunAgentAgentsRole);
3230
+
3231
+ /** @internal */
3232
+ export const RunAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
3233
+ typeof RunAgentAgentsRole
3234
+ > = RunAgentAgentsRole$inboundSchema;
3235
+
3236
+ /**
3237
+ * @internal
3238
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3239
+ */
3240
+ export namespace RunAgentAgentsRole$ {
3241
+ /** @deprecated use `RunAgentAgentsRole$inboundSchema` instead. */
3242
+ export const inboundSchema = RunAgentAgentsRole$inboundSchema;
3243
+ /** @deprecated use `RunAgentAgentsRole$outboundSchema` instead. */
3244
+ export const outboundSchema = RunAgentAgentsRole$outboundSchema;
3245
+ }
3246
+
3247
+ /** @internal */
3248
+ export const RunAgentMessage$inboundSchema: z.ZodType<
3249
+ RunAgentMessage,
3250
+ z.ZodTypeDef,
3251
+ unknown
3252
+ > = z.object({
3253
+ kind: RunAgentAgentsKind$inboundSchema,
3254
+ messageId: z.string(),
3255
+ role: RunAgentAgentsRole$inboundSchema,
3256
+ parts: z.array(z.any()),
3257
+ });
3258
+
3259
+ /** @internal */
3260
+ export type RunAgentMessage$Outbound = {
3261
+ kind: string;
3262
+ messageId: string;
3263
+ role: string;
3264
+ parts: Array<any>;
3265
+ };
3266
+
3267
+ /** @internal */
3268
+ export const RunAgentMessage$outboundSchema: z.ZodType<
3269
+ RunAgentMessage$Outbound,
3270
+ z.ZodTypeDef,
3271
+ RunAgentMessage
3272
+ > = z.object({
3273
+ kind: RunAgentAgentsKind$outboundSchema,
3274
+ messageId: z.string(),
3275
+ role: RunAgentAgentsRole$outboundSchema,
3276
+ parts: z.array(z.any()),
3277
+ });
3278
+
3279
+ /**
3280
+ * @internal
3281
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3282
+ */
3283
+ export namespace RunAgentMessage$ {
3284
+ /** @deprecated use `RunAgentMessage$inboundSchema` instead. */
3285
+ export const inboundSchema = RunAgentMessage$inboundSchema;
3286
+ /** @deprecated use `RunAgentMessage$outboundSchema` instead. */
3287
+ export const outboundSchema = RunAgentMessage$outboundSchema;
3288
+ /** @deprecated use `RunAgentMessage$Outbound` instead. */
3289
+ export type Outbound = RunAgentMessage$Outbound;
3290
+ }
3291
+
3292
+ export function runAgentMessageToJSON(
3293
+ runAgentMessage: RunAgentMessage,
3294
+ ): string {
3295
+ return JSON.stringify(RunAgentMessage$outboundSchema.parse(runAgentMessage));
3296
+ }
3297
+
3298
+ export function runAgentMessageFromJSON(
3299
+ jsonString: string,
3300
+ ): SafeParseResult<RunAgentMessage, SDKValidationError> {
3301
+ return safeParse(
3302
+ jsonString,
3303
+ (x) => RunAgentMessage$inboundSchema.parse(JSON.parse(x)),
3304
+ `Failed to parse 'RunAgentMessage' from JSON`,
3305
+ );
3306
+ }
3307
+
3308
+ /** @internal */
3309
+ export const RunAgentStatus$inboundSchema: z.ZodType<
3310
+ RunAgentStatus,
3311
+ z.ZodTypeDef,
3312
+ unknown
3313
+ > = z.object({
3314
+ state: RunAgentState$inboundSchema,
3315
+ timestamp: z.string().optional(),
3316
+ message: z.lazy(() => RunAgentMessage$inboundSchema).optional(),
3317
+ });
3318
+
3319
+ /** @internal */
3320
+ export type RunAgentStatus$Outbound = {
3321
+ state: string;
3322
+ timestamp?: string | undefined;
3323
+ message?: RunAgentMessage$Outbound | undefined;
3324
+ };
3325
+
3326
+ /** @internal */
3327
+ export const RunAgentStatus$outboundSchema: z.ZodType<
3328
+ RunAgentStatus$Outbound,
3329
+ z.ZodTypeDef,
3330
+ RunAgentStatus
3331
+ > = z.object({
3332
+ state: RunAgentState$outboundSchema,
3333
+ timestamp: z.string().optional(),
3334
+ message: z.lazy(() => RunAgentMessage$outboundSchema).optional(),
3335
+ });
3336
+
3337
+ /**
3338
+ * @internal
3339
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3340
+ */
3341
+ export namespace RunAgentStatus$ {
3342
+ /** @deprecated use `RunAgentStatus$inboundSchema` instead. */
3343
+ export const inboundSchema = RunAgentStatus$inboundSchema;
3344
+ /** @deprecated use `RunAgentStatus$outboundSchema` instead. */
3345
+ export const outboundSchema = RunAgentStatus$outboundSchema;
3346
+ /** @deprecated use `RunAgentStatus$Outbound` instead. */
3347
+ export type Outbound = RunAgentStatus$Outbound;
3348
+ }
3349
+
3350
+ export function runAgentStatusToJSON(runAgentStatus: RunAgentStatus): string {
3351
+ return JSON.stringify(RunAgentStatus$outboundSchema.parse(runAgentStatus));
3352
+ }
3353
+
3354
+ export function runAgentStatusFromJSON(
3355
+ jsonString: string,
3356
+ ): SafeParseResult<RunAgentStatus, SDKValidationError> {
3357
+ return safeParse(
3358
+ jsonString,
3359
+ (x) => RunAgentStatus$inboundSchema.parse(JSON.parse(x)),
3360
+ `Failed to parse 'RunAgentStatus' from JSON`,
3361
+ );
3362
+ }
3363
+
3364
+ /** @internal */
3365
+ export const RunAgentResponseBody$inboundSchema: z.ZodType<
3366
+ RunAgentResponseBody,
3367
+ z.ZodTypeDef,
3368
+ unknown
3369
+ > = z.object({
3370
+ id: z.string(),
3371
+ contextId: z.string(),
3372
+ kind: RunAgentKind$inboundSchema,
3373
+ status: z.lazy(() => RunAgentStatus$inboundSchema),
3374
+ metadata: z.record(z.any()).optional(),
3375
+ });
3376
+
3377
+ /** @internal */
3378
+ export type RunAgentResponseBody$Outbound = {
3379
+ id: string;
3380
+ contextId: string;
3381
+ kind: string;
3382
+ status: RunAgentStatus$Outbound;
3383
+ metadata?: { [k: string]: any } | undefined;
3384
+ };
3385
+
3386
+ /** @internal */
3387
+ export const RunAgentResponseBody$outboundSchema: z.ZodType<
3388
+ RunAgentResponseBody$Outbound,
3389
+ z.ZodTypeDef,
3390
+ RunAgentResponseBody
3391
+ > = z.object({
3392
+ id: z.string(),
3393
+ contextId: z.string(),
3394
+ kind: RunAgentKind$outboundSchema,
3395
+ status: z.lazy(() => RunAgentStatus$outboundSchema),
3396
+ metadata: z.record(z.any()).optional(),
3397
+ });
3398
+
3399
+ /**
3400
+ * @internal
3401
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3402
+ */
3403
+ export namespace RunAgentResponseBody$ {
3404
+ /** @deprecated use `RunAgentResponseBody$inboundSchema` instead. */
3405
+ export const inboundSchema = RunAgentResponseBody$inboundSchema;
3406
+ /** @deprecated use `RunAgentResponseBody$outboundSchema` instead. */
3407
+ export const outboundSchema = RunAgentResponseBody$outboundSchema;
3408
+ /** @deprecated use `RunAgentResponseBody$Outbound` instead. */
3409
+ export type Outbound = RunAgentResponseBody$Outbound;
3410
+ }
3411
+
3412
+ export function runAgentResponseBodyToJSON(
3413
+ runAgentResponseBody: RunAgentResponseBody,
3414
+ ): string {
3415
+ return JSON.stringify(
3416
+ RunAgentResponseBody$outboundSchema.parse(runAgentResponseBody),
3417
+ );
3418
+ }
3419
+
3420
+ export function runAgentResponseBodyFromJSON(
3421
+ jsonString: string,
3422
+ ): SafeParseResult<RunAgentResponseBody, SDKValidationError> {
3423
+ return safeParse(
3424
+ jsonString,
3425
+ (x) => RunAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
3426
+ `Failed to parse 'RunAgentResponseBody' from JSON`,
3427
+ );
3428
+ }