@orq-ai/node 4.1.0-rc.1 → 4.1.0-rc.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 (412) hide show
  1. package/README.md +22 -18
  2. package/bin/mcp-server.js +35857 -37966
  3. package/bin/mcp-server.js.map +100 -74
  4. package/docs/sdks/agents/README.md +10 -10
  5. package/docs/sdks/evals/README.md +103 -1
  6. package/docs/sdks/responses/README.md +5 -5
  7. package/examples/package-lock.json +1 -1
  8. package/funcs/agentsCreate.d.ts +1 -1
  9. package/funcs/agentsCreate.d.ts.map +1 -1
  10. package/funcs/agentsCreate.js +2 -4
  11. package/funcs/agentsCreate.js.map +1 -1
  12. package/funcs/agentsResponsesCreate.d.ts +1 -1
  13. package/funcs/agentsResponsesCreate.d.ts.map +1 -1
  14. package/funcs/agentsResponsesCreate.js +4 -4
  15. package/funcs/agentsResponsesCreate.js.map +1 -1
  16. package/funcs/agentsRun.d.ts +1 -1
  17. package/funcs/agentsRun.d.ts.map +1 -1
  18. package/funcs/agentsRun.js +2 -4
  19. package/funcs/agentsRun.js.map +1 -1
  20. package/funcs/agentsStream.d.ts +1 -1
  21. package/funcs/agentsStream.d.ts.map +1 -1
  22. package/funcs/agentsStream.js +4 -4
  23. package/funcs/agentsStream.js.map +1 -1
  24. package/funcs/agentsStreamRun.d.ts +1 -1
  25. package/funcs/agentsStreamRun.d.ts.map +1 -1
  26. package/funcs/agentsStreamRun.js +2 -4
  27. package/funcs/agentsStreamRun.js.map +1 -1
  28. package/funcs/agentsUpdate.d.ts +1 -1
  29. package/funcs/agentsUpdate.d.ts.map +1 -1
  30. package/funcs/agentsUpdate.js +4 -4
  31. package/funcs/agentsUpdate.js.map +1 -1
  32. package/funcs/evalsInvoke.d.ts +15 -0
  33. package/funcs/evalsInvoke.d.ts.map +1 -0
  34. package/funcs/evalsInvoke.js +121 -0
  35. package/funcs/evalsInvoke.js.map +1 -0
  36. package/jsr.json +1 -1
  37. package/lib/config.d.ts +3 -3
  38. package/lib/config.js +3 -3
  39. package/lib/config.js.map +1 -1
  40. package/mcp-server/mcp-server.js +1 -1
  41. package/mcp-server/mcp-server.js.map +1 -1
  42. package/mcp-server/server.d.ts.map +1 -1
  43. package/mcp-server/server.js +3 -1
  44. package/mcp-server/server.js.map +1 -1
  45. package/mcp-server/tools/agentsCreate.d.ts +1 -1
  46. package/mcp-server/tools/agentsCreate.js +1 -1
  47. package/mcp-server/tools/agentsCreate.js.map +1 -1
  48. package/mcp-server/tools/agentsResponsesCreate.d.ts +1 -1
  49. package/mcp-server/tools/agentsResponsesCreate.d.ts.map +1 -1
  50. package/mcp-server/tools/agentsResponsesCreate.js +2 -3
  51. package/mcp-server/tools/agentsResponsesCreate.js.map +1 -1
  52. package/mcp-server/tools/agentsRun.d.ts +1 -1
  53. package/mcp-server/tools/agentsRun.js +1 -1
  54. package/mcp-server/tools/agentsRun.js.map +1 -1
  55. package/mcp-server/tools/agentsStream.d.ts +1 -1
  56. package/mcp-server/tools/agentsStream.js +2 -2
  57. package/mcp-server/tools/agentsStream.js.map +1 -1
  58. package/mcp-server/tools/agentsStreamRun.d.ts +1 -1
  59. package/mcp-server/tools/agentsStreamRun.js +1 -1
  60. package/mcp-server/tools/agentsStreamRun.js.map +1 -1
  61. package/mcp-server/tools/agentsUpdate.d.ts +1 -1
  62. package/mcp-server/tools/agentsUpdate.d.ts.map +1 -1
  63. package/mcp-server/tools/agentsUpdate.js +2 -3
  64. package/mcp-server/tools/agentsUpdate.js.map +1 -1
  65. package/mcp-server/tools/evalsInvoke.d.ts +8 -0
  66. package/mcp-server/tools/evalsInvoke.d.ts.map +1 -0
  67. package/mcp-server/tools/evalsInvoke.js +62 -0
  68. package/mcp-server/tools/evalsInvoke.js.map +1 -0
  69. package/models/components/actionreviewedstreamingevent.d.ts +76 -0
  70. package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
  71. package/models/components/actionreviewedstreamingevent.js +127 -0
  72. package/models/components/actionreviewedstreamingevent.js.map +1 -0
  73. package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
  74. package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
  75. package/models/components/actionreviewrequestedstreamingevent.js +180 -0
  76. package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
  77. package/models/components/agenterroredstreamingevent.d.ts +58 -0
  78. package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
  79. package/models/components/agenterroredstreamingevent.js +91 -0
  80. package/models/components/agenterroredstreamingevent.js.map +1 -0
  81. package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
  82. package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
  83. package/models/components/agentexecutionstartedstreamingevent.js +103 -0
  84. package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
  85. package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
  86. package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
  87. package/models/components/agenthandedoffstreamingevent.js +96 -0
  88. package/models/components/agenthandedoffstreamingevent.js.map +1 -0
  89. package/models/components/agentinactivestreamingevent.d.ts +309 -0
  90. package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
  91. package/models/components/agentinactivestreamingevent.js +385 -0
  92. package/models/components/agentinactivestreamingevent.js.map +1 -0
  93. package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
  94. package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
  95. package/models/components/agentmessagecreatedstreamingevent.js +190 -0
  96. package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
  97. package/models/components/agentstartedstreamingevent.d.ts +382 -0
  98. package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
  99. package/models/components/agentstartedstreamingevent.js +441 -0
  100. package/models/components/agentstartedstreamingevent.js.map +1 -0
  101. package/models/components/agentthoughtstreamingevent.d.ts +542 -0
  102. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
  103. package/models/components/agentthoughtstreamingevent.js +626 -0
  104. package/models/components/agentthoughtstreamingevent.js.map +1 -0
  105. package/models/components/datapart.d.ts +41 -0
  106. package/models/components/datapart.d.ts.map +1 -0
  107. package/models/components/datapart.js +69 -0
  108. package/models/components/datapart.js.map +1 -0
  109. package/models/components/errorstreamingevent.d.ts +51 -0
  110. package/models/components/errorstreamingevent.d.ts.map +1 -0
  111. package/models/components/errorstreamingevent.js +87 -0
  112. package/models/components/errorstreamingevent.js.map +1 -0
  113. package/models/components/executionnamedstreamingevent.d.ts +51 -0
  114. package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
  115. package/models/components/executionnamedstreamingevent.js +96 -0
  116. package/models/components/executionnamedstreamingevent.js.map +1 -0
  117. package/models/components/executionreviewedstreamingevent.d.ts +45 -0
  118. package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
  119. package/models/components/executionreviewedstreamingevent.js +81 -0
  120. package/models/components/executionreviewedstreamingevent.js.map +1 -0
  121. package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
  122. package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
  123. package/models/components/executionreviewrequiredstreamingevent.js +82 -0
  124. package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
  125. package/models/components/filepart.d.ts +104 -0
  126. package/models/components/filepart.d.ts.map +1 -0
  127. package/models/components/filepart.js +134 -0
  128. package/models/components/filepart.js.map +1 -0
  129. package/models/components/index.d.ts +22 -0
  130. package/models/components/index.d.ts.map +1 -1
  131. package/models/components/index.js +22 -0
  132. package/models/components/index.js.map +1 -1
  133. package/models/components/invokedeploymentrequest.d.ts +21 -21
  134. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  135. package/models/components/invokedeploymentrequest.js +27 -28
  136. package/models/components/invokedeploymentrequest.js.map +1 -1
  137. package/models/components/textpart.d.ts +31 -0
  138. package/models/components/textpart.d.ts.map +1 -0
  139. package/models/components/textpart.js +67 -0
  140. package/models/components/textpart.js.map +1 -0
  141. package/models/components/timeoutstreamingevent.d.ts +49 -0
  142. package/models/components/timeoutstreamingevent.d.ts.map +1 -0
  143. package/models/components/timeoutstreamingevent.js +85 -0
  144. package/models/components/timeoutstreamingevent.js.map +1 -0
  145. package/models/components/toolcallpart.d.ts +45 -0
  146. package/models/components/toolcallpart.d.ts.map +1 -0
  147. package/models/components/toolcallpart.js +84 -0
  148. package/models/components/toolcallpart.js.map +1 -0
  149. package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
  150. package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
  151. package/models/components/toolexecutionfailedstreamingevent.js +223 -0
  152. package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
  153. package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
  154. package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
  155. package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
  156. package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
  157. package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
  158. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
  159. package/models/components/toolexecutionstartedstreamingevent.js +217 -0
  160. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
  161. package/models/components/toolresultpart.d.ts +39 -0
  162. package/models/components/toolresultpart.d.ts.map +1 -0
  163. package/models/components/toolresultpart.js +80 -0
  164. package/models/components/toolresultpart.js.map +1 -0
  165. package/models/errors/index.d.ts +1 -0
  166. package/models/errors/index.d.ts.map +1 -1
  167. package/models/errors/index.js +1 -0
  168. package/models/errors/index.js.map +1 -1
  169. package/models/errors/invokeeval.d.ts +55 -0
  170. package/models/errors/invokeeval.d.ts.map +1 -0
  171. package/models/errors/invokeeval.js +106 -0
  172. package/models/errors/invokeeval.js.map +1 -0
  173. package/models/operations/createagentrequest.d.ts +3 -0
  174. package/models/operations/createagentrequest.d.ts.map +1 -1
  175. package/models/operations/createagentrequest.js.map +1 -1
  176. package/models/operations/createagentresponserequest.d.ts +58 -167
  177. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  178. package/models/operations/createagentresponserequest.js +89 -173
  179. package/models/operations/createagentresponserequest.js.map +1 -1
  180. package/models/operations/createbudget.js +2 -2
  181. package/models/operations/createcontact.js +2 -2
  182. package/models/operations/createdataset.js +2 -2
  183. package/models/operations/createdatasetitem.js +8 -8
  184. package/models/operations/createdatasource.js +2 -2
  185. package/models/operations/createeval.d.ts +80 -145
  186. package/models/operations/createeval.d.ts.map +1 -1
  187. package/models/operations/createeval.js +190 -266
  188. package/models/operations/createeval.js.map +1 -1
  189. package/models/operations/createprompt.d.ts +9 -11
  190. package/models/operations/createprompt.d.ts.map +1 -1
  191. package/models/operations/createprompt.js +9 -11
  192. package/models/operations/createprompt.js.map +1 -1
  193. package/models/operations/createtool.js +12 -12
  194. package/models/operations/deploymentgetconfig.d.ts +241 -241
  195. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  196. package/models/operations/deploymentgetconfig.js +346 -351
  197. package/models/operations/deploymentgetconfig.js.map +1 -1
  198. package/models/operations/deploymentinvoke.d.ts +24 -26
  199. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  200. package/models/operations/deploymentinvoke.js +26 -28
  201. package/models/operations/deploymentinvoke.js.map +1 -1
  202. package/models/operations/deployments.d.ts +24 -26
  203. package/models/operations/deployments.d.ts.map +1 -1
  204. package/models/operations/deployments.js +26 -28
  205. package/models/operations/deployments.js.map +1 -1
  206. package/models/operations/deploymentstream.d.ts +25 -27
  207. package/models/operations/deploymentstream.d.ts.map +1 -1
  208. package/models/operations/deploymentstream.js +30 -34
  209. package/models/operations/deploymentstream.js.map +1 -1
  210. package/models/operations/fileget.js +2 -2
  211. package/models/operations/filelist.js +2 -2
  212. package/models/operations/fileupload.js +2 -2
  213. package/models/operations/getallprompts.d.ts +9 -11
  214. package/models/operations/getallprompts.d.ts.map +1 -1
  215. package/models/operations/getallprompts.js +9 -11
  216. package/models/operations/getallprompts.js.map +1 -1
  217. package/models/operations/getalltools.js +12 -12
  218. package/models/operations/getbudget.js +2 -2
  219. package/models/operations/getevals.d.ts +14 -79
  220. package/models/operations/getevals.d.ts.map +1 -1
  221. package/models/operations/getevals.js +49 -132
  222. package/models/operations/getevals.js.map +1 -1
  223. package/models/operations/getoneprompt.d.ts +9 -11
  224. package/models/operations/getoneprompt.d.ts.map +1 -1
  225. package/models/operations/getoneprompt.js +9 -11
  226. package/models/operations/getoneprompt.js.map +1 -1
  227. package/models/operations/getpromptversion.d.ts +9 -11
  228. package/models/operations/getpromptversion.d.ts.map +1 -1
  229. package/models/operations/getpromptversion.js +9 -11
  230. package/models/operations/getpromptversion.js.map +1 -1
  231. package/models/operations/index.d.ts +1 -0
  232. package/models/operations/index.d.ts.map +1 -1
  233. package/models/operations/index.js +1 -0
  234. package/models/operations/index.js.map +1 -1
  235. package/models/operations/invokeagent.d.ts +63 -416
  236. package/models/operations/invokeagent.d.ts.map +1 -1
  237. package/models/operations/invokeagent.js +80 -429
  238. package/models/operations/invokeagent.js.map +1 -1
  239. package/models/operations/invokeeval.d.ts +719 -0
  240. package/models/operations/invokeeval.d.ts.map +1 -0
  241. package/models/operations/invokeeval.js +954 -0
  242. package/models/operations/invokeeval.js.map +1 -0
  243. package/models/operations/listagents.d.ts +3 -0
  244. package/models/operations/listagents.d.ts.map +1 -1
  245. package/models/operations/listagents.js.map +1 -1
  246. package/models/operations/listbudgets.js +2 -2
  247. package/models/operations/listcontacts.js +2 -2
  248. package/models/operations/listdatasetdatapoints.js +8 -8
  249. package/models/operations/listdatasets.js +2 -2
  250. package/models/operations/listdatasources.js +2 -2
  251. package/models/operations/listknowledgebases.d.ts +16 -16
  252. package/models/operations/listknowledgebases.d.ts.map +1 -1
  253. package/models/operations/listknowledgebases.js +27 -25
  254. package/models/operations/listknowledgebases.js.map +1 -1
  255. package/models/operations/listpromptversions.d.ts +9 -11
  256. package/models/operations/listpromptversions.d.ts.map +1 -1
  257. package/models/operations/listpromptversions.js +9 -11
  258. package/models/operations/listpromptversions.js.map +1 -1
  259. package/models/operations/retrieveagentrequest.d.ts +3 -0
  260. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  261. package/models/operations/retrieveagentrequest.js.map +1 -1
  262. package/models/operations/retrievecontact.js +2 -2
  263. package/models/operations/retrievedatapoint.js +8 -8
  264. package/models/operations/retrievedataset.js +2 -2
  265. package/models/operations/retrievedatasource.js +2 -2
  266. package/models/operations/retrievetool.js +12 -12
  267. package/models/operations/runagent.d.ts +49 -402
  268. package/models/operations/runagent.d.ts.map +1 -1
  269. package/models/operations/runagent.js +70 -418
  270. package/models/operations/runagent.js.map +1 -1
  271. package/models/operations/streamagent.d.ts +240 -3281
  272. package/models/operations/streamagent.d.ts.map +1 -1
  273. package/models/operations/streamagent.js +160 -3604
  274. package/models/operations/streamagent.js.map +1 -1
  275. package/models/operations/streamrunagent.d.ts +888 -3929
  276. package/models/operations/streamrunagent.d.ts.map +1 -1
  277. package/models/operations/streamrunagent.js +165 -3605
  278. package/models/operations/streamrunagent.js.map +1 -1
  279. package/models/operations/updateagent.d.ts +5 -2
  280. package/models/operations/updateagent.d.ts.map +1 -1
  281. package/models/operations/updateagent.js +2 -4
  282. package/models/operations/updateagent.js.map +1 -1
  283. package/models/operations/updatebudget.js +2 -2
  284. package/models/operations/updatecontact.js +2 -2
  285. package/models/operations/updatedatapoint.js +8 -8
  286. package/models/operations/updatedataset.js +2 -2
  287. package/models/operations/updatedatasource.js +2 -2
  288. package/models/operations/updateeval.d.ts +14 -79
  289. package/models/operations/updateeval.d.ts.map +1 -1
  290. package/models/operations/updateeval.js +51 -134
  291. package/models/operations/updateeval.js.map +1 -1
  292. package/models/operations/updatememorystore.d.ts +9 -20
  293. package/models/operations/updatememorystore.d.ts.map +1 -1
  294. package/models/operations/updatememorystore.js +9 -14
  295. package/models/operations/updatememorystore.js.map +1 -1
  296. package/models/operations/updateprompt.d.ts +18 -22
  297. package/models/operations/updateprompt.d.ts.map +1 -1
  298. package/models/operations/updateprompt.js +18 -22
  299. package/models/operations/updateprompt.js.map +1 -1
  300. package/models/operations/updatetool.js +14 -14
  301. package/package.json +1 -1
  302. package/sdk/agents.d.ts +5 -5
  303. package/sdk/agents.d.ts.map +1 -1
  304. package/sdk/agents.js +4 -4
  305. package/sdk/agents.js.map +1 -1
  306. package/sdk/evals.d.ts +4 -0
  307. package/sdk/evals.d.ts.map +1 -1
  308. package/sdk/evals.js +7 -0
  309. package/sdk/evals.js.map +1 -1
  310. package/sdk/responses.d.ts +1 -1
  311. package/sdk/responses.d.ts.map +1 -1
  312. package/sdk/responses.js +2 -2
  313. package/sdk/responses.js.map +1 -1
  314. package/src/funcs/agentsCreate.ts +4 -8
  315. package/src/funcs/agentsResponsesCreate.ts +4 -4
  316. package/src/funcs/agentsRun.ts +4 -7
  317. package/src/funcs/agentsStream.ts +4 -4
  318. package/src/funcs/agentsStreamRun.ts +4 -9
  319. package/src/funcs/agentsUpdate.ts +4 -4
  320. package/src/funcs/evalsInvoke.ts +177 -0
  321. package/src/lib/config.ts +3 -3
  322. package/src/mcp-server/mcp-server.ts +1 -1
  323. package/src/mcp-server/server.ts +3 -1
  324. package/src/mcp-server/tools/agentsCreate.ts +1 -1
  325. package/src/mcp-server/tools/agentsResponsesCreate.ts +2 -3
  326. package/src/mcp-server/tools/agentsRun.ts +1 -1
  327. package/src/mcp-server/tools/agentsStream.ts +2 -2
  328. package/src/mcp-server/tools/agentsStreamRun.ts +1 -1
  329. package/src/mcp-server/tools/agentsUpdate.ts +2 -3
  330. package/src/mcp-server/tools/evalsInvoke.ts +35 -0
  331. package/src/models/components/actionreviewedstreamingevent.ts +189 -0
  332. package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
  333. package/src/models/components/agenterroredstreamingevent.ts +142 -0
  334. package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
  335. package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
  336. package/src/models/components/agentinactivestreamingevent.ts +857 -0
  337. package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
  338. package/src/models/components/agentstartedstreamingevent.ts +909 -0
  339. package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
  340. package/src/models/components/datapart.ts +71 -0
  341. package/src/models/components/errorstreamingevent.ts +129 -0
  342. package/src/models/components/executionnamedstreamingevent.ts +142 -0
  343. package/src/models/components/executionreviewedstreamingevent.ts +122 -0
  344. package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
  345. package/src/models/components/filepart.ts +231 -0
  346. package/src/models/components/index.ts +22 -0
  347. package/src/models/components/invokedeploymentrequest.ts +66 -52
  348. package/src/models/components/textpart.ts +68 -0
  349. package/src/models/components/timeoutstreamingevent.ts +125 -0
  350. package/src/models/components/toolcallpart.ts +92 -0
  351. package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
  352. package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
  353. package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
  354. package/src/models/components/toolresultpart.ts +86 -0
  355. package/src/models/errors/index.ts +1 -0
  356. package/src/models/errors/invokeeval.ts +128 -0
  357. package/src/models/operations/createagentrequest.ts +3 -0
  358. package/src/models/operations/createagentresponserequest.ts +190 -397
  359. package/src/models/operations/createbudget.ts +2 -2
  360. package/src/models/operations/createcontact.ts +2 -2
  361. package/src/models/operations/createdataset.ts +2 -2
  362. package/src/models/operations/createdatasetitem.ts +8 -8
  363. package/src/models/operations/createdatasource.ts +2 -2
  364. package/src/models/operations/createeval.ts +318 -615
  365. package/src/models/operations/createprompt.ts +9 -11
  366. package/src/models/operations/createtool.ts +12 -12
  367. package/src/models/operations/deploymentgetconfig.ts +877 -685
  368. package/src/models/operations/deploymentinvoke.ts +44 -46
  369. package/src/models/operations/deployments.ts +45 -47
  370. package/src/models/operations/deploymentstream.ts +64 -49
  371. package/src/models/operations/fileget.ts +2 -2
  372. package/src/models/operations/filelist.ts +2 -2
  373. package/src/models/operations/fileupload.ts +2 -2
  374. package/src/models/operations/getallprompts.ts +9 -11
  375. package/src/models/operations/getalltools.ts +12 -12
  376. package/src/models/operations/getbudget.ts +2 -2
  377. package/src/models/operations/getevals.ts +52 -287
  378. package/src/models/operations/getoneprompt.ts +9 -11
  379. package/src/models/operations/getpromptversion.ts +9 -11
  380. package/src/models/operations/index.ts +1 -0
  381. package/src/models/operations/invokeagent.ts +180 -1041
  382. package/src/models/operations/invokeeval.ts +2062 -0
  383. package/src/models/operations/listagents.ts +3 -0
  384. package/src/models/operations/listbudgets.ts +2 -2
  385. package/src/models/operations/listcontacts.ts +2 -2
  386. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  387. package/src/models/operations/listdatasets.ts +2 -2
  388. package/src/models/operations/listdatasources.ts +2 -2
  389. package/src/models/operations/listknowledgebases.ts +82 -102
  390. package/src/models/operations/listpromptversions.ts +9 -11
  391. package/src/models/operations/retrieveagentrequest.ts +3 -0
  392. package/src/models/operations/retrievecontact.ts +2 -2
  393. package/src/models/operations/retrievedatapoint.ts +8 -8
  394. package/src/models/operations/retrievedataset.ts +2 -2
  395. package/src/models/operations/retrievedatasource.ts +2 -2
  396. package/src/models/operations/retrievetool.ts +12 -12
  397. package/src/models/operations/runagent.ts +238 -1140
  398. package/src/models/operations/streamagent.ts +780 -9308
  399. package/src/models/operations/streamrunagent.ts +3839 -12309
  400. package/src/models/operations/updateagent.ts +7 -6
  401. package/src/models/operations/updatebudget.ts +2 -2
  402. package/src/models/operations/updatecontact.ts +2 -2
  403. package/src/models/operations/updatedatapoint.ts +8 -8
  404. package/src/models/operations/updatedataset.ts +2 -2
  405. package/src/models/operations/updatedatasource.ts +2 -2
  406. package/src/models/operations/updateeval.ts +52 -287
  407. package/src/models/operations/updatememorystore.ts +9 -20
  408. package/src/models/operations/updateprompt.ts +18 -22
  409. package/src/models/operations/updatetool.ts +14 -14
  410. package/src/sdk/agents.ts +7 -7
  411. package/src/sdk/evals.ts +15 -0
  412. package/src/sdk/responses.ts +2 -2
