@orq-ai/node 3.13.9 → 3.13.11

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 (292) hide show
  1. package/README.md +107 -93
  2. package/bin/mcp-server.js +43652 -40649
  3. package/bin/mcp-server.js.map +117 -98
  4. package/docs/sdks/agents/README.md +566 -0
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/agentsCreate.d.ts +18 -0
  7. package/funcs/agentsCreate.d.ts.map +1 -0
  8. package/funcs/agentsCreate.js +120 -0
  9. package/funcs/agentsCreate.js.map +1 -0
  10. package/funcs/agentsDelete.d.ts +18 -0
  11. package/funcs/agentsDelete.d.ts.map +1 -0
  12. package/funcs/agentsDelete.js +124 -0
  13. package/funcs/agentsDelete.js.map +1 -0
  14. package/funcs/agentsInvoke.d.ts +17 -0
  15. package/funcs/agentsInvoke.d.ts.map +1 -0
  16. package/funcs/agentsInvoke.js +120 -0
  17. package/funcs/agentsInvoke.js.map +1 -0
  18. package/funcs/agentsStream.d.ts +19 -0
  19. package/funcs/agentsStream.d.ts.map +1 -0
  20. package/funcs/agentsStream.js +134 -0
  21. package/funcs/agentsStream.js.map +1 -0
  22. package/funcs/agentsUpdate.d.ts +18 -0
  23. package/funcs/agentsUpdate.d.ts.map +1 -0
  24. package/funcs/agentsUpdate.js +124 -0
  25. package/funcs/agentsUpdate.js.map +1 -0
  26. package/jsr.json +1 -1
  27. package/lib/config.d.ts +2 -2
  28. package/lib/config.js +2 -2
  29. package/lib/config.js.map +1 -1
  30. package/mcp-server/mcp-server.js +1 -1
  31. package/mcp-server/mcp-server.js.map +1 -1
  32. package/mcp-server/server.d.ts.map +1 -1
  33. package/mcp-server/server.js +11 -1
  34. package/mcp-server/server.js.map +1 -1
  35. package/mcp-server/tools/agentsCreate.d.ts +8 -0
  36. package/mcp-server/tools/agentsCreate.d.ts.map +1 -0
  37. package/mcp-server/tools/agentsCreate.js +64 -0
  38. package/mcp-server/tools/agentsCreate.js.map +1 -0
  39. package/mcp-server/tools/agentsDelete.d.ts +8 -0
  40. package/mcp-server/tools/agentsDelete.d.ts.map +1 -0
  41. package/mcp-server/tools/agentsDelete.js +63 -0
  42. package/mcp-server/tools/agentsDelete.js.map +1 -0
  43. package/mcp-server/tools/agentsInvoke.d.ts +8 -0
  44. package/mcp-server/tools/agentsInvoke.d.ts.map +1 -0
  45. package/mcp-server/tools/agentsInvoke.js +64 -0
  46. package/mcp-server/tools/agentsInvoke.js.map +1 -0
  47. package/mcp-server/tools/agentsStream.d.ts +8 -0
  48. package/mcp-server/tools/agentsStream.d.ts.map +1 -0
  49. package/mcp-server/tools/agentsStream.js +64 -0
  50. package/mcp-server/tools/agentsStream.js.map +1 -0
  51. package/mcp-server/tools/agentsUpdate.d.ts +8 -0
  52. package/mcp-server/tools/agentsUpdate.d.ts.map +1 -0
  53. package/mcp-server/tools/agentsUpdate.js +64 -0
  54. package/mcp-server/tools/agentsUpdate.js.map +1 -0
  55. package/models/errors/createagent.d.ts +41 -0
  56. package/models/errors/createagent.d.ts.map +1 -0
  57. package/models/errors/createagent.js +85 -0
  58. package/models/errors/createagent.js.map +1 -0
  59. package/models/errors/deleteagent.d.ts +41 -0
  60. package/models/errors/deleteagent.d.ts.map +1 -0
  61. package/models/errors/deleteagent.js +85 -0
  62. package/models/errors/deleteagent.js.map +1 -0
  63. package/models/errors/index.d.ts +4 -0
  64. package/models/errors/index.d.ts.map +1 -1
  65. package/models/errors/index.js +4 -0
  66. package/models/errors/index.js.map +1 -1
  67. package/models/errors/streamagent.d.ts +41 -0
  68. package/models/errors/streamagent.d.ts.map +1 -0
  69. package/models/errors/streamagent.js +85 -0
  70. package/models/errors/streamagent.js.map +1 -0
  71. package/models/errors/updateagent.d.ts +41 -0
  72. package/models/errors/updateagent.d.ts.map +1 -0
  73. package/models/errors/updateagent.js +85 -0
  74. package/models/errors/updateagent.js.map +1 -0
  75. package/models/operations/createagent.d.ts +1504 -0
  76. package/models/operations/createagent.d.ts.map +1 -0
  77. package/models/operations/createagent.js +1530 -0
  78. package/models/operations/createagent.js.map +1 -0
  79. package/models/operations/createbudget.js +2 -2
  80. package/models/operations/createcontact.js +2 -2
  81. package/models/operations/createdataset.js +2 -2
  82. package/models/operations/createdatasetitem.js +2 -2
  83. package/models/operations/createdatasource.js +2 -2
  84. package/models/operations/createeval.js +28 -28
  85. package/models/operations/createtool.d.ts +20 -20
  86. package/models/operations/createtool.d.ts.map +1 -1
  87. package/models/operations/createtool.js +34 -34
  88. package/models/operations/createtool.js.map +1 -1
  89. package/models/operations/deleteagent.d.ts +32 -0
  90. package/models/operations/deleteagent.d.ts.map +1 -0
  91. package/models/operations/deleteagent.js +78 -0
  92. package/models/operations/deleteagent.js.map +1 -0
  93. package/models/operations/duplicatetool.d.ts +10 -10
  94. package/models/operations/duplicatetool.d.ts.map +1 -1
  95. package/models/operations/duplicatetool.js +20 -20
  96. package/models/operations/duplicatetool.js.map +1 -1
  97. package/models/operations/fileget.js +2 -2
  98. package/models/operations/filelist.js +2 -2
  99. package/models/operations/fileupload.js +2 -2
  100. package/models/operations/getagent.d.ts +44 -175
  101. package/models/operations/getagent.d.ts.map +1 -1
  102. package/models/operations/getagent.js +51 -184
  103. package/models/operations/getagent.js.map +1 -1
  104. package/models/operations/getalltools.d.ts +10 -10
  105. package/models/operations/getalltools.d.ts.map +1 -1
  106. package/models/operations/getalltools.js +20 -20
  107. package/models/operations/getalltools.js.map +1 -1
  108. package/models/operations/getbudget.js +2 -2
  109. package/models/operations/getevals.js +28 -28
  110. package/models/operations/index.d.ts +5 -0
  111. package/models/operations/index.d.ts.map +1 -1
  112. package/models/operations/index.js +5 -0
  113. package/models/operations/index.js.map +1 -1
  114. package/models/operations/invokeagent.d.ts +912 -0
  115. package/models/operations/invokeagent.d.ts.map +1 -0
  116. package/models/operations/invokeagent.js +824 -0
  117. package/models/operations/invokeagent.js.map +1 -0
  118. package/models/operations/listagents.d.ts +6 -137
  119. package/models/operations/listagents.d.ts.map +1 -1
  120. package/models/operations/listagents.js +3 -139
  121. package/models/operations/listagents.js.map +1 -1
  122. package/models/operations/listagenttasks.d.ts +5 -0
  123. package/models/operations/listagenttasks.d.ts.map +1 -1
  124. package/models/operations/listagenttasks.js +2 -0
  125. package/models/operations/listagenttasks.js.map +1 -1
  126. package/models/operations/listbudgets.js +2 -2
  127. package/models/operations/listcontacts.js +2 -2
  128. package/models/operations/listdatasetdatapoints.js +2 -2
  129. package/models/operations/listdatasets.js +2 -2
  130. package/models/operations/listdatasources.js +2 -2
  131. package/models/operations/retrievecontact.js +2 -2
  132. package/models/operations/retrievedatapoint.js +2 -2
  133. package/models/operations/retrievedataset.js +2 -2
  134. package/models/operations/retrievedatasource.js +2 -2
  135. package/models/operations/retrievetool.d.ts +10 -10
  136. package/models/operations/retrievetool.d.ts.map +1 -1
  137. package/models/operations/retrievetool.js +20 -20
  138. package/models/operations/retrievetool.js.map +1 -1
  139. package/models/operations/runagent.d.ts +640 -721
  140. package/models/operations/runagent.d.ts.map +1 -1
  141. package/models/operations/runagent.js +817 -928
  142. package/models/operations/runagent.js.map +1 -1
  143. package/models/operations/streamagent.d.ts +676 -0
  144. package/models/operations/streamagent.d.ts.map +1 -0
  145. package/models/operations/streamagent.js +670 -0
  146. package/models/operations/streamagent.js.map +1 -0
  147. package/models/operations/streamrunagent.d.ts +567 -648
  148. package/models/operations/streamrunagent.d.ts.map +1 -1
  149. package/models/operations/streamrunagent.js +721 -835
  150. package/models/operations/streamrunagent.js.map +1 -1
  151. package/models/operations/updateagent.d.ts +1515 -0
  152. package/models/operations/updateagent.d.ts.map +1 -0
  153. package/models/operations/updateagent.js +1576 -0
  154. package/models/operations/updateagent.js.map +1 -0
  155. package/models/operations/updatebudget.js +2 -2
  156. package/models/operations/updatecontact.js +2 -2
  157. package/models/operations/updatedatapoint.js +2 -2
  158. package/models/operations/updatedataset.js +2 -2
  159. package/models/operations/updatedatasource.js +2 -2
  160. package/models/operations/updateeval.js +28 -28
  161. package/models/operations/updatetool.d.ts +18 -18
  162. package/models/operations/updatetool.d.ts.map +1 -1
  163. package/models/operations/updatetool.js +36 -36
  164. package/models/operations/updatetool.js.map +1 -1
  165. package/package.json +1 -1
  166. package/packages/orq-rc/README.md +103 -94
  167. package/packages/orq-rc/docs/sdks/agents/README.md +297 -0
  168. package/packages/orq-rc/examples/package-lock.json +1 -1
  169. package/packages/orq-rc/jsr.json +1 -1
  170. package/packages/orq-rc/package-lock.json +2 -2
  171. package/packages/orq-rc/package.json +1 -1
  172. package/packages/orq-rc/src/funcs/agentsCreate.ts +172 -0
  173. package/packages/orq-rc/src/funcs/agentsDelete.ts +176 -0
  174. package/packages/orq-rc/src/funcs/agentsUpdate.ts +176 -0
  175. package/packages/orq-rc/src/lib/config.ts +2 -2
  176. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  177. package/packages/orq-rc/src/mcp-server/server.ts +7 -1
  178. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +37 -0
  179. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +35 -0
  180. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +37 -0
  181. package/packages/orq-rc/src/models/errors/createagent.ts +80 -0
  182. package/packages/orq-rc/src/models/errors/deleteagent.ts +80 -0
  183. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  184. package/packages/orq-rc/src/models/errors/updateagent.ts +80 -0
  185. package/packages/orq-rc/src/models/operations/createagent.ts +3027 -0
  186. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  187. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  188. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  189. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  190. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  191. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  192. package/packages/orq-rc/src/models/operations/createtool.ts +50 -50
  193. package/packages/orq-rc/src/models/operations/deleteagent.ts +78 -0
  194. package/packages/orq-rc/src/models/operations/duplicatetool.ts +30 -30
  195. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  196. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  197. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  198. package/packages/orq-rc/src/models/operations/getagent.ts +87 -387
  199. package/packages/orq-rc/src/models/operations/getalltools.ts +33 -33
  200. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  201. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  202. package/packages/orq-rc/src/models/operations/index.ts +3 -0
  203. package/packages/orq-rc/src/models/operations/invokeagent.ts +12 -4
  204. package/packages/orq-rc/src/models/operations/listagents.ts +8 -321
  205. package/packages/orq-rc/src/models/operations/listagenttasks.ts +7 -0
  206. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  207. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  208. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  209. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  210. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  211. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  212. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  213. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  214. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  215. package/packages/orq-rc/src/models/operations/retrievetool.ts +30 -30
  216. package/packages/orq-rc/src/models/operations/runagent.ts +1003 -1113
  217. package/packages/orq-rc/src/models/operations/streamagent.ts +4 -2
  218. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1276 -1427
  219. package/packages/orq-rc/src/models/operations/updateagent.ts +3239 -0
  220. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  221. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  222. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  223. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  224. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  225. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  226. package/packages/orq-rc/src/models/operations/updatetool.ts +56 -56
  227. package/packages/orq-rc/src/sdk/agents.ts +54 -0
  228. package/sdk/agents.d.ts +35 -0
  229. package/sdk/agents.d.ts.map +1 -1
  230. package/sdk/agents.js +50 -0
  231. package/sdk/agents.js.map +1 -1
  232. package/src/funcs/agentsCreate.ts +172 -0
  233. package/src/funcs/agentsDelete.ts +176 -0
  234. package/src/funcs/agentsInvoke.ts +167 -0
  235. package/src/funcs/agentsStream.ts +191 -0
  236. package/src/funcs/agentsUpdate.ts +176 -0
  237. package/src/lib/config.ts +2 -2
  238. package/src/mcp-server/mcp-server.ts +1 -1
  239. package/src/mcp-server/server.ts +11 -1
  240. package/src/mcp-server/tools/agentsCreate.ts +37 -0
  241. package/src/mcp-server/tools/agentsDelete.ts +35 -0
  242. package/src/mcp-server/tools/agentsInvoke.ts +37 -0
  243. package/src/mcp-server/tools/agentsStream.ts +37 -0
  244. package/src/mcp-server/tools/agentsUpdate.ts +37 -0
  245. package/src/models/errors/createagent.ts +80 -0
  246. package/src/models/errors/deleteagent.ts +80 -0
  247. package/src/models/errors/index.ts +4 -0
  248. package/src/models/errors/streamagent.ts +80 -0
  249. package/src/models/errors/updateagent.ts +80 -0
  250. package/src/models/operations/createagent.ts +3021 -0
  251. package/src/models/operations/createbudget.ts +2 -2
  252. package/src/models/operations/createcontact.ts +2 -2
  253. package/src/models/operations/createdataset.ts +2 -2
  254. package/src/models/operations/createdatasetitem.ts +2 -2
  255. package/src/models/operations/createdatasource.ts +2 -2
  256. package/src/models/operations/createeval.ts +28 -28
  257. package/src/models/operations/createtool.ts +54 -54
  258. package/src/models/operations/deleteagent.ts +78 -0
  259. package/src/models/operations/duplicatetool.ts +30 -30
  260. package/src/models/operations/fileget.ts +2 -2
  261. package/src/models/operations/filelist.ts +2 -2
  262. package/src/models/operations/fileupload.ts +2 -2
  263. package/src/models/operations/getagent.ts +87 -387
  264. package/src/models/operations/getalltools.ts +30 -30
  265. package/src/models/operations/getbudget.ts +2 -2
  266. package/src/models/operations/getevals.ts +28 -28
  267. package/src/models/operations/index.ts +5 -0
  268. package/src/models/operations/invokeagent.ts +1569 -0
  269. package/src/models/operations/listagents.ts +8 -321
  270. package/src/models/operations/listagenttasks.ts +7 -0
  271. package/src/models/operations/listbudgets.ts +2 -2
  272. package/src/models/operations/listcontacts.ts +2 -2
  273. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  274. package/src/models/operations/listdatasets.ts +2 -2
  275. package/src/models/operations/listdatasources.ts +2 -2
  276. package/src/models/operations/retrievecontact.ts +2 -2
  277. package/src/models/operations/retrievedatapoint.ts +2 -2
  278. package/src/models/operations/retrievedataset.ts +2 -2
  279. package/src/models/operations/retrievedatasource.ts +2 -2
  280. package/src/models/operations/retrievetool.ts +30 -30
  281. package/src/models/operations/runagent.ts +1441 -1488
  282. package/src/models/operations/streamagent.ts +1367 -0
  283. package/src/models/operations/streamrunagent.ts +1542 -1657
  284. package/src/models/operations/updateagent.ts +3227 -0
  285. package/src/models/operations/updatebudget.ts +2 -2
  286. package/src/models/operations/updatecontact.ts +2 -2
  287. package/src/models/operations/updatedatapoint.ts +2 -2
  288. package/src/models/operations/updatedataset.ts +2 -2
  289. package/src/models/operations/updatedatasource.ts +2 -2
  290. package/src/models/operations/updateeval.ts +28 -28
  291. package/src/models/operations/updatetool.ts +60 -60
  292. package/src/sdk/agents.ts +90 -0
