@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,3027 @@
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
+ * Entity storage path in the format: `project/folder/subfolder/...`
620
+ *
621
+ * @remarks
622
+ *
623
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
624
+ *
625
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
626
+ */
627
+ path: string;
628
+ memoryStores: Array<string>;
629
+ /**
630
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
631
+ */
632
+ teamOfAgents: Array<CreateAgentTeamOfAgents>;
633
+ metrics?: Metrics | undefined;
634
+ /**
635
+ * Extracted variables from agent instructions
636
+ */
637
+ variables?: { [k: string]: any } | undefined;
638
+ /**
639
+ * Agent knowledge bases reference
640
+ */
641
+ knowledgeBases?: Array<CreateAgentKnowledgeBases> | undefined;
642
+ /**
643
+ * List of hidden collapsed panels in configuration. Duplicates are not allowed.
644
+ */
645
+ hiddenPanels?: Array<HiddenPanels> | undefined;
646
+ };
647
+
648
+ /** @internal */
649
+ export const ToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
650
+ typeof ToolApprovalRequired
651
+ > = z.nativeEnum(ToolApprovalRequired);
652
+
653
+ /** @internal */
654
+ export const ToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
655
+ typeof ToolApprovalRequired
656
+ > = ToolApprovalRequired$inboundSchema;
657
+
658
+ /**
659
+ * @internal
660
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
661
+ */
662
+ export namespace ToolApprovalRequired$ {
663
+ /** @deprecated use `ToolApprovalRequired$inboundSchema` instead. */
664
+ export const inboundSchema = ToolApprovalRequired$inboundSchema;
665
+ /** @deprecated use `ToolApprovalRequired$outboundSchema` instead. */
666
+ export const outboundSchema = ToolApprovalRequired$outboundSchema;
667
+ }
668
+
669
+ /** @internal */
670
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema:
671
+ z.ZodNativeEnum<
672
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type
673
+ > = z.nativeEnum(
674
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type,
675
+ );
676
+
677
+ /** @internal */
678
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema:
679
+ z.ZodNativeEnum<
680
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type
681
+ > =
682
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema;
683
+
684
+ /**
685
+ * @internal
686
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
687
+ */
688
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$ {
689
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema` instead. */
690
+ export const inboundSchema =
691
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema;
692
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema` instead. */
693
+ export const outboundSchema =
694
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema;
695
+ }
696
+
697
+ /** @internal */
698
+ export const FunctionTool$inboundSchema: z.ZodType<
699
+ FunctionTool,
700
+ z.ZodTypeDef,
701
+ unknown
702
+ > = z.object({
703
+ type:
704
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$inboundSchema,
705
+ key: z.string().optional(),
706
+ id: z.string().optional(),
707
+ requires_approval: z.boolean().default(false),
708
+ }).transform((v) => {
709
+ return remap$(v, {
710
+ "requires_approval": "requiresApproval",
711
+ });
712
+ });
713
+
714
+ /** @internal */
715
+ export type FunctionTool$Outbound = {
716
+ type: string;
717
+ key?: string | undefined;
718
+ id?: string | undefined;
719
+ requires_approval: boolean;
720
+ };
721
+
722
+ /** @internal */
723
+ export const FunctionTool$outboundSchema: z.ZodType<
724
+ FunctionTool$Outbound,
725
+ z.ZodTypeDef,
726
+ FunctionTool
727
+ > = z.object({
728
+ type:
729
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools14Type$outboundSchema,
730
+ key: z.string().optional(),
731
+ id: z.string().optional(),
732
+ requiresApproval: z.boolean().default(false),
733
+ }).transform((v) => {
734
+ return remap$(v, {
735
+ requiresApproval: "requires_approval",
736
+ });
737
+ });
738
+
739
+ /**
740
+ * @internal
741
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
742
+ */
743
+ export namespace FunctionTool$ {
744
+ /** @deprecated use `FunctionTool$inboundSchema` instead. */
745
+ export const inboundSchema = FunctionTool$inboundSchema;
746
+ /** @deprecated use `FunctionTool$outboundSchema` instead. */
747
+ export const outboundSchema = FunctionTool$outboundSchema;
748
+ /** @deprecated use `FunctionTool$Outbound` instead. */
749
+ export type Outbound = FunctionTool$Outbound;
750
+ }
751
+
752
+ export function functionToolToJSON(functionTool: FunctionTool): string {
753
+ return JSON.stringify(FunctionTool$outboundSchema.parse(functionTool));
754
+ }
755
+
756
+ export function functionToolFromJSON(
757
+ jsonString: string,
758
+ ): SafeParseResult<FunctionTool, SDKValidationError> {
759
+ return safeParse(
760
+ jsonString,
761
+ (x) => FunctionTool$inboundSchema.parse(JSON.parse(x)),
762
+ `Failed to parse 'FunctionTool' from JSON`,
763
+ );
764
+ }
765
+
766
+ /** @internal */
767
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema:
768
+ z.ZodNativeEnum<
769
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type
770
+ > = z.nativeEnum(
771
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type,
772
+ );
773
+
774
+ /** @internal */
775
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema:
776
+ z.ZodNativeEnum<
777
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type
778
+ > =
779
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema;
780
+
781
+ /**
782
+ * @internal
783
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
784
+ */
785
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$ {
786
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema` instead. */
787
+ export const inboundSchema =
788
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema;
789
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema` instead. */
790
+ export const outboundSchema =
791
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema;
792
+ }
793
+
794
+ /** @internal */
795
+ export const CodeExecutionTool$inboundSchema: z.ZodType<
796
+ CodeExecutionTool,
797
+ z.ZodTypeDef,
798
+ unknown
799
+ > = z.object({
800
+ type:
801
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$inboundSchema,
802
+ key: z.string().optional(),
803
+ id: z.string().optional(),
804
+ requires_approval: z.boolean().default(false),
805
+ }).transform((v) => {
806
+ return remap$(v, {
807
+ "requires_approval": "requiresApproval",
808
+ });
809
+ });
810
+
811
+ /** @internal */
812
+ export type CodeExecutionTool$Outbound = {
813
+ type: string;
814
+ key?: string | undefined;
815
+ id?: string | undefined;
816
+ requires_approval: boolean;
817
+ };
818
+
819
+ /** @internal */
820
+ export const CodeExecutionTool$outboundSchema: z.ZodType<
821
+ CodeExecutionTool$Outbound,
822
+ z.ZodTypeDef,
823
+ CodeExecutionTool
824
+ > = z.object({
825
+ type:
826
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools13Type$outboundSchema,
827
+ key: z.string().optional(),
828
+ id: z.string().optional(),
829
+ requiresApproval: z.boolean().default(false),
830
+ }).transform((v) => {
831
+ return remap$(v, {
832
+ requiresApproval: "requires_approval",
833
+ });
834
+ });
835
+
836
+ /**
837
+ * @internal
838
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
839
+ */
840
+ export namespace CodeExecutionTool$ {
841
+ /** @deprecated use `CodeExecutionTool$inboundSchema` instead. */
842
+ export const inboundSchema = CodeExecutionTool$inboundSchema;
843
+ /** @deprecated use `CodeExecutionTool$outboundSchema` instead. */
844
+ export const outboundSchema = CodeExecutionTool$outboundSchema;
845
+ /** @deprecated use `CodeExecutionTool$Outbound` instead. */
846
+ export type Outbound = CodeExecutionTool$Outbound;
847
+ }
848
+
849
+ export function codeExecutionToolToJSON(
850
+ codeExecutionTool: CodeExecutionTool,
851
+ ): string {
852
+ return JSON.stringify(
853
+ CodeExecutionTool$outboundSchema.parse(codeExecutionTool),
854
+ );
855
+ }
856
+
857
+ export function codeExecutionToolFromJSON(
858
+ jsonString: string,
859
+ ): SafeParseResult<CodeExecutionTool, SDKValidationError> {
860
+ return safeParse(
861
+ jsonString,
862
+ (x) => CodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
863
+ `Failed to parse 'CodeExecutionTool' from JSON`,
864
+ );
865
+ }
866
+
867
+ /** @internal */
868
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema:
869
+ z.ZodNativeEnum<
870
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type
871
+ > = z.nativeEnum(
872
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type,
873
+ );
874
+
875
+ /** @internal */
876
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema:
877
+ z.ZodNativeEnum<
878
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type
879
+ > =
880
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema;
881
+
882
+ /**
883
+ * @internal
884
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
885
+ */
886
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$ {
887
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema` instead. */
888
+ export const inboundSchema =
889
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema;
890
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema` instead. */
891
+ export const outboundSchema =
892
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema;
893
+ }
894
+
895
+ /** @internal */
896
+ export const HTTPTool$inboundSchema: z.ZodType<
897
+ HTTPTool,
898
+ z.ZodTypeDef,
899
+ unknown
900
+ > = z.object({
901
+ type:
902
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$inboundSchema,
903
+ key: z.string().optional(),
904
+ id: z.string().optional(),
905
+ requires_approval: z.boolean().default(false),
906
+ }).transform((v) => {
907
+ return remap$(v, {
908
+ "requires_approval": "requiresApproval",
909
+ });
910
+ });
911
+
912
+ /** @internal */
913
+ export type HTTPTool$Outbound = {
914
+ type: string;
915
+ key?: string | undefined;
916
+ id?: string | undefined;
917
+ requires_approval: boolean;
918
+ };
919
+
920
+ /** @internal */
921
+ export const HTTPTool$outboundSchema: z.ZodType<
922
+ HTTPTool$Outbound,
923
+ z.ZodTypeDef,
924
+ HTTPTool
925
+ > = z.object({
926
+ type:
927
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools12Type$outboundSchema,
928
+ key: z.string().optional(),
929
+ id: z.string().optional(),
930
+ requiresApproval: z.boolean().default(false),
931
+ }).transform((v) => {
932
+ return remap$(v, {
933
+ requiresApproval: "requires_approval",
934
+ });
935
+ });
936
+
937
+ /**
938
+ * @internal
939
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
940
+ */
941
+ export namespace HTTPTool$ {
942
+ /** @deprecated use `HTTPTool$inboundSchema` instead. */
943
+ export const inboundSchema = HTTPTool$inboundSchema;
944
+ /** @deprecated use `HTTPTool$outboundSchema` instead. */
945
+ export const outboundSchema = HTTPTool$outboundSchema;
946
+ /** @deprecated use `HTTPTool$Outbound` instead. */
947
+ export type Outbound = HTTPTool$Outbound;
948
+ }
949
+
950
+ export function httpToolToJSON(httpTool: HTTPTool): string {
951
+ return JSON.stringify(HTTPTool$outboundSchema.parse(httpTool));
952
+ }
953
+
954
+ export function httpToolFromJSON(
955
+ jsonString: string,
956
+ ): SafeParseResult<HTTPTool, SDKValidationError> {
957
+ return safeParse(
958
+ jsonString,
959
+ (x) => HTTPTool$inboundSchema.parse(JSON.parse(x)),
960
+ `Failed to parse 'HTTPTool' from JSON`,
961
+ );
962
+ }
963
+
964
+ /** @internal */
965
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema:
966
+ z.ZodNativeEnum<
967
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type
968
+ > = z.nativeEnum(
969
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type,
970
+ );
971
+
972
+ /** @internal */
973
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema:
974
+ z.ZodNativeEnum<
975
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type
976
+ > =
977
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema;
978
+
979
+ /**
980
+ * @internal
981
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
982
+ */
983
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$ {
984
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema` instead. */
985
+ export const inboundSchema =
986
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema;
987
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema` instead. */
988
+ export const outboundSchema =
989
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema;
990
+ }
991
+
992
+ /** @internal */
993
+ export const CurrentDateTool$inboundSchema: z.ZodType<
994
+ CurrentDateTool,
995
+ z.ZodTypeDef,
996
+ unknown
997
+ > = z.object({
998
+ type:
999
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$inboundSchema,
1000
+ requires_approval: z.boolean().default(false),
1001
+ }).transform((v) => {
1002
+ return remap$(v, {
1003
+ "requires_approval": "requiresApproval",
1004
+ });
1005
+ });
1006
+
1007
+ /** @internal */
1008
+ export type CurrentDateTool$Outbound = {
1009
+ type: string;
1010
+ requires_approval: boolean;
1011
+ };
1012
+
1013
+ /** @internal */
1014
+ export const CurrentDateTool$outboundSchema: z.ZodType<
1015
+ CurrentDateTool$Outbound,
1016
+ z.ZodTypeDef,
1017
+ CurrentDateTool
1018
+ > = z.object({
1019
+ type:
1020
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools11Type$outboundSchema,
1021
+ requiresApproval: z.boolean().default(false),
1022
+ }).transform((v) => {
1023
+ return remap$(v, {
1024
+ requiresApproval: "requires_approval",
1025
+ });
1026
+ });
1027
+
1028
+ /**
1029
+ * @internal
1030
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1031
+ */
1032
+ export namespace CurrentDateTool$ {
1033
+ /** @deprecated use `CurrentDateTool$inboundSchema` instead. */
1034
+ export const inboundSchema = CurrentDateTool$inboundSchema;
1035
+ /** @deprecated use `CurrentDateTool$outboundSchema` instead. */
1036
+ export const outboundSchema = CurrentDateTool$outboundSchema;
1037
+ /** @deprecated use `CurrentDateTool$Outbound` instead. */
1038
+ export type Outbound = CurrentDateTool$Outbound;
1039
+ }
1040
+
1041
+ export function currentDateToolToJSON(
1042
+ currentDateTool: CurrentDateTool,
1043
+ ): string {
1044
+ return JSON.stringify(CurrentDateTool$outboundSchema.parse(currentDateTool));
1045
+ }
1046
+
1047
+ export function currentDateToolFromJSON(
1048
+ jsonString: string,
1049
+ ): SafeParseResult<CurrentDateTool, SDKValidationError> {
1050
+ return safeParse(
1051
+ jsonString,
1052
+ (x) => CurrentDateTool$inboundSchema.parse(JSON.parse(x)),
1053
+ `Failed to parse 'CurrentDateTool' from JSON`,
1054
+ );
1055
+ }
1056
+
1057
+ /** @internal */
1058
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema:
1059
+ z.ZodNativeEnum<
1060
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type
1061
+ > = z.nativeEnum(
1062
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type,
1063
+ );
1064
+
1065
+ /** @internal */
1066
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema:
1067
+ z.ZodNativeEnum<
1068
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type
1069
+ > =
1070
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema;
1071
+
1072
+ /**
1073
+ * @internal
1074
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1075
+ */
1076
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$ {
1077
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema` instead. */
1078
+ export const inboundSchema =
1079
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema;
1080
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema` instead. */
1081
+ export const outboundSchema =
1082
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema;
1083
+ }
1084
+
1085
+ /** @internal */
1086
+ export const QueryKnowledgeBaseTool$inboundSchema: z.ZodType<
1087
+ QueryKnowledgeBaseTool,
1088
+ z.ZodTypeDef,
1089
+ unknown
1090
+ > = z.object({
1091
+ type:
1092
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$inboundSchema,
1093
+ requires_approval: z.boolean().default(false),
1094
+ }).transform((v) => {
1095
+ return remap$(v, {
1096
+ "requires_approval": "requiresApproval",
1097
+ });
1098
+ });
1099
+
1100
+ /** @internal */
1101
+ export type QueryKnowledgeBaseTool$Outbound = {
1102
+ type: string;
1103
+ requires_approval: boolean;
1104
+ };
1105
+
1106
+ /** @internal */
1107
+ export const QueryKnowledgeBaseTool$outboundSchema: z.ZodType<
1108
+ QueryKnowledgeBaseTool$Outbound,
1109
+ z.ZodTypeDef,
1110
+ QueryKnowledgeBaseTool
1111
+ > = z.object({
1112
+ type:
1113
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools10Type$outboundSchema,
1114
+ requiresApproval: z.boolean().default(false),
1115
+ }).transform((v) => {
1116
+ return remap$(v, {
1117
+ requiresApproval: "requires_approval",
1118
+ });
1119
+ });
1120
+
1121
+ /**
1122
+ * @internal
1123
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1124
+ */
1125
+ export namespace QueryKnowledgeBaseTool$ {
1126
+ /** @deprecated use `QueryKnowledgeBaseTool$inboundSchema` instead. */
1127
+ export const inboundSchema = QueryKnowledgeBaseTool$inboundSchema;
1128
+ /** @deprecated use `QueryKnowledgeBaseTool$outboundSchema` instead. */
1129
+ export const outboundSchema = QueryKnowledgeBaseTool$outboundSchema;
1130
+ /** @deprecated use `QueryKnowledgeBaseTool$Outbound` instead. */
1131
+ export type Outbound = QueryKnowledgeBaseTool$Outbound;
1132
+ }
1133
+
1134
+ export function queryKnowledgeBaseToolToJSON(
1135
+ queryKnowledgeBaseTool: QueryKnowledgeBaseTool,
1136
+ ): string {
1137
+ return JSON.stringify(
1138
+ QueryKnowledgeBaseTool$outboundSchema.parse(queryKnowledgeBaseTool),
1139
+ );
1140
+ }
1141
+
1142
+ export function queryKnowledgeBaseToolFromJSON(
1143
+ jsonString: string,
1144
+ ): SafeParseResult<QueryKnowledgeBaseTool, SDKValidationError> {
1145
+ return safeParse(
1146
+ jsonString,
1147
+ (x) => QueryKnowledgeBaseTool$inboundSchema.parse(JSON.parse(x)),
1148
+ `Failed to parse 'QueryKnowledgeBaseTool' from JSON`,
1149
+ );
1150
+ }
1151
+
1152
+ /** @internal */
1153
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema:
1154
+ z.ZodNativeEnum<
1155
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type
1156
+ > = z.nativeEnum(
1157
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type,
1158
+ );
1159
+
1160
+ /** @internal */
1161
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema:
1162
+ z.ZodNativeEnum<
1163
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type
1164
+ > =
1165
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema;
1166
+
1167
+ /**
1168
+ * @internal
1169
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1170
+ */
1171
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$ {
1172
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema` instead. */
1173
+ export const inboundSchema =
1174
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema;
1175
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema` instead. */
1176
+ export const outboundSchema =
1177
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema;
1178
+ }
1179
+
1180
+ /** @internal */
1181
+ export const RetrieveKnowledgeBasesTool$inboundSchema: z.ZodType<
1182
+ RetrieveKnowledgeBasesTool,
1183
+ z.ZodTypeDef,
1184
+ unknown
1185
+ > = z.object({
1186
+ type:
1187
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$inboundSchema,
1188
+ requires_approval: z.boolean().default(false),
1189
+ }).transform((v) => {
1190
+ return remap$(v, {
1191
+ "requires_approval": "requiresApproval",
1192
+ });
1193
+ });
1194
+
1195
+ /** @internal */
1196
+ export type RetrieveKnowledgeBasesTool$Outbound = {
1197
+ type: string;
1198
+ requires_approval: boolean;
1199
+ };
1200
+
1201
+ /** @internal */
1202
+ export const RetrieveKnowledgeBasesTool$outboundSchema: z.ZodType<
1203
+ RetrieveKnowledgeBasesTool$Outbound,
1204
+ z.ZodTypeDef,
1205
+ RetrieveKnowledgeBasesTool
1206
+ > = z.object({
1207
+ type:
1208
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools9Type$outboundSchema,
1209
+ requiresApproval: z.boolean().default(false),
1210
+ }).transform((v) => {
1211
+ return remap$(v, {
1212
+ requiresApproval: "requires_approval",
1213
+ });
1214
+ });
1215
+
1216
+ /**
1217
+ * @internal
1218
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1219
+ */
1220
+ export namespace RetrieveKnowledgeBasesTool$ {
1221
+ /** @deprecated use `RetrieveKnowledgeBasesTool$inboundSchema` instead. */
1222
+ export const inboundSchema = RetrieveKnowledgeBasesTool$inboundSchema;
1223
+ /** @deprecated use `RetrieveKnowledgeBasesTool$outboundSchema` instead. */
1224
+ export const outboundSchema = RetrieveKnowledgeBasesTool$outboundSchema;
1225
+ /** @deprecated use `RetrieveKnowledgeBasesTool$Outbound` instead. */
1226
+ export type Outbound = RetrieveKnowledgeBasesTool$Outbound;
1227
+ }
1228
+
1229
+ export function retrieveKnowledgeBasesToolToJSON(
1230
+ retrieveKnowledgeBasesTool: RetrieveKnowledgeBasesTool,
1231
+ ): string {
1232
+ return JSON.stringify(
1233
+ RetrieveKnowledgeBasesTool$outboundSchema.parse(retrieveKnowledgeBasesTool),
1234
+ );
1235
+ }
1236
+
1237
+ export function retrieveKnowledgeBasesToolFromJSON(
1238
+ jsonString: string,
1239
+ ): SafeParseResult<RetrieveKnowledgeBasesTool, SDKValidationError> {
1240
+ return safeParse(
1241
+ jsonString,
1242
+ (x) => RetrieveKnowledgeBasesTool$inboundSchema.parse(JSON.parse(x)),
1243
+ `Failed to parse 'RetrieveKnowledgeBasesTool' from JSON`,
1244
+ );
1245
+ }
1246
+
1247
+ /** @internal */
1248
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema:
1249
+ z.ZodNativeEnum<
1250
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type
1251
+ > = z.nativeEnum(
1252
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type,
1253
+ );
1254
+
1255
+ /** @internal */
1256
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema:
1257
+ z.ZodNativeEnum<
1258
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type
1259
+ > =
1260
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema;
1261
+
1262
+ /**
1263
+ * @internal
1264
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1265
+ */
1266
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$ {
1267
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema` instead. */
1268
+ export const inboundSchema =
1269
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema;
1270
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema` instead. */
1271
+ export const outboundSchema =
1272
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema;
1273
+ }
1274
+
1275
+ /** @internal */
1276
+ export const DeleteMemoryDocumentTool$inboundSchema: z.ZodType<
1277
+ DeleteMemoryDocumentTool,
1278
+ z.ZodTypeDef,
1279
+ unknown
1280
+ > = z.object({
1281
+ type:
1282
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$inboundSchema,
1283
+ requires_approval: z.boolean().default(false),
1284
+ }).transform((v) => {
1285
+ return remap$(v, {
1286
+ "requires_approval": "requiresApproval",
1287
+ });
1288
+ });
1289
+
1290
+ /** @internal */
1291
+ export type DeleteMemoryDocumentTool$Outbound = {
1292
+ type: string;
1293
+ requires_approval: boolean;
1294
+ };
1295
+
1296
+ /** @internal */
1297
+ export const DeleteMemoryDocumentTool$outboundSchema: z.ZodType<
1298
+ DeleteMemoryDocumentTool$Outbound,
1299
+ z.ZodTypeDef,
1300
+ DeleteMemoryDocumentTool
1301
+ > = z.object({
1302
+ type:
1303
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsTools8Type$outboundSchema,
1304
+ requiresApproval: z.boolean().default(false),
1305
+ }).transform((v) => {
1306
+ return remap$(v, {
1307
+ requiresApproval: "requires_approval",
1308
+ });
1309
+ });
1310
+
1311
+ /**
1312
+ * @internal
1313
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1314
+ */
1315
+ export namespace DeleteMemoryDocumentTool$ {
1316
+ /** @deprecated use `DeleteMemoryDocumentTool$inboundSchema` instead. */
1317
+ export const inboundSchema = DeleteMemoryDocumentTool$inboundSchema;
1318
+ /** @deprecated use `DeleteMemoryDocumentTool$outboundSchema` instead. */
1319
+ export const outboundSchema = DeleteMemoryDocumentTool$outboundSchema;
1320
+ /** @deprecated use `DeleteMemoryDocumentTool$Outbound` instead. */
1321
+ export type Outbound = DeleteMemoryDocumentTool$Outbound;
1322
+ }
1323
+
1324
+ export function deleteMemoryDocumentToolToJSON(
1325
+ deleteMemoryDocumentTool: DeleteMemoryDocumentTool,
1326
+ ): string {
1327
+ return JSON.stringify(
1328
+ DeleteMemoryDocumentTool$outboundSchema.parse(deleteMemoryDocumentTool),
1329
+ );
1330
+ }
1331
+
1332
+ export function deleteMemoryDocumentToolFromJSON(
1333
+ jsonString: string,
1334
+ ): SafeParseResult<DeleteMemoryDocumentTool, SDKValidationError> {
1335
+ return safeParse(
1336
+ jsonString,
1337
+ (x) => DeleteMemoryDocumentTool$inboundSchema.parse(JSON.parse(x)),
1338
+ `Failed to parse 'DeleteMemoryDocumentTool' from JSON`,
1339
+ );
1340
+ }
1341
+
1342
+ /** @internal */
1343
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema:
1344
+ z.ZodNativeEnum<
1345
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType
1346
+ > = z.nativeEnum(
1347
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType,
1348
+ );
1349
+
1350
+ /** @internal */
1351
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema:
1352
+ z.ZodNativeEnum<
1353
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType
1354
+ > =
1355
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema;
1356
+
1357
+ /**
1358
+ * @internal
1359
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1360
+ */
1361
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$ {
1362
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema` instead. */
1363
+ export const inboundSchema =
1364
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema;
1365
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema` instead. */
1366
+ export const outboundSchema =
1367
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema;
1368
+ }
1369
+
1370
+ /** @internal */
1371
+ export const RetrieveMemoryStoresTool$inboundSchema: z.ZodType<
1372
+ RetrieveMemoryStoresTool,
1373
+ z.ZodTypeDef,
1374
+ unknown
1375
+ > = z.object({
1376
+ type:
1377
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$inboundSchema,
1378
+ requires_approval: z.boolean().default(false),
1379
+ }).transform((v) => {
1380
+ return remap$(v, {
1381
+ "requires_approval": "requiresApproval",
1382
+ });
1383
+ });
1384
+
1385
+ /** @internal */
1386
+ export type RetrieveMemoryStoresTool$Outbound = {
1387
+ type: string;
1388
+ requires_approval: boolean;
1389
+ };
1390
+
1391
+ /** @internal */
1392
+ export const RetrieveMemoryStoresTool$outboundSchema: z.ZodType<
1393
+ RetrieveMemoryStoresTool$Outbound,
1394
+ z.ZodTypeDef,
1395
+ RetrieveMemoryStoresTool
1396
+ > = z.object({
1397
+ type:
1398
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsToolsType$outboundSchema,
1399
+ requiresApproval: z.boolean().default(false),
1400
+ }).transform((v) => {
1401
+ return remap$(v, {
1402
+ requiresApproval: "requires_approval",
1403
+ });
1404
+ });
1405
+
1406
+ /**
1407
+ * @internal
1408
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1409
+ */
1410
+ export namespace RetrieveMemoryStoresTool$ {
1411
+ /** @deprecated use `RetrieveMemoryStoresTool$inboundSchema` instead. */
1412
+ export const inboundSchema = RetrieveMemoryStoresTool$inboundSchema;
1413
+ /** @deprecated use `RetrieveMemoryStoresTool$outboundSchema` instead. */
1414
+ export const outboundSchema = RetrieveMemoryStoresTool$outboundSchema;
1415
+ /** @deprecated use `RetrieveMemoryStoresTool$Outbound` instead. */
1416
+ export type Outbound = RetrieveMemoryStoresTool$Outbound;
1417
+ }
1418
+
1419
+ export function retrieveMemoryStoresToolToJSON(
1420
+ retrieveMemoryStoresTool: RetrieveMemoryStoresTool,
1421
+ ): string {
1422
+ return JSON.stringify(
1423
+ RetrieveMemoryStoresTool$outboundSchema.parse(retrieveMemoryStoresTool),
1424
+ );
1425
+ }
1426
+
1427
+ export function retrieveMemoryStoresToolFromJSON(
1428
+ jsonString: string,
1429
+ ): SafeParseResult<RetrieveMemoryStoresTool, SDKValidationError> {
1430
+ return safeParse(
1431
+ jsonString,
1432
+ (x) => RetrieveMemoryStoresTool$inboundSchema.parse(JSON.parse(x)),
1433
+ `Failed to parse 'RetrieveMemoryStoresTool' from JSON`,
1434
+ );
1435
+ }
1436
+
1437
+ /** @internal */
1438
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema:
1439
+ z.ZodNativeEnum<
1440
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType
1441
+ > = z.nativeEnum(
1442
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType,
1443
+ );
1444
+
1445
+ /** @internal */
1446
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema:
1447
+ z.ZodNativeEnum<
1448
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType
1449
+ > =
1450
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema;
1451
+
1452
+ /**
1453
+ * @internal
1454
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1455
+ */
1456
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$ {
1457
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema` instead. */
1458
+ export const inboundSchema =
1459
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema;
1460
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema` instead. */
1461
+ export const outboundSchema =
1462
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema;
1463
+ }
1464
+
1465
+ /** @internal */
1466
+ export const WriteMemoryStoreTool$inboundSchema: z.ZodType<
1467
+ WriteMemoryStoreTool,
1468
+ z.ZodTypeDef,
1469
+ unknown
1470
+ > = z.object({
1471
+ type:
1472
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$inboundSchema,
1473
+ requires_approval: z.boolean().default(false),
1474
+ }).transform((v) => {
1475
+ return remap$(v, {
1476
+ "requires_approval": "requiresApproval",
1477
+ });
1478
+ });
1479
+
1480
+ /** @internal */
1481
+ export type WriteMemoryStoreTool$Outbound = {
1482
+ type: string;
1483
+ requires_approval: boolean;
1484
+ };
1485
+
1486
+ /** @internal */
1487
+ export const WriteMemoryStoreTool$outboundSchema: z.ZodType<
1488
+ WriteMemoryStoreTool$Outbound,
1489
+ z.ZodTypeDef,
1490
+ WriteMemoryStoreTool
1491
+ > = z.object({
1492
+ type:
1493
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodySettingsType$outboundSchema,
1494
+ requiresApproval: z.boolean().default(false),
1495
+ }).transform((v) => {
1496
+ return remap$(v, {
1497
+ requiresApproval: "requires_approval",
1498
+ });
1499
+ });
1500
+
1501
+ /**
1502
+ * @internal
1503
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1504
+ */
1505
+ export namespace WriteMemoryStoreTool$ {
1506
+ /** @deprecated use `WriteMemoryStoreTool$inboundSchema` instead. */
1507
+ export const inboundSchema = WriteMemoryStoreTool$inboundSchema;
1508
+ /** @deprecated use `WriteMemoryStoreTool$outboundSchema` instead. */
1509
+ export const outboundSchema = WriteMemoryStoreTool$outboundSchema;
1510
+ /** @deprecated use `WriteMemoryStoreTool$Outbound` instead. */
1511
+ export type Outbound = WriteMemoryStoreTool$Outbound;
1512
+ }
1513
+
1514
+ export function writeMemoryStoreToolToJSON(
1515
+ writeMemoryStoreTool: WriteMemoryStoreTool,
1516
+ ): string {
1517
+ return JSON.stringify(
1518
+ WriteMemoryStoreTool$outboundSchema.parse(writeMemoryStoreTool),
1519
+ );
1520
+ }
1521
+
1522
+ export function writeMemoryStoreToolFromJSON(
1523
+ jsonString: string,
1524
+ ): SafeParseResult<WriteMemoryStoreTool, SDKValidationError> {
1525
+ return safeParse(
1526
+ jsonString,
1527
+ (x) => WriteMemoryStoreTool$inboundSchema.parse(JSON.parse(x)),
1528
+ `Failed to parse 'WriteMemoryStoreTool' from JSON`,
1529
+ );
1530
+ }
1531
+
1532
+ /** @internal */
1533
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema:
1534
+ z.ZodNativeEnum<
1535
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType
1536
+ > = z.nativeEnum(CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType);
1537
+
1538
+ /** @internal */
1539
+ export const CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema:
1540
+ z.ZodNativeEnum<
1541
+ typeof CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType
1542
+ > = CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema;
1543
+
1544
+ /**
1545
+ * @internal
1546
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1547
+ */
1548
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$ {
1549
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema` instead. */
1550
+ export const inboundSchema =
1551
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema;
1552
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema` instead. */
1553
+ export const outboundSchema =
1554
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema;
1555
+ }
1556
+
1557
+ /** @internal */
1558
+ export const QueryMemoryStoreTool$inboundSchema: z.ZodType<
1559
+ QueryMemoryStoreTool,
1560
+ z.ZodTypeDef,
1561
+ unknown
1562
+ > = z.object({
1563
+ type: CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$inboundSchema,
1564
+ requires_approval: z.boolean().default(false),
1565
+ }).transform((v) => {
1566
+ return remap$(v, {
1567
+ "requires_approval": "requiresApproval",
1568
+ });
1569
+ });
1570
+
1571
+ /** @internal */
1572
+ export type QueryMemoryStoreTool$Outbound = {
1573
+ type: string;
1574
+ requires_approval: boolean;
1575
+ };
1576
+
1577
+ /** @internal */
1578
+ export const QueryMemoryStoreTool$outboundSchema: z.ZodType<
1579
+ QueryMemoryStoreTool$Outbound,
1580
+ z.ZodTypeDef,
1581
+ QueryMemoryStoreTool
1582
+ > = z.object({
1583
+ type:
1584
+ CreateAgentAgentToolInputCRUDAgentsRequestRequestBodyType$outboundSchema,
1585
+ requiresApproval: z.boolean().default(false),
1586
+ }).transform((v) => {
1587
+ return remap$(v, {
1588
+ requiresApproval: "requires_approval",
1589
+ });
1590
+ });
1591
+
1592
+ /**
1593
+ * @internal
1594
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1595
+ */
1596
+ export namespace QueryMemoryStoreTool$ {
1597
+ /** @deprecated use `QueryMemoryStoreTool$inboundSchema` instead. */
1598
+ export const inboundSchema = QueryMemoryStoreTool$inboundSchema;
1599
+ /** @deprecated use `QueryMemoryStoreTool$outboundSchema` instead. */
1600
+ export const outboundSchema = QueryMemoryStoreTool$outboundSchema;
1601
+ /** @deprecated use `QueryMemoryStoreTool$Outbound` instead. */
1602
+ export type Outbound = QueryMemoryStoreTool$Outbound;
1603
+ }
1604
+
1605
+ export function queryMemoryStoreToolToJSON(
1606
+ queryMemoryStoreTool: QueryMemoryStoreTool,
1607
+ ): string {
1608
+ return JSON.stringify(
1609
+ QueryMemoryStoreTool$outboundSchema.parse(queryMemoryStoreTool),
1610
+ );
1611
+ }
1612
+
1613
+ export function queryMemoryStoreToolFromJSON(
1614
+ jsonString: string,
1615
+ ): SafeParseResult<QueryMemoryStoreTool, SDKValidationError> {
1616
+ return safeParse(
1617
+ jsonString,
1618
+ (x) => QueryMemoryStoreTool$inboundSchema.parse(JSON.parse(x)),
1619
+ `Failed to parse 'QueryMemoryStoreTool' from JSON`,
1620
+ );
1621
+ }
1622
+
1623
+ /** @internal */
1624
+ export const CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema:
1625
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsRequestType> = z
1626
+ .nativeEnum(CreateAgentAgentToolInputCRUDAgentsRequestType);
1627
+
1628
+ /** @internal */
1629
+ export const CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema:
1630
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsRequestType> =
1631
+ CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema;
1632
+
1633
+ /**
1634
+ * @internal
1635
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1636
+ */
1637
+ export namespace CreateAgentAgentToolInputCRUDAgentsRequestType$ {
1638
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema` instead. */
1639
+ export const inboundSchema =
1640
+ CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema;
1641
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema` instead. */
1642
+ export const outboundSchema =
1643
+ CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema;
1644
+ }
1645
+
1646
+ /** @internal */
1647
+ export const RetrieveAgentsTool$inboundSchema: z.ZodType<
1648
+ RetrieveAgentsTool,
1649
+ z.ZodTypeDef,
1650
+ unknown
1651
+ > = z.object({
1652
+ type: CreateAgentAgentToolInputCRUDAgentsRequestType$inboundSchema,
1653
+ requires_approval: z.boolean().default(false),
1654
+ }).transform((v) => {
1655
+ return remap$(v, {
1656
+ "requires_approval": "requiresApproval",
1657
+ });
1658
+ });
1659
+
1660
+ /** @internal */
1661
+ export type RetrieveAgentsTool$Outbound = {
1662
+ type: string;
1663
+ requires_approval: boolean;
1664
+ };
1665
+
1666
+ /** @internal */
1667
+ export const RetrieveAgentsTool$outboundSchema: z.ZodType<
1668
+ RetrieveAgentsTool$Outbound,
1669
+ z.ZodTypeDef,
1670
+ RetrieveAgentsTool
1671
+ > = z.object({
1672
+ type: CreateAgentAgentToolInputCRUDAgentsRequestType$outboundSchema,
1673
+ requiresApproval: z.boolean().default(false),
1674
+ }).transform((v) => {
1675
+ return remap$(v, {
1676
+ requiresApproval: "requires_approval",
1677
+ });
1678
+ });
1679
+
1680
+ /**
1681
+ * @internal
1682
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1683
+ */
1684
+ export namespace RetrieveAgentsTool$ {
1685
+ /** @deprecated use `RetrieveAgentsTool$inboundSchema` instead. */
1686
+ export const inboundSchema = RetrieveAgentsTool$inboundSchema;
1687
+ /** @deprecated use `RetrieveAgentsTool$outboundSchema` instead. */
1688
+ export const outboundSchema = RetrieveAgentsTool$outboundSchema;
1689
+ /** @deprecated use `RetrieveAgentsTool$Outbound` instead. */
1690
+ export type Outbound = RetrieveAgentsTool$Outbound;
1691
+ }
1692
+
1693
+ export function retrieveAgentsToolToJSON(
1694
+ retrieveAgentsTool: RetrieveAgentsTool,
1695
+ ): string {
1696
+ return JSON.stringify(
1697
+ RetrieveAgentsTool$outboundSchema.parse(retrieveAgentsTool),
1698
+ );
1699
+ }
1700
+
1701
+ export function retrieveAgentsToolFromJSON(
1702
+ jsonString: string,
1703
+ ): SafeParseResult<RetrieveAgentsTool, SDKValidationError> {
1704
+ return safeParse(
1705
+ jsonString,
1706
+ (x) => RetrieveAgentsTool$inboundSchema.parse(JSON.parse(x)),
1707
+ `Failed to parse 'RetrieveAgentsTool' from JSON`,
1708
+ );
1709
+ }
1710
+
1711
+ /** @internal */
1712
+ export const CreateAgentAgentToolInputCRUDAgentsType$inboundSchema:
1713
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsType> = z
1714
+ .nativeEnum(CreateAgentAgentToolInputCRUDAgentsType);
1715
+
1716
+ /** @internal */
1717
+ export const CreateAgentAgentToolInputCRUDAgentsType$outboundSchema:
1718
+ z.ZodNativeEnum<typeof CreateAgentAgentToolInputCRUDAgentsType> =
1719
+ CreateAgentAgentToolInputCRUDAgentsType$inboundSchema;
1720
+
1721
+ /**
1722
+ * @internal
1723
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1724
+ */
1725
+ export namespace CreateAgentAgentToolInputCRUDAgentsType$ {
1726
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsType$inboundSchema` instead. */
1727
+ export const inboundSchema =
1728
+ CreateAgentAgentToolInputCRUDAgentsType$inboundSchema;
1729
+ /** @deprecated use `CreateAgentAgentToolInputCRUDAgentsType$outboundSchema` instead. */
1730
+ export const outboundSchema =
1731
+ CreateAgentAgentToolInputCRUDAgentsType$outboundSchema;
1732
+ }
1733
+
1734
+ /** @internal */
1735
+ export const CallSubAgentTool$inboundSchema: z.ZodType<
1736
+ CallSubAgentTool,
1737
+ z.ZodTypeDef,
1738
+ unknown
1739
+ > = z.object({
1740
+ type: CreateAgentAgentToolInputCRUDAgentsType$inboundSchema,
1741
+ requires_approval: z.boolean().default(false),
1742
+ }).transform((v) => {
1743
+ return remap$(v, {
1744
+ "requires_approval": "requiresApproval",
1745
+ });
1746
+ });
1747
+
1748
+ /** @internal */
1749
+ export type CallSubAgentTool$Outbound = {
1750
+ type: string;
1751
+ requires_approval: boolean;
1752
+ };
1753
+
1754
+ /** @internal */
1755
+ export const CallSubAgentTool$outboundSchema: z.ZodType<
1756
+ CallSubAgentTool$Outbound,
1757
+ z.ZodTypeDef,
1758
+ CallSubAgentTool
1759
+ > = z.object({
1760
+ type: CreateAgentAgentToolInputCRUDAgentsType$outboundSchema,
1761
+ requiresApproval: z.boolean().default(false),
1762
+ }).transform((v) => {
1763
+ return remap$(v, {
1764
+ requiresApproval: "requires_approval",
1765
+ });
1766
+ });
1767
+
1768
+ /**
1769
+ * @internal
1770
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1771
+ */
1772
+ export namespace CallSubAgentTool$ {
1773
+ /** @deprecated use `CallSubAgentTool$inboundSchema` instead. */
1774
+ export const inboundSchema = CallSubAgentTool$inboundSchema;
1775
+ /** @deprecated use `CallSubAgentTool$outboundSchema` instead. */
1776
+ export const outboundSchema = CallSubAgentTool$outboundSchema;
1777
+ /** @deprecated use `CallSubAgentTool$Outbound` instead. */
1778
+ export type Outbound = CallSubAgentTool$Outbound;
1779
+ }
1780
+
1781
+ export function callSubAgentToolToJSON(
1782
+ callSubAgentTool: CallSubAgentTool,
1783
+ ): string {
1784
+ return JSON.stringify(
1785
+ CallSubAgentTool$outboundSchema.parse(callSubAgentTool),
1786
+ );
1787
+ }
1788
+
1789
+ export function callSubAgentToolFromJSON(
1790
+ jsonString: string,
1791
+ ): SafeParseResult<CallSubAgentTool, SDKValidationError> {
1792
+ return safeParse(
1793
+ jsonString,
1794
+ (x) => CallSubAgentTool$inboundSchema.parse(JSON.parse(x)),
1795
+ `Failed to parse 'CallSubAgentTool' from JSON`,
1796
+ );
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const CreateAgentAgentToolInputCRUDType$inboundSchema: z.ZodNativeEnum<
1801
+ typeof CreateAgentAgentToolInputCRUDType
1802
+ > = z.nativeEnum(CreateAgentAgentToolInputCRUDType);
1803
+
1804
+ /** @internal */
1805
+ export const CreateAgentAgentToolInputCRUDType$outboundSchema: z.ZodNativeEnum<
1806
+ typeof CreateAgentAgentToolInputCRUDType
1807
+ > = CreateAgentAgentToolInputCRUDType$inboundSchema;
1808
+
1809
+ /**
1810
+ * @internal
1811
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1812
+ */
1813
+ export namespace CreateAgentAgentToolInputCRUDType$ {
1814
+ /** @deprecated use `CreateAgentAgentToolInputCRUDType$inboundSchema` instead. */
1815
+ export const inboundSchema = CreateAgentAgentToolInputCRUDType$inboundSchema;
1816
+ /** @deprecated use `CreateAgentAgentToolInputCRUDType$outboundSchema` instead. */
1817
+ export const outboundSchema =
1818
+ CreateAgentAgentToolInputCRUDType$outboundSchema;
1819
+ }
1820
+
1821
+ /** @internal */
1822
+ export const WebScraperTool$inboundSchema: z.ZodType<
1823
+ WebScraperTool,
1824
+ z.ZodTypeDef,
1825
+ unknown
1826
+ > = z.object({
1827
+ type: CreateAgentAgentToolInputCRUDType$inboundSchema,
1828
+ requires_approval: z.boolean().default(false),
1829
+ }).transform((v) => {
1830
+ return remap$(v, {
1831
+ "requires_approval": "requiresApproval",
1832
+ });
1833
+ });
1834
+
1835
+ /** @internal */
1836
+ export type WebScraperTool$Outbound = {
1837
+ type: string;
1838
+ requires_approval: boolean;
1839
+ };
1840
+
1841
+ /** @internal */
1842
+ export const WebScraperTool$outboundSchema: z.ZodType<
1843
+ WebScraperTool$Outbound,
1844
+ z.ZodTypeDef,
1845
+ WebScraperTool
1846
+ > = z.object({
1847
+ type: CreateAgentAgentToolInputCRUDType$outboundSchema,
1848
+ requiresApproval: z.boolean().default(false),
1849
+ }).transform((v) => {
1850
+ return remap$(v, {
1851
+ requiresApproval: "requires_approval",
1852
+ });
1853
+ });
1854
+
1855
+ /**
1856
+ * @internal
1857
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1858
+ */
1859
+ export namespace WebScraperTool$ {
1860
+ /** @deprecated use `WebScraperTool$inboundSchema` instead. */
1861
+ export const inboundSchema = WebScraperTool$inboundSchema;
1862
+ /** @deprecated use `WebScraperTool$outboundSchema` instead. */
1863
+ export const outboundSchema = WebScraperTool$outboundSchema;
1864
+ /** @deprecated use `WebScraperTool$Outbound` instead. */
1865
+ export type Outbound = WebScraperTool$Outbound;
1866
+ }
1867
+
1868
+ export function webScraperToolToJSON(webScraperTool: WebScraperTool): string {
1869
+ return JSON.stringify(WebScraperTool$outboundSchema.parse(webScraperTool));
1870
+ }
1871
+
1872
+ export function webScraperToolFromJSON(
1873
+ jsonString: string,
1874
+ ): SafeParseResult<WebScraperTool, SDKValidationError> {
1875
+ return safeParse(
1876
+ jsonString,
1877
+ (x) => WebScraperTool$inboundSchema.parse(JSON.parse(x)),
1878
+ `Failed to parse 'WebScraperTool' from JSON`,
1879
+ );
1880
+ }
1881
+
1882
+ /** @internal */
1883
+ export const AgentToolInputCRUDType$inboundSchema: z.ZodNativeEnum<
1884
+ typeof AgentToolInputCRUDType
1885
+ > = z.nativeEnum(AgentToolInputCRUDType);
1886
+
1887
+ /** @internal */
1888
+ export const AgentToolInputCRUDType$outboundSchema: z.ZodNativeEnum<
1889
+ typeof AgentToolInputCRUDType
1890
+ > = AgentToolInputCRUDType$inboundSchema;
1891
+
1892
+ /**
1893
+ * @internal
1894
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1895
+ */
1896
+ export namespace AgentToolInputCRUDType$ {
1897
+ /** @deprecated use `AgentToolInputCRUDType$inboundSchema` instead. */
1898
+ export const inboundSchema = AgentToolInputCRUDType$inboundSchema;
1899
+ /** @deprecated use `AgentToolInputCRUDType$outboundSchema` instead. */
1900
+ export const outboundSchema = AgentToolInputCRUDType$outboundSchema;
1901
+ }
1902
+
1903
+ /** @internal */
1904
+ export const GoogleSearchTool$inboundSchema: z.ZodType<
1905
+ GoogleSearchTool,
1906
+ z.ZodTypeDef,
1907
+ unknown
1908
+ > = z.object({
1909
+ type: AgentToolInputCRUDType$inboundSchema,
1910
+ requires_approval: z.boolean().default(false),
1911
+ }).transform((v) => {
1912
+ return remap$(v, {
1913
+ "requires_approval": "requiresApproval",
1914
+ });
1915
+ });
1916
+
1917
+ /** @internal */
1918
+ export type GoogleSearchTool$Outbound = {
1919
+ type: string;
1920
+ requires_approval: boolean;
1921
+ };
1922
+
1923
+ /** @internal */
1924
+ export const GoogleSearchTool$outboundSchema: z.ZodType<
1925
+ GoogleSearchTool$Outbound,
1926
+ z.ZodTypeDef,
1927
+ GoogleSearchTool
1928
+ > = z.object({
1929
+ type: AgentToolInputCRUDType$outboundSchema,
1930
+ requiresApproval: z.boolean().default(false),
1931
+ }).transform((v) => {
1932
+ return remap$(v, {
1933
+ requiresApproval: "requires_approval",
1934
+ });
1935
+ });
1936
+
1937
+ /**
1938
+ * @internal
1939
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1940
+ */
1941
+ export namespace GoogleSearchTool$ {
1942
+ /** @deprecated use `GoogleSearchTool$inboundSchema` instead. */
1943
+ export const inboundSchema = GoogleSearchTool$inboundSchema;
1944
+ /** @deprecated use `GoogleSearchTool$outboundSchema` instead. */
1945
+ export const outboundSchema = GoogleSearchTool$outboundSchema;
1946
+ /** @deprecated use `GoogleSearchTool$Outbound` instead. */
1947
+ export type Outbound = GoogleSearchTool$Outbound;
1948
+ }
1949
+
1950
+ export function googleSearchToolToJSON(
1951
+ googleSearchTool: GoogleSearchTool,
1952
+ ): string {
1953
+ return JSON.stringify(
1954
+ GoogleSearchTool$outboundSchema.parse(googleSearchTool),
1955
+ );
1956
+ }
1957
+
1958
+ export function googleSearchToolFromJSON(
1959
+ jsonString: string,
1960
+ ): SafeParseResult<GoogleSearchTool, SDKValidationError> {
1961
+ return safeParse(
1962
+ jsonString,
1963
+ (x) => GoogleSearchTool$inboundSchema.parse(JSON.parse(x)),
1964
+ `Failed to parse 'GoogleSearchTool' from JSON`,
1965
+ );
1966
+ }
1967
+
1968
+ /** @internal */
1969
+ export const AgentToolInputCRUD$inboundSchema: z.ZodType<
1970
+ AgentToolInputCRUD,
1971
+ z.ZodTypeDef,
1972
+ unknown
1973
+ > = z.union([
1974
+ z.lazy(() => GoogleSearchTool$inboundSchema),
1975
+ z.lazy(() => WebScraperTool$inboundSchema),
1976
+ z.lazy(() => CallSubAgentTool$inboundSchema),
1977
+ z.lazy(() => RetrieveAgentsTool$inboundSchema),
1978
+ z.lazy(() => QueryMemoryStoreTool$inboundSchema),
1979
+ z.lazy(() => WriteMemoryStoreTool$inboundSchema),
1980
+ z.lazy(() => RetrieveMemoryStoresTool$inboundSchema),
1981
+ z.lazy(() => DeleteMemoryDocumentTool$inboundSchema),
1982
+ z.lazy(() => RetrieveKnowledgeBasesTool$inboundSchema),
1983
+ z.lazy(() => QueryKnowledgeBaseTool$inboundSchema),
1984
+ z.lazy(() => CurrentDateTool$inboundSchema),
1985
+ z.lazy(() => HTTPTool$inboundSchema),
1986
+ z.lazy(() => CodeExecutionTool$inboundSchema),
1987
+ z.lazy(() => FunctionTool$inboundSchema),
1988
+ ]);
1989
+
1990
+ /** @internal */
1991
+ export type AgentToolInputCRUD$Outbound =
1992
+ | GoogleSearchTool$Outbound
1993
+ | WebScraperTool$Outbound
1994
+ | CallSubAgentTool$Outbound
1995
+ | RetrieveAgentsTool$Outbound
1996
+ | QueryMemoryStoreTool$Outbound
1997
+ | WriteMemoryStoreTool$Outbound
1998
+ | RetrieveMemoryStoresTool$Outbound
1999
+ | DeleteMemoryDocumentTool$Outbound
2000
+ | RetrieveKnowledgeBasesTool$Outbound
2001
+ | QueryKnowledgeBaseTool$Outbound
2002
+ | CurrentDateTool$Outbound
2003
+ | HTTPTool$Outbound
2004
+ | CodeExecutionTool$Outbound
2005
+ | FunctionTool$Outbound;
2006
+
2007
+ /** @internal */
2008
+ export const AgentToolInputCRUD$outboundSchema: z.ZodType<
2009
+ AgentToolInputCRUD$Outbound,
2010
+ z.ZodTypeDef,
2011
+ AgentToolInputCRUD
2012
+ > = z.union([
2013
+ z.lazy(() => GoogleSearchTool$outboundSchema),
2014
+ z.lazy(() => WebScraperTool$outboundSchema),
2015
+ z.lazy(() => CallSubAgentTool$outboundSchema),
2016
+ z.lazy(() => RetrieveAgentsTool$outboundSchema),
2017
+ z.lazy(() => QueryMemoryStoreTool$outboundSchema),
2018
+ z.lazy(() => WriteMemoryStoreTool$outboundSchema),
2019
+ z.lazy(() => RetrieveMemoryStoresTool$outboundSchema),
2020
+ z.lazy(() => DeleteMemoryDocumentTool$outboundSchema),
2021
+ z.lazy(() => RetrieveKnowledgeBasesTool$outboundSchema),
2022
+ z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
2023
+ z.lazy(() => CurrentDateTool$outboundSchema),
2024
+ z.lazy(() => HTTPTool$outboundSchema),
2025
+ z.lazy(() => CodeExecutionTool$outboundSchema),
2026
+ z.lazy(() => FunctionTool$outboundSchema),
2027
+ ]);
2028
+
2029
+ /**
2030
+ * @internal
2031
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2032
+ */
2033
+ export namespace AgentToolInputCRUD$ {
2034
+ /** @deprecated use `AgentToolInputCRUD$inboundSchema` instead. */
2035
+ export const inboundSchema = AgentToolInputCRUD$inboundSchema;
2036
+ /** @deprecated use `AgentToolInputCRUD$outboundSchema` instead. */
2037
+ export const outboundSchema = AgentToolInputCRUD$outboundSchema;
2038
+ /** @deprecated use `AgentToolInputCRUD$Outbound` instead. */
2039
+ export type Outbound = AgentToolInputCRUD$Outbound;
2040
+ }
2041
+
2042
+ export function agentToolInputCRUDToJSON(
2043
+ agentToolInputCRUD: AgentToolInputCRUD,
2044
+ ): string {
2045
+ return JSON.stringify(
2046
+ AgentToolInputCRUD$outboundSchema.parse(agentToolInputCRUD),
2047
+ );
2048
+ }
2049
+
2050
+ export function agentToolInputCRUDFromJSON(
2051
+ jsonString: string,
2052
+ ): SafeParseResult<AgentToolInputCRUD, SDKValidationError> {
2053
+ return safeParse(
2054
+ jsonString,
2055
+ (x) => AgentToolInputCRUD$inboundSchema.parse(JSON.parse(x)),
2056
+ `Failed to parse 'AgentToolInputCRUD' from JSON`,
2057
+ );
2058
+ }
2059
+
2060
+ /** @internal */
2061
+ export const Settings$inboundSchema: z.ZodType<
2062
+ Settings,
2063
+ z.ZodTypeDef,
2064
+ unknown
2065
+ > = z.object({
2066
+ max_iterations: z.number().int().default(15),
2067
+ max_execution_time: z.number().int().default(300),
2068
+ tool_approval_required: ToolApprovalRequired$inboundSchema.default(
2069
+ "respect_tool",
2070
+ ),
2071
+ tools: z.array(
2072
+ z.union([
2073
+ z.lazy(() => GoogleSearchTool$inboundSchema),
2074
+ z.lazy(() => WebScraperTool$inboundSchema),
2075
+ z.lazy(() => CallSubAgentTool$inboundSchema),
2076
+ z.lazy(() => RetrieveAgentsTool$inboundSchema),
2077
+ z.lazy(() => QueryMemoryStoreTool$inboundSchema),
2078
+ z.lazy(() => WriteMemoryStoreTool$inboundSchema),
2079
+ z.lazy(() => RetrieveMemoryStoresTool$inboundSchema),
2080
+ z.lazy(() => DeleteMemoryDocumentTool$inboundSchema),
2081
+ z.lazy(() => RetrieveKnowledgeBasesTool$inboundSchema),
2082
+ z.lazy(() => QueryKnowledgeBaseTool$inboundSchema),
2083
+ z.lazy(() => CurrentDateTool$inboundSchema),
2084
+ z.lazy(() => HTTPTool$inboundSchema),
2085
+ z.lazy(() => CodeExecutionTool$inboundSchema),
2086
+ z.lazy(() => FunctionTool$inboundSchema),
2087
+ ]),
2088
+ ),
2089
+ }).transform((v) => {
2090
+ return remap$(v, {
2091
+ "max_iterations": "maxIterations",
2092
+ "max_execution_time": "maxExecutionTime",
2093
+ "tool_approval_required": "toolApprovalRequired",
2094
+ });
2095
+ });
2096
+
2097
+ /** @internal */
2098
+ export type Settings$Outbound = {
2099
+ max_iterations: number;
2100
+ max_execution_time: number;
2101
+ tool_approval_required: string;
2102
+ tools: Array<
2103
+ | GoogleSearchTool$Outbound
2104
+ | WebScraperTool$Outbound
2105
+ | CallSubAgentTool$Outbound
2106
+ | RetrieveAgentsTool$Outbound
2107
+ | QueryMemoryStoreTool$Outbound
2108
+ | WriteMemoryStoreTool$Outbound
2109
+ | RetrieveMemoryStoresTool$Outbound
2110
+ | DeleteMemoryDocumentTool$Outbound
2111
+ | RetrieveKnowledgeBasesTool$Outbound
2112
+ | QueryKnowledgeBaseTool$Outbound
2113
+ | CurrentDateTool$Outbound
2114
+ | HTTPTool$Outbound
2115
+ | CodeExecutionTool$Outbound
2116
+ | FunctionTool$Outbound
2117
+ >;
2118
+ };
2119
+
2120
+ /** @internal */
2121
+ export const Settings$outboundSchema: z.ZodType<
2122
+ Settings$Outbound,
2123
+ z.ZodTypeDef,
2124
+ Settings
2125
+ > = z.object({
2126
+ maxIterations: z.number().int().default(15),
2127
+ maxExecutionTime: z.number().int().default(300),
2128
+ toolApprovalRequired: ToolApprovalRequired$outboundSchema.default(
2129
+ "respect_tool",
2130
+ ),
2131
+ tools: z.array(
2132
+ z.union([
2133
+ z.lazy(() => GoogleSearchTool$outboundSchema),
2134
+ z.lazy(() => WebScraperTool$outboundSchema),
2135
+ z.lazy(() => CallSubAgentTool$outboundSchema),
2136
+ z.lazy(() => RetrieveAgentsTool$outboundSchema),
2137
+ z.lazy(() => QueryMemoryStoreTool$outboundSchema),
2138
+ z.lazy(() => WriteMemoryStoreTool$outboundSchema),
2139
+ z.lazy(() => RetrieveMemoryStoresTool$outboundSchema),
2140
+ z.lazy(() => DeleteMemoryDocumentTool$outboundSchema),
2141
+ z.lazy(() => RetrieveKnowledgeBasesTool$outboundSchema),
2142
+ z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
2143
+ z.lazy(() => CurrentDateTool$outboundSchema),
2144
+ z.lazy(() => HTTPTool$outboundSchema),
2145
+ z.lazy(() => CodeExecutionTool$outboundSchema),
2146
+ z.lazy(() => FunctionTool$outboundSchema),
2147
+ ]),
2148
+ ),
2149
+ }).transform((v) => {
2150
+ return remap$(v, {
2151
+ maxIterations: "max_iterations",
2152
+ maxExecutionTime: "max_execution_time",
2153
+ toolApprovalRequired: "tool_approval_required",
2154
+ });
2155
+ });
2156
+
2157
+ /**
2158
+ * @internal
2159
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2160
+ */
2161
+ export namespace Settings$ {
2162
+ /** @deprecated use `Settings$inboundSchema` instead. */
2163
+ export const inboundSchema = Settings$inboundSchema;
2164
+ /** @deprecated use `Settings$outboundSchema` instead. */
2165
+ export const outboundSchema = Settings$outboundSchema;
2166
+ /** @deprecated use `Settings$Outbound` instead. */
2167
+ export type Outbound = Settings$Outbound;
2168
+ }
2169
+
2170
+ export function settingsToJSON(settings: Settings): string {
2171
+ return JSON.stringify(Settings$outboundSchema.parse(settings));
2172
+ }
2173
+
2174
+ export function settingsFromJSON(
2175
+ jsonString: string,
2176
+ ): SafeParseResult<Settings, SDKValidationError> {
2177
+ return safeParse(
2178
+ jsonString,
2179
+ (x) => Settings$inboundSchema.parse(JSON.parse(x)),
2180
+ `Failed to parse 'Settings' from JSON`,
2181
+ );
2182
+ }
2183
+
2184
+ /** @internal */
2185
+ export const KnowledgeBases$inboundSchema: z.ZodType<
2186
+ KnowledgeBases,
2187
+ z.ZodTypeDef,
2188
+ unknown
2189
+ > = z.object({
2190
+ knowledge_id: z.string(),
2191
+ }).transform((v) => {
2192
+ return remap$(v, {
2193
+ "knowledge_id": "knowledgeId",
2194
+ });
2195
+ });
2196
+
2197
+ /** @internal */
2198
+ export type KnowledgeBases$Outbound = {
2199
+ knowledge_id: string;
2200
+ };
2201
+
2202
+ /** @internal */
2203
+ export const KnowledgeBases$outboundSchema: z.ZodType<
2204
+ KnowledgeBases$Outbound,
2205
+ z.ZodTypeDef,
2206
+ KnowledgeBases
2207
+ > = z.object({
2208
+ knowledgeId: z.string(),
2209
+ }).transform((v) => {
2210
+ return remap$(v, {
2211
+ knowledgeId: "knowledge_id",
2212
+ });
2213
+ });
2214
+
2215
+ /**
2216
+ * @internal
2217
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2218
+ */
2219
+ export namespace KnowledgeBases$ {
2220
+ /** @deprecated use `KnowledgeBases$inboundSchema` instead. */
2221
+ export const inboundSchema = KnowledgeBases$inboundSchema;
2222
+ /** @deprecated use `KnowledgeBases$outboundSchema` instead. */
2223
+ export const outboundSchema = KnowledgeBases$outboundSchema;
2224
+ /** @deprecated use `KnowledgeBases$Outbound` instead. */
2225
+ export type Outbound = KnowledgeBases$Outbound;
2226
+ }
2227
+
2228
+ export function knowledgeBasesToJSON(knowledgeBases: KnowledgeBases): string {
2229
+ return JSON.stringify(KnowledgeBases$outboundSchema.parse(knowledgeBases));
2230
+ }
2231
+
2232
+ export function knowledgeBasesFromJSON(
2233
+ jsonString: string,
2234
+ ): SafeParseResult<KnowledgeBases, SDKValidationError> {
2235
+ return safeParse(
2236
+ jsonString,
2237
+ (x) => KnowledgeBases$inboundSchema.parse(JSON.parse(x)),
2238
+ `Failed to parse 'KnowledgeBases' from JSON`,
2239
+ );
2240
+ }
2241
+
2242
+ /** @internal */
2243
+ export const CreateAgentRequestBody$inboundSchema: z.ZodType<
2244
+ CreateAgentRequestBody,
2245
+ z.ZodTypeDef,
2246
+ unknown
2247
+ > = z.object({
2248
+ path: z.string(),
2249
+ key: z.string(),
2250
+ role: z.string(),
2251
+ description: z.string(),
2252
+ instructions: z.string(),
2253
+ system_prompt: z.string().optional(),
2254
+ model: z.string(),
2255
+ fallback_models: z.array(z.string()).optional(),
2256
+ settings: z.lazy(() => Settings$inboundSchema),
2257
+ memory_stores: z.array(z.string()).optional(),
2258
+ knowledge_bases: z.array(z.lazy(() => KnowledgeBases$inboundSchema))
2259
+ .optional(),
2260
+ }).transform((v) => {
2261
+ return remap$(v, {
2262
+ "system_prompt": "systemPrompt",
2263
+ "fallback_models": "fallbackModels",
2264
+ "memory_stores": "memoryStores",
2265
+ "knowledge_bases": "knowledgeBases",
2266
+ });
2267
+ });
2268
+
2269
+ /** @internal */
2270
+ export type CreateAgentRequestBody$Outbound = {
2271
+ path: string;
2272
+ key: string;
2273
+ role: string;
2274
+ description: string;
2275
+ instructions: string;
2276
+ system_prompt?: string | undefined;
2277
+ model: string;
2278
+ fallback_models?: Array<string> | undefined;
2279
+ settings: Settings$Outbound;
2280
+ memory_stores?: Array<string> | undefined;
2281
+ knowledge_bases?: Array<KnowledgeBases$Outbound> | undefined;
2282
+ };
2283
+
2284
+ /** @internal */
2285
+ export const CreateAgentRequestBody$outboundSchema: z.ZodType<
2286
+ CreateAgentRequestBody$Outbound,
2287
+ z.ZodTypeDef,
2288
+ CreateAgentRequestBody
2289
+ > = z.object({
2290
+ path: z.string(),
2291
+ key: z.string(),
2292
+ role: z.string(),
2293
+ description: z.string(),
2294
+ instructions: z.string(),
2295
+ systemPrompt: z.string().optional(),
2296
+ model: z.string(),
2297
+ fallbackModels: z.array(z.string()).optional(),
2298
+ settings: z.lazy(() => Settings$outboundSchema),
2299
+ memoryStores: z.array(z.string()).optional(),
2300
+ knowledgeBases: z.array(z.lazy(() => KnowledgeBases$outboundSchema))
2301
+ .optional(),
2302
+ }).transform((v) => {
2303
+ return remap$(v, {
2304
+ systemPrompt: "system_prompt",
2305
+ fallbackModels: "fallback_models",
2306
+ memoryStores: "memory_stores",
2307
+ knowledgeBases: "knowledge_bases",
2308
+ });
2309
+ });
2310
+
2311
+ /**
2312
+ * @internal
2313
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2314
+ */
2315
+ export namespace CreateAgentRequestBody$ {
2316
+ /** @deprecated use `CreateAgentRequestBody$inboundSchema` instead. */
2317
+ export const inboundSchema = CreateAgentRequestBody$inboundSchema;
2318
+ /** @deprecated use `CreateAgentRequestBody$outboundSchema` instead. */
2319
+ export const outboundSchema = CreateAgentRequestBody$outboundSchema;
2320
+ /** @deprecated use `CreateAgentRequestBody$Outbound` instead. */
2321
+ export type Outbound = CreateAgentRequestBody$Outbound;
2322
+ }
2323
+
2324
+ export function createAgentRequestBodyToJSON(
2325
+ createAgentRequestBody: CreateAgentRequestBody,
2326
+ ): string {
2327
+ return JSON.stringify(
2328
+ CreateAgentRequestBody$outboundSchema.parse(createAgentRequestBody),
2329
+ );
2330
+ }
2331
+
2332
+ export function createAgentRequestBodyFromJSON(
2333
+ jsonString: string,
2334
+ ): SafeParseResult<CreateAgentRequestBody, SDKValidationError> {
2335
+ return safeParse(
2336
+ jsonString,
2337
+ (x) => CreateAgentRequestBody$inboundSchema.parse(JSON.parse(x)),
2338
+ `Failed to parse 'CreateAgentRequestBody' from JSON`,
2339
+ );
2340
+ }
2341
+
2342
+ /** @internal */
2343
+ export const CreateAgentStatus$inboundSchema: z.ZodNativeEnum<
2344
+ typeof CreateAgentStatus
2345
+ > = z.nativeEnum(CreateAgentStatus);
2346
+
2347
+ /** @internal */
2348
+ export const CreateAgentStatus$outboundSchema: z.ZodNativeEnum<
2349
+ typeof CreateAgentStatus
2350
+ > = CreateAgentStatus$inboundSchema;
2351
+
2352
+ /**
2353
+ * @internal
2354
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2355
+ */
2356
+ export namespace CreateAgentStatus$ {
2357
+ /** @deprecated use `CreateAgentStatus$inboundSchema` instead. */
2358
+ export const inboundSchema = CreateAgentStatus$inboundSchema;
2359
+ /** @deprecated use `CreateAgentStatus$outboundSchema` instead. */
2360
+ export const outboundSchema = CreateAgentStatus$outboundSchema;
2361
+ }
2362
+
2363
+ /** @internal */
2364
+ export const CreateAgentToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
2365
+ typeof CreateAgentToolApprovalRequired
2366
+ > = z.nativeEnum(CreateAgentToolApprovalRequired);
2367
+
2368
+ /** @internal */
2369
+ export const CreateAgentToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
2370
+ typeof CreateAgentToolApprovalRequired
2371
+ > = CreateAgentToolApprovalRequired$inboundSchema;
2372
+
2373
+ /**
2374
+ * @internal
2375
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2376
+ */
2377
+ export namespace CreateAgentToolApprovalRequired$ {
2378
+ /** @deprecated use `CreateAgentToolApprovalRequired$inboundSchema` instead. */
2379
+ export const inboundSchema = CreateAgentToolApprovalRequired$inboundSchema;
2380
+ /** @deprecated use `CreateAgentToolApprovalRequired$outboundSchema` instead. */
2381
+ export const outboundSchema = CreateAgentToolApprovalRequired$outboundSchema;
2382
+ }
2383
+
2384
+ /** @internal */
2385
+ export const Conditions$inboundSchema: z.ZodType<
2386
+ Conditions,
2387
+ z.ZodTypeDef,
2388
+ unknown
2389
+ > = z.object({
2390
+ condition: z.string(),
2391
+ operator: z.string(),
2392
+ value: z.string(),
2393
+ });
2394
+
2395
+ /** @internal */
2396
+ export type Conditions$Outbound = {
2397
+ condition: string;
2398
+ operator: string;
2399
+ value: string;
2400
+ };
2401
+
2402
+ /** @internal */
2403
+ export const Conditions$outboundSchema: z.ZodType<
2404
+ Conditions$Outbound,
2405
+ z.ZodTypeDef,
2406
+ Conditions
2407
+ > = z.object({
2408
+ condition: z.string(),
2409
+ operator: z.string(),
2410
+ value: z.string(),
2411
+ });
2412
+
2413
+ /**
2414
+ * @internal
2415
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2416
+ */
2417
+ export namespace Conditions$ {
2418
+ /** @deprecated use `Conditions$inboundSchema` instead. */
2419
+ export const inboundSchema = Conditions$inboundSchema;
2420
+ /** @deprecated use `Conditions$outboundSchema` instead. */
2421
+ export const outboundSchema = Conditions$outboundSchema;
2422
+ /** @deprecated use `Conditions$Outbound` instead. */
2423
+ export type Outbound = Conditions$Outbound;
2424
+ }
2425
+
2426
+ export function conditionsToJSON(conditions: Conditions): string {
2427
+ return JSON.stringify(Conditions$outboundSchema.parse(conditions));
2428
+ }
2429
+
2430
+ export function conditionsFromJSON(
2431
+ jsonString: string,
2432
+ ): SafeParseResult<Conditions, SDKValidationError> {
2433
+ return safeParse(
2434
+ jsonString,
2435
+ (x) => Conditions$inboundSchema.parse(JSON.parse(x)),
2436
+ `Failed to parse 'Conditions' from JSON`,
2437
+ );
2438
+ }
2439
+
2440
+ /** @internal */
2441
+ export const CreateAgentTools$inboundSchema: z.ZodType<
2442
+ CreateAgentTools,
2443
+ z.ZodTypeDef,
2444
+ unknown
2445
+ > = z.object({
2446
+ id: z.string(),
2447
+ key: z.string().optional(),
2448
+ action_type: z.string(),
2449
+ display_name: z.string().optional(),
2450
+ requires_approval: z.boolean().default(false),
2451
+ conditions: z.array(z.lazy(() => Conditions$inboundSchema)).optional(),
2452
+ mcpServer: z.string().optional(),
2453
+ timeout: z.number().default(120),
2454
+ }).transform((v) => {
2455
+ return remap$(v, {
2456
+ "action_type": "actionType",
2457
+ "display_name": "displayName",
2458
+ "requires_approval": "requiresApproval",
2459
+ });
2460
+ });
2461
+
2462
+ /** @internal */
2463
+ export type CreateAgentTools$Outbound = {
2464
+ id: string;
2465
+ key?: string | undefined;
2466
+ action_type: string;
2467
+ display_name?: string | undefined;
2468
+ requires_approval: boolean;
2469
+ conditions?: Array<Conditions$Outbound> | undefined;
2470
+ mcpServer?: string | undefined;
2471
+ timeout: number;
2472
+ };
2473
+
2474
+ /** @internal */
2475
+ export const CreateAgentTools$outboundSchema: z.ZodType<
2476
+ CreateAgentTools$Outbound,
2477
+ z.ZodTypeDef,
2478
+ CreateAgentTools
2479
+ > = z.object({
2480
+ id: z.string(),
2481
+ key: z.string().optional(),
2482
+ actionType: z.string(),
2483
+ displayName: z.string().optional(),
2484
+ requiresApproval: z.boolean().default(false),
2485
+ conditions: z.array(z.lazy(() => Conditions$outboundSchema)).optional(),
2486
+ mcpServer: z.string().optional(),
2487
+ timeout: z.number().default(120),
2488
+ }).transform((v) => {
2489
+ return remap$(v, {
2490
+ actionType: "action_type",
2491
+ displayName: "display_name",
2492
+ requiresApproval: "requires_approval",
2493
+ });
2494
+ });
2495
+
2496
+ /**
2497
+ * @internal
2498
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2499
+ */
2500
+ export namespace CreateAgentTools$ {
2501
+ /** @deprecated use `CreateAgentTools$inboundSchema` instead. */
2502
+ export const inboundSchema = CreateAgentTools$inboundSchema;
2503
+ /** @deprecated use `CreateAgentTools$outboundSchema` instead. */
2504
+ export const outboundSchema = CreateAgentTools$outboundSchema;
2505
+ /** @deprecated use `CreateAgentTools$Outbound` instead. */
2506
+ export type Outbound = CreateAgentTools$Outbound;
2507
+ }
2508
+
2509
+ export function createAgentToolsToJSON(
2510
+ createAgentTools: CreateAgentTools,
2511
+ ): string {
2512
+ return JSON.stringify(
2513
+ CreateAgentTools$outboundSchema.parse(createAgentTools),
2514
+ );
2515
+ }
2516
+
2517
+ export function createAgentToolsFromJSON(
2518
+ jsonString: string,
2519
+ ): SafeParseResult<CreateAgentTools, SDKValidationError> {
2520
+ return safeParse(
2521
+ jsonString,
2522
+ (x) => CreateAgentTools$inboundSchema.parse(JSON.parse(x)),
2523
+ `Failed to parse 'CreateAgentTools' from JSON`,
2524
+ );
2525
+ }
2526
+
2527
+ /** @internal */
2528
+ export const CreateAgentSettings$inboundSchema: z.ZodType<
2529
+ CreateAgentSettings,
2530
+ z.ZodTypeDef,
2531
+ unknown
2532
+ > = z.object({
2533
+ max_iterations: z.number().int().default(15),
2534
+ max_execution_time: z.number().int().default(300),
2535
+ tool_approval_required: CreateAgentToolApprovalRequired$inboundSchema.default(
2536
+ "respect_tool",
2537
+ ),
2538
+ tools: z.array(z.lazy(() => CreateAgentTools$inboundSchema)),
2539
+ }).transform((v) => {
2540
+ return remap$(v, {
2541
+ "max_iterations": "maxIterations",
2542
+ "max_execution_time": "maxExecutionTime",
2543
+ "tool_approval_required": "toolApprovalRequired",
2544
+ });
2545
+ });
2546
+
2547
+ /** @internal */
2548
+ export type CreateAgentSettings$Outbound = {
2549
+ max_iterations: number;
2550
+ max_execution_time: number;
2551
+ tool_approval_required: string;
2552
+ tools: Array<CreateAgentTools$Outbound>;
2553
+ };
2554
+
2555
+ /** @internal */
2556
+ export const CreateAgentSettings$outboundSchema: z.ZodType<
2557
+ CreateAgentSettings$Outbound,
2558
+ z.ZodTypeDef,
2559
+ CreateAgentSettings
2560
+ > = z.object({
2561
+ maxIterations: z.number().int().default(15),
2562
+ maxExecutionTime: z.number().int().default(300),
2563
+ toolApprovalRequired: CreateAgentToolApprovalRequired$outboundSchema.default(
2564
+ "respect_tool",
2565
+ ),
2566
+ tools: z.array(z.lazy(() => CreateAgentTools$outboundSchema)),
2567
+ }).transform((v) => {
2568
+ return remap$(v, {
2569
+ maxIterations: "max_iterations",
2570
+ maxExecutionTime: "max_execution_time",
2571
+ toolApprovalRequired: "tool_approval_required",
2572
+ });
2573
+ });
2574
+
2575
+ /**
2576
+ * @internal
2577
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2578
+ */
2579
+ export namespace CreateAgentSettings$ {
2580
+ /** @deprecated use `CreateAgentSettings$inboundSchema` instead. */
2581
+ export const inboundSchema = CreateAgentSettings$inboundSchema;
2582
+ /** @deprecated use `CreateAgentSettings$outboundSchema` instead. */
2583
+ export const outboundSchema = CreateAgentSettings$outboundSchema;
2584
+ /** @deprecated use `CreateAgentSettings$Outbound` instead. */
2585
+ export type Outbound = CreateAgentSettings$Outbound;
2586
+ }
2587
+
2588
+ export function createAgentSettingsToJSON(
2589
+ createAgentSettings: CreateAgentSettings,
2590
+ ): string {
2591
+ return JSON.stringify(
2592
+ CreateAgentSettings$outboundSchema.parse(createAgentSettings),
2593
+ );
2594
+ }
2595
+
2596
+ export function createAgentSettingsFromJSON(
2597
+ jsonString: string,
2598
+ ): SafeParseResult<CreateAgentSettings, SDKValidationError> {
2599
+ return safeParse(
2600
+ jsonString,
2601
+ (x) => CreateAgentSettings$inboundSchema.parse(JSON.parse(x)),
2602
+ `Failed to parse 'CreateAgentSettings' from JSON`,
2603
+ );
2604
+ }
2605
+
2606
+ /** @internal */
2607
+ export const CreateAgentModel$inboundSchema: z.ZodType<
2608
+ CreateAgentModel,
2609
+ z.ZodTypeDef,
2610
+ unknown
2611
+ > = z.object({
2612
+ id: z.string(),
2613
+ integration_id: z.nullable(z.string()).optional(),
2614
+ fallback_models: z.nullable(z.array(z.string())).optional(),
2615
+ max_tokens: z.number().int().optional(),
2616
+ temperature: z.number().optional(),
2617
+ }).transform((v) => {
2618
+ return remap$(v, {
2619
+ "integration_id": "integrationId",
2620
+ "fallback_models": "fallbackModels",
2621
+ "max_tokens": "maxTokens",
2622
+ });
2623
+ });
2624
+
2625
+ /** @internal */
2626
+ export type CreateAgentModel$Outbound = {
2627
+ id: string;
2628
+ integration_id?: string | null | undefined;
2629
+ fallback_models?: Array<string> | null | undefined;
2630
+ max_tokens?: number | undefined;
2631
+ temperature?: number | undefined;
2632
+ };
2633
+
2634
+ /** @internal */
2635
+ export const CreateAgentModel$outboundSchema: z.ZodType<
2636
+ CreateAgentModel$Outbound,
2637
+ z.ZodTypeDef,
2638
+ CreateAgentModel
2639
+ > = z.object({
2640
+ id: z.string(),
2641
+ integrationId: z.nullable(z.string()).optional(),
2642
+ fallbackModels: z.nullable(z.array(z.string())).optional(),
2643
+ maxTokens: z.number().int().optional(),
2644
+ temperature: z.number().optional(),
2645
+ }).transform((v) => {
2646
+ return remap$(v, {
2647
+ integrationId: "integration_id",
2648
+ fallbackModels: "fallback_models",
2649
+ maxTokens: "max_tokens",
2650
+ });
2651
+ });
2652
+
2653
+ /**
2654
+ * @internal
2655
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2656
+ */
2657
+ export namespace CreateAgentModel$ {
2658
+ /** @deprecated use `CreateAgentModel$inboundSchema` instead. */
2659
+ export const inboundSchema = CreateAgentModel$inboundSchema;
2660
+ /** @deprecated use `CreateAgentModel$outboundSchema` instead. */
2661
+ export const outboundSchema = CreateAgentModel$outboundSchema;
2662
+ /** @deprecated use `CreateAgentModel$Outbound` instead. */
2663
+ export type Outbound = CreateAgentModel$Outbound;
2664
+ }
2665
+
2666
+ export function createAgentModelToJSON(
2667
+ createAgentModel: CreateAgentModel,
2668
+ ): string {
2669
+ return JSON.stringify(
2670
+ CreateAgentModel$outboundSchema.parse(createAgentModel),
2671
+ );
2672
+ }
2673
+
2674
+ export function createAgentModelFromJSON(
2675
+ jsonString: string,
2676
+ ): SafeParseResult<CreateAgentModel, SDKValidationError> {
2677
+ return safeParse(
2678
+ jsonString,
2679
+ (x) => CreateAgentModel$inboundSchema.parse(JSON.parse(x)),
2680
+ `Failed to parse 'CreateAgentModel' from JSON`,
2681
+ );
2682
+ }
2683
+
2684
+ /** @internal */
2685
+ export const CreateAgentTeamOfAgents$inboundSchema: z.ZodType<
2686
+ CreateAgentTeamOfAgents,
2687
+ z.ZodTypeDef,
2688
+ unknown
2689
+ > = z.object({
2690
+ key: z.string(),
2691
+ role: z.string().optional(),
2692
+ });
2693
+
2694
+ /** @internal */
2695
+ export type CreateAgentTeamOfAgents$Outbound = {
2696
+ key: string;
2697
+ role?: string | undefined;
2698
+ };
2699
+
2700
+ /** @internal */
2701
+ export const CreateAgentTeamOfAgents$outboundSchema: z.ZodType<
2702
+ CreateAgentTeamOfAgents$Outbound,
2703
+ z.ZodTypeDef,
2704
+ CreateAgentTeamOfAgents
2705
+ > = z.object({
2706
+ key: z.string(),
2707
+ role: z.string().optional(),
2708
+ });
2709
+
2710
+ /**
2711
+ * @internal
2712
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2713
+ */
2714
+ export namespace CreateAgentTeamOfAgents$ {
2715
+ /** @deprecated use `CreateAgentTeamOfAgents$inboundSchema` instead. */
2716
+ export const inboundSchema = CreateAgentTeamOfAgents$inboundSchema;
2717
+ /** @deprecated use `CreateAgentTeamOfAgents$outboundSchema` instead. */
2718
+ export const outboundSchema = CreateAgentTeamOfAgents$outboundSchema;
2719
+ /** @deprecated use `CreateAgentTeamOfAgents$Outbound` instead. */
2720
+ export type Outbound = CreateAgentTeamOfAgents$Outbound;
2721
+ }
2722
+
2723
+ export function createAgentTeamOfAgentsToJSON(
2724
+ createAgentTeamOfAgents: CreateAgentTeamOfAgents,
2725
+ ): string {
2726
+ return JSON.stringify(
2727
+ CreateAgentTeamOfAgents$outboundSchema.parse(createAgentTeamOfAgents),
2728
+ );
2729
+ }
2730
+
2731
+ export function createAgentTeamOfAgentsFromJSON(
2732
+ jsonString: string,
2733
+ ): SafeParseResult<CreateAgentTeamOfAgents, SDKValidationError> {
2734
+ return safeParse(
2735
+ jsonString,
2736
+ (x) => CreateAgentTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
2737
+ `Failed to parse 'CreateAgentTeamOfAgents' from JSON`,
2738
+ );
2739
+ }
2740
+
2741
+ /** @internal */
2742
+ export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
2743
+ z.object({
2744
+ total_cost: z.number().default(0),
2745
+ }).transform((v) => {
2746
+ return remap$(v, {
2747
+ "total_cost": "totalCost",
2748
+ });
2749
+ });
2750
+
2751
+ /** @internal */
2752
+ export type Metrics$Outbound = {
2753
+ total_cost: number;
2754
+ };
2755
+
2756
+ /** @internal */
2757
+ export const Metrics$outboundSchema: z.ZodType<
2758
+ Metrics$Outbound,
2759
+ z.ZodTypeDef,
2760
+ Metrics
2761
+ > = z.object({
2762
+ totalCost: z.number().default(0),
2763
+ }).transform((v) => {
2764
+ return remap$(v, {
2765
+ totalCost: "total_cost",
2766
+ });
2767
+ });
2768
+
2769
+ /**
2770
+ * @internal
2771
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2772
+ */
2773
+ export namespace Metrics$ {
2774
+ /** @deprecated use `Metrics$inboundSchema` instead. */
2775
+ export const inboundSchema = Metrics$inboundSchema;
2776
+ /** @deprecated use `Metrics$outboundSchema` instead. */
2777
+ export const outboundSchema = Metrics$outboundSchema;
2778
+ /** @deprecated use `Metrics$Outbound` instead. */
2779
+ export type Outbound = Metrics$Outbound;
2780
+ }
2781
+
2782
+ export function metricsToJSON(metrics: Metrics): string {
2783
+ return JSON.stringify(Metrics$outboundSchema.parse(metrics));
2784
+ }
2785
+
2786
+ export function metricsFromJSON(
2787
+ jsonString: string,
2788
+ ): SafeParseResult<Metrics, SDKValidationError> {
2789
+ return safeParse(
2790
+ jsonString,
2791
+ (x) => Metrics$inboundSchema.parse(JSON.parse(x)),
2792
+ `Failed to parse 'Metrics' from JSON`,
2793
+ );
2794
+ }
2795
+
2796
+ /** @internal */
2797
+ export const CreateAgentKnowledgeBases$inboundSchema: z.ZodType<
2798
+ CreateAgentKnowledgeBases,
2799
+ z.ZodTypeDef,
2800
+ unknown
2801
+ > = z.object({
2802
+ knowledge_id: z.string(),
2803
+ }).transform((v) => {
2804
+ return remap$(v, {
2805
+ "knowledge_id": "knowledgeId",
2806
+ });
2807
+ });
2808
+
2809
+ /** @internal */
2810
+ export type CreateAgentKnowledgeBases$Outbound = {
2811
+ knowledge_id: string;
2812
+ };
2813
+
2814
+ /** @internal */
2815
+ export const CreateAgentKnowledgeBases$outboundSchema: z.ZodType<
2816
+ CreateAgentKnowledgeBases$Outbound,
2817
+ z.ZodTypeDef,
2818
+ CreateAgentKnowledgeBases
2819
+ > = z.object({
2820
+ knowledgeId: z.string(),
2821
+ }).transform((v) => {
2822
+ return remap$(v, {
2823
+ knowledgeId: "knowledge_id",
2824
+ });
2825
+ });
2826
+
2827
+ /**
2828
+ * @internal
2829
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2830
+ */
2831
+ export namespace CreateAgentKnowledgeBases$ {
2832
+ /** @deprecated use `CreateAgentKnowledgeBases$inboundSchema` instead. */
2833
+ export const inboundSchema = CreateAgentKnowledgeBases$inboundSchema;
2834
+ /** @deprecated use `CreateAgentKnowledgeBases$outboundSchema` instead. */
2835
+ export const outboundSchema = CreateAgentKnowledgeBases$outboundSchema;
2836
+ /** @deprecated use `CreateAgentKnowledgeBases$Outbound` instead. */
2837
+ export type Outbound = CreateAgentKnowledgeBases$Outbound;
2838
+ }
2839
+
2840
+ export function createAgentKnowledgeBasesToJSON(
2841
+ createAgentKnowledgeBases: CreateAgentKnowledgeBases,
2842
+ ): string {
2843
+ return JSON.stringify(
2844
+ CreateAgentKnowledgeBases$outboundSchema.parse(createAgentKnowledgeBases),
2845
+ );
2846
+ }
2847
+
2848
+ export function createAgentKnowledgeBasesFromJSON(
2849
+ jsonString: string,
2850
+ ): SafeParseResult<CreateAgentKnowledgeBases, SDKValidationError> {
2851
+ return safeParse(
2852
+ jsonString,
2853
+ (x) => CreateAgentKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
2854
+ `Failed to parse 'CreateAgentKnowledgeBases' from JSON`,
2855
+ );
2856
+ }
2857
+
2858
+ /** @internal */
2859
+ export const HiddenPanels$inboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
2860
+ z.nativeEnum(HiddenPanels);
2861
+
2862
+ /** @internal */
2863
+ export const HiddenPanels$outboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
2864
+ HiddenPanels$inboundSchema;
2865
+
2866
+ /**
2867
+ * @internal
2868
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2869
+ */
2870
+ export namespace HiddenPanels$ {
2871
+ /** @deprecated use `HiddenPanels$inboundSchema` instead. */
2872
+ export const inboundSchema = HiddenPanels$inboundSchema;
2873
+ /** @deprecated use `HiddenPanels$outboundSchema` instead. */
2874
+ export const outboundSchema = HiddenPanels$outboundSchema;
2875
+ }
2876
+
2877
+ /** @internal */
2878
+ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
2879
+ CreateAgentResponseBody,
2880
+ z.ZodTypeDef,
2881
+ unknown
2882
+ > = z.object({
2883
+ _id: z.string(),
2884
+ key: z.string(),
2885
+ workspace_id: z.string(),
2886
+ project_id: z.string(),
2887
+ created_by_id: z.nullable(z.string()).optional(),
2888
+ updated_by_id: z.nullable(z.string()).optional(),
2889
+ created: z.string().optional(),
2890
+ updated: z.string().optional(),
2891
+ role: z.string(),
2892
+ description: z.string(),
2893
+ system_prompt: z.string().optional(),
2894
+ instructions: z.string(),
2895
+ status: CreateAgentStatus$inboundSchema,
2896
+ settings: z.lazy(() => CreateAgentSettings$inboundSchema).optional(),
2897
+ model: z.lazy(() => CreateAgentModel$inboundSchema),
2898
+ version_hash: z.string().optional(),
2899
+ path: z.string(),
2900
+ memory_stores: z.array(z.string()),
2901
+ team_of_agents: z.array(z.lazy(() => CreateAgentTeamOfAgents$inboundSchema)),
2902
+ metrics: z.lazy(() => Metrics$inboundSchema).optional(),
2903
+ variables: z.record(z.any()).optional(),
2904
+ knowledge_bases: z.array(
2905
+ z.lazy(() => CreateAgentKnowledgeBases$inboundSchema),
2906
+ ).optional(),
2907
+ hidden_panels: z.array(HiddenPanels$inboundSchema).optional(),
2908
+ }).transform((v) => {
2909
+ return remap$(v, {
2910
+ "_id": "id",
2911
+ "workspace_id": "workspaceId",
2912
+ "project_id": "projectId",
2913
+ "created_by_id": "createdById",
2914
+ "updated_by_id": "updatedById",
2915
+ "system_prompt": "systemPrompt",
2916
+ "version_hash": "versionHash",
2917
+ "memory_stores": "memoryStores",
2918
+ "team_of_agents": "teamOfAgents",
2919
+ "knowledge_bases": "knowledgeBases",
2920
+ "hidden_panels": "hiddenPanels",
2921
+ });
2922
+ });
2923
+
2924
+ /** @internal */
2925
+ export type CreateAgentResponseBody$Outbound = {
2926
+ _id: string;
2927
+ key: string;
2928
+ workspace_id: string;
2929
+ project_id: string;
2930
+ created_by_id?: string | null | undefined;
2931
+ updated_by_id?: string | null | undefined;
2932
+ created?: string | undefined;
2933
+ updated?: string | undefined;
2934
+ role: string;
2935
+ description: string;
2936
+ system_prompt?: string | undefined;
2937
+ instructions: string;
2938
+ status: string;
2939
+ settings?: CreateAgentSettings$Outbound | undefined;
2940
+ model: CreateAgentModel$Outbound;
2941
+ version_hash?: string | undefined;
2942
+ path: string;
2943
+ memory_stores: Array<string>;
2944
+ team_of_agents: Array<CreateAgentTeamOfAgents$Outbound>;
2945
+ metrics?: Metrics$Outbound | undefined;
2946
+ variables?: { [k: string]: any } | undefined;
2947
+ knowledge_bases?: Array<CreateAgentKnowledgeBases$Outbound> | undefined;
2948
+ hidden_panels?: Array<string> | undefined;
2949
+ };
2950
+
2951
+ /** @internal */
2952
+ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
2953
+ CreateAgentResponseBody$Outbound,
2954
+ z.ZodTypeDef,
2955
+ CreateAgentResponseBody
2956
+ > = z.object({
2957
+ id: z.string(),
2958
+ key: z.string(),
2959
+ workspaceId: z.string(),
2960
+ projectId: z.string(),
2961
+ createdById: z.nullable(z.string()).optional(),
2962
+ updatedById: z.nullable(z.string()).optional(),
2963
+ created: z.string().optional(),
2964
+ updated: z.string().optional(),
2965
+ role: z.string(),
2966
+ description: z.string(),
2967
+ systemPrompt: z.string().optional(),
2968
+ instructions: z.string(),
2969
+ status: CreateAgentStatus$outboundSchema,
2970
+ settings: z.lazy(() => CreateAgentSettings$outboundSchema).optional(),
2971
+ model: z.lazy(() => CreateAgentModel$outboundSchema),
2972
+ versionHash: z.string().optional(),
2973
+ path: z.string(),
2974
+ memoryStores: z.array(z.string()),
2975
+ teamOfAgents: z.array(z.lazy(() => CreateAgentTeamOfAgents$outboundSchema)),
2976
+ metrics: z.lazy(() => Metrics$outboundSchema).optional(),
2977
+ variables: z.record(z.any()).optional(),
2978
+ knowledgeBases: z.array(
2979
+ z.lazy(() => CreateAgentKnowledgeBases$outboundSchema),
2980
+ ).optional(),
2981
+ hiddenPanels: z.array(HiddenPanels$outboundSchema).optional(),
2982
+ }).transform((v) => {
2983
+ return remap$(v, {
2984
+ id: "_id",
2985
+ workspaceId: "workspace_id",
2986
+ projectId: "project_id",
2987
+ createdById: "created_by_id",
2988
+ updatedById: "updated_by_id",
2989
+ systemPrompt: "system_prompt",
2990
+ versionHash: "version_hash",
2991
+ memoryStores: "memory_stores",
2992
+ teamOfAgents: "team_of_agents",
2993
+ knowledgeBases: "knowledge_bases",
2994
+ hiddenPanels: "hidden_panels",
2995
+ });
2996
+ });
2997
+
2998
+ /**
2999
+ * @internal
3000
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3001
+ */
3002
+ export namespace CreateAgentResponseBody$ {
3003
+ /** @deprecated use `CreateAgentResponseBody$inboundSchema` instead. */
3004
+ export const inboundSchema = CreateAgentResponseBody$inboundSchema;
3005
+ /** @deprecated use `CreateAgentResponseBody$outboundSchema` instead. */
3006
+ export const outboundSchema = CreateAgentResponseBody$outboundSchema;
3007
+ /** @deprecated use `CreateAgentResponseBody$Outbound` instead. */
3008
+ export type Outbound = CreateAgentResponseBody$Outbound;
3009
+ }
3010
+
3011
+ export function createAgentResponseBodyToJSON(
3012
+ createAgentResponseBody: CreateAgentResponseBody,
3013
+ ): string {
3014
+ return JSON.stringify(
3015
+ CreateAgentResponseBody$outboundSchema.parse(createAgentResponseBody),
3016
+ );
3017
+ }
3018
+
3019
+ export function createAgentResponseBodyFromJSON(
3020
+ jsonString: string,
3021
+ ): SafeParseResult<CreateAgentResponseBody, SDKValidationError> {
3022
+ return safeParse(
3023
+ jsonString,
3024
+ (x) => CreateAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
3025
+ `Failed to parse 'CreateAgentResponseBody' from JSON`,
3026
+ );
3027
+ }