@@ -0,0 +1,231 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const FilePartKind = {
12
+ File: "file",
13
+ } as const;
14
+ export type FilePartKind = ClosedEnum<typeof FilePartKind>;
15
+
16
+ /**
17
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
18
+ */
19
+ export type FileInURIFormat = {
20
+ /**
21
+ * URL for the File content
22
+ */
23
+ uri: string;
24
+ /**
25
+ * Optional mimeType for the file
26
+ */
27
+ mimeType?: string | undefined;
28
+ /**
29
+ * Optional name for the file
30
+ */
31
+ name?: string | undefined;
32
+ };
33
+
34
+ /**
35
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
36
+ */
37
+ export type BinaryFormat = {
38
+ /**
39
+ * base64 encoded content of the file
40
+ */
41
+ bytes: string;
42
+ /**
43
+ * Optional mimeType for the file
44
+ */
45
+ mimeType?: string | undefined;
46
+ /**
47
+ * Optional name for the file
48
+ */
49
+ name?: string | undefined;
50
+ };
51
+
52
+ export type FileT = BinaryFormat | FileInURIFormat;
53
+
54
+ /**
55
+ * File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
56
+ */
57
+ export type FilePart = {
58
+ kind: FilePartKind;
59
+ file: BinaryFormat | FileInURIFormat;
60
+ metadata?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const FilePartKind$inboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
65
+ z.nativeEnum(FilePartKind);
66
+ /** @internal */
67
+ export const FilePartKind$outboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
68
+ FilePartKind$inboundSchema;
69
+
70
+ /** @internal */
71
+ export const FileInURIFormat$inboundSchema: z.ZodType<
72
+ FileInURIFormat,
73
+ z.ZodTypeDef,
74
+ unknown
75
+ > = z.object({
76
+ uri: z.string(),
77
+ mimeType: z.string().optional(),
78
+ name: z.string().optional(),
79
+ });
80
+ /** @internal */
81
+ export type FileInURIFormat$Outbound = {
82
+ uri: string;
83
+ mimeType?: string | undefined;
84
+ name?: string | undefined;
85
+ };
86
+
87
+ /** @internal */
88
+ export const FileInURIFormat$outboundSchema: z.ZodType<
89
+ FileInURIFormat$Outbound,
90
+ z.ZodTypeDef,
91
+ FileInURIFormat
92
+ > = z.object({
93
+ uri: z.string(),
94
+ mimeType: z.string().optional(),
95
+ name: z.string().optional(),
96
+ });
97
+
98
+ export function fileInURIFormatToJSON(
99
+ fileInURIFormat: FileInURIFormat,
100
+ ): string {
101
+ return JSON.stringify(FileInURIFormat$outboundSchema.parse(fileInURIFormat));
102
+ }
103
+ export function fileInURIFormatFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<FileInURIFormat, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => FileInURIFormat$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'FileInURIFormat' from JSON`,
110
+ );
111
+ }
112
+
113
+ /** @internal */
114
+ export const BinaryFormat$inboundSchema: z.ZodType<
115
+ BinaryFormat,
116
+ z.ZodTypeDef,
117
+ unknown
118
+ > = z.object({
119
+ bytes: z.string(),
120
+ mimeType: z.string().optional(),
121
+ name: z.string().optional(),
122
+ });
123
+ /** @internal */
124
+ export type BinaryFormat$Outbound = {
125
+ bytes: string;
126
+ mimeType?: string | undefined;
127
+ name?: string | undefined;
128
+ };
129
+
130
+ /** @internal */
131
+ export const BinaryFormat$outboundSchema: z.ZodType<
132
+ BinaryFormat$Outbound,
133
+ z.ZodTypeDef,
134
+ BinaryFormat
135
+ > = z.object({
136
+ bytes: z.string(),
137
+ mimeType: z.string().optional(),
138
+ name: z.string().optional(),
139
+ });
140
+
141
+ export function binaryFormatToJSON(binaryFormat: BinaryFormat): string {
142
+ return JSON.stringify(BinaryFormat$outboundSchema.parse(binaryFormat));
143
+ }
144
+ export function binaryFormatFromJSON(
145
+ jsonString: string,
146
+ ): SafeParseResult<BinaryFormat, SDKValidationError> {
147
+ return safeParse(
148
+ jsonString,
149
+ (x) => BinaryFormat$inboundSchema.parse(JSON.parse(x)),
150
+ `Failed to parse 'BinaryFormat' from JSON`,
151
+ );
152
+ }
153
+
154
+ /** @internal */
155
+ export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
156
+ .union([
157
+ z.lazy(() => BinaryFormat$inboundSchema),
158
+ z.lazy(() => FileInURIFormat$inboundSchema),
159
+ ]);
160
+ /** @internal */
161
+ export type FileT$Outbound = BinaryFormat$Outbound | FileInURIFormat$Outbound;
162
+
163
+ /** @internal */
164
+ export const FileT$outboundSchema: z.ZodType<
165
+ FileT$Outbound,
166
+ z.ZodTypeDef,
167
+ FileT
168
+ > = z.union([
169
+ z.lazy(() => BinaryFormat$outboundSchema),
170
+ z.lazy(() => FileInURIFormat$outboundSchema),
171
+ ]);
172
+
173
+ export function fileToJSON(fileT: FileT): string {
174
+ return JSON.stringify(FileT$outboundSchema.parse(fileT));
175
+ }
176
+ export function fileFromJSON(
177
+ jsonString: string,
178
+ ): SafeParseResult<FileT, SDKValidationError> {
179
+ return safeParse(
180
+ jsonString,
181
+ (x) => FileT$inboundSchema.parse(JSON.parse(x)),
182
+ `Failed to parse 'FileT' from JSON`,
183
+ );
184
+ }
185
+
186
+ /** @internal */
187
+ export const FilePart$inboundSchema: z.ZodType<
188
+ FilePart,
189
+ z.ZodTypeDef,
190
+ unknown
191
+ > = z.object({
192
+ kind: FilePartKind$inboundSchema,
193
+ file: z.union([
194
+ z.lazy(() => BinaryFormat$inboundSchema),
195
+ z.lazy(() => FileInURIFormat$inboundSchema),
196
+ ]),
197
+ metadata: z.record(z.any()).optional(),
198
+ });
199
+ /** @internal */
200
+ export type FilePart$Outbound = {
201
+ kind: string;
202
+ file: BinaryFormat$Outbound | FileInURIFormat$Outbound;
203
+ metadata?: { [k: string]: any } | undefined;
204
+ };
205
+
206
+ /** @internal */
207
+ export const FilePart$outboundSchema: z.ZodType<
208
+ FilePart$Outbound,
209
+ z.ZodTypeDef,
210
+ FilePart
211
+ > = z.object({
212
+ kind: FilePartKind$outboundSchema,
213
+ file: z.union([
214
+ z.lazy(() => BinaryFormat$outboundSchema),
215
+ z.lazy(() => FileInURIFormat$outboundSchema),
216
+ ]),
217
+ metadata: z.record(z.any()).optional(),
218
+ });
219
+
220
+ export function filePartToJSON(filePart: FilePart): string {
221
+ return JSON.stringify(FilePart$outboundSchema.parse(filePart));
222
+ }
223
+ export function filePartFromJSON(
224
+ jsonString: string,
225
+ ): SafeParseResult<FilePart, SDKValidationError> {
226
+ return safeParse(
227
+ jsonString,
228
+ (x) => FilePart$inboundSchema.parse(JSON.parse(x)),
229
+ `Failed to parse 'FilePart' from JSON`,
230
+ );
231
+ }
@@ -2,5 +2,27 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./actionreviewedstreamingevent.js";
6
+ export * from "./actionreviewrequestedstreamingevent.js";
7
+ export * from "./agenterroredstreamingevent.js";
8
+ export * from "./agentexecutionstartedstreamingevent.js";
9
+ export * from "./agenthandedoffstreamingevent.js";
10
+ export * from "./agentinactivestreamingevent.js";
11
+ export * from "./agentmessagecreatedstreamingevent.js";
12
+ export * from "./agentstartedstreamingevent.js";
13
+ export * from "./agentthoughtstreamingevent.js";
14
+ export * from "./datapart.js";
15
+ export * from "./errorstreamingevent.js";
16
+ export * from "./executionnamedstreamingevent.js";
17
+ export * from "./executionreviewedstreamingevent.js";
18
+ export * from "./executionreviewrequiredstreamingevent.js";
19
+ export * from "./filepart.js";
5
20
  export * from "./invokedeploymentrequest.js";
6
21
  export * from "./security.js";
22
+ export * from "./textpart.js";
23
+ export * from "./timeoutstreamingevent.js";
24
+ export * from "./toolcallpart.js";
25
+ export * from "./toolexecutionfailedstreamingevent.js";
26
+ export * from "./toolexecutionfinishedstreamingevent.js";
27
+ export * from "./toolexecutionstartedstreamingevent.js";
28
+ export * from "./toolresultpart.js";
@@ -170,15 +170,15 @@ export type Audio = {
170
170
  /**
171
171
  * The type of the tool. Currently, only `function` is supported.
172
172
  */
173
- export const Type = {
173
+ export const PrefixMessagesType = {
174
174
  Function: "function",
175
175
  } as const;
176
176
  /**
177
177
  * The type of the tool. Currently, only `function` is supported.
178
178
  */
179
- export type Type = ClosedEnum<typeof Type>;
179
+ export type PrefixMessagesType = ClosedEnum<typeof PrefixMessagesType>;
180
180
 
181
- export type FunctionT = {
181
+ export type PrefixMessagesFunction = {
182
182
  /**
183
183
  * The name of the function to call.
184
184
  */
@@ -197,8 +197,8 @@ export type ToolCalls = {
197
197
  /**
198
198
  * The type of the tool. Currently, only `function` is supported.
199
199
  */
200
- type: Type;
201
- function: FunctionT;
200
+ type: PrefixMessagesType;
201
+ function: PrefixMessagesFunction;
202
202
  };
203
203
 
204
204
  export type AssistantMessage = {
@@ -273,7 +273,7 @@ export type InvokeDeploymentRequest2PrefixMessagesType = ClosedEnum<
273
273
  /**
274
274
  * File data for the content part. Must contain either file_data or uri, but not both.
275
275
  */
276
- export type FileT = {
276
+ export type InvokeDeploymentRequest2File = {
277
277
  /**
278
278
  * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
279
279
  */
@@ -300,7 +300,7 @@ export type Four = {
300
300
  /**
301
301
  * File data for the content part. Must contain either file_data or uri, but not both.
302
302
  */
303
- file: FileT;
303
+ file: InvokeDeploymentRequest2File;
304
304
  };
305
305
 
306
306
  export const InvokeDeploymentRequest2Type = {
@@ -1954,16 +1954,17 @@ export function audioFromJSON(
1954
1954
  }
1955
1955
 
1956
1956
  /** @internal */
1957
- export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
1958
- Type,
1959
- );
1957
+ export const PrefixMessagesType$inboundSchema: z.ZodNativeEnum<
1958
+ typeof PrefixMessagesType
1959
+ > = z.nativeEnum(PrefixMessagesType);
1960
1960
  /** @internal */
1961
- export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
1962
- Type$inboundSchema;
1961
+ export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1962
+ typeof PrefixMessagesType
1963
+ > = PrefixMessagesType$inboundSchema;
1963
1964
 
1964
1965
  /** @internal */
1965
- export const FunctionT$inboundSchema: z.ZodType<
1966
- FunctionT,
1966
+ export const PrefixMessagesFunction$inboundSchema: z.ZodType<
1967
+ PrefixMessagesFunction,
1967
1968
  z.ZodTypeDef,
1968
1969
  unknown
1969
1970
  > = z.object({
@@ -1971,31 +1972,35 @@ export const FunctionT$inboundSchema: z.ZodType<
1971
1972
  arguments: z.string().optional(),
1972
1973
  });
1973
1974
  /** @internal */
1974
- export type FunctionT$Outbound = {
1975
+ export type PrefixMessagesFunction$Outbound = {
1975
1976
  name?: string | undefined;
1976
1977
  arguments?: string | undefined;
1977
1978
  };
1978
1979
 
1979
1980
  /** @internal */
1980
- export const FunctionT$outboundSchema: z.ZodType<
1981
- FunctionT$Outbound,
1981
+ export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1982
+ PrefixMessagesFunction$Outbound,
1982
1983
  z.ZodTypeDef,
1983
- FunctionT
1984
+ PrefixMessagesFunction
1984
1985
  > = z.object({
1985
1986
  name: z.string().optional(),
1986
1987
  arguments: z.string().optional(),
1987
1988
  });
1988
1989
 
1989
- export function functionToJSON(functionT: FunctionT): string {
1990
- return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
1990
+ export function prefixMessagesFunctionToJSON(
1991
+ prefixMessagesFunction: PrefixMessagesFunction,
1992
+ ): string {
1993
+ return JSON.stringify(
1994
+ PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1995
+ );
1991
1996
  }
1992
- export function functionFromJSON(
1997
+ export function prefixMessagesFunctionFromJSON(
1993
1998
  jsonString: string,
1994
- ): SafeParseResult<FunctionT, SDKValidationError> {
1999
+ ): SafeParseResult<PrefixMessagesFunction, SDKValidationError> {
1995
2000
  return safeParse(
1996
2001
  jsonString,
1997
- (x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
1998
- `Failed to parse 'FunctionT' from JSON`,
2002
+ (x) => PrefixMessagesFunction$inboundSchema.parse(JSON.parse(x)),
2003
+ `Failed to parse 'PrefixMessagesFunction' from JSON`,
1999
2004
  );
2000
2005
  }
2001
2006
 
@@ -2006,14 +2011,14 @@ export const ToolCalls$inboundSchema: z.ZodType<
2006
2011
  unknown
2007
2012
  > = z.object({
2008
2013
  id: z.string(),
2009
- type: Type$inboundSchema,
2010
- function: z.lazy(() => FunctionT$inboundSchema),
2014
+ type: PrefixMessagesType$inboundSchema,
2015
+ function: z.lazy(() => PrefixMessagesFunction$inboundSchema),
2011
2016
  });
2012
2017
  /** @internal */
2013
2018
  export type ToolCalls$Outbound = {
2014
2019
  id: string;
2015
2020
  type: string;
2016
- function: FunctionT$Outbound;
2021
+ function: PrefixMessagesFunction$Outbound;
2017
2022
  };
2018
2023
 
2019
2024
  /** @internal */
@@ -2023,8 +2028,8 @@ export const ToolCalls$outboundSchema: z.ZodType<
2023
2028
  ToolCalls
2024
2029
  > = z.object({
2025
2030
  id: z.string(),
2026
- type: Type$outboundSchema,
2027
- function: z.lazy(() => FunctionT$outboundSchema),
2031
+ type: PrefixMessagesType$outboundSchema,
2032
+ function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
2028
2033
  });
2029
2034
 
2030
2035
  export function toolCallsToJSON(toolCalls: ToolCalls): string {
@@ -2156,19 +2161,22 @@ export const InvokeDeploymentRequest2PrefixMessagesType$outboundSchema:
2156
2161
  InvokeDeploymentRequest2PrefixMessagesType$inboundSchema;
2157
2162
 
2158
2163
  /** @internal */
2159
- export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
2160
- .object({
2161
- file_data: z.string().optional(),
2162
- uri: z.string().optional(),
2163
- mimeType: z.string().optional(),
2164
- filename: z.string().optional(),
2165
- }).transform((v) => {
2166
- return remap$(v, {
2167
- "file_data": "fileData",
2168
- });
2164
+ export const InvokeDeploymentRequest2File$inboundSchema: z.ZodType<
2165
+ InvokeDeploymentRequest2File,
2166
+ z.ZodTypeDef,
2167
+ unknown
2168
+ > = z.object({
2169
+ file_data: z.string().optional(),
2170
+ uri: z.string().optional(),
2171
+ mimeType: z.string().optional(),
2172
+ filename: z.string().optional(),
2173
+ }).transform((v) => {
2174
+ return remap$(v, {
2175
+ "file_data": "fileData",
2169
2176
  });
2177
+ });
2170
2178
  /** @internal */
2171
- export type FileT$Outbound = {
2179
+ export type InvokeDeploymentRequest2File$Outbound = {
2172
2180
  file_data?: string | undefined;
2173
2181
  uri?: string | undefined;
2174
2182
  mimeType?: string | undefined;
@@ -2176,10 +2184,10 @@ export type FileT$Outbound = {
2176
2184
  };
2177
2185
 
2178
2186
  /** @internal */
2179
- export const FileT$outboundSchema: z.ZodType<
2180
- FileT$Outbound,
2187
+ export const InvokeDeploymentRequest2File$outboundSchema: z.ZodType<
2188
+ InvokeDeploymentRequest2File$Outbound,
2181
2189
  z.ZodTypeDef,
2182
- FileT
2190
+ InvokeDeploymentRequest2File
2183
2191
  > = z.object({
2184
2192
  fileData: z.string().optional(),
2185
2193
  uri: z.string().optional(),
@@ -2191,16 +2199,22 @@ export const FileT$outboundSchema: z.ZodType<
2191
2199
  });
2192
2200
  });
2193
2201
 
2194
- export function fileToJSON(fileT: FileT): string {
2195
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
2202
+ export function invokeDeploymentRequest2FileToJSON(
2203
+ invokeDeploymentRequest2File: InvokeDeploymentRequest2File,
2204
+ ): string {
2205
+ return JSON.stringify(
2206
+ InvokeDeploymentRequest2File$outboundSchema.parse(
2207
+ invokeDeploymentRequest2File,
2208
+ ),
2209
+ );
2196
2210
  }
2197
- export function fileFromJSON(
2211
+ export function invokeDeploymentRequest2FileFromJSON(
2198
2212
  jsonString: string,
2199
- ): SafeParseResult<FileT, SDKValidationError> {
2213
+ ): SafeParseResult<InvokeDeploymentRequest2File, SDKValidationError> {
2200
2214
  return safeParse(
2201
2215
  jsonString,
2202
- (x) => FileT$inboundSchema.parse(JSON.parse(x)),
2203
- `Failed to parse 'FileT' from JSON`,
2216
+ (x) => InvokeDeploymentRequest2File$inboundSchema.parse(JSON.parse(x)),
2217
+ `Failed to parse 'InvokeDeploymentRequest2File' from JSON`,
2204
2218
  );
2205
2219
  }
2206
2220
 
@@ -2208,19 +2222,19 @@ export function fileFromJSON(
2208
2222
  export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
2209
2223
  .object({
2210
2224
  type: InvokeDeploymentRequest2PrefixMessagesType$inboundSchema,
2211
- file: z.lazy(() => FileT$inboundSchema),
2225
+ file: z.lazy(() => InvokeDeploymentRequest2File$inboundSchema),
2212
2226
  });
2213
2227
  /** @internal */
2214
2228
  export type Four$Outbound = {
2215
2229
  type: string;
2216
- file: FileT$Outbound;
2230
+ file: InvokeDeploymentRequest2File$Outbound;
2217
2231
  };
2218
2232
 
2219
2233
  /** @internal */
2220
2234
  export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
2221
2235
  z.object({
2222
2236
  type: InvokeDeploymentRequest2PrefixMessagesType$outboundSchema,
2223
- file: z.lazy(() => FileT$outboundSchema),
2237
+ file: z.lazy(() => InvokeDeploymentRequest2File$outboundSchema),
2224
2238
  });
2225
2239
 
2226
2240
  export function fourToJSON(four: Four): string {
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const Kind = {
12
+ Text: "text",
13
+ } as const;
14
+ export type Kind = ClosedEnum<typeof Kind>;
15
+
16
+ /**
17
+ * Text content part. Use this to send text messages to the agent.
18
+ */
19
+ export type TextPart = {
20
+ kind: Kind;
21
+ text: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
26
+ Kind,
27
+ );
28
+ /** @internal */
29
+ export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
30
+ Kind$inboundSchema;
31
+
32
+ /** @internal */
33
+ export const TextPart$inboundSchema: z.ZodType<
34
+ TextPart,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ kind: Kind$inboundSchema,
39
+ text: z.string(),
40
+ });
41
+ /** @internal */
42
+ export type TextPart$Outbound = {
43
+ kind: string;
44
+ text: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const TextPart$outboundSchema: z.ZodType<
49
+ TextPart$Outbound,
50
+ z.ZodTypeDef,
51
+ TextPart
52
+ > = z.object({
53
+ kind: Kind$outboundSchema,
54
+ text: z.string(),
55
+ });
56
+
57
+ export function textPartToJSON(textPart: TextPart): string {
58
+ return JSON.stringify(TextPart$outboundSchema.parse(textPart));
59
+ }
60
+ export function textPartFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<TextPart, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => TextPart$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'TextPart' from JSON`,
67
+ );
68
+ }
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const TimeoutStreamingEventType = {
12
+ AgentsTimeout: "agents.timeout",
13
+ } as const;
14
+ export type TimeoutStreamingEventType = ClosedEnum<
15
+ typeof TimeoutStreamingEventType
16
+ >;
17
+
18
+ export type TimeoutStreamingEventData = {
19
+ message: string;
20
+ };
21
+
22
+ /**
23
+ * Emitted when the agent stream exceeds the configured timeout duration. Contains a message describing the timeout condition.
24
+ */
25
+ export type TimeoutStreamingEvent = {
26
+ type: TimeoutStreamingEventType;
27
+ /**
28
+ * ISO timestamp of the event
29
+ */
30
+ timestamp: string;
31
+ data: TimeoutStreamingEventData;
32
+ };
33
+
34
+ /** @internal */
35
+ export const TimeoutStreamingEventType$inboundSchema: z.ZodNativeEnum<
36
+ typeof TimeoutStreamingEventType
37
+ > = z.nativeEnum(TimeoutStreamingEventType);
38
+ /** @internal */
39
+ export const TimeoutStreamingEventType$outboundSchema: z.ZodNativeEnum<
40
+ typeof TimeoutStreamingEventType
41
+ > = TimeoutStreamingEventType$inboundSchema;
42
+
43
+ /** @internal */
44
+ export const TimeoutStreamingEventData$inboundSchema: z.ZodType<
45
+ TimeoutStreamingEventData,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ message: z.string(),
50
+ });
51
+ /** @internal */
52
+ export type TimeoutStreamingEventData$Outbound = {
53
+ message: string;
54
+ };
55
+
56
+ /** @internal */
57
+ export const TimeoutStreamingEventData$outboundSchema: z.ZodType<
58
+ TimeoutStreamingEventData$Outbound,
59
+ z.ZodTypeDef,
60
+ TimeoutStreamingEventData
61
+ > = z.object({
62
+ message: z.string(),
63
+ });
64
+
65
+ export function timeoutStreamingEventDataToJSON(
66
+ timeoutStreamingEventData: TimeoutStreamingEventData,
67
+ ): string {
68
+ return JSON.stringify(
69
+ TimeoutStreamingEventData$outboundSchema.parse(timeoutStreamingEventData),
70
+ );
71
+ }
72
+ export function timeoutStreamingEventDataFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<TimeoutStreamingEventData, SDKValidationError> {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) => TimeoutStreamingEventData$inboundSchema.parse(JSON.parse(x)),
78
+ `Failed to parse 'TimeoutStreamingEventData' from JSON`,
79
+ );
80
+ }
81
+
82
+ /** @internal */
83
+ export const TimeoutStreamingEvent$inboundSchema: z.ZodType<
84
+ TimeoutStreamingEvent,
85
+ z.ZodTypeDef,
86
+ unknown
87
+ > = z.object({
88
+ type: TimeoutStreamingEventType$inboundSchema,
89
+ timestamp: z.string(),
90
+ data: z.lazy(() => TimeoutStreamingEventData$inboundSchema),
91
+ });
92
+ /** @internal */
93
+ export type TimeoutStreamingEvent$Outbound = {
94
+ type: string;
95
+ timestamp: string;
96
+ data: TimeoutStreamingEventData$Outbound;
97
+ };
98
+
99
+ /** @internal */
100
+ export const TimeoutStreamingEvent$outboundSchema: z.ZodType<
101
+ TimeoutStreamingEvent$Outbound,
102
+ z.ZodTypeDef,
103
+ TimeoutStreamingEvent
104
+ > = z.object({
105
+ type: TimeoutStreamingEventType$outboundSchema,
106
+ timestamp: z.string(),
107
+ data: z.lazy(() => TimeoutStreamingEventData$outboundSchema),
108
+ });
109
+
110
+ export function timeoutStreamingEventToJSON(
111
+ timeoutStreamingEvent: TimeoutStreamingEvent,
112
+ ): string {
113
+ return JSON.stringify(
114
+ TimeoutStreamingEvent$outboundSchema.parse(timeoutStreamingEvent),
115
+ );
116
+ }
117
+ export function timeoutStreamingEventFromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<TimeoutStreamingEvent, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => TimeoutStreamingEvent$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'TimeoutStreamingEvent' from JSON`,
124
+ );
125
+ }