@@ -0,0 +1,3021 @@
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
+ /**
13
+ * 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.
14
+ */
15
+ export const ToolApprovalRequired = {
16
+ All: "all",
17
+ RespectTool: "respect_tool",
18
+ None: "none",
19
+ } as const;
20
+ /**
21
+ * 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.
22
+ */
23
+ export type ToolApprovalRequired = ClosedEnum<typeof ToolApprovalRequired>;
24
+
25
+ /**
26
+ * Function tool type
27
+ */
28
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type =
29
+ {
30
+ Function: "function",
31
+ } as const;
32
+ /**
33
+ * Function tool type
34
+ */
35
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type =
36
+ ClosedEnum<
37
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type
38
+ >;
39
+
40
+ /**
41
+ * Calls custom function tools defined in the agent configuration. Must reference a pre-created function tool by key or id.
42
+ */
43
+ export type FunctionTool = {
44
+ /**
45
+ * Function tool type
46
+ */
47
+ type:
48
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type;
49
+ /**
50
+ * The key of the pre-created function tool
51
+ */
52
+ key?: string | undefined;
53
+ /**
54
+ * The ID of the pre-created function tool
55
+ */
56
+ id?: string | undefined;
57
+ /**
58
+ * Whether this tool requires approval before execution
59
+ */
60
+ requiresApproval?: boolean | undefined;
61
+ };
62
+
63
+ /**
64
+ * Code execution tool type
65
+ */
66
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type =
67
+ {
68
+ Code: "code",
69
+ } as const;
70
+ /**
71
+ * Code execution tool type
72
+ */
73
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type =
74
+ ClosedEnum<
75
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type
76
+ >;
77
+
78
+ /**
79
+ * Executes code snippets in a sandboxed environment. Must reference a pre-created code tool by key or id.
80
+ */
81
+ export type CodeExecutionTool = {
82
+ /**
83
+ * Code execution tool type
84
+ */
85
+ type:
86
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type;
87
+ /**
88
+ * The key of the pre-created code tool
89
+ */
90
+ key?: string | undefined;
91
+ /**
92
+ * The ID of the pre-created code tool
93
+ */
94
+ id?: string | undefined;
95
+ /**
96
+ * Whether this tool requires approval before execution
97
+ */
98
+ requiresApproval?: boolean | undefined;
99
+ };
100
+
101
+ /**
102
+ * HTTP tool type
103
+ */
104
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type =
105
+ {
106
+ Http: "http",
107
+ } as const;
108
+ /**
109
+ * HTTP tool type
110
+ */
111
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type =
112
+ ClosedEnum<
113
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type
114
+ >;
115
+
116
+ /**
117
+ * Executes HTTP requests to interact with external APIs and web services. Must reference a pre-created HTTP tool by key or id.
118
+ */
119
+ export type HTTPTool = {
120
+ /**
121
+ * HTTP tool type
122
+ */
123
+ type:
124
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type;
125
+ /**
126
+ * The key of the pre-created HTTP tool
127
+ */
128
+ key?: string | undefined;
129
+ /**
130
+ * The ID of the pre-created HTTP tool
131
+ */
132
+ id?: string | undefined;
133
+ /**
134
+ * Whether this tool requires approval before execution
135
+ */
136
+ requiresApproval?: boolean | undefined;
137
+ };
138
+
139
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type =
140
+ {
141
+ CurrentDate: "current_date",
142
+ } as const;
143
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type =
144
+ ClosedEnum<
145
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type
146
+ >;
147
+
148
+ /**
149
+ * Returns the current date and time
150
+ */
151
+ export type CurrentDateTool = {
152
+ type:
153
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type;
154
+ /**
155
+ * Whether this tool requires approval before execution
156
+ */
157
+ requiresApproval?: boolean | undefined;
158
+ };
159
+
160
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type =
161
+ {
162
+ QueryKnowledgeBase: "query_knowledge_base",
163
+ } as const;
164
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type =
165
+ ClosedEnum<
166
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type
167
+ >;
168
+
169
+ /**
170
+ * Queries knowledge bases for information
171
+ */
172
+ export type QueryKnowledgeBaseTool = {
173
+ type:
174
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type;
175
+ /**
176
+ * Whether this tool requires approval before execution
177
+ */
178
+ requiresApproval?: boolean | undefined;
179
+ };
180
+
181
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type =
182
+ {
183
+ RetrieveKnowledgeBases: "retrieve_knowledge_bases",
184
+ } as const;
185
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type =
186
+ ClosedEnum<
187
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type
188
+ >;
189
+
190
+ /**
191
+ * Lists available knowledge bases
192
+ */
193
+ export type RetrieveKnowledgeBasesTool = {
194
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type;
195
+ /**
196
+ * Whether this tool requires approval before execution
197
+ */
198
+ requiresApproval?: boolean | undefined;
199
+ };
200
+
201
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type =
202
+ {
203
+ DeleteMemoryDocument: "delete_memory_document",
204
+ } as const;
205
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type =
206
+ ClosedEnum<
207
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type
208
+ >;
209
+
210
+ /**
211
+ * Deletes documents from memory stores
212
+ */
213
+ export type DeleteMemoryDocumentTool = {
214
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type;
215
+ /**
216
+ * Whether this tool requires approval before execution
217
+ */
218
+ requiresApproval?: boolean | undefined;
219
+ };
220
+
221
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType =
222
+ {
223
+ RetrieveMemoryStores: "retrieve_memory_stores",
224
+ } as const;
225
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType =
226
+ ClosedEnum<
227
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType
228
+ >;
229
+
230
+ /**
231
+ * Lists available memory stores
232
+ */
233
+ export type RetrieveMemoryStoresTool = {
234
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType;
235
+ /**
236
+ * Whether this tool requires approval before execution
237
+ */
238
+ requiresApproval?: boolean | undefined;
239
+ };
240
+
241
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType =
242
+ {
243
+ WriteMemoryStore: "write_memory_store",
244
+ } as const;
245
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType =
246
+ ClosedEnum<
247
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType
248
+ >;
249
+
250
+ /**
251
+ * Writes information to agent memory stores
252
+ */
253
+ export type WriteMemoryStoreTool = {
254
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType;
255
+ /**
256
+ * Whether this tool requires approval before execution
257
+ */
258
+ requiresApproval?: boolean | undefined;
259
+ };
260
+
261
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType = {
262
+ QueryMemoryStore: "query_memory_store",
263
+ } as const;
264
+ export type CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType =
265
+ ClosedEnum<typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType>;
266
+
267
+ /**
268
+ * Queries agent memory stores for context
269
+ */
270
+ export type QueryMemoryStoreTool = {
271
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType;
272
+ /**
273
+ * Whether this tool requires approval before execution
274
+ */
275
+ requiresApproval?: boolean | undefined;
276
+ };
277
+
278
+ export const CreateAgentAgentToolInputCRUDAgentsRequestType = {
279
+ RetrieveAgents: "retrieve_agents",
280
+ } as const;
281
+ export type CreateAgentAgentToolInputCRUDAgentsRequestType = ClosedEnum<
282
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestType
283
+ >;
284
+
285
+ /**
286
+ * Retrieves available agents in the system
287
+ */
288
+ export type RetrieveAgentsTool = {
289
+ type: CreateAgentAgentToolInputCRUDAgentsRequestType;
290
+ /**
291
+ * Whether this tool requires approval before execution
292
+ */
293
+ requiresApproval?: boolean | undefined;
294
+ };
295
+
296
+ export const CreateAgentAgentToolInputCRUDAgentsType = {
297
+ CallSubAgent: "call_sub_agent",
298
+ } as const;
299
+ export type CreateAgentAgentToolInputCRUDAgentsType = ClosedEnum<
300
+ typeof CreateAgentAgentToolInputCRUDAgentsType
301
+ >;
302
+
303
+ /**
304
+ * Delegates tasks to specialized sub-agents
305
+ */
306
+ export type CallSubAgentTool = {
307
+ type: CreateAgentAgentToolInputCRUDAgentsType;
308
+ /**
309
+ * Whether this tool requires approval before execution
310
+ */
311
+ requiresApproval?: boolean | undefined;
312
+ };
313
+
314
+ export const CreateAgentAgentToolInputCRUDType = {
315
+ WebScraper: "web_scraper",
316
+ } as const;
317
+ export type CreateAgentAgentToolInputCRUDType = ClosedEnum<
318
+ typeof CreateAgentAgentToolInputCRUDType
319
+ >;
320
+
321
+ /**
322
+ * Scrapes and extracts content from web pages
323
+ */
324
+ export type WebScraperTool = {
325
+ type: CreateAgentAgentToolInputCRUDType;
326
+ /**
327
+ * Whether this tool requires approval before execution
328
+ */
329
+ requiresApproval?: boolean | undefined;
330
+ };
331
+
332
+ export const AgentToolInputCRUDType = {
333
+ GoogleSearch: "google_search",
334
+ } as const;
335
+ export type AgentToolInputCRUDType = ClosedEnum<typeof AgentToolInputCRUDType>;
336
+
337
+ /**
338
+ * Performs Google searches to retrieve web content
339
+ */
340
+ export type GoogleSearchTool = {
341
+ type: AgentToolInputCRUDType;
342
+ /**
343
+ * Whether this tool requires approval before execution
344
+ */
345
+ requiresApproval?: boolean | undefined;
346
+ };
347
+
348
+ /**
349
+ * Tool configuration for agent create/update operations. Built-in tools only require a type, while custom tools must reference pre-created tools by key or id.
350
+ */
351
+ export type AgentToolInputCRUD =
352
+ | GoogleSearchTool
353
+ | WebScraperTool
354
+ | CallSubAgentTool
355
+ | RetrieveAgentsTool
356
+ | QueryMemoryStoreTool
357
+ | WriteMemoryStoreTool
358
+ | RetrieveMemoryStoresTool
359
+ | DeleteMemoryDocumentTool
360
+ | RetrieveKnowledgeBasesTool
361
+ | QueryKnowledgeBaseTool
362
+ | CurrentDateTool
363
+ | HTTPTool
364
+ | CodeExecutionTool
365
+ | FunctionTool;
366
+
367
+ /**
368
+ * Configuration settings for the agent's behavior
369
+ */
370
+ export type Settings = {
371
+ /**
372
+ * Maximum iterations(llm calls) before the agent will stop executing.
373
+ */
374
+ maxIterations?: number | undefined;
375
+ /**
376
+ * Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
377
+ */
378
+ maxExecutionTime?: number | undefined;
379
+ /**
380
+ * 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.
381
+ */
382
+ toolApprovalRequired?: ToolApprovalRequired | undefined;
383
+ /**
384
+ * Tools available to the agent. Built-in tools only need a type, while custom tools (http, code, function) must reference pre-created tools by key or id.
385
+ */
386
+ tools: Array<
387
+ | GoogleSearchTool
388
+ | WebScraperTool
389
+ | CallSubAgentTool
390
+ | RetrieveAgentsTool
391
+ | QueryMemoryStoreTool
392
+ | WriteMemoryStoreTool
393
+ | RetrieveMemoryStoresTool
394
+ | DeleteMemoryDocumentTool
395
+ | RetrieveKnowledgeBasesTool
396
+ | QueryKnowledgeBaseTool
397
+ | CurrentDateTool
398
+ | HTTPTool
399
+ | CodeExecutionTool
400
+ | FunctionTool
401
+ >;
402
+ };
403
+
404
+ export type KnowledgeBases = {
405
+ /**
406
+ * Unique identifier of the knowledge base to search
407
+ */
408
+ knowledgeId: string;
409
+ };
410
+
411
+ export type CreateAgentRequestBody = {
412
+ /**
413
+ * The path where the agent will be stored in the project structure
414
+ */
415
+ path: string;
416
+ /**
417
+ * Unique identifier for the agent within the workspace
418
+ */
419
+ key: string;
420
+ /**
421
+ * The role or function of the agent
422
+ */
423
+ role: string;
424
+ /**
425
+ * A brief description of what the agent does
426
+ */
427
+ description: string;
428
+ /**
429
+ * Detailed instructions that guide the agent's behavior
430
+ */
431
+ instructions: string;
432
+ /**
433
+ * A custom system prompt template for the agent. If omitted, the default template is used.
434
+ */
435
+ systemPrompt?: string | undefined;
436
+ /**
437
+ * The primary language model that powers the agent (e.g., "anthropic/claude-3-sonnet-20240229")
438
+ */
439
+ model: string;
440
+ /**
441
+ * 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.
442
+ */
443
+ fallbackModels?: Array<string> | undefined;
444
+ /**
445
+ * Configuration settings for the agent's behavior
446
+ */
447
+ settings: Settings;
448
+ /**
449
+ * Optional array of memory store keys for the agent to access
450
+ */
451
+ memoryStores?: Array<string> | undefined;
452
+ /**
453
+ * Optional array of knowledge base configurations for the agent to access
454
+ */
455
+ knowledgeBases?: Array<KnowledgeBases> | undefined;
456
+ };
457
+
458
+ /**
459
+ * The status of the agent. `Live` is the latest version of the agent. `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.
460
+ */
461
+ export const CreateAgentStatus = {
462
+ Live: "live",
463
+ Draft: "draft",
464
+ Pending: "pending",
465
+ Published: "published",
466
+ } as const;
467
+ /**
468
+ * The status of the agent. `Live` is the latest version of the agent. `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.
469
+ */
470
+ export type CreateAgentStatus = ClosedEnum<typeof CreateAgentStatus>;
471
+
472
+ /**
473
+ * 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.
474
+ */
475
+ export const CreateAgentToolApprovalRequired = {
476
+ All: "all",
477
+ RespectTool: "respect_tool",
478
+ None: "none",
479
+ } as const;
480
+ /**
481
+ * 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.
482
+ */
483
+ export type CreateAgentToolApprovalRequired = ClosedEnum<
484
+ typeof CreateAgentToolApprovalRequired
485
+ >;
486
+
487
+ export type Conditions = {
488
+ /**
489
+ * The argument of the tool call to evaluate
490
+ */
491
+ condition: string;
492
+ /**
493
+ * The operator to use
494
+ */
495
+ operator: string;
496
+ /**
497
+ * The value to compare against
498
+ */
499
+ value: string;
500
+ };
501
+
502
+ export type CreateAgentTools = {
503
+ /**
504
+ * The id of the resource
505
+ */
506
+ id: string;
507
+ /**
508
+ * Optional tool key for custom tools
509
+ */
510
+ key?: string | undefined;
511
+ actionType: string;
512
+ displayName?: string | undefined;
513
+ requiresApproval?: boolean | undefined;
514
+ conditions?: Array<Conditions> | undefined;
515
+ /**
516
+ * The id of the resource
517
+ */
518
+ mcpServer?: string | undefined;
519
+ /**
520
+ * Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
521
+ */
522
+ timeout?: number | undefined;
523
+ };
524
+
525
+ export type CreateAgentSettings = {
526
+ /**
527
+ * Maximum iterations(llm calls) before the agent will stop executing.
528
+ */
529
+ maxIterations?: number | undefined;
530
+ /**
531
+ * Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
532
+ */
533
+ maxExecutionTime?: number | undefined;
534
+ /**
535
+ * 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.
536
+ */
537
+ toolApprovalRequired?: CreateAgentToolApprovalRequired | undefined;
538
+ tools: Array<CreateAgentTools>;
539
+ };
540
+
541
+ export type CreateAgentModel = {
542
+ /**
543
+ * The database ID of the primary model
544
+ */
545
+ id: string;
546
+ /**
547
+ * Optional integration ID for custom model configurations
548
+ */
549
+ integrationId?: string | null | undefined;
550
+ /**
551
+ * Optional array of fallback model IDs that will be used automatically in order if the primary model fails
552
+ */
553
+ fallbackModels?: Array<string> | null | undefined;
554
+ /**
555
+ * Maximum number of tokens for model responses
556
+ */
557
+ maxTokens?: number | undefined;
558
+ /**
559
+ * Temperature setting for model responses
560
+ */
561
+ temperature?: number | undefined;
562
+ };
563
+
564
+ export type CreateAgentTeamOfAgents = {
565
+ /**
566
+ * The unique key of the agent within the workspace
567
+ */
568
+ key: string;
569
+ /**
570
+ * 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.
571
+ */
572
+ role?: string | undefined;
573
+ };
574
+
575
+ export type Metrics = {
576
+ totalCost?: number | undefined;
577
+ };
578
+
579
+ export type CreateAgentKnowledgeBases = {
580
+ /**
581
+ * Unique identifier of the knowledge base to search
582
+ */
583
+ knowledgeId: string;
584
+ };
585
+
586
+ export const HiddenPanels = {
587
+ Model: "model",
588
+ Tools: "tools",
589
+ KnowledgeBases: "knowledge_bases",
590
+ Variables: "variables",
591
+ RuntimeConstraints: "runtime_constraints",
592
+ } as const;
593
+ export type HiddenPanels = ClosedEnum<typeof HiddenPanels>;
594
+
595
+ /**
596
+ * Agent created successfully
597
+ */
598
+ export type CreateAgentResponseBody = {
599
+ id: string;
600
+ key: string;
601
+ workspaceId: string;
602
+ projectId: string;
603
+ createdById?: string | null | undefined;
604
+ updatedById?: string | null | undefined;
605
+ created?: string | undefined;
606
+ updated?: string | undefined;
607
+ role: string;
608
+ description: string;
609
+ systemPrompt?: string | undefined;
610
+ instructions: string;
611
+ /**
612
+ * The status of the agent. `Live` is the latest version of the agent. `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.
613
+ */
614
+ status: CreateAgentStatus;
615
+ settings?: CreateAgentSettings | undefined;
616
+ model: CreateAgentModel;
617
+ versionHash?: string | undefined;
618
+ /**
619
+ * 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.
620
+ */
621
+ path: string;
622
+ memoryStores: Array<string>;
623
+ /**
624
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
625
+ */
626
+ teamOfAgents: Array<CreateAgentTeamOfAgents>;
627
+ metrics?: Metrics | undefined;
628
+ /**
629
+ * Extracted variables from agent instructions
630
+ */
631
+ variables?: { [k: string]: any } | undefined;
632
+ /**
633
+ * Agent knowledge bases reference
634
+ */
635
+ knowledgeBases?: Array<CreateAgentKnowledgeBases> | undefined;
636
+ /**
637
+ * List of hidden collapsed panels in configuration. Duplicates are not allowed.
638
+ */
639
+ hiddenPanels?: Array<HiddenPanels> | undefined;
640
+ };
641
+
642
+ /** @internal */
643
+ export const ToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
644
+ typeof ToolApprovalRequired
645
+ > = z.nativeEnum(ToolApprovalRequired);
646
+
647
+ /** @internal */
648
+ export const ToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
649
+ typeof ToolApprovalRequired
650
+ > = ToolApprovalRequired$inboundSchema;
651
+
652
+ /**
653
+ * @internal
654
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
655
+ */
656
+ export namespace ToolApprovalRequired$ {
657
+ /** @deprecated use `ToolApprovalRequired$inboundSchema` instead. */
658
+ export const inboundSchema = ToolApprovalRequired$inboundSchema;
659
+ /** @deprecated use `ToolApprovalRequired$outboundSchema` instead. */
660
+ export const outboundSchema = ToolApprovalRequired$outboundSchema;
661
+ }
662
+
663
+ /** @internal */
664
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema:
665
+ z.ZodNativeEnum<
666
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type
667
+ > = z.nativeEnum(
668
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type,
669
+ );
670
+
671
+ /** @internal */
672
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema:
673
+ z.ZodNativeEnum<
674
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type
675
+ > =
676
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema;
677
+
678
+ /**
679
+ * @internal
680
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
681
+ */
682
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$ {
683
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema` instead. */
684
+ export const inboundSchema =
685
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema;
686
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema` instead. */
687
+ export const outboundSchema =
688
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema;
689
+ }
690
+
691
+ /** @internal */
692
+ export const FunctionTool$inboundSchema: z.ZodType<
693
+ FunctionTool,
694
+ z.ZodTypeDef,
695
+ unknown
696
+ > = z.object({
697
+ type:
698
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema,
699
+ key: z.string().optional(),
700
+ id: z.string().optional(),
701
+ requires_approval: z.boolean().default(false),
702
+ }).transform((v) => {
703
+ return remap$(v, {
704
+ "requires_approval": "requiresApproval",
705
+ });
706
+ });
707
+
708
+ /** @internal */
709
+ export type FunctionTool$Outbound = {
710
+ type: string;
711
+ key?: string | undefined;
712
+ id?: string | undefined;
713
+ requires_approval: boolean;
714
+ };
715
+
716
+ /** @internal */
717
+ export const FunctionTool$outboundSchema: z.ZodType<
718
+ FunctionTool$Outbound,
719
+ z.ZodTypeDef,
720
+ FunctionTool
721
+ > = z.object({
722
+ type:
723
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema,
724
+ key: z.string().optional(),
725
+ id: z.string().optional(),
726
+ requiresApproval: z.boolean().default(false),
727
+ }).transform((v) => {
728
+ return remap$(v, {
729
+ requiresApproval: "requires_approval",
730
+ });
731
+ });
732
+
733
+ /**
734
+ * @internal
735
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
736
+ */
737
+ export namespace FunctionTool$ {
738
+ /** @deprecated use `FunctionTool$inboundSchema` instead. */
739
+ export const inboundSchema = FunctionTool$inboundSchema;
740
+ /** @deprecated use `FunctionTool$outboundSchema` instead. */
741
+ export const outboundSchema = FunctionTool$outboundSchema;
742
+ /** @deprecated use `FunctionTool$Outbound` instead. */
743
+ export type Outbound = FunctionTool$Outbound;
744
+ }
745
+
746
+ export function functionToolToJSON(functionTool: FunctionTool): string {
747
+ return JSON.stringify(FunctionTool$outboundSchema.parse(functionTool));
748
+ }
749
+
750
+ export function functionToolFromJSON(
751
+ jsonString: string,
752
+ ): SafeParseResult<FunctionTool, SDKValidationError> {
753
+ return safeParse(
754
+ jsonString,
755
+ (x) => FunctionTool$inboundSchema.parse(JSON.parse(x)),
756
+ `Failed to parse 'FunctionTool' from JSON`,
757
+ );
758
+ }
759
+
760
+ /** @internal */
761
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema:
762
+ z.ZodNativeEnum<
763
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type
764
+ > = z.nativeEnum(
765
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type,
766
+ );
767
+
768
+ /** @internal */
769
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema:
770
+ z.ZodNativeEnum<
771
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type
772
+ > =
773
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema;
774
+
775
+ /**
776
+ * @internal
777
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
778
+ */
779
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$ {
780
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema` instead. */
781
+ export const inboundSchema =
782
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema;
783
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema` instead. */
784
+ export const outboundSchema =
785
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema;
786
+ }
787
+
788
+ /** @internal */
789
+ export const CodeExecutionTool$inboundSchema: z.ZodType<
790
+ CodeExecutionTool,
791
+ z.ZodTypeDef,
792
+ unknown
793
+ > = z.object({
794
+ type:
795
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema,
796
+ key: z.string().optional(),
797
+ id: z.string().optional(),
798
+ requires_approval: z.boolean().default(false),
799
+ }).transform((v) => {
800
+ return remap$(v, {
801
+ "requires_approval": "requiresApproval",
802
+ });
803
+ });
804
+
805
+ /** @internal */
806
+ export type CodeExecutionTool$Outbound = {
807
+ type: string;
808
+ key?: string | undefined;
809
+ id?: string | undefined;
810
+ requires_approval: boolean;
811
+ };
812
+
813
+ /** @internal */
814
+ export const CodeExecutionTool$outboundSchema: z.ZodType<
815
+ CodeExecutionTool$Outbound,
816
+ z.ZodTypeDef,
817
+ CodeExecutionTool
818
+ > = z.object({
819
+ type:
820
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema,
821
+ key: z.string().optional(),
822
+ id: z.string().optional(),
823
+ requiresApproval: z.boolean().default(false),
824
+ }).transform((v) => {
825
+ return remap$(v, {
826
+ requiresApproval: "requires_approval",
827
+ });
828
+ });
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 CodeExecutionTool$ {
835
+ /** @deprecated use `CodeExecutionTool$inboundSchema` instead. */
836
+ export const inboundSchema = CodeExecutionTool$inboundSchema;
837
+ /** @deprecated use `CodeExecutionTool$outboundSchema` instead. */
838
+ export const outboundSchema = CodeExecutionTool$outboundSchema;
839
+ /** @deprecated use `CodeExecutionTool$Outbound` instead. */
840
+ export type Outbound = CodeExecutionTool$Outbound;
841
+ }
842
+
843
+ export function codeExecutionToolToJSON(
844
+ codeExecutionTool: CodeExecutionTool,
845
+ ): string {
846
+ return JSON.stringify(
847
+ CodeExecutionTool$outboundSchema.parse(codeExecutionTool),
848
+ );
849
+ }
850
+
851
+ export function codeExecutionToolFromJSON(
852
+ jsonString: string,
853
+ ): SafeParseResult<CodeExecutionTool, SDKValidationError> {
854
+ return safeParse(
855
+ jsonString,
856
+ (x) => CodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
857
+ `Failed to parse 'CodeExecutionTool' from JSON`,
858
+ );
859
+ }
860
+
861
+ /** @internal */
862
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema:
863
+ z.ZodNativeEnum<
864
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type
865
+ > = z.nativeEnum(
866
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type,
867
+ );
868
+
869
+ /** @internal */
870
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema:
871
+ z.ZodNativeEnum<
872
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type
873
+ > =
874
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema;
875
+
876
+ /**
877
+ * @internal
878
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
879
+ */
880
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$ {
881
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema` instead. */
882
+ export const inboundSchema =
883
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema;
884
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema` instead. */
885
+ export const outboundSchema =
886
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema;
887
+ }
888
+
889
+ /** @internal */
890
+ export const HTTPTool$inboundSchema: z.ZodType<
891
+ HTTPTool,
892
+ z.ZodTypeDef,
893
+ unknown
894
+ > = z.object({
895
+ type:
896
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema,
897
+ key: z.string().optional(),
898
+ id: z.string().optional(),
899
+ requires_approval: z.boolean().default(false),
900
+ }).transform((v) => {
901
+ return remap$(v, {
902
+ "requires_approval": "requiresApproval",
903
+ });
904
+ });
905
+
906
+ /** @internal */
907
+ export type HTTPTool$Outbound = {
908
+ type: string;
909
+ key?: string | undefined;
910
+ id?: string | undefined;
911
+ requires_approval: boolean;
912
+ };
913
+
914
+ /** @internal */
915
+ export const HTTPTool$outboundSchema: z.ZodType<
916
+ HTTPTool$Outbound,
917
+ z.ZodTypeDef,
918
+ HTTPTool
919
+ > = z.object({
920
+ type:
921
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema,
922
+ key: z.string().optional(),
923
+ id: z.string().optional(),
924
+ requiresApproval: z.boolean().default(false),
925
+ }).transform((v) => {
926
+ return remap$(v, {
927
+ requiresApproval: "requires_approval",
928
+ });
929
+ });
930
+
931
+ /**
932
+ * @internal
933
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
934
+ */
935
+ export namespace HTTPTool$ {
936
+ /** @deprecated use `HTTPTool$inboundSchema` instead. */
937
+ export const inboundSchema = HTTPTool$inboundSchema;
938
+ /** @deprecated use `HTTPTool$outboundSchema` instead. */
939
+ export const outboundSchema = HTTPTool$outboundSchema;
940
+ /** @deprecated use `HTTPTool$Outbound` instead. */
941
+ export type Outbound = HTTPTool$Outbound;
942
+ }
943
+
944
+ export function httpToolToJSON(httpTool: HTTPTool): string {
945
+ return JSON.stringify(HTTPTool$outboundSchema.parse(httpTool));
946
+ }
947
+
948
+ export function httpToolFromJSON(
949
+ jsonString: string,
950
+ ): SafeParseResult<HTTPTool, SDKValidationError> {
951
+ return safeParse(
952
+ jsonString,
953
+ (x) => HTTPTool$inboundSchema.parse(JSON.parse(x)),
954
+ `Failed to parse 'HTTPTool' from JSON`,
955
+ );
956
+ }
957
+
958
+ /** @internal */
959
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema:
960
+ z.ZodNativeEnum<
961
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type
962
+ > = z.nativeEnum(
963
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type,
964
+ );
965
+
966
+ /** @internal */
967
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema:
968
+ z.ZodNativeEnum<
969
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type
970
+ > =
971
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema;
972
+
973
+ /**
974
+ * @internal
975
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
976
+ */
977
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$ {
978
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema` instead. */
979
+ export const inboundSchema =
980
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema;
981
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema` instead. */
982
+ export const outboundSchema =
983
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema;
984
+ }
985
+
986
+ /** @internal */
987
+ export const CurrentDateTool$inboundSchema: z.ZodType<
988
+ CurrentDateTool,
989
+ z.ZodTypeDef,
990
+ unknown
991
+ > = z.object({
992
+ type:
993
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema,
994
+ requires_approval: z.boolean().default(false),
995
+ }).transform((v) => {
996
+ return remap$(v, {
997
+ "requires_approval": "requiresApproval",
998
+ });
999
+ });
1000
+
1001
+ /** @internal */
1002
+ export type CurrentDateTool$Outbound = {
1003
+ type: string;
1004
+ requires_approval: boolean;
1005
+ };
1006
+
1007
+ /** @internal */
1008
+ export const CurrentDateTool$outboundSchema: z.ZodType<
1009
+ CurrentDateTool$Outbound,
1010
+ z.ZodTypeDef,
1011
+ CurrentDateTool
1012
+ > = z.object({
1013
+ type:
1014
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema,
1015
+ requiresApproval: z.boolean().default(false),
1016
+ }).transform((v) => {
1017
+ return remap$(v, {
1018
+ requiresApproval: "requires_approval",
1019
+ });
1020
+ });
1021
+
1022
+ /**
1023
+ * @internal
1024
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1025
+ */
1026
+ export namespace CurrentDateTool$ {
1027
+ /** @deprecated use `CurrentDateTool$inboundSchema` instead. */
1028
+ export const inboundSchema = CurrentDateTool$inboundSchema;
1029
+ /** @deprecated use `CurrentDateTool$outboundSchema` instead. */
1030
+ export const outboundSchema = CurrentDateTool$outboundSchema;
1031
+ /** @deprecated use `CurrentDateTool$Outbound` instead. */
1032
+ export type Outbound = CurrentDateTool$Outbound;
1033
+ }
1034
+
1035
+ export function currentDateToolToJSON(
1036
+ currentDateTool: CurrentDateTool,
1037
+ ): string {
1038
+ return JSON.stringify(CurrentDateTool$outboundSchema.parse(currentDateTool));
1039
+ }
1040
+
1041
+ export function currentDateToolFromJSON(
1042
+ jsonString: string,
1043
+ ): SafeParseResult<CurrentDateTool, SDKValidationError> {
1044
+ return safeParse(
1045
+ jsonString,
1046
+ (x) => CurrentDateTool$inboundSchema.parse(JSON.parse(x)),
1047
+ `Failed to parse 'CurrentDateTool' from JSON`,
1048
+ );
1049
+ }
1050
+
1051
+ /** @internal */
1052
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema:
1053
+ z.ZodNativeEnum<
1054
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type
1055
+ > = z.nativeEnum(
1056
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type,
1057
+ );
1058
+
1059
+ /** @internal */
1060
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema:
1061
+ z.ZodNativeEnum<
1062
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type
1063
+ > =
1064
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema;
1065
+
1066
+ /**
1067
+ * @internal
1068
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1069
+ */
1070
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$ {
1071
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema` instead. */
1072
+ export const inboundSchema =
1073
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema;
1074
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema` instead. */
1075
+ export const outboundSchema =
1076
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema;
1077
+ }
1078
+
1079
+ /** @internal */
1080
+ export const QueryKnowledgeBaseTool$inboundSchema: z.ZodType<
1081
+ QueryKnowledgeBaseTool,
1082
+ z.ZodTypeDef,
1083
+ unknown
1084
+ > = z.object({
1085
+ type:
1086
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema,
1087
+ requires_approval: z.boolean().default(false),
1088
+ }).transform((v) => {
1089
+ return remap$(v, {
1090
+ "requires_approval": "requiresApproval",
1091
+ });
1092
+ });
1093
+
1094
+ /** @internal */
1095
+ export type QueryKnowledgeBaseTool$Outbound = {
1096
+ type: string;
1097
+ requires_approval: boolean;
1098
+ };
1099
+
1100
+ /** @internal */
1101
+ export const QueryKnowledgeBaseTool$outboundSchema: z.ZodType<
1102
+ QueryKnowledgeBaseTool$Outbound,
1103
+ z.ZodTypeDef,
1104
+ QueryKnowledgeBaseTool
1105
+ > = z.object({
1106
+ type:
1107
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema,
1108
+ requiresApproval: z.boolean().default(false),
1109
+ }).transform((v) => {
1110
+ return remap$(v, {
1111
+ requiresApproval: "requires_approval",
1112
+ });
1113
+ });
1114
+
1115
+ /**
1116
+ * @internal
1117
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1118
+ */
1119
+ export namespace QueryKnowledgeBaseTool$ {
1120
+ /** @deprecated use `QueryKnowledgeBaseTool$inboundSchema` instead. */
1121
+ export const inboundSchema = QueryKnowledgeBaseTool$inboundSchema;
1122
+ /** @deprecated use `QueryKnowledgeBaseTool$outboundSchema` instead. */
1123
+ export const outboundSchema = QueryKnowledgeBaseTool$outboundSchema;
1124
+ /** @deprecated use `QueryKnowledgeBaseTool$Outbound` instead. */
1125
+ export type Outbound = QueryKnowledgeBaseTool$Outbound;
1126
+ }
1127
+
1128
+ export function queryKnowledgeBaseToolToJSON(
1129
+ queryKnowledgeBaseTool: QueryKnowledgeBaseTool,
1130
+ ): string {
1131
+ return JSON.stringify(
1132
+ QueryKnowledgeBaseTool$outboundSchema.parse(queryKnowledgeBaseTool),
1133
+ );
1134
+ }
1135
+
1136
+ export function queryKnowledgeBaseToolFromJSON(
1137
+ jsonString: string,
1138
+ ): SafeParseResult<QueryKnowledgeBaseTool, SDKValidationError> {
1139
+ return safeParse(
1140
+ jsonString,
1141
+ (x) => QueryKnowledgeBaseTool$inboundSchema.parse(JSON.parse(x)),
1142
+ `Failed to parse 'QueryKnowledgeBaseTool' from JSON`,
1143
+ );
1144
+ }
1145
+
1146
+ /** @internal */
1147
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema:
1148
+ z.ZodNativeEnum<
1149
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type
1150
+ > = z.nativeEnum(
1151
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type,
1152
+ );
1153
+
1154
+ /** @internal */
1155
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema:
1156
+ z.ZodNativeEnum<
1157
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type
1158
+ > =
1159
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema;
1160
+
1161
+ /**
1162
+ * @internal
1163
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1164
+ */
1165
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$ {
1166
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema` instead. */
1167
+ export const inboundSchema =
1168
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema;
1169
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema` instead. */
1170
+ export const outboundSchema =
1171
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema;
1172
+ }
1173
+
1174
+ /** @internal */
1175
+ export const RetrieveKnowledgeBasesTool$inboundSchema: z.ZodType<
1176
+ RetrieveKnowledgeBasesTool,
1177
+ z.ZodTypeDef,
1178
+ unknown
1179
+ > = z.object({
1180
+ type:
1181
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema,
1182
+ requires_approval: z.boolean().default(false),
1183
+ }).transform((v) => {
1184
+ return remap$(v, {
1185
+ "requires_approval": "requiresApproval",
1186
+ });
1187
+ });
1188
+
1189
+ /** @internal */
1190
+ export type RetrieveKnowledgeBasesTool$Outbound = {
1191
+ type: string;
1192
+ requires_approval: boolean;
1193
+ };
1194
+
1195
+ /** @internal */
1196
+ export const RetrieveKnowledgeBasesTool$outboundSchema: z.ZodType<
1197
+ RetrieveKnowledgeBasesTool$Outbound,
1198
+ z.ZodTypeDef,
1199
+ RetrieveKnowledgeBasesTool
1200
+ > = z.object({
1201
+ type:
1202
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema,
1203
+ requiresApproval: z.boolean().default(false),
1204
+ }).transform((v) => {
1205
+ return remap$(v, {
1206
+ requiresApproval: "requires_approval",
1207
+ });
1208
+ });
1209
+
1210
+ /**
1211
+ * @internal
1212
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1213
+ */
1214
+ export namespace RetrieveKnowledgeBasesTool$ {
1215
+ /** @deprecated use `RetrieveKnowledgeBasesTool$inboundSchema` instead. */
1216
+ export const inboundSchema = RetrieveKnowledgeBasesTool$inboundSchema;
1217
+ /** @deprecated use `RetrieveKnowledgeBasesTool$outboundSchema` instead. */
1218
+ export const outboundSchema = RetrieveKnowledgeBasesTool$outboundSchema;
1219
+ /** @deprecated use `RetrieveKnowledgeBasesTool$Outbound` instead. */
1220
+ export type Outbound = RetrieveKnowledgeBasesTool$Outbound;
1221
+ }
1222
+
1223
+ export function retrieveKnowledgeBasesToolToJSON(
1224
+ retrieveKnowledgeBasesTool: RetrieveKnowledgeBasesTool,
1225
+ ): string {
1226
+ return JSON.stringify(
1227
+ RetrieveKnowledgeBasesTool$outboundSchema.parse(retrieveKnowledgeBasesTool),
1228
+ );
1229
+ }
1230
+
1231
+ export function retrieveKnowledgeBasesToolFromJSON(
1232
+ jsonString: string,
1233
+ ): SafeParseResult<RetrieveKnowledgeBasesTool, SDKValidationError> {
1234
+ return safeParse(
1235
+ jsonString,
1236
+ (x) => RetrieveKnowledgeBasesTool$inboundSchema.parse(JSON.parse(x)),
1237
+ `Failed to parse 'RetrieveKnowledgeBasesTool' from JSON`,
1238
+ );
1239
+ }
1240
+
1241
+ /** @internal */
1242
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema:
1243
+ z.ZodNativeEnum<
1244
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type
1245
+ > = z.nativeEnum(
1246
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type,
1247
+ );
1248
+
1249
+ /** @internal */
1250
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema:
1251
+ z.ZodNativeEnum<
1252
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type
1253
+ > =
1254
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema;
1255
+
1256
+ /**
1257
+ * @internal
1258
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1259
+ */
1260
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$ {
1261
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema` instead. */
1262
+ export const inboundSchema =
1263
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema;
1264
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema` instead. */
1265
+ export const outboundSchema =
1266
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema;
1267
+ }
1268
+
1269
+ /** @internal */
1270
+ export const DeleteMemoryDocumentTool$inboundSchema: z.ZodType<
1271
+ DeleteMemoryDocumentTool,
1272
+ z.ZodTypeDef,
1273
+ unknown
1274
+ > = z.object({
1275
+ type:
1276
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema,
1277
+ requires_approval: z.boolean().default(false),
1278
+ }).transform((v) => {
1279
+ return remap$(v, {
1280
+ "requires_approval": "requiresApproval",
1281
+ });
1282
+ });
1283
+
1284
+ /** @internal */
1285
+ export type DeleteMemoryDocumentTool$Outbound = {
1286
+ type: string;
1287
+ requires_approval: boolean;
1288
+ };
1289
+
1290
+ /** @internal */
1291
+ export const DeleteMemoryDocumentTool$outboundSchema: z.ZodType<
1292
+ DeleteMemoryDocumentTool$Outbound,
1293
+ z.ZodTypeDef,
1294
+ DeleteMemoryDocumentTool
1295
+ > = z.object({
1296
+ type:
1297
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema,
1298
+ requiresApproval: z.boolean().default(false),
1299
+ }).transform((v) => {
1300
+ return remap$(v, {
1301
+ requiresApproval: "requires_approval",
1302
+ });
1303
+ });
1304
+
1305
+ /**
1306
+ * @internal
1307
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1308
+ */
1309
+ export namespace DeleteMemoryDocumentTool$ {
1310
+ /** @deprecated use `DeleteMemoryDocumentTool$inboundSchema` instead. */
1311
+ export const inboundSchema = DeleteMemoryDocumentTool$inboundSchema;
1312
+ /** @deprecated use `DeleteMemoryDocumentTool$outboundSchema` instead. */
1313
+ export const outboundSchema = DeleteMemoryDocumentTool$outboundSchema;
1314
+ /** @deprecated use `DeleteMemoryDocumentTool$Outbound` instead. */
1315
+ export type Outbound = DeleteMemoryDocumentTool$Outbound;
1316
+ }
1317
+
1318
+ export function deleteMemoryDocumentToolToJSON(
1319
+ deleteMemoryDocumentTool: DeleteMemoryDocumentTool,
1320
+ ): string {
1321
+ return JSON.stringify(
1322
+ DeleteMemoryDocumentTool$outboundSchema.parse(deleteMemoryDocumentTool),
1323
+ );
1324
+ }
1325
+
1326
+ export function deleteMemoryDocumentToolFromJSON(
1327
+ jsonString: string,
1328
+ ): SafeParseResult<DeleteMemoryDocumentTool, SDKValidationError> {
1329
+ return safeParse(
1330
+ jsonString,
1331
+ (x) => DeleteMemoryDocumentTool$inboundSchema.parse(JSON.parse(x)),
1332
+ `Failed to parse 'DeleteMemoryDocumentTool' from JSON`,
1333
+ );
1334
+ }
1335
+
1336
+ /** @internal */
1337
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema:
1338
+ z.ZodNativeEnum<
1339
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType
1340
+ > = z.nativeEnum(
1341
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType,
1342
+ );
1343
+
1344
+ /** @internal */
1345
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema:
1346
+ z.ZodNativeEnum<
1347
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType
1348
+ > =
1349
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema;
1350
+
1351
+ /**
1352
+ * @internal
1353
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1354
+ */
1355
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$ {
1356
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema` instead. */
1357
+ export const inboundSchema =
1358
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema;
1359
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema` instead. */
1360
+ export const outboundSchema =
1361
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema;
1362
+ }
1363
+
1364
+ /** @internal */
1365
+ export const RetrieveMemoryStoresTool$inboundSchema: z.ZodType<
1366
+ RetrieveMemoryStoresTool,
1367
+ z.ZodTypeDef,
1368
+ unknown
1369
+ > = z.object({
1370
+ type:
1371
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema,
1372
+ requires_approval: z.boolean().default(false),
1373
+ }).transform((v) => {
1374
+ return remap$(v, {
1375
+ "requires_approval": "requiresApproval",
1376
+ });
1377
+ });
1378
+
1379
+ /** @internal */
1380
+ export type RetrieveMemoryStoresTool$Outbound = {
1381
+ type: string;
1382
+ requires_approval: boolean;
1383
+ };
1384
+
1385
+ /** @internal */
1386
+ export const RetrieveMemoryStoresTool$outboundSchema: z.ZodType<
1387
+ RetrieveMemoryStoresTool$Outbound,
1388
+ z.ZodTypeDef,
1389
+ RetrieveMemoryStoresTool
1390
+ > = z.object({
1391
+ type:
1392
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema,
1393
+ requiresApproval: z.boolean().default(false),
1394
+ }).transform((v) => {
1395
+ return remap$(v, {
1396
+ requiresApproval: "requires_approval",
1397
+ });
1398
+ });
1399
+
1400
+ /**
1401
+ * @internal
1402
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1403
+ */
1404
+ export namespace RetrieveMemoryStoresTool$ {
1405
+ /** @deprecated use `RetrieveMemoryStoresTool$inboundSchema` instead. */
1406
+ export const inboundSchema = RetrieveMemoryStoresTool$inboundSchema;
1407
+ /** @deprecated use `RetrieveMemoryStoresTool$outboundSchema` instead. */
1408
+ export const outboundSchema = RetrieveMemoryStoresTool$outboundSchema;
1409
+ /** @deprecated use `RetrieveMemoryStoresTool$Outbound` instead. */
1410
+ export type Outbound = RetrieveMemoryStoresTool$Outbound;
1411
+ }
1412
+
1413
+ export function retrieveMemoryStoresToolToJSON(
1414
+ retrieveMemoryStoresTool: RetrieveMemoryStoresTool,
1415
+ ): string {
1416
+ return JSON.stringify(
1417
+ RetrieveMemoryStoresTool$outboundSchema.parse(retrieveMemoryStoresTool),
1418
+ );
1419
+ }
1420
+
1421
+ export function retrieveMemoryStoresToolFromJSON(
1422
+ jsonString: string,
1423
+ ): SafeParseResult<RetrieveMemoryStoresTool, SDKValidationError> {
1424
+ return safeParse(
1425
+ jsonString,
1426
+ (x) => RetrieveMemoryStoresTool$inboundSchema.parse(JSON.parse(x)),
1427
+ `Failed to parse 'RetrieveMemoryStoresTool' from JSON`,
1428
+ );
1429
+ }
1430
+
1431
+ /** @internal */
1432
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema:
1433
+ z.ZodNativeEnum<
1434
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType
1435
+ > = z.nativeEnum(
1436
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType,
1437
+ );
1438
+
1439
+ /** @internal */
1440
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema:
1441
+ z.ZodNativeEnum<
1442
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType
1443
+ > =
1444
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema;
1445
+
1446
+ /**
1447
+ * @internal
1448
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1449
+ */
1450
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$ {
1451
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema` instead. */
1452
+ export const inboundSchema =
1453
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema;
1454
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema` instead. */
1455
+ export const outboundSchema =
1456
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema;
1457
+ }
1458
+
1459
+ /** @internal */
1460
+ export const WriteMemoryStoreTool$inboundSchema: z.ZodType<
1461
+ WriteMemoryStoreTool,
1462
+ z.ZodTypeDef,
1463
+ unknown
1464
+ > = z.object({
1465
+ type:
1466
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema,
1467
+ requires_approval: z.boolean().default(false),
1468
+ }).transform((v) => {
1469
+ return remap$(v, {
1470
+ "requires_approval": "requiresApproval",
1471
+ });
1472
+ });
1473
+
1474
+ /** @internal */
1475
+ export type WriteMemoryStoreTool$Outbound = {
1476
+ type: string;
1477
+ requires_approval: boolean;
1478
+ };
1479
+
1480
+ /** @internal */
1481
+ export const WriteMemoryStoreTool$outboundSchema: z.ZodType<
1482
+ WriteMemoryStoreTool$Outbound,
1483
+ z.ZodTypeDef,
1484
+ WriteMemoryStoreTool
1485
+ > = z.object({
1486
+ type:
1487
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema,
1488
+ requiresApproval: z.boolean().default(false),
1489
+ }).transform((v) => {
1490
+ return remap$(v, {
1491
+ requiresApproval: "requires_approval",
1492
+ });
1493
+ });
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 WriteMemoryStoreTool$ {
1500
+ /** @deprecated use `WriteMemoryStoreTool$inboundSchema` instead. */
1501
+ export const inboundSchema = WriteMemoryStoreTool$inboundSchema;
1502
+ /** @deprecated use `WriteMemoryStoreTool$outboundSchema` instead. */
1503
+ export const outboundSchema = WriteMemoryStoreTool$outboundSchema;
1504
+ /** @deprecated use `WriteMemoryStoreTool$Outbound` instead. */
1505
+ export type Outbound = WriteMemoryStoreTool$Outbound;
1506
+ }
1507
+
1508
+ export function writeMemoryStoreToolToJSON(
1509
+ writeMemoryStoreTool: WriteMemoryStoreTool,
1510
+ ): string {
1511
+ return JSON.stringify(
1512
+ WriteMemoryStoreTool$outboundSchema.parse(writeMemoryStoreTool),
1513
+ );
1514
+ }
1515
+
1516
+ export function writeMemoryStoreToolFromJSON(
1517
+ jsonString: string,
1518
+ ): SafeParseResult<WriteMemoryStoreTool, SDKValidationError> {
1519
+ return safeParse(
1520
+ jsonString,
1521
+ (x) => WriteMemoryStoreTool$inboundSchema.parse(JSON.parse(x)),
1522
+ `Failed to parse 'WriteMemoryStoreTool' from JSON`,
1523
+ );
1524
+ }
1525
+
1526
+ /** @internal */
1527
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema:
1528
+ z.ZodNativeEnum<
1529
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType
1530
+ > = z.nativeEnum(CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType);
1531
+
1532
+ /** @internal */
1533
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema:
1534
+ z.ZodNativeEnum<
1535
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType
1536
+ > = CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema;
1537
+
1538
+ /**
1539
+ * @internal
1540
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1541
+ */
1542
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$ {
1543
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema` instead. */
1544
+ export const inboundSchema =
1545
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema;
1546
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema` instead. */
1547
+ export const outboundSchema =
1548
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema;
1549
+ }
1550
+
1551
+ /** @internal */
1552
+ export const QueryMemoryStoreTool$inboundSchema: z.ZodType<
1553
+ QueryMemoryStoreTool,
1554
+ z.ZodTypeDef,
1555
+ unknown
1556
+ > = z.object({
1557
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema,
1558
+ requires_approval: z.boolean().default(false),
1559
+ }).transform((v) => {
1560
+ return remap$(v, {
1561
+ "requires_approval": "requiresApproval",
1562
+ });
1563
+ });
1564
+
1565
+ /** @internal */
1566
+ export type QueryMemoryStoreTool$Outbound = {
1567
+ type: string;
1568
+ requires_approval: boolean;
1569
+ };
1570
+
1571
+ /** @internal */
1572
+ export const QueryMemoryStoreTool$outboundSchema: z.ZodType<
1573
+ QueryMemoryStoreTool$Outbound,
1574
+ z.ZodTypeDef,
1575
+ QueryMemoryStoreTool
1576
+ > = z.object({
1577
+ type:
1578
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema,
1579
+ requiresApproval: z.boolean().default(false),
1580
+ }).transform((v) => {
1581
+ return remap$(v, {
1582
+ requiresApproval: "requires_approval",
1583
+ });
1584
+ });
1585
+
1586
+ /**
1587
+ * @internal
1588
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1589
+ */
1590
+ export namespace QueryMemoryStoreTool$ {
1591
+ /** @deprecated use `QueryMemoryStoreTool$inboundSchema` instead. */
1592
+ export const inboundSchema = QueryMemoryStoreTool$inboundSchema;
1593
+ /** @deprecated use `QueryMemoryStoreTool$outboundSchema` instead. */
1594
+ export const outboundSchema = QueryMemoryStoreTool$outboundSchema;
1595
+ /** @deprecated use `QueryMemoryStoreTool$Outbound` instead. */
1596
+ export type Outbound = QueryMemoryStoreTool$Outbound;
1597
+ }
1598
+
1599
+ export function queryMemoryStoreToolToJSON(
1600
+ queryMemoryStoreTool: QueryMemoryStoreTool,
1601
+ ): string {
1602
+ return JSON.stringify(
1603
+ QueryMemoryStoreTool$outboundSchema.parse(queryMemoryStoreTool),
1604
+ );
1605
+ }
1606
+
1607
+ export function queryMemoryStoreToolFromJSON(
1608
+ jsonString: string,
1609
+ ): SafeParseResult<QueryMemoryStoreTool, SDKValidationError> {
1610
+ return safeParse(
1611
+ jsonString,
1612
+ (x) => QueryMemoryStoreTool$inboundSchema.parse(JSON.parse(x)),
1613
+ `Failed to parse 'QueryMemoryStoreTool' from JSON`,
1614
+ );
1615
+ }
1616
+
1617
+ /** @internal */
1618
+ export const CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema:
1619
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsRequestType> = z
1620
+ .nativeEnum(CreateAgentAgentToolInputCRUDAgentsRequestType);
1621
+
1622
+ /** @internal */
1623
+ export const CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema:
1624
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsRequestType> =
1625
+ CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema;
1626
+
1627
+ /**
1628
+ * @internal
1629
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1630
+ */
1631
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestType$ {
1632
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema` instead. */
1633
+ export const inboundSchema =
1634
+ CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema;
1635
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema` instead. */
1636
+ export const outboundSchema =
1637
+ CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema;
1638
+ }
1639
+
1640
+ /** @internal */
1641
+ export const RetrieveAgentsTool$inboundSchema: z.ZodType<
1642
+ RetrieveAgentsTool,
1643
+ z.ZodTypeDef,
1644
+ unknown
1645
+ > = z.object({
1646
+ type: CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema,
1647
+ requires_approval: z.boolean().default(false),
1648
+ }).transform((v) => {
1649
+ return remap$(v, {
1650
+ "requires_approval": "requiresApproval",
1651
+ });
1652
+ });
1653
+
1654
+ /** @internal */
1655
+ export type RetrieveAgentsTool$Outbound = {
1656
+ type: string;
1657
+ requires_approval: boolean;
1658
+ };
1659
+
1660
+ /** @internal */
1661
+ export const RetrieveAgentsTool$outboundSchema: z.ZodType<
1662
+ RetrieveAgentsTool$Outbound,
1663
+ z.ZodTypeDef,
1664
+ RetrieveAgentsTool
1665
+ > = z.object({
1666
+ type: CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema,
1667
+ requiresApproval: z.boolean().default(false),
1668
+ }).transform((v) => {
1669
+ return remap$(v, {
1670
+ requiresApproval: "requires_approval",
1671
+ });
1672
+ });
1673
+
1674
+ /**
1675
+ * @internal
1676
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1677
+ */
1678
+ export namespace RetrieveAgentsTool$ {
1679
+ /** @deprecated use `RetrieveAgentsTool$inboundSchema` instead. */
1680
+ export const inboundSchema = RetrieveAgentsTool$inboundSchema;
1681
+ /** @deprecated use `RetrieveAgentsTool$outboundSchema` instead. */
1682
+ export const outboundSchema = RetrieveAgentsTool$outboundSchema;
1683
+ /** @deprecated use `RetrieveAgentsTool$Outbound` instead. */
1684
+ export type Outbound = RetrieveAgentsTool$Outbound;
1685
+ }
1686
+
1687
+ export function retrieveAgentsToolToJSON(
1688
+ retrieveAgentsTool: RetrieveAgentsTool,
1689
+ ): string {
1690
+ return JSON.stringify(
1691
+ RetrieveAgentsTool$outboundSchema.parse(retrieveAgentsTool),
1692
+ );
1693
+ }
1694
+
1695
+ export function retrieveAgentsToolFromJSON(
1696
+ jsonString: string,
1697
+ ): SafeParseResult<RetrieveAgentsTool, SDKValidationError> {
1698
+ return safeParse(
1699
+ jsonString,
1700
+ (x) => RetrieveAgentsTool$inboundSchema.parse(JSON.parse(x)),
1701
+ `Failed to parse 'RetrieveAgentsTool' from JSON`,
1702
+ );
1703
+ }
1704
+
1705
+ /** @internal */
1706
+ export const CreateAgentAgentToolInputCRUDAgentsType$inboundSchema:
1707
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsType> = z
1708
+ .nativeEnum(CreateAgentAgentToolInputCRUDAgentsType);
1709
+
1710
+ /** @internal */
1711
+ export const CreateAgentAgentToolInputCRUDAgentsType$outboundSchema:
1712
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsType> =
1713
+ CreateAgentAgentToolInputCRUDAgentsType$inboundSchema;
1714
+
1715
+ /**
1716
+ * @internal
1717
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1718
+ */
1719
+ export namespace CreateAgentAgentToolInputCRUDAgentsType$ {
1720
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsType$inboundSchema` instead. */
1721
+ export const inboundSchema =
1722
+ CreateAgentAgentToolInputCRUDAgentsType$inboundSchema;
1723
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsType$outboundSchema` instead. */
1724
+ export const outboundSchema =
1725
+ CreateAgentAgentToolInputCRUDAgentsType$outboundSchema;
1726
+ }
1727
+
1728
+ /** @internal */
1729
+ export const CallSubAgentTool$inboundSchema: z.ZodType<
1730
+ CallSubAgentTool,
1731
+ z.ZodTypeDef,
1732
+ unknown
1733
+ > = z.object({
1734
+ type: CreateAgentAgentToolInputCRUDAgentsType$inboundSchema,
1735
+ requires_approval: z.boolean().default(false),
1736
+ }).transform((v) => {
1737
+ return remap$(v, {
1738
+ "requires_approval": "requiresApproval",
1739
+ });
1740
+ });
1741
+
1742
+ /** @internal */
1743
+ export type CallSubAgentTool$Outbound = {
1744
+ type: string;
1745
+ requires_approval: boolean;
1746
+ };
1747
+
1748
+ /** @internal */
1749
+ export const CallSubAgentTool$outboundSchema: z.ZodType<
1750
+ CallSubAgentTool$Outbound,
1751
+ z.ZodTypeDef,
1752
+ CallSubAgentTool
1753
+ > = z.object({
1754
+ type: CreateAgentAgentToolInputCRUDAgentsType$outboundSchema,
1755
+ requiresApproval: z.boolean().default(false),
1756
+ }).transform((v) => {
1757
+ return remap$(v, {
1758
+ requiresApproval: "requires_approval",
1759
+ });
1760
+ });
1761
+
1762
+ /**
1763
+ * @internal
1764
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1765
+ */
1766
+ export namespace CallSubAgentTool$ {
1767
+ /** @deprecated use `CallSubAgentTool$inboundSchema` instead. */
1768
+ export const inboundSchema = CallSubAgentTool$inboundSchema;
1769
+ /** @deprecated use `CallSubAgentTool$outboundSchema` instead. */
1770
+ export const outboundSchema = CallSubAgentTool$outboundSchema;
1771
+ /** @deprecated use `CallSubAgentTool$Outbound` instead. */
1772
+ export type Outbound = CallSubAgentTool$Outbound;
1773
+ }
1774
+
1775
+ export function callSubAgentToolToJSON(
1776
+ callSubAgentTool: CallSubAgentTool,
1777
+ ): string {
1778
+ return JSON.stringify(
1779
+ CallSubAgentTool$outboundSchema.parse(callSubAgentTool),
1780
+ );
1781
+ }
1782
+
1783
+ export function callSubAgentToolFromJSON(
1784
+ jsonString: string,
1785
+ ): SafeParseResult<CallSubAgentTool, SDKValidationError> {
1786
+ return safeParse(
1787
+ jsonString,
1788
+ (x) => CallSubAgentTool$inboundSchema.parse(JSON.parse(x)),
1789
+ `Failed to parse 'CallSubAgentTool' from JSON`,
1790
+ );
1791
+ }
1792
+
1793
+ /** @internal */
1794
+ export const CreateAgentAgentToolInputCRUDType$inboundSchema: z.ZodNativeEnum<
1795
+ typeof CreateAgentAgentToolInputCRUDType
1796
+ > = z.nativeEnum(CreateAgentAgentToolInputCRUDType);
1797
+
1798
+ /** @internal */
1799
+ export const CreateAgentAgentToolInputCRUDType$outboundSchema: z.ZodNativeEnum<
1800
+ typeof CreateAgentAgentToolInputCRUDType
1801
+ > = CreateAgentAgentToolInputCRUDType$inboundSchema;
1802
+
1803
+ /**
1804
+ * @internal
1805
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1806
+ */
1807
+ export namespace CreateAgentAgentToolInputCRUDType$ {
1808
+ /** @deprecated use `CreateAgentAgentToolInputCRUDType$inboundSchema` instead. */
1809
+ export const inboundSchema = CreateAgentAgentToolInputCRUDType$inboundSchema;
1810
+ /** @deprecated use `CreateAgentAgentToolInputCRUDType$outboundSchema` instead. */
1811
+ export const outboundSchema =
1812
+ CreateAgentAgentToolInputCRUDType$outboundSchema;
1813
+ }
1814
+
1815
+ /** @internal */
1816
+ export const WebScraperTool$inboundSchema: z.ZodType<
1817
+ WebScraperTool,
1818
+ z.ZodTypeDef,
1819
+ unknown
1820
+ > = z.object({
1821
+ type: CreateAgentAgentToolInputCRUDType$inboundSchema,
1822
+ requires_approval: z.boolean().default(false),
1823
+ }).transform((v) => {
1824
+ return remap$(v, {
1825
+ "requires_approval": "requiresApproval",
1826
+ });
1827
+ });
1828
+
1829
+ /** @internal */
1830
+ export type WebScraperTool$Outbound = {
1831
+ type: string;
1832
+ requires_approval: boolean;
1833
+ };
1834
+
1835
+ /** @internal */
1836
+ export const WebScraperTool$outboundSchema: z.ZodType<
1837
+ WebScraperTool$Outbound,
1838
+ z.ZodTypeDef,
1839
+ WebScraperTool
1840
+ > = z.object({
1841
+ type: CreateAgentAgentToolInputCRUDType$outboundSchema,
1842
+ requiresApproval: z.boolean().default(false),
1843
+ }).transform((v) => {
1844
+ return remap$(v, {
1845
+ requiresApproval: "requires_approval",
1846
+ });
1847
+ });
1848
+
1849
+ /**
1850
+ * @internal
1851
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1852
+ */
1853
+ export namespace WebScraperTool$ {
1854
+ /** @deprecated use `WebScraperTool$inboundSchema` instead. */
1855
+ export const inboundSchema = WebScraperTool$inboundSchema;
1856
+ /** @deprecated use `WebScraperTool$outboundSchema` instead. */
1857
+ export const outboundSchema = WebScraperTool$outboundSchema;
1858
+ /** @deprecated use `WebScraperTool$Outbound` instead. */
1859
+ export type Outbound = WebScraperTool$Outbound;
1860
+ }
1861
+
1862
+ export function webScraperToolToJSON(webScraperTool: WebScraperTool): string {
1863
+ return JSON.stringify(WebScraperTool$outboundSchema.parse(webScraperTool));
1864
+ }
1865
+
1866
+ export function webScraperToolFromJSON(
1867
+ jsonString: string,
1868
+ ): SafeParseResult<WebScraperTool, SDKValidationError> {
1869
+ return safeParse(
1870
+ jsonString,
1871
+ (x) => WebScraperTool$inboundSchema.parse(JSON.parse(x)),
1872
+ `Failed to parse 'WebScraperTool' from JSON`,
1873
+ );
1874
+ }
1875
+
1876
+ /** @internal */
1877
+ export const AgentToolInputCRUDType$inboundSchema: z.ZodNativeEnum<
1878
+ typeof AgentToolInputCRUDType
1879
+ > = z.nativeEnum(AgentToolInputCRUDType);
1880
+
1881
+ /** @internal */
1882
+ export const AgentToolInputCRUDType$outboundSchema: z.ZodNativeEnum<
1883
+ typeof AgentToolInputCRUDType
1884
+ > = AgentToolInputCRUDType$inboundSchema;
1885
+
1886
+ /**
1887
+ * @internal
1888
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1889
+ */
1890
+ export namespace AgentToolInputCRUDType$ {
1891
+ /** @deprecated use `AgentToolInputCRUDType$inboundSchema` instead. */
1892
+ export const inboundSchema = AgentToolInputCRUDType$inboundSchema;
1893
+ /** @deprecated use `AgentToolInputCRUDType$outboundSchema` instead. */
1894
+ export const outboundSchema = AgentToolInputCRUDType$outboundSchema;
1895
+ }
1896
+
1897
+ /** @internal */
1898
+ export const GoogleSearchTool$inboundSchema: z.ZodType<
1899
+ GoogleSearchTool,
1900
+ z.ZodTypeDef,
1901
+ unknown
1902
+ > = z.object({
1903
+ type: AgentToolInputCRUDType$inboundSchema,
1904
+ requires_approval: z.boolean().default(false),
1905
+ }).transform((v) => {
1906
+ return remap$(v, {
1907
+ "requires_approval": "requiresApproval",
1908
+ });
1909
+ });
1910
+
1911
+ /** @internal */
1912
+ export type GoogleSearchTool$Outbound = {
1913
+ type: string;
1914
+ requires_approval: boolean;
1915
+ };
1916
+
1917
+ /** @internal */
1918
+ export const GoogleSearchTool$outboundSchema: z.ZodType<
1919
+ GoogleSearchTool$Outbound,
1920
+ z.ZodTypeDef,
1921
+ GoogleSearchTool
1922
+ > = z.object({
1923
+ type: AgentToolInputCRUDType$outboundSchema,
1924
+ requiresApproval: z.boolean().default(false),
1925
+ }).transform((v) => {
1926
+ return remap$(v, {
1927
+ requiresApproval: "requires_approval",
1928
+ });
1929
+ });
1930
+
1931
+ /**
1932
+ * @internal
1933
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1934
+ */
1935
+ export namespace GoogleSearchTool$ {
1936
+ /** @deprecated use `GoogleSearchTool$inboundSchema` instead. */
1937
+ export const inboundSchema = GoogleSearchTool$inboundSchema;
1938
+ /** @deprecated use `GoogleSearchTool$outboundSchema` instead. */
1939
+ export const outboundSchema = GoogleSearchTool$outboundSchema;
1940
+ /** @deprecated use `GoogleSearchTool$Outbound` instead. */
1941
+ export type Outbound = GoogleSearchTool$Outbound;
1942
+ }
1943
+
1944
+ export function googleSearchToolToJSON(
1945
+ googleSearchTool: GoogleSearchTool,
1946
+ ): string {
1947
+ return JSON.stringify(
1948
+ GoogleSearchTool$outboundSchema.parse(googleSearchTool),
1949
+ );
1950
+ }
1951
+
1952
+ export function googleSearchToolFromJSON(
1953
+ jsonString: string,
1954
+ ): SafeParseResult<GoogleSearchTool, SDKValidationError> {
1955
+ return safeParse(
1956
+ jsonString,
1957
+ (x) => GoogleSearchTool$inboundSchema.parse(JSON.parse(x)),
1958
+ `Failed to parse 'GoogleSearchTool' from JSON`,
1959
+ );
1960
+ }
1961
+
1962
+ /** @internal */
1963
+ export const AgentToolInputCRUD$inboundSchema: z.ZodType<
1964
+ AgentToolInputCRUD,
1965
+ z.ZodTypeDef,
1966
+ unknown
1967
+ > = z.union([
1968
+ z.lazy(() => GoogleSearchTool$inboundSchema),
1969
+ z.lazy(() => WebScraperTool$inboundSchema),
1970
+ z.lazy(() => CallSubAgentTool$inboundSchema),
1971
+ z.lazy(() => RetrieveAgentsTool$inboundSchema),
1972
+ z.lazy(() => QueryMemoryStoreTool$inboundSchema),
1973
+ z.lazy(() => WriteMemoryStoreTool$inboundSchema),
1974
+ z.lazy(() => RetrieveMemoryStoresTool$inboundSchema),
1975
+ z.lazy(() => DeleteMemoryDocumentTool$inboundSchema),
1976
+ z.lazy(() => RetrieveKnowledgeBasesTool$inboundSchema),
1977
+ z.lazy(() => QueryKnowledgeBaseTool$inboundSchema),
1978
+ z.lazy(() => CurrentDateTool$inboundSchema),
1979
+ z.lazy(() => HTTPTool$inboundSchema),
1980
+ z.lazy(() => CodeExecutionTool$inboundSchema),
1981
+ z.lazy(() => FunctionTool$inboundSchema),
1982
+ ]);
1983
+
1984
+ /** @internal */
1985
+ export type AgentToolInputCRUD$Outbound =
1986
+ | GoogleSearchTool$Outbound
1987
+ | WebScraperTool$Outbound
1988
+ | CallSubAgentTool$Outbound
1989
+ | RetrieveAgentsTool$Outbound
1990
+ | QueryMemoryStoreTool$Outbound
1991
+ | WriteMemoryStoreTool$Outbound
1992
+ | RetrieveMemoryStoresTool$Outbound
1993
+ | DeleteMemoryDocumentTool$Outbound
1994
+ | RetrieveKnowledgeBasesTool$Outbound
1995
+ | QueryKnowledgeBaseTool$Outbound
1996
+ | CurrentDateTool$Outbound
1997
+ | HTTPTool$Outbound
1998
+ | CodeExecutionTool$Outbound
1999
+ | FunctionTool$Outbound;
2000
+
2001
+ /** @internal */
2002
+ export const AgentToolInputCRUD$outboundSchema: z.ZodType<
2003
+ AgentToolInputCRUD$Outbound,
2004
+ z.ZodTypeDef,
2005
+ AgentToolInputCRUD
2006
+ > = z.union([
2007
+ z.lazy(() => GoogleSearchTool$outboundSchema),
2008
+ z.lazy(() => WebScraperTool$outboundSchema),
2009
+ z.lazy(() => CallSubAgentTool$outboundSchema),
2010
+ z.lazy(() => RetrieveAgentsTool$outboundSchema),
2011
+ z.lazy(() => QueryMemoryStoreTool$outboundSchema),
2012
+ z.lazy(() => WriteMemoryStoreTool$outboundSchema),
2013
+ z.lazy(() => RetrieveMemoryStoresTool$outboundSchema),
2014
+ z.lazy(() => DeleteMemoryDocumentTool$outboundSchema),
2015
+ z.lazy(() => RetrieveKnowledgeBasesTool$outboundSchema),
2016
+ z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
2017
+ z.lazy(() => CurrentDateTool$outboundSchema),
2018
+ z.lazy(() => HTTPTool$outboundSchema),
2019
+ z.lazy(() => CodeExecutionTool$outboundSchema),
2020
+ z.lazy(() => FunctionTool$outboundSchema),
2021
+ ]);
2022
+
2023
+ /**
2024
+ * @internal
2025
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2026
+ */
2027
+ export namespace AgentToolInputCRUD$ {
2028
+ /** @deprecated use `AgentToolInputCRUD$inboundSchema` instead. */
2029
+ export const inboundSchema = AgentToolInputCRUD$inboundSchema;
2030
+ /** @deprecated use `AgentToolInputCRUD$outboundSchema` instead. */
2031
+ export const outboundSchema = AgentToolInputCRUD$outboundSchema;
2032
+ /** @deprecated use `AgentToolInputCRUD$Outbound` instead. */
2033
+ export type Outbound = AgentToolInputCRUD$Outbound;
2034
+ }
2035
+
2036
+ export function agentToolInputCRUDToJSON(
2037
+ agentToolInputCRUD: AgentToolInputCRUD,
2038
+ ): string {
2039
+ return JSON.stringify(
2040
+ AgentToolInputCRUD$outboundSchema.parse(agentToolInputCRUD),
2041
+ );
2042
+ }
2043
+
2044
+ export function agentToolInputCRUDFromJSON(
2045
+ jsonString: string,
2046
+ ): SafeParseResult<AgentToolInputCRUD, SDKValidationError> {
2047
+ return safeParse(
2048
+ jsonString,
2049
+ (x) => AgentToolInputCRUD$inboundSchema.parse(JSON.parse(x)),
2050
+ `Failed to parse 'AgentToolInputCRUD' from JSON`,
2051
+ );
2052
+ }
2053
+
2054
+ /** @internal */
2055
+ export const Settings$inboundSchema: z.ZodType<
2056
+ Settings,
2057
+ z.ZodTypeDef,
2058
+ unknown
2059
+ > = z.object({
2060
+ max_iterations: z.number().int().default(15),
2061
+ max_execution_time: z.number().int().default(300),
2062
+ tool_approval_required: ToolApprovalRequired$inboundSchema.default(
2063
+ "respect_tool",
2064
+ ),
2065
+ tools: z.array(
2066
+ z.union([
2067
+ z.lazy(() => GoogleSearchTool$inboundSchema),
2068
+ z.lazy(() => WebScraperTool$inboundSchema),
2069
+ z.lazy(() => CallSubAgentTool$inboundSchema),
2070
+ z.lazy(() => RetrieveAgentsTool$inboundSchema),
2071
+ z.lazy(() => QueryMemoryStoreTool$inboundSchema),
2072
+ z.lazy(() => WriteMemoryStoreTool$inboundSchema),
2073
+ z.lazy(() => RetrieveMemoryStoresTool$inboundSchema),
2074
+ z.lazy(() => DeleteMemoryDocumentTool$inboundSchema),
2075
+ z.lazy(() => RetrieveKnowledgeBasesTool$inboundSchema),
2076
+ z.lazy(() => QueryKnowledgeBaseTool$inboundSchema),
2077
+ z.lazy(() => CurrentDateTool$inboundSchema),
2078
+ z.lazy(() => HTTPTool$inboundSchema),
2079
+ z.lazy(() => CodeExecutionTool$inboundSchema),
2080
+ z.lazy(() => FunctionTool$inboundSchema),
2081
+ ]),
2082
+ ),
2083
+ }).transform((v) => {
2084
+ return remap$(v, {
2085
+ "max_iterations": "maxIterations",
2086
+ "max_execution_time": "maxExecutionTime",
2087
+ "tool_approval_required": "toolApprovalRequired",
2088
+ });
2089
+ });
2090
+
2091
+ /** @internal */
2092
+ export type Settings$Outbound = {
2093
+ max_iterations: number;
2094
+ max_execution_time: number;
2095
+ tool_approval_required: string;
2096
+ tools: Array<
2097
+ | GoogleSearchTool$Outbound
2098
+ | WebScraperTool$Outbound
2099
+ | CallSubAgentTool$Outbound
2100
+ | RetrieveAgentsTool$Outbound
2101
+ | QueryMemoryStoreTool$Outbound
2102
+ | WriteMemoryStoreTool$Outbound
2103
+ | RetrieveMemoryStoresTool$Outbound
2104
+ | DeleteMemoryDocumentTool$Outbound
2105
+ | RetrieveKnowledgeBasesTool$Outbound
2106
+ | QueryKnowledgeBaseTool$Outbound
2107
+ | CurrentDateTool$Outbound
2108
+ | HTTPTool$Outbound
2109
+ | CodeExecutionTool$Outbound
2110
+ | FunctionTool$Outbound
2111
+ >;
2112
+ };
2113
+
2114
+ /** @internal */
2115
+ export const Settings$outboundSchema: z.ZodType<
2116
+ Settings$Outbound,
2117
+ z.ZodTypeDef,
2118
+ Settings
2119
+ > = z.object({
2120
+ maxIterations: z.number().int().default(15),
2121
+ maxExecutionTime: z.number().int().default(300),
2122
+ toolApprovalRequired: ToolApprovalRequired$outboundSchema.default(
2123
+ "respect_tool",
2124
+ ),
2125
+ tools: z.array(
2126
+ z.union([
2127
+ z.lazy(() => GoogleSearchTool$outboundSchema),
2128
+ z.lazy(() => WebScraperTool$outboundSchema),
2129
+ z.lazy(() => CallSubAgentTool$outboundSchema),
2130
+ z.lazy(() => RetrieveAgentsTool$outboundSchema),
2131
+ z.lazy(() => QueryMemoryStoreTool$outboundSchema),
2132
+ z.lazy(() => WriteMemoryStoreTool$outboundSchema),
2133
+ z.lazy(() => RetrieveMemoryStoresTool$outboundSchema),
2134
+ z.lazy(() => DeleteMemoryDocumentTool$outboundSchema),
2135
+ z.lazy(() => RetrieveKnowledgeBasesTool$outboundSchema),
2136
+ z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
2137
+ z.lazy(() => CurrentDateTool$outboundSchema),
2138
+ z.lazy(() => HTTPTool$outboundSchema),
2139
+ z.lazy(() => CodeExecutionTool$outboundSchema),
2140
+ z.lazy(() => FunctionTool$outboundSchema),
2141
+ ]),
2142
+ ),
2143
+ }).transform((v) => {
2144
+ return remap$(v, {
2145
+ maxIterations: "max_iterations",
2146
+ maxExecutionTime: "max_execution_time",
2147
+ toolApprovalRequired: "tool_approval_required",
2148
+ });
2149
+ });
2150
+
2151
+ /**
2152
+ * @internal
2153
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2154
+ */
2155
+ export namespace Settings$ {
2156
+ /** @deprecated use `Settings$inboundSchema` instead. */
2157
+ export const inboundSchema = Settings$inboundSchema;
2158
+ /** @deprecated use `Settings$outboundSchema` instead. */
2159
+ export const outboundSchema = Settings$outboundSchema;
2160
+ /** @deprecated use `Settings$Outbound` instead. */
2161
+ export type Outbound = Settings$Outbound;
2162
+ }
2163
+
2164
+ export function settingsToJSON(settings: Settings): string {
2165
+ return JSON.stringify(Settings$outboundSchema.parse(settings));
2166
+ }
2167
+
2168
+ export function settingsFromJSON(
2169
+ jsonString: string,
2170
+ ): SafeParseResult<Settings, SDKValidationError> {
2171
+ return safeParse(
2172
+ jsonString,
2173
+ (x) => Settings$inboundSchema.parse(JSON.parse(x)),
2174
+ `Failed to parse 'Settings' from JSON`,
2175
+ );
2176
+ }
2177
+
2178
+ /** @internal */
2179
+ export const KnowledgeBases$inboundSchema: z.ZodType<
2180
+ KnowledgeBases,
2181
+ z.ZodTypeDef,
2182
+ unknown
2183
+ > = z.object({
2184
+ knowledge_id: z.string(),
2185
+ }).transform((v) => {
2186
+ return remap$(v, {
2187
+ "knowledge_id": "knowledgeId",
2188
+ });
2189
+ });
2190
+
2191
+ /** @internal */
2192
+ export type KnowledgeBases$Outbound = {
2193
+ knowledge_id: string;
2194
+ };
2195
+
2196
+ /** @internal */
2197
+ export const KnowledgeBases$outboundSchema: z.ZodType<
2198
+ KnowledgeBases$Outbound,
2199
+ z.ZodTypeDef,
2200
+ KnowledgeBases
2201
+ > = z.object({
2202
+ knowledgeId: z.string(),
2203
+ }).transform((v) => {
2204
+ return remap$(v, {
2205
+ knowledgeId: "knowledge_id",
2206
+ });
2207
+ });
2208
+
2209
+ /**
2210
+ * @internal
2211
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2212
+ */
2213
+ export namespace KnowledgeBases$ {
2214
+ /** @deprecated use `KnowledgeBases$inboundSchema` instead. */
2215
+ export const inboundSchema = KnowledgeBases$inboundSchema;
2216
+ /** @deprecated use `KnowledgeBases$outboundSchema` instead. */
2217
+ export const outboundSchema = KnowledgeBases$outboundSchema;
2218
+ /** @deprecated use `KnowledgeBases$Outbound` instead. */
2219
+ export type Outbound = KnowledgeBases$Outbound;
2220
+ }
2221
+
2222
+ export function knowledgeBasesToJSON(knowledgeBases: KnowledgeBases): string {
2223
+ return JSON.stringify(KnowledgeBases$outboundSchema.parse(knowledgeBases));
2224
+ }
2225
+
2226
+ export function knowledgeBasesFromJSON(
2227
+ jsonString: string,
2228
+ ): SafeParseResult<KnowledgeBases, SDKValidationError> {
2229
+ return safeParse(
2230
+ jsonString,
2231
+ (x) => KnowledgeBases$inboundSchema.parse(JSON.parse(x)),
2232
+ `Failed to parse 'KnowledgeBases' from JSON`,
2233
+ );
2234
+ }
2235
+
2236
+ /** @internal */
2237
+ export const CreateAgentRequestBody$inboundSchema: z.ZodType<
2238
+ CreateAgentRequestBody,
2239
+ z.ZodTypeDef,
2240
+ unknown
2241
+ > = z.object({
2242
+ path: z.string(),
2243
+ key: z.string(),
2244
+ role: z.string(),
2245
+ description: z.string(),
2246
+ instructions: z.string(),
2247
+ system_prompt: z.string().optional(),
2248
+ model: z.string(),
2249
+ fallback_models: z.array(z.string()).optional(),
2250
+ settings: z.lazy(() => Settings$inboundSchema),
2251
+ memory_stores: z.array(z.string()).optional(),
2252
+ knowledge_bases: z.array(z.lazy(() => KnowledgeBases$inboundSchema))
2253
+ .optional(),
2254
+ }).transform((v) => {
2255
+ return remap$(v, {
2256
+ "system_prompt": "systemPrompt",
2257
+ "fallback_models": "fallbackModels",
2258
+ "memory_stores": "memoryStores",
2259
+ "knowledge_bases": "knowledgeBases",
2260
+ });
2261
+ });
2262
+
2263
+ /** @internal */
2264
+ export type CreateAgentRequestBody$Outbound = {
2265
+ path: string;
2266
+ key: string;
2267
+ role: string;
2268
+ description: string;
2269
+ instructions: string;
2270
+ system_prompt?: string | undefined;
2271
+ model: string;
2272
+ fallback_models?: Array<string> | undefined;
2273
+ settings: Settings$Outbound;
2274
+ memory_stores?: Array<string> | undefined;
2275
+ knowledge_bases?: Array<KnowledgeBases$Outbound> | undefined;
2276
+ };
2277
+
2278
+ /** @internal */
2279
+ export const CreateAgentRequestBody$outboundSchema: z.ZodType<
2280
+ CreateAgentRequestBody$Outbound,
2281
+ z.ZodTypeDef,
2282
+ CreateAgentRequestBody
2283
+ > = z.object({
2284
+ path: z.string(),
2285
+ key: z.string(),
2286
+ role: z.string(),
2287
+ description: z.string(),
2288
+ instructions: z.string(),
2289
+ systemPrompt: z.string().optional(),
2290
+ model: z.string(),
2291
+ fallbackModels: z.array(z.string()).optional(),
2292
+ settings: z.lazy(() => Settings$outboundSchema),
2293
+ memoryStores: z.array(z.string()).optional(),
2294
+ knowledgeBases: z.array(z.lazy(() => KnowledgeBases$outboundSchema))
2295
+ .optional(),
2296
+ }).transform((v) => {
2297
+ return remap$(v, {
2298
+ systemPrompt: "system_prompt",
2299
+ fallbackModels: "fallback_models",
2300
+ memoryStores: "memory_stores",
2301
+ knowledgeBases: "knowledge_bases",
2302
+ });
2303
+ });
2304
+
2305
+ /**
2306
+ * @internal
2307
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2308
+ */
2309
+ export namespace CreateAgentRequestBody$ {
2310
+ /** @deprecated use `CreateAgentRequestBody$inboundSchema` instead. */
2311
+ export const inboundSchema = CreateAgentRequestBody$inboundSchema;
2312
+ /** @deprecated use `CreateAgentRequestBody$outboundSchema` instead. */
2313
+ export const outboundSchema = CreateAgentRequestBody$outboundSchema;
2314
+ /** @deprecated use `CreateAgentRequestBody$Outbound` instead. */
2315
+ export type Outbound = CreateAgentRequestBody$Outbound;
2316
+ }
2317
+
2318
+ export function createAgentRequestBodyToJSON(
2319
+ createAgentRequestBody: CreateAgentRequestBody,
2320
+ ): string {
2321
+ return JSON.stringify(
2322
+ CreateAgentRequestBody$outboundSchema.parse(createAgentRequestBody),
2323
+ );
2324
+ }
2325
+
2326
+ export function createAgentRequestBodyFromJSON(
2327
+ jsonString: string,
2328
+ ): SafeParseResult<CreateAgentRequestBody, SDKValidationError> {
2329
+ return safeParse(
2330
+ jsonString,
2331
+ (x) => CreateAgentRequestBody$inboundSchema.parse(JSON.parse(x)),
2332
+ `Failed to parse 'CreateAgentRequestBody' from JSON`,
2333
+ );
2334
+ }
2335
+
2336
+ /** @internal */
2337
+ export const CreateAgentStatus$inboundSchema: z.ZodNativeEnum<
2338
+ typeof CreateAgentStatus
2339
+ > = z.nativeEnum(CreateAgentStatus);
2340
+
2341
+ /** @internal */
2342
+ export const CreateAgentStatus$outboundSchema: z.ZodNativeEnum<
2343
+ typeof CreateAgentStatus
2344
+ > = CreateAgentStatus$inboundSchema;
2345
+
2346
+ /**
2347
+ * @internal
2348
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2349
+ */
2350
+ export namespace CreateAgentStatus$ {
2351
+ /** @deprecated use `CreateAgentStatus$inboundSchema` instead. */
2352
+ export const inboundSchema = CreateAgentStatus$inboundSchema;
2353
+ /** @deprecated use `CreateAgentStatus$outboundSchema` instead. */
2354
+ export const outboundSchema = CreateAgentStatus$outboundSchema;
2355
+ }
2356
+
2357
+ /** @internal */
2358
+ export const CreateAgentToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
2359
+ typeof CreateAgentToolApprovalRequired
2360
+ > = z.nativeEnum(CreateAgentToolApprovalRequired);
2361
+
2362
+ /** @internal */
2363
+ export const CreateAgentToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
2364
+ typeof CreateAgentToolApprovalRequired
2365
+ > = CreateAgentToolApprovalRequired$inboundSchema;
2366
+
2367
+ /**
2368
+ * @internal
2369
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2370
+ */
2371
+ export namespace CreateAgentToolApprovalRequired$ {
2372
+ /** @deprecated use `CreateAgentToolApprovalRequired$inboundSchema` instead. */
2373
+ export const inboundSchema = CreateAgentToolApprovalRequired$inboundSchema;
2374
+ /** @deprecated use `CreateAgentToolApprovalRequired$outboundSchema` instead. */
2375
+ export const outboundSchema = CreateAgentToolApprovalRequired$outboundSchema;
2376
+ }
2377
+
2378
+ /** @internal */
2379
+ export const Conditions$inboundSchema: z.ZodType<
2380
+ Conditions,
2381
+ z.ZodTypeDef,
2382
+ unknown
2383
+ > = z.object({
2384
+ condition: z.string(),
2385
+ operator: z.string(),
2386
+ value: z.string(),
2387
+ });
2388
+
2389
+ /** @internal */
2390
+ export type Conditions$Outbound = {
2391
+ condition: string;
2392
+ operator: string;
2393
+ value: string;
2394
+ };
2395
+
2396
+ /** @internal */
2397
+ export const Conditions$outboundSchema: z.ZodType<
2398
+ Conditions$Outbound,
2399
+ z.ZodTypeDef,
2400
+ Conditions
2401
+ > = z.object({
2402
+ condition: z.string(),
2403
+ operator: z.string(),
2404
+ value: z.string(),
2405
+ });
2406
+
2407
+ /**
2408
+ * @internal
2409
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2410
+ */
2411
+ export namespace Conditions$ {
2412
+ /** @deprecated use `Conditions$inboundSchema` instead. */
2413
+ export const inboundSchema = Conditions$inboundSchema;
2414
+ /** @deprecated use `Conditions$outboundSchema` instead. */
2415
+ export const outboundSchema = Conditions$outboundSchema;
2416
+ /** @deprecated use `Conditions$Outbound` instead. */
2417
+ export type Outbound = Conditions$Outbound;
2418
+ }
2419
+
2420
+ export function conditionsToJSON(conditions: Conditions): string {
2421
+ return JSON.stringify(Conditions$outboundSchema.parse(conditions));
2422
+ }
2423
+
2424
+ export function conditionsFromJSON(
2425
+ jsonString: string,
2426
+ ): SafeParseResult<Conditions, SDKValidationError> {
2427
+ return safeParse(
2428
+ jsonString,
2429
+ (x) => Conditions$inboundSchema.parse(JSON.parse(x)),
2430
+ `Failed to parse 'Conditions' from JSON`,
2431
+ );
2432
+ }
2433
+
2434
+ /** @internal */
2435
+ export const CreateAgentTools$inboundSchema: z.ZodType<
2436
+ CreateAgentTools,
2437
+ z.ZodTypeDef,
2438
+ unknown
2439
+ > = z.object({
2440
+ id: z.string(),
2441
+ key: z.string().optional(),
2442
+ action_type: z.string(),
2443
+ display_name: z.string().optional(),
2444
+ requires_approval: z.boolean().default(false),
2445
+ conditions: z.array(z.lazy(() => Conditions$inboundSchema)).optional(),
2446
+ mcpServer: z.string().optional(),
2447
+ timeout: z.number().default(120),
2448
+ }).transform((v) => {
2449
+ return remap$(v, {
2450
+ "action_type": "actionType",
2451
+ "display_name": "displayName",
2452
+ "requires_approval": "requiresApproval",
2453
+ });
2454
+ });
2455
+
2456
+ /** @internal */
2457
+ export type CreateAgentTools$Outbound = {
2458
+ id: string;
2459
+ key?: string | undefined;
2460
+ action_type: string;
2461
+ display_name?: string | undefined;
2462
+ requires_approval: boolean;
2463
+ conditions?: Array<Conditions$Outbound> | undefined;
2464
+ mcpServer?: string | undefined;
2465
+ timeout: number;
2466
+ };
2467
+
2468
+ /** @internal */
2469
+ export const CreateAgentTools$outboundSchema: z.ZodType<
2470
+ CreateAgentTools$Outbound,
2471
+ z.ZodTypeDef,
2472
+ CreateAgentTools
2473
+ > = z.object({
2474
+ id: z.string(),
2475
+ key: z.string().optional(),
2476
+ actionType: z.string(),
2477
+ displayName: z.string().optional(),
2478
+ requiresApproval: z.boolean().default(false),
2479
+ conditions: z.array(z.lazy(() => Conditions$outboundSchema)).optional(),
2480
+ mcpServer: z.string().optional(),
2481
+ timeout: z.number().default(120),
2482
+ }).transform((v) => {
2483
+ return remap$(v, {
2484
+ actionType: "action_type",
2485
+ displayName: "display_name",
2486
+ requiresApproval: "requires_approval",
2487
+ });
2488
+ });
2489
+
2490
+ /**
2491
+ * @internal
2492
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2493
+ */
2494
+ export namespace CreateAgentTools$ {
2495
+ /** @deprecated use `CreateAgentTools$inboundSchema` instead. */
2496
+ export const inboundSchema = CreateAgentTools$inboundSchema;
2497
+ /** @deprecated use `CreateAgentTools$outboundSchema` instead. */
2498
+ export const outboundSchema = CreateAgentTools$outboundSchema;
2499
+ /** @deprecated use `CreateAgentTools$Outbound` instead. */
2500
+ export type Outbound = CreateAgentTools$Outbound;
2501
+ }
2502
+
2503
+ export function createAgentToolsToJSON(
2504
+ createAgentTools: CreateAgentTools,
2505
+ ): string {
2506
+ return JSON.stringify(
2507
+ CreateAgentTools$outboundSchema.parse(createAgentTools),
2508
+ );
2509
+ }
2510
+
2511
+ export function createAgentToolsFromJSON(
2512
+ jsonString: string,
2513
+ ): SafeParseResult<CreateAgentTools, SDKValidationError> {
2514
+ return safeParse(
2515
+ jsonString,
2516
+ (x) => CreateAgentTools$inboundSchema.parse(JSON.parse(x)),
2517
+ `Failed to parse 'CreateAgentTools' from JSON`,
2518
+ );
2519
+ }
2520
+
2521
+ /** @internal */
2522
+ export const CreateAgentSettings$inboundSchema: z.ZodType<
2523
+ CreateAgentSettings,
2524
+ z.ZodTypeDef,
2525
+ unknown
2526
+ > = z.object({
2527
+ max_iterations: z.number().int().default(15),
2528
+ max_execution_time: z.number().int().default(300),
2529
+ tool_approval_required: CreateAgentToolApprovalRequired$inboundSchema.default(
2530
+ "respect_tool",
2531
+ ),
2532
+ tools: z.array(z.lazy(() => CreateAgentTools$inboundSchema)),
2533
+ }).transform((v) => {
2534
+ return remap$(v, {
2535
+ "max_iterations": "maxIterations",
2536
+ "max_execution_time": "maxExecutionTime",
2537
+ "tool_approval_required": "toolApprovalRequired",
2538
+ });
2539
+ });
2540
+
2541
+ /** @internal */
2542
+ export type CreateAgentSettings$Outbound = {
2543
+ max_iterations: number;
2544
+ max_execution_time: number;
2545
+ tool_approval_required: string;
2546
+ tools: Array<CreateAgentTools$Outbound>;
2547
+ };
2548
+
2549
+ /** @internal */
2550
+ export const CreateAgentSettings$outboundSchema: z.ZodType<
2551
+ CreateAgentSettings$Outbound,
2552
+ z.ZodTypeDef,
2553
+ CreateAgentSettings
2554
+ > = z.object({
2555
+ maxIterations: z.number().int().default(15),
2556
+ maxExecutionTime: z.number().int().default(300),
2557
+ toolApprovalRequired: CreateAgentToolApprovalRequired$outboundSchema.default(
2558
+ "respect_tool",
2559
+ ),
2560
+ tools: z.array(z.lazy(() => CreateAgentTools$outboundSchema)),
2561
+ }).transform((v) => {
2562
+ return remap$(v, {
2563
+ maxIterations: "max_iterations",
2564
+ maxExecutionTime: "max_execution_time",
2565
+ toolApprovalRequired: "tool_approval_required",
2566
+ });
2567
+ });
2568
+
2569
+ /**
2570
+ * @internal
2571
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2572
+ */
2573
+ export namespace CreateAgentSettings$ {
2574
+ /** @deprecated use `CreateAgentSettings$inboundSchema` instead. */
2575
+ export const inboundSchema = CreateAgentSettings$inboundSchema;
2576
+ /** @deprecated use `CreateAgentSettings$outboundSchema` instead. */
2577
+ export const outboundSchema = CreateAgentSettings$outboundSchema;
2578
+ /** @deprecated use `CreateAgentSettings$Outbound` instead. */
2579
+ export type Outbound = CreateAgentSettings$Outbound;
2580
+ }
2581
+
2582
+ export function createAgentSettingsToJSON(
2583
+ createAgentSettings: CreateAgentSettings,
2584
+ ): string {
2585
+ return JSON.stringify(
2586
+ CreateAgentSettings$outboundSchema.parse(createAgentSettings),
2587
+ );
2588
+ }
2589
+
2590
+ export function createAgentSettingsFromJSON(
2591
+ jsonString: string,
2592
+ ): SafeParseResult<CreateAgentSettings, SDKValidationError> {
2593
+ return safeParse(
2594
+ jsonString,
2595
+ (x) => CreateAgentSettings$inboundSchema.parse(JSON.parse(x)),
2596
+ `Failed to parse 'CreateAgentSettings' from JSON`,
2597
+ );
2598
+ }
2599
+
2600
+ /** @internal */
2601
+ export const CreateAgentModel$inboundSchema: z.ZodType<
2602
+ CreateAgentModel,
2603
+ z.ZodTypeDef,
2604
+ unknown
2605
+ > = z.object({
2606
+ id: z.string(),
2607
+ integration_id: z.nullable(z.string()).optional(),
2608
+ fallback_models: z.nullable(z.array(z.string())).optional(),
2609
+ max_tokens: z.number().int().optional(),
2610
+ temperature: z.number().optional(),
2611
+ }).transform((v) => {
2612
+ return remap$(v, {
2613
+ "integration_id": "integrationId",
2614
+ "fallback_models": "fallbackModels",
2615
+ "max_tokens": "maxTokens",
2616
+ });
2617
+ });
2618
+
2619
+ /** @internal */
2620
+ export type CreateAgentModel$Outbound = {
2621
+ id: string;
2622
+ integration_id?: string | null | undefined;
2623
+ fallback_models?: Array<string> | null | undefined;
2624
+ max_tokens?: number | undefined;
2625
+ temperature?: number | undefined;
2626
+ };
2627
+
2628
+ /** @internal */
2629
+ export const CreateAgentModel$outboundSchema: z.ZodType<
2630
+ CreateAgentModel$Outbound,
2631
+ z.ZodTypeDef,
2632
+ CreateAgentModel
2633
+ > = z.object({
2634
+ id: z.string(),
2635
+ integrationId: z.nullable(z.string()).optional(),
2636
+ fallbackModels: z.nullable(z.array(z.string())).optional(),
2637
+ maxTokens: z.number().int().optional(),
2638
+ temperature: z.number().optional(),
2639
+ }).transform((v) => {
2640
+ return remap$(v, {
2641
+ integrationId: "integration_id",
2642
+ fallbackModels: "fallback_models",
2643
+ maxTokens: "max_tokens",
2644
+ });
2645
+ });
2646
+
2647
+ /**
2648
+ * @internal
2649
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2650
+ */
2651
+ export namespace CreateAgentModel$ {
2652
+ /** @deprecated use `CreateAgentModel$inboundSchema` instead. */
2653
+ export const inboundSchema = CreateAgentModel$inboundSchema;
2654
+ /** @deprecated use `CreateAgentModel$outboundSchema` instead. */
2655
+ export const outboundSchema = CreateAgentModel$outboundSchema;
2656
+ /** @deprecated use `CreateAgentModel$Outbound` instead. */
2657
+ export type Outbound = CreateAgentModel$Outbound;
2658
+ }
2659
+
2660
+ export function createAgentModelToJSON(
2661
+ createAgentModel: CreateAgentModel,
2662
+ ): string {
2663
+ return JSON.stringify(
2664
+ CreateAgentModel$outboundSchema.parse(createAgentModel),
2665
+ );
2666
+ }
2667
+
2668
+ export function createAgentModelFromJSON(
2669
+ jsonString: string,
2670
+ ): SafeParseResult<CreateAgentModel, SDKValidationError> {
2671
+ return safeParse(
2672
+ jsonString,
2673
+ (x) => CreateAgentModel$inboundSchema.parse(JSON.parse(x)),
2674
+ `Failed to parse 'CreateAgentModel' from JSON`,
2675
+ );
2676
+ }
2677
+
2678
+ /** @internal */
2679
+ export const CreateAgentTeamOfAgents$inboundSchema: z.ZodType<
2680
+ CreateAgentTeamOfAgents,
2681
+ z.ZodTypeDef,
2682
+ unknown
2683
+ > = z.object({
2684
+ key: z.string(),
2685
+ role: z.string().optional(),
2686
+ });
2687
+
2688
+ /** @internal */
2689
+ export type CreateAgentTeamOfAgents$Outbound = {
2690
+ key: string;
2691
+ role?: string | undefined;
2692
+ };
2693
+
2694
+ /** @internal */
2695
+ export const CreateAgentTeamOfAgents$outboundSchema: z.ZodType<
2696
+ CreateAgentTeamOfAgents$Outbound,
2697
+ z.ZodTypeDef,
2698
+ CreateAgentTeamOfAgents
2699
+ > = z.object({
2700
+ key: z.string(),
2701
+ role: z.string().optional(),
2702
+ });
2703
+
2704
+ /**
2705
+ * @internal
2706
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2707
+ */
2708
+ export namespace CreateAgentTeamOfAgents$ {
2709
+ /** @deprecated use `CreateAgentTeamOfAgents$inboundSchema` instead. */
2710
+ export const inboundSchema = CreateAgentTeamOfAgents$inboundSchema;
2711
+ /** @deprecated use `CreateAgentTeamOfAgents$outboundSchema` instead. */
2712
+ export const outboundSchema = CreateAgentTeamOfAgents$outboundSchema;
2713
+ /** @deprecated use `CreateAgentTeamOfAgents$Outbound` instead. */
2714
+ export type Outbound = CreateAgentTeamOfAgents$Outbound;
2715
+ }
2716
+
2717
+ export function createAgentTeamOfAgentsToJSON(
2718
+ createAgentTeamOfAgents: CreateAgentTeamOfAgents,
2719
+ ): string {
2720
+ return JSON.stringify(
2721
+ CreateAgentTeamOfAgents$outboundSchema.parse(createAgentTeamOfAgents),
2722
+ );
2723
+ }
2724
+
2725
+ export function createAgentTeamOfAgentsFromJSON(
2726
+ jsonString: string,
2727
+ ): SafeParseResult<CreateAgentTeamOfAgents, SDKValidationError> {
2728
+ return safeParse(
2729
+ jsonString,
2730
+ (x) => CreateAgentTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
2731
+ `Failed to parse 'CreateAgentTeamOfAgents' from JSON`,
2732
+ );
2733
+ }
2734
+
2735
+ /** @internal */
2736
+ export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
2737
+ z.object({
2738
+ total_cost: z.number().default(0),
2739
+ }).transform((v) => {
2740
+ return remap$(v, {
2741
+ "total_cost": "totalCost",
2742
+ });
2743
+ });
2744
+
2745
+ /** @internal */
2746
+ export type Metrics$Outbound = {
2747
+ total_cost: number;
2748
+ };
2749
+
2750
+ /** @internal */
2751
+ export const Metrics$outboundSchema: z.ZodType<
2752
+ Metrics$Outbound,
2753
+ z.ZodTypeDef,
2754
+ Metrics
2755
+ > = z.object({
2756
+ totalCost: z.number().default(0),
2757
+ }).transform((v) => {
2758
+ return remap$(v, {
2759
+ totalCost: "total_cost",
2760
+ });
2761
+ });
2762
+
2763
+ /**
2764
+ * @internal
2765
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2766
+ */
2767
+ export namespace Metrics$ {
2768
+ /** @deprecated use `Metrics$inboundSchema` instead. */
2769
+ export const inboundSchema = Metrics$inboundSchema;
2770
+ /** @deprecated use `Metrics$outboundSchema` instead. */
2771
+ export const outboundSchema = Metrics$outboundSchema;
2772
+ /** @deprecated use `Metrics$Outbound` instead. */
2773
+ export type Outbound = Metrics$Outbound;
2774
+ }
2775
+
2776
+ export function metricsToJSON(metrics: Metrics): string {
2777
+ return JSON.stringify(Metrics$outboundSchema.parse(metrics));
2778
+ }
2779
+
2780
+ export function metricsFromJSON(
2781
+ jsonString: string,
2782
+ ): SafeParseResult<Metrics, SDKValidationError> {
2783
+ return safeParse(
2784
+ jsonString,
2785
+ (x) => Metrics$inboundSchema.parse(JSON.parse(x)),
2786
+ `Failed to parse 'Metrics' from JSON`,
2787
+ );
2788
+ }
2789
+
2790
+ /** @internal */
2791
+ export const CreateAgentKnowledgeBases$inboundSchema: z.ZodType<
2792
+ CreateAgentKnowledgeBases,
2793
+ z.ZodTypeDef,
2794
+ unknown
2795
+ > = z.object({
2796
+ knowledge_id: z.string(),
2797
+ }).transform((v) => {
2798
+ return remap$(v, {
2799
+ "knowledge_id": "knowledgeId",
2800
+ });
2801
+ });
2802
+
2803
+ /** @internal */
2804
+ export type CreateAgentKnowledgeBases$Outbound = {
2805
+ knowledge_id: string;
2806
+ };
2807
+
2808
+ /** @internal */
2809
+ export const CreateAgentKnowledgeBases$outboundSchema: z.ZodType<
2810
+ CreateAgentKnowledgeBases$Outbound,
2811
+ z.ZodTypeDef,
2812
+ CreateAgentKnowledgeBases
2813
+ > = z.object({
2814
+ knowledgeId: z.string(),
2815
+ }).transform((v) => {
2816
+ return remap$(v, {
2817
+ knowledgeId: "knowledge_id",
2818
+ });
2819
+ });
2820
+
2821
+ /**
2822
+ * @internal
2823
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2824
+ */
2825
+ export namespace CreateAgentKnowledgeBases$ {
2826
+ /** @deprecated use `CreateAgentKnowledgeBases$inboundSchema` instead. */
2827
+ export const inboundSchema = CreateAgentKnowledgeBases$inboundSchema;
2828
+ /** @deprecated use `CreateAgentKnowledgeBases$outboundSchema` instead. */
2829
+ export const outboundSchema = CreateAgentKnowledgeBases$outboundSchema;
2830
+ /** @deprecated use `CreateAgentKnowledgeBases$Outbound` instead. */
2831
+ export type Outbound = CreateAgentKnowledgeBases$Outbound;
2832
+ }
2833
+
2834
+ export function createAgentKnowledgeBasesToJSON(
2835
+ createAgentKnowledgeBases: CreateAgentKnowledgeBases,
2836
+ ): string {
2837
+ return JSON.stringify(
2838
+ CreateAgentKnowledgeBases$outboundSchema.parse(createAgentKnowledgeBases),
2839
+ );
2840
+ }
2841
+
2842
+ export function createAgentKnowledgeBasesFromJSON(
2843
+ jsonString: string,
2844
+ ): SafeParseResult<CreateAgentKnowledgeBases, SDKValidationError> {
2845
+ return safeParse(
2846
+ jsonString,
2847
+ (x) => CreateAgentKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
2848
+ `Failed to parse 'CreateAgentKnowledgeBases' from JSON`,
2849
+ );
2850
+ }
2851
+
2852
+ /** @internal */
2853
+ export const HiddenPanels$inboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
2854
+ z.nativeEnum(HiddenPanels);
2855
+
2856
+ /** @internal */
2857
+ export const HiddenPanels$outboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
2858
+ HiddenPanels$inboundSchema;
2859
+
2860
+ /**
2861
+ * @internal
2862
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2863
+ */
2864
+ export namespace HiddenPanels$ {
2865
+ /** @deprecated use `HiddenPanels$inboundSchema` instead. */
2866
+ export const inboundSchema = HiddenPanels$inboundSchema;
2867
+ /** @deprecated use `HiddenPanels$outboundSchema` instead. */
2868
+ export const outboundSchema = HiddenPanels$outboundSchema;
2869
+ }
2870
+
2871
+ /** @internal */
2872
+ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
2873
+ CreateAgentResponseBody,
2874
+ z.ZodTypeDef,
2875
+ unknown
2876
+ > = z.object({
2877
+ _id: z.string(),
2878
+ key: z.string(),
2879
+ workspace_id: z.string(),
2880
+ project_id: z.string(),
2881
+ created_by_id: z.nullable(z.string()).optional(),
2882
+ updated_by_id: z.nullable(z.string()).optional(),
2883
+ created: z.string().optional(),
2884
+ updated: z.string().optional(),
2885
+ role: z.string(),
2886
+ description: z.string(),
2887
+ system_prompt: z.string().optional(),
2888
+ instructions: z.string(),
2889
+ status: CreateAgentStatus$inboundSchema,
2890
+ settings: z.lazy(() => CreateAgentSettings$inboundSchema).optional(),
2891
+ model: z.lazy(() => CreateAgentModel$inboundSchema),
2892
+ version_hash: z.string().optional(),
2893
+ path: z.string(),
2894
+ memory_stores: z.array(z.string()),
2895
+ team_of_agents: z.array(z.lazy(() => CreateAgentTeamOfAgents$inboundSchema)),
2896
+ metrics: z.lazy(() => Metrics$inboundSchema).optional(),
2897
+ variables: z.record(z.any()).optional(),
2898
+ knowledge_bases: z.array(
2899
+ z.lazy(() => CreateAgentKnowledgeBases$inboundSchema),
2900
+ ).optional(),
2901
+ hidden_panels: z.array(HiddenPanels$inboundSchema).optional(),
2902
+ }).transform((v) => {
2903
+ return remap$(v, {
2904
+ "_id": "id",
2905
+ "workspace_id": "workspaceId",
2906
+ "project_id": "projectId",
2907
+ "created_by_id": "createdById",
2908
+ "updated_by_id": "updatedById",
2909
+ "system_prompt": "systemPrompt",
2910
+ "version_hash": "versionHash",
2911
+ "memory_stores": "memoryStores",
2912
+ "team_of_agents": "teamOfAgents",
2913
+ "knowledge_bases": "knowledgeBases",
2914
+ "hidden_panels": "hiddenPanels",
2915
+ });
2916
+ });
2917
+
2918
+ /** @internal */
2919
+ export type CreateAgentResponseBody$Outbound = {
2920
+ _id: string;
2921
+ key: string;
2922
+ workspace_id: string;
2923
+ project_id: string;
2924
+ created_by_id?: string | null | undefined;
2925
+ updated_by_id?: string | null | undefined;
2926
+ created?: string | undefined;
2927
+ updated?: string | undefined;
2928
+ role: string;
2929
+ description: string;
2930
+ system_prompt?: string | undefined;
2931
+ instructions: string;
2932
+ status: string;
2933
+ settings?: CreateAgentSettings$Outbound | undefined;
2934
+ model: CreateAgentModel$Outbound;
2935
+ version_hash?: string | undefined;
2936
+ path: string;
2937
+ memory_stores: Array<string>;
2938
+ team_of_agents: Array<CreateAgentTeamOfAgents$Outbound>;
2939
+ metrics?: Metrics$Outbound | undefined;
2940
+ variables?: { [k: string]: any } | undefined;
2941
+ knowledge_bases?: Array<CreateAgentKnowledgeBases$Outbound> | undefined;
2942
+ hidden_panels?: Array<string> | undefined;
2943
+ };
2944
+
2945
+ /** @internal */
2946
+ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
2947
+ CreateAgentResponseBody$Outbound,
2948
+ z.ZodTypeDef,
2949
+ CreateAgentResponseBody
2950
+ > = z.object({
2951
+ id: z.string(),
2952
+ key: z.string(),
2953
+ workspaceId: z.string(),
2954
+ projectId: z.string(),
2955
+ createdById: z.nullable(z.string()).optional(),
2956
+ updatedById: z.nullable(z.string()).optional(),
2957
+ created: z.string().optional(),
2958
+ updated: z.string().optional(),
2959
+ role: z.string(),
2960
+ description: z.string(),
2961
+ systemPrompt: z.string().optional(),
2962
+ instructions: z.string(),
2963
+ status: CreateAgentStatus$outboundSchema,
2964
+ settings: z.lazy(() => CreateAgentSettings$outboundSchema).optional(),
2965
+ model: z.lazy(() => CreateAgentModel$outboundSchema),
2966
+ versionHash: z.string().optional(),
2967
+ path: z.string(),
2968
+ memoryStores: z.array(z.string()),
2969
+ teamOfAgents: z.array(z.lazy(() => CreateAgentTeamOfAgents$outboundSchema)),
2970
+ metrics: z.lazy(() => Metrics$outboundSchema).optional(),
2971
+ variables: z.record(z.any()).optional(),
2972
+ knowledgeBases: z.array(
2973
+ z.lazy(() => CreateAgentKnowledgeBases$outboundSchema),
2974
+ ).optional(),
2975
+ hiddenPanels: z.array(HiddenPanels$outboundSchema).optional(),
2976
+ }).transform((v) => {
2977
+ return remap$(v, {
2978
+ id: "_id",
2979
+ workspaceId: "workspace_id",
2980
+ projectId: "project_id",
2981
+ createdById: "created_by_id",
2982
+ updatedById: "updated_by_id",
2983
+ systemPrompt: "system_prompt",
2984
+ versionHash: "version_hash",
2985
+ memoryStores: "memory_stores",
2986
+ teamOfAgents: "team_of_agents",
2987
+ knowledgeBases: "knowledge_bases",
2988
+ hiddenPanels: "hidden_panels",
2989
+ });
2990
+ });
2991
+
2992
+ /**
2993
+ * @internal
2994
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2995
+ */
2996
+ export namespace CreateAgentResponseBody$ {
2997
+ /** @deprecated use `CreateAgentResponseBody$inboundSchema` instead. */
2998
+ export const inboundSchema = CreateAgentResponseBody$inboundSchema;
2999
+ /** @deprecated use `CreateAgentResponseBody$outboundSchema` instead. */
3000
+ export const outboundSchema = CreateAgentResponseBody$outboundSchema;
3001
+ /** @deprecated use `CreateAgentResponseBody$Outbound` instead. */
3002
+ export type Outbound = CreateAgentResponseBody$Outbound;
3003
+ }
3004
+
3005
+ export function createAgentResponseBodyToJSON(
3006
+ createAgentResponseBody: CreateAgentResponseBody,
3007
+ ): string {
3008
+ return JSON.stringify(
3009
+ CreateAgentResponseBody$outboundSchema.parse(createAgentResponseBody),
3010
+ );
3011
+ }
3012
+
3013
+ export function createAgentResponseBodyFromJSON(
3014
+ jsonString: string,
3015
+ ): SafeParseResult<CreateAgentResponseBody, SDKValidationError> {
3016
+ return safeParse(
3017
+ jsonString,
3018
+ (x) => CreateAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
3019
+ `Failed to parse 'CreateAgentResponseBody' from JSON`,
3020
+ );
3021
+ }