@orq-ai/node 3.13.6 → 3.13.8

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 (667) hide show
  1. package/README.md +0 -1
  2. package/RUNTIMES.md +6 -6
  3. package/bin/mcp-server.js +330 -330
  4. package/bin/mcp-server.js.map +168 -168
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/agentsList.js +1 -1
  7. package/funcs/agentsList.js.map +1 -1
  8. package/funcs/agentsListActions.js +1 -1
  9. package/funcs/agentsListActions.js.map +1 -1
  10. package/funcs/agentsListTasks.js +1 -1
  11. package/funcs/agentsListTasks.js.map +1 -1
  12. package/funcs/agentsRetrieve.js +1 -1
  13. package/funcs/agentsRetrieve.js.map +1 -1
  14. package/funcs/agentsRetrieveAction.js +1 -1
  15. package/funcs/agentsRetrieveAction.js.map +1 -1
  16. package/funcs/agentsRetrieveTask.js +1 -1
  17. package/funcs/agentsRetrieveTask.js.map +1 -1
  18. package/funcs/agentsRun.js +1 -1
  19. package/funcs/agentsRun.js.map +1 -1
  20. package/funcs/agentsStreamRun.js +1 -1
  21. package/funcs/agentsStreamRun.js.map +1 -1
  22. package/funcs/budgetsCreate.js +1 -1
  23. package/funcs/budgetsCreate.js.map +1 -1
  24. package/funcs/budgetsDelete.js +1 -1
  25. package/funcs/budgetsDelete.js.map +1 -1
  26. package/funcs/budgetsGet.js +1 -1
  27. package/funcs/budgetsGet.js.map +1 -1
  28. package/funcs/budgetsList.js +1 -1
  29. package/funcs/budgetsList.js.map +1 -1
  30. package/funcs/budgetsUpdate.js +1 -1
  31. package/funcs/budgetsUpdate.js.map +1 -1
  32. package/funcs/chunkingParse.js +1 -1
  33. package/funcs/chunkingParse.js.map +1 -1
  34. package/funcs/contactsCreate.js +1 -1
  35. package/funcs/contactsCreate.js.map +1 -1
  36. package/funcs/contactsDelete.js +1 -1
  37. package/funcs/contactsDelete.js.map +1 -1
  38. package/funcs/contactsList.js +1 -1
  39. package/funcs/contactsList.js.map +1 -1
  40. package/funcs/contactsRetrieve.js +1 -1
  41. package/funcs/contactsRetrieve.js.map +1 -1
  42. package/funcs/contactsUpdate.js +1 -1
  43. package/funcs/contactsUpdate.js.map +1 -1
  44. package/funcs/datasetsClear.js +1 -1
  45. package/funcs/datasetsClear.js.map +1 -1
  46. package/funcs/datasetsCreate.js +1 -1
  47. package/funcs/datasetsCreate.js.map +1 -1
  48. package/funcs/datasetsCreateDatapoint.js +1 -1
  49. package/funcs/datasetsCreateDatapoint.js.map +1 -1
  50. package/funcs/datasetsDelete.js +1 -1
  51. package/funcs/datasetsDelete.js.map +1 -1
  52. package/funcs/datasetsDeleteDatapoint.js +1 -1
  53. package/funcs/datasetsDeleteDatapoint.js.map +1 -1
  54. package/funcs/datasetsList.js +1 -1
  55. package/funcs/datasetsList.js.map +1 -1
  56. package/funcs/datasetsListDatapoints.js +1 -1
  57. package/funcs/datasetsListDatapoints.js.map +1 -1
  58. package/funcs/datasetsRetrieve.js +1 -1
  59. package/funcs/datasetsRetrieve.js.map +1 -1
  60. package/funcs/datasetsRetrieveDatapoint.js +1 -1
  61. package/funcs/datasetsRetrieveDatapoint.js.map +1 -1
  62. package/funcs/datasetsUpdate.js +1 -1
  63. package/funcs/datasetsUpdate.js.map +1 -1
  64. package/funcs/datasetsUpdateDatapoint.js +1 -1
  65. package/funcs/datasetsUpdateDatapoint.js.map +1 -1
  66. package/funcs/deploymentsGetConfig.js +1 -1
  67. package/funcs/deploymentsGetConfig.js.map +1 -1
  68. package/funcs/deploymentsInvoke.js +1 -1
  69. package/funcs/deploymentsInvoke.js.map +1 -1
  70. package/funcs/deploymentsList.js +1 -1
  71. package/funcs/deploymentsList.js.map +1 -1
  72. package/funcs/deploymentsMetricsCreate.js +1 -1
  73. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  74. package/funcs/deploymentsStream.js +1 -1
  75. package/funcs/deploymentsStream.js.map +1 -1
  76. package/funcs/evalsAgeAppropriate.js +1 -1
  77. package/funcs/evalsAgeAppropriate.js.map +1 -1
  78. package/funcs/evalsAll.js +1 -1
  79. package/funcs/evalsAll.js.map +1 -1
  80. package/funcs/evalsBertScore.js +1 -1
  81. package/funcs/evalsBertScore.js.map +1 -1
  82. package/funcs/evalsBleuScore.js +1 -1
  83. package/funcs/evalsBleuScore.js.map +1 -1
  84. package/funcs/evalsBotDetection.js +1 -1
  85. package/funcs/evalsBotDetection.js.map +1 -1
  86. package/funcs/evalsContains.js +1 -1
  87. package/funcs/evalsContains.js.map +1 -1
  88. package/funcs/evalsContainsAll.js +1 -1
  89. package/funcs/evalsContainsAll.js.map +1 -1
  90. package/funcs/evalsContainsAny.js +1 -1
  91. package/funcs/evalsContainsAny.js.map +1 -1
  92. package/funcs/evalsContainsEmail.js +1 -1
  93. package/funcs/evalsContainsEmail.js.map +1 -1
  94. package/funcs/evalsContainsNone.js +1 -1
  95. package/funcs/evalsContainsNone.js.map +1 -1
  96. package/funcs/evalsContainsUrl.js +1 -1
  97. package/funcs/evalsContainsUrl.js.map +1 -1
  98. package/funcs/evalsContainsValidLink.js +1 -1
  99. package/funcs/evalsContainsValidLink.js.map +1 -1
  100. package/funcs/evalsCreate.js +1 -1
  101. package/funcs/evalsCreate.js.map +1 -1
  102. package/funcs/evalsDelete.js +1 -1
  103. package/funcs/evalsDelete.js.map +1 -1
  104. package/funcs/evalsEndsWith.js +1 -1
  105. package/funcs/evalsEndsWith.js.map +1 -1
  106. package/funcs/evalsExactMatch.js +1 -1
  107. package/funcs/evalsExactMatch.js.map +1 -1
  108. package/funcs/evalsFactCheckingKnowledgeBase.js +1 -1
  109. package/funcs/evalsFactCheckingKnowledgeBase.js.map +1 -1
  110. package/funcs/evalsGrammar.js +1 -1
  111. package/funcs/evalsGrammar.js.map +1 -1
  112. package/funcs/evalsInvoke.js +1 -1
  113. package/funcs/evalsInvoke.js.map +1 -1
  114. package/funcs/evalsLengthBetween.js +1 -1
  115. package/funcs/evalsLengthBetween.js.map +1 -1
  116. package/funcs/evalsLengthGreaterThan.js +1 -1
  117. package/funcs/evalsLengthGreaterThan.js.map +1 -1
  118. package/funcs/evalsLengthLessThan.js +1 -1
  119. package/funcs/evalsLengthLessThan.js.map +1 -1
  120. package/funcs/evalsLocalization.js +1 -1
  121. package/funcs/evalsLocalization.js.map +1 -1
  122. package/funcs/evalsPii.js +1 -1
  123. package/funcs/evalsPii.js.map +1 -1
  124. package/funcs/evalsRagasCoherence.js +1 -1
  125. package/funcs/evalsRagasCoherence.js.map +1 -1
  126. package/funcs/evalsRagasConciseness.js +1 -1
  127. package/funcs/evalsRagasConciseness.js.map +1 -1
  128. package/funcs/evalsRagasContextEntitiesRecall.js +1 -1
  129. package/funcs/evalsRagasContextEntitiesRecall.js.map +1 -1
  130. package/funcs/evalsRagasContextPrecision.js +1 -1
  131. package/funcs/evalsRagasContextPrecision.js.map +1 -1
  132. package/funcs/evalsRagasContextRecall.js +1 -1
  133. package/funcs/evalsRagasContextRecall.js.map +1 -1
  134. package/funcs/evalsRagasCorrectness.js +1 -1
  135. package/funcs/evalsRagasCorrectness.js.map +1 -1
  136. package/funcs/evalsRagasFaithfulness.js +1 -1
  137. package/funcs/evalsRagasFaithfulness.js.map +1 -1
  138. package/funcs/evalsRagasHarmfulness.js +1 -1
  139. package/funcs/evalsRagasHarmfulness.js.map +1 -1
  140. package/funcs/evalsRagasMaliciousness.js +1 -1
  141. package/funcs/evalsRagasMaliciousness.js.map +1 -1
  142. package/funcs/evalsRagasNoiseSensitivity.js +1 -1
  143. package/funcs/evalsRagasNoiseSensitivity.js.map +1 -1
  144. package/funcs/evalsRagasResponseRelevancy.js +1 -1
  145. package/funcs/evalsRagasResponseRelevancy.js.map +1 -1
  146. package/funcs/evalsRagasSummarization.js +1 -1
  147. package/funcs/evalsRagasSummarization.js.map +1 -1
  148. package/funcs/evalsSentimentClassification.js +1 -1
  149. package/funcs/evalsSentimentClassification.js.map +1 -1
  150. package/funcs/evalsSummarization.js +1 -1
  151. package/funcs/evalsSummarization.js.map +1 -1
  152. package/funcs/evalsToneOfVoice.js +1 -1
  153. package/funcs/evalsToneOfVoice.js.map +1 -1
  154. package/funcs/evalsTranslation.js +1 -1
  155. package/funcs/evalsTranslation.js.map +1 -1
  156. package/funcs/evalsUpdate.js +1 -1
  157. package/funcs/evalsUpdate.js.map +1 -1
  158. package/funcs/evalsValidJson.js +1 -1
  159. package/funcs/evalsValidJson.js.map +1 -1
  160. package/funcs/feedbackCreate.js +1 -1
  161. package/funcs/feedbackCreate.js.map +1 -1
  162. package/funcs/filesCreate.js +1 -1
  163. package/funcs/filesCreate.js.map +1 -1
  164. package/funcs/filesDelete.js +1 -1
  165. package/funcs/filesDelete.js.map +1 -1
  166. package/funcs/filesGet.js +1 -1
  167. package/funcs/filesGet.js.map +1 -1
  168. package/funcs/filesList.js +1 -1
  169. package/funcs/filesList.js.map +1 -1
  170. package/funcs/knowledgeCreate.js +1 -1
  171. package/funcs/knowledgeCreate.js.map +1 -1
  172. package/funcs/knowledgeCreateChunks.js +1 -1
  173. package/funcs/knowledgeCreateChunks.js.map +1 -1
  174. package/funcs/knowledgeCreateDatasource.js +1 -1
  175. package/funcs/knowledgeCreateDatasource.js.map +1 -1
  176. package/funcs/knowledgeDelete.js +1 -1
  177. package/funcs/knowledgeDelete.js.map +1 -1
  178. package/funcs/knowledgeDeleteChunk.js +1 -1
  179. package/funcs/knowledgeDeleteChunk.js.map +1 -1
  180. package/funcs/knowledgeDeleteDatasource.js +1 -1
  181. package/funcs/knowledgeDeleteDatasource.js.map +1 -1
  182. package/funcs/knowledgeList.js +1 -1
  183. package/funcs/knowledgeList.js.map +1 -1
  184. package/funcs/knowledgeListChunks.js +1 -1
  185. package/funcs/knowledgeListChunks.js.map +1 -1
  186. package/funcs/knowledgeListDatasources.js +1 -1
  187. package/funcs/knowledgeListDatasources.js.map +1 -1
  188. package/funcs/knowledgeRetrieve.js +1 -1
  189. package/funcs/knowledgeRetrieve.js.map +1 -1
  190. package/funcs/knowledgeRetrieveChunk.js +1 -1
  191. package/funcs/knowledgeRetrieveChunk.js.map +1 -1
  192. package/funcs/knowledgeRetrieveDatasource.js +1 -1
  193. package/funcs/knowledgeRetrieveDatasource.js.map +1 -1
  194. package/funcs/knowledgeSearch.js +1 -1
  195. package/funcs/knowledgeSearch.js.map +1 -1
  196. package/funcs/knowledgeUpdate.js +1 -1
  197. package/funcs/knowledgeUpdate.js.map +1 -1
  198. package/funcs/knowledgeUpdateChunk.js +1 -1
  199. package/funcs/knowledgeUpdateChunk.js.map +1 -1
  200. package/funcs/knowledgeUpdateDatasource.js +1 -1
  201. package/funcs/knowledgeUpdateDatasource.js.map +1 -1
  202. package/funcs/memoryStoresCreate.js +1 -1
  203. package/funcs/memoryStoresCreate.js.map +1 -1
  204. package/funcs/memoryStoresCreateDocument.js +1 -1
  205. package/funcs/memoryStoresCreateDocument.js.map +1 -1
  206. package/funcs/memoryStoresCreateMemory.js +1 -1
  207. package/funcs/memoryStoresCreateMemory.js.map +1 -1
  208. package/funcs/memoryStoresDelete.js +1 -1
  209. package/funcs/memoryStoresDelete.js.map +1 -1
  210. package/funcs/memoryStoresDeleteDocument.js +1 -1
  211. package/funcs/memoryStoresDeleteDocument.js.map +1 -1
  212. package/funcs/memoryStoresDeleteMemory.js +1 -1
  213. package/funcs/memoryStoresDeleteMemory.js.map +1 -1
  214. package/funcs/memoryStoresList.js +1 -1
  215. package/funcs/memoryStoresList.js.map +1 -1
  216. package/funcs/memoryStoresListDocuments.js +1 -1
  217. package/funcs/memoryStoresListDocuments.js.map +1 -1
  218. package/funcs/memoryStoresListMemories.js +1 -1
  219. package/funcs/memoryStoresListMemories.js.map +1 -1
  220. package/funcs/memoryStoresRetrieve.js +1 -1
  221. package/funcs/memoryStoresRetrieve.js.map +1 -1
  222. package/funcs/memoryStoresRetrieveDocument.js +1 -1
  223. package/funcs/memoryStoresRetrieveDocument.js.map +1 -1
  224. package/funcs/memoryStoresRetrieveMemory.js +1 -1
  225. package/funcs/memoryStoresRetrieveMemory.js.map +1 -1
  226. package/funcs/memoryStoresUpdate.js +1 -1
  227. package/funcs/memoryStoresUpdate.js.map +1 -1
  228. package/funcs/memoryStoresUpdateDocument.js +1 -1
  229. package/funcs/memoryStoresUpdateDocument.js.map +1 -1
  230. package/funcs/memoryStoresUpdateMemory.js +1 -1
  231. package/funcs/memoryStoresUpdateMemory.js.map +1 -1
  232. package/funcs/modelsList.js +1 -1
  233. package/funcs/modelsList.js.map +1 -1
  234. package/funcs/promptsCreate.js +1 -1
  235. package/funcs/promptsCreate.js.map +1 -1
  236. package/funcs/promptsDelete.js +1 -1
  237. package/funcs/promptsDelete.js.map +1 -1
  238. package/funcs/promptsGetVersion.js +1 -1
  239. package/funcs/promptsGetVersion.js.map +1 -1
  240. package/funcs/promptsList.js +1 -1
  241. package/funcs/promptsList.js.map +1 -1
  242. package/funcs/promptsListVersions.js +1 -1
  243. package/funcs/promptsListVersions.js.map +1 -1
  244. package/funcs/promptsRetrieve.js +1 -1
  245. package/funcs/promptsRetrieve.js.map +1 -1
  246. package/funcs/promptsUpdate.js +1 -1
  247. package/funcs/promptsUpdate.js.map +1 -1
  248. package/funcs/remoteconfigsRetrieve.js +1 -1
  249. package/funcs/remoteconfigsRetrieve.js.map +1 -1
  250. package/funcs/toolsCreate.js +1 -1
  251. package/funcs/toolsCreate.js.map +1 -1
  252. package/funcs/toolsDelete.js +1 -1
  253. package/funcs/toolsDelete.js.map +1 -1
  254. package/funcs/toolsDuplicate.js +1 -1
  255. package/funcs/toolsDuplicate.js.map +1 -1
  256. package/funcs/toolsList.js +1 -1
  257. package/funcs/toolsList.js.map +1 -1
  258. package/funcs/toolsRetrieve.js +1 -1
  259. package/funcs/toolsRetrieve.js.map +1 -1
  260. package/funcs/toolsUpdate.js +1 -1
  261. package/funcs/toolsUpdate.js.map +1 -1
  262. package/jsr.json +1 -1
  263. package/lib/config.d.ts +3 -3
  264. package/lib/config.js +3 -3
  265. package/lib/config.js.map +1 -1
  266. package/mcp-server/mcp-server.js +1 -1
  267. package/mcp-server/server.js +1 -1
  268. package/models/operations/createbudget.js +2 -2
  269. package/models/operations/createcontact.js +2 -2
  270. package/models/operations/createdataset.js +2 -2
  271. package/models/operations/createdatasetitem.js +2 -2
  272. package/models/operations/createdatasource.js +2 -2
  273. package/models/operations/createeval.js +28 -28
  274. package/models/operations/createtool.js +14 -14
  275. package/models/operations/duplicatetool.js +10 -10
  276. package/models/operations/fileget.js +2 -2
  277. package/models/operations/filelist.js +2 -2
  278. package/models/operations/fileupload.js +2 -2
  279. package/models/operations/getagent.js +2 -2
  280. package/models/operations/getalltools.js +10 -10
  281. package/models/operations/getbudget.js +2 -2
  282. package/models/operations/getevals.js +28 -28
  283. package/models/operations/listagents.js +2 -2
  284. package/models/operations/listbudgets.js +2 -2
  285. package/models/operations/listcontacts.js +2 -2
  286. package/models/operations/listdatasetdatapoints.js +2 -2
  287. package/models/operations/listdatasets.js +2 -2
  288. package/models/operations/listdatasources.js +2 -2
  289. package/models/operations/retrievecontact.js +2 -2
  290. package/models/operations/retrievedatapoint.js +2 -2
  291. package/models/operations/retrievedataset.js +2 -2
  292. package/models/operations/retrievedatasource.js +2 -2
  293. package/models/operations/retrievetool.js +10 -10
  294. package/models/operations/runagent.js +2 -2
  295. package/models/operations/streamrunagent.js +2 -2
  296. package/models/operations/updatebudget.js +2 -2
  297. package/models/operations/updatecontact.js +2 -2
  298. package/models/operations/updatedatapoint.js +2 -2
  299. package/models/operations/updatedataset.js +2 -2
  300. package/models/operations/updatedatasource.js +2 -2
  301. package/models/operations/updateeval.js +28 -28
  302. package/models/operations/updatetool.js +14 -14
  303. package/package.json +1 -1
  304. package/packages/orq-rc/README.md +98 -94
  305. package/packages/orq-rc/RUNTIMES.md +6 -6
  306. package/packages/orq-rc/docs/sdks/agents/README.md +269 -0
  307. package/packages/orq-rc/examples/package-lock.json +1 -1
  308. package/packages/orq-rc/jsr.json +1 -1
  309. package/packages/orq-rc/package-lock.json +2 -2
  310. package/packages/orq-rc/package.json +1 -1
  311. package/packages/orq-rc/src/funcs/agentsInvoke.ts +167 -0
  312. package/packages/orq-rc/src/funcs/agentsList.ts +1 -1
  313. package/packages/orq-rc/src/funcs/agentsListActions.ts +1 -1
  314. package/packages/orq-rc/src/funcs/agentsListTasks.ts +1 -1
  315. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +1 -1
  316. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +1 -1
  317. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +1 -1
  318. package/packages/orq-rc/src/funcs/agentsRun.ts +1 -1
  319. package/packages/orq-rc/src/funcs/agentsStream.ts +191 -0
  320. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +1 -1
  321. package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
  322. package/packages/orq-rc/src/funcs/budgetsDelete.ts +1 -1
  323. package/packages/orq-rc/src/funcs/budgetsGet.ts +1 -1
  324. package/packages/orq-rc/src/funcs/budgetsList.ts +1 -1
  325. package/packages/orq-rc/src/funcs/budgetsUpdate.ts +1 -1
  326. package/packages/orq-rc/src/funcs/chunkingParse.ts +1 -1
  327. package/packages/orq-rc/src/funcs/contactsCreate.ts +1 -1
  328. package/packages/orq-rc/src/funcs/contactsDelete.ts +1 -1
  329. package/packages/orq-rc/src/funcs/contactsList.ts +1 -1
  330. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +1 -1
  331. package/packages/orq-rc/src/funcs/contactsUpdate.ts +1 -1
  332. package/packages/orq-rc/src/funcs/datasetsClear.ts +1 -1
  333. package/packages/orq-rc/src/funcs/datasetsCreate.ts +1 -1
  334. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +1 -1
  335. package/packages/orq-rc/src/funcs/datasetsDelete.ts +1 -1
  336. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +1 -1
  337. package/packages/orq-rc/src/funcs/datasetsList.ts +1 -1
  338. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +1 -1
  339. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +1 -1
  340. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +1 -1
  341. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +1 -1
  342. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +1 -1
  343. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +1 -1
  344. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +1 -1
  345. package/packages/orq-rc/src/funcs/deploymentsList.ts +1 -1
  346. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +1 -1
  347. package/packages/orq-rc/src/funcs/deploymentsStream.ts +1 -1
  348. package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +1 -1
  349. package/packages/orq-rc/src/funcs/evalsAll.ts +1 -1
  350. package/packages/orq-rc/src/funcs/evalsBertScore.ts +1 -1
  351. package/packages/orq-rc/src/funcs/evalsBleuScore.ts +1 -1
  352. package/packages/orq-rc/src/funcs/evalsBotDetection.ts +1 -1
  353. package/packages/orq-rc/src/funcs/evalsContains.ts +1 -1
  354. package/packages/orq-rc/src/funcs/evalsContainsAll.ts +1 -1
  355. package/packages/orq-rc/src/funcs/evalsContainsAny.ts +1 -1
  356. package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +1 -1
  357. package/packages/orq-rc/src/funcs/evalsContainsNone.ts +1 -1
  358. package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +1 -1
  359. package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +1 -1
  360. package/packages/orq-rc/src/funcs/evalsCreate.ts +1 -1
  361. package/packages/orq-rc/src/funcs/evalsDelete.ts +1 -1
  362. package/packages/orq-rc/src/funcs/evalsEndsWith.ts +1 -1
  363. package/packages/orq-rc/src/funcs/evalsExactMatch.ts +1 -1
  364. package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +1 -1
  365. package/packages/orq-rc/src/funcs/evalsGrammar.ts +1 -1
  366. package/packages/orq-rc/src/funcs/evalsInvoke.ts +1 -1
  367. package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +1 -1
  368. package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +1 -1
  369. package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +1 -1
  370. package/packages/orq-rc/src/funcs/evalsLocalization.ts +1 -1
  371. package/packages/orq-rc/src/funcs/evalsPii.ts +1 -1
  372. package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +1 -1
  373. package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +1 -1
  374. package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +1 -1
  375. package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +1 -1
  376. package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +1 -1
  377. package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +1 -1
  378. package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +1 -1
  379. package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +1 -1
  380. package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +1 -1
  381. package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +1 -1
  382. package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +1 -1
  383. package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +1 -1
  384. package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +1 -1
  385. package/packages/orq-rc/src/funcs/evalsSummarization.ts +1 -1
  386. package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +1 -1
  387. package/packages/orq-rc/src/funcs/evalsTranslation.ts +1 -1
  388. package/packages/orq-rc/src/funcs/evalsUpdate.ts +1 -1
  389. package/packages/orq-rc/src/funcs/evalsValidJson.ts +1 -1
  390. package/packages/orq-rc/src/funcs/feedbackCreate.ts +1 -1
  391. package/packages/orq-rc/src/funcs/filesCreate.ts +1 -1
  392. package/packages/orq-rc/src/funcs/filesDelete.ts +1 -1
  393. package/packages/orq-rc/src/funcs/filesGet.ts +1 -1
  394. package/packages/orq-rc/src/funcs/filesList.ts +1 -1
  395. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +1 -1
  396. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +1 -1
  397. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +1 -1
  398. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +1 -1
  399. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +1 -1
  400. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +1 -1
  401. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +1 -1
  402. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +1 -1
  403. package/packages/orq-rc/src/funcs/knowledgeList.ts +1 -1
  404. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +1 -1
  405. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +1 -1
  406. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +1 -1
  407. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +1 -1
  408. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +1 -1
  409. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +1 -1
  410. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +1 -1
  411. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +1 -1
  412. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +1 -1
  413. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +1 -1
  414. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +1 -1
  415. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +1 -1
  416. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +1 -1
  417. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +1 -1
  418. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +1 -1
  419. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +1 -1
  420. package/packages/orq-rc/src/funcs/memoryStoresList.ts +1 -1
  421. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +1 -1
  422. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +1 -1
  423. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +1 -1
  424. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +1 -1
  425. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +1 -1
  426. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +1 -1
  427. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +1 -1
  428. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +1 -1
  429. package/packages/orq-rc/src/funcs/modelsList.ts +1 -1
  430. package/packages/orq-rc/src/funcs/promptsCreate.ts +1 -1
  431. package/packages/orq-rc/src/funcs/promptsDelete.ts +1 -1
  432. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +1 -1
  433. package/packages/orq-rc/src/funcs/promptsList.ts +1 -1
  434. package/packages/orq-rc/src/funcs/promptsListVersions.ts +1 -1
  435. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +1 -1
  436. package/packages/orq-rc/src/funcs/promptsUpdate.ts +1 -1
  437. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +1 -1
  438. package/packages/orq-rc/src/funcs/toolsCreate.ts +1 -1
  439. package/packages/orq-rc/src/funcs/toolsDelete.ts +1 -1
  440. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +1 -1
  441. package/packages/orq-rc/src/funcs/toolsList.ts +1 -1
  442. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +1 -1
  443. package/packages/orq-rc/src/funcs/toolsUpdate.ts +1 -1
  444. package/packages/orq-rc/src/lib/config.ts +3 -3
  445. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  446. package/packages/orq-rc/src/mcp-server/server.ts +5 -1
  447. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +37 -0
  448. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +37 -0
  449. package/packages/orq-rc/src/models/errors/index.ts +1 -0
  450. package/packages/orq-rc/src/models/errors/streamagent.ts +80 -0
  451. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  452. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  453. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  454. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  455. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  456. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  457. package/packages/orq-rc/src/models/operations/createprompt.ts +2 -0
  458. package/packages/orq-rc/src/models/operations/createtool.ts +10 -10
  459. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1 -0
  460. package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
  461. package/packages/orq-rc/src/models/operations/deploymentstream.ts +1 -0
  462. package/packages/orq-rc/src/models/operations/duplicatetool.ts +10 -10
  463. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  464. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  465. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  466. package/packages/orq-rc/src/models/operations/getagent.ts +2 -2
  467. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
  468. package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
  469. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  470. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  471. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
  472. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
  473. package/packages/orq-rc/src/models/operations/index.ts +2 -0
  474. package/packages/orq-rc/src/models/operations/invokeagent.ts +1561 -0
  475. package/packages/orq-rc/src/models/operations/listagents.ts +2 -2
  476. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  477. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  478. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  479. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  480. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  481. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
  482. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  483. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  484. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  485. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  486. package/packages/orq-rc/src/models/operations/retrievetool.ts +10 -10
  487. package/packages/orq-rc/src/models/operations/runagent.ts +443 -374
  488. package/packages/orq-rc/src/models/operations/streamagent.ts +1365 -0
  489. package/packages/orq-rc/src/models/operations/streamrunagent.ts +207 -165
  490. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  491. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  492. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  493. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  494. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  495. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  496. package/packages/orq-rc/src/models/operations/updatememorystore.ts +1 -0
  497. package/packages/orq-rc/src/models/operations/updateprompt.ts +2 -0
  498. package/packages/orq-rc/src/models/operations/updatetool.ts +10 -10
  499. package/packages/orq-rc/src/sdk/agents.ts +36 -0
  500. package/src/funcs/agentsList.ts +1 -1
  501. package/src/funcs/agentsListActions.ts +1 -1
  502. package/src/funcs/agentsListTasks.ts +1 -1
  503. package/src/funcs/agentsRetrieve.ts +1 -1
  504. package/src/funcs/agentsRetrieveAction.ts +1 -1
  505. package/src/funcs/agentsRetrieveTask.ts +1 -1
  506. package/src/funcs/agentsRun.ts +1 -1
  507. package/src/funcs/agentsStreamRun.ts +1 -1
  508. package/src/funcs/budgetsCreate.ts +1 -1
  509. package/src/funcs/budgetsDelete.ts +1 -1
  510. package/src/funcs/budgetsGet.ts +1 -1
  511. package/src/funcs/budgetsList.ts +1 -1
  512. package/src/funcs/budgetsUpdate.ts +1 -1
  513. package/src/funcs/chunkingParse.ts +1 -1
  514. package/src/funcs/contactsCreate.ts +1 -1
  515. package/src/funcs/contactsDelete.ts +1 -1
  516. package/src/funcs/contactsList.ts +1 -1
  517. package/src/funcs/contactsRetrieve.ts +1 -1
  518. package/src/funcs/contactsUpdate.ts +1 -1
  519. package/src/funcs/datasetsClear.ts +1 -1
  520. package/src/funcs/datasetsCreate.ts +1 -1
  521. package/src/funcs/datasetsCreateDatapoint.ts +1 -1
  522. package/src/funcs/datasetsDelete.ts +1 -1
  523. package/src/funcs/datasetsDeleteDatapoint.ts +1 -1
  524. package/src/funcs/datasetsList.ts +1 -1
  525. package/src/funcs/datasetsListDatapoints.ts +1 -1
  526. package/src/funcs/datasetsRetrieve.ts +1 -1
  527. package/src/funcs/datasetsRetrieveDatapoint.ts +1 -1
  528. package/src/funcs/datasetsUpdate.ts +1 -1
  529. package/src/funcs/datasetsUpdateDatapoint.ts +1 -1
  530. package/src/funcs/deploymentsGetConfig.ts +1 -1
  531. package/src/funcs/deploymentsInvoke.ts +1 -1
  532. package/src/funcs/deploymentsList.ts +1 -1
  533. package/src/funcs/deploymentsMetricsCreate.ts +1 -1
  534. package/src/funcs/deploymentsStream.ts +1 -1
  535. package/src/funcs/evalsAgeAppropriate.ts +1 -1
  536. package/src/funcs/evalsAll.ts +1 -1
  537. package/src/funcs/evalsBertScore.ts +1 -1
  538. package/src/funcs/evalsBleuScore.ts +1 -1
  539. package/src/funcs/evalsBotDetection.ts +1 -1
  540. package/src/funcs/evalsContains.ts +1 -1
  541. package/src/funcs/evalsContainsAll.ts +1 -1
  542. package/src/funcs/evalsContainsAny.ts +1 -1
  543. package/src/funcs/evalsContainsEmail.ts +1 -1
  544. package/src/funcs/evalsContainsNone.ts +1 -1
  545. package/src/funcs/evalsContainsUrl.ts +1 -1
  546. package/src/funcs/evalsContainsValidLink.ts +1 -1
  547. package/src/funcs/evalsCreate.ts +1 -1
  548. package/src/funcs/evalsDelete.ts +1 -1
  549. package/src/funcs/evalsEndsWith.ts +1 -1
  550. package/src/funcs/evalsExactMatch.ts +1 -1
  551. package/src/funcs/evalsFactCheckingKnowledgeBase.ts +1 -1
  552. package/src/funcs/evalsGrammar.ts +1 -1
  553. package/src/funcs/evalsInvoke.ts +1 -1
  554. package/src/funcs/evalsLengthBetween.ts +1 -1
  555. package/src/funcs/evalsLengthGreaterThan.ts +1 -1
  556. package/src/funcs/evalsLengthLessThan.ts +1 -1
  557. package/src/funcs/evalsLocalization.ts +1 -1
  558. package/src/funcs/evalsPii.ts +1 -1
  559. package/src/funcs/evalsRagasCoherence.ts +1 -1
  560. package/src/funcs/evalsRagasConciseness.ts +1 -1
  561. package/src/funcs/evalsRagasContextEntitiesRecall.ts +1 -1
  562. package/src/funcs/evalsRagasContextPrecision.ts +1 -1
  563. package/src/funcs/evalsRagasContextRecall.ts +1 -1
  564. package/src/funcs/evalsRagasCorrectness.ts +1 -1
  565. package/src/funcs/evalsRagasFaithfulness.ts +1 -1
  566. package/src/funcs/evalsRagasHarmfulness.ts +1 -1
  567. package/src/funcs/evalsRagasMaliciousness.ts +1 -1
  568. package/src/funcs/evalsRagasNoiseSensitivity.ts +1 -1
  569. package/src/funcs/evalsRagasResponseRelevancy.ts +1 -1
  570. package/src/funcs/evalsRagasSummarization.ts +1 -1
  571. package/src/funcs/evalsSentimentClassification.ts +1 -1
  572. package/src/funcs/evalsSummarization.ts +1 -1
  573. package/src/funcs/evalsToneOfVoice.ts +1 -1
  574. package/src/funcs/evalsTranslation.ts +1 -1
  575. package/src/funcs/evalsUpdate.ts +1 -1
  576. package/src/funcs/evalsValidJson.ts +1 -1
  577. package/src/funcs/feedbackCreate.ts +1 -1
  578. package/src/funcs/filesCreate.ts +1 -1
  579. package/src/funcs/filesDelete.ts +1 -1
  580. package/src/funcs/filesGet.ts +1 -1
  581. package/src/funcs/filesList.ts +1 -1
  582. package/src/funcs/knowledgeCreate.ts +1 -1
  583. package/src/funcs/knowledgeCreateChunks.ts +1 -1
  584. package/src/funcs/knowledgeCreateDatasource.ts +1 -1
  585. package/src/funcs/knowledgeDelete.ts +1 -1
  586. package/src/funcs/knowledgeDeleteChunk.ts +1 -1
  587. package/src/funcs/knowledgeDeleteDatasource.ts +1 -1
  588. package/src/funcs/knowledgeList.ts +1 -1
  589. package/src/funcs/knowledgeListChunks.ts +1 -1
  590. package/src/funcs/knowledgeListDatasources.ts +1 -1
  591. package/src/funcs/knowledgeRetrieve.ts +1 -1
  592. package/src/funcs/knowledgeRetrieveChunk.ts +1 -1
  593. package/src/funcs/knowledgeRetrieveDatasource.ts +1 -1
  594. package/src/funcs/knowledgeSearch.ts +1 -1
  595. package/src/funcs/knowledgeUpdate.ts +1 -1
  596. package/src/funcs/knowledgeUpdateChunk.ts +1 -1
  597. package/src/funcs/knowledgeUpdateDatasource.ts +1 -1
  598. package/src/funcs/memoryStoresCreate.ts +1 -1
  599. package/src/funcs/memoryStoresCreateDocument.ts +1 -1
  600. package/src/funcs/memoryStoresCreateMemory.ts +1 -1
  601. package/src/funcs/memoryStoresDelete.ts +1 -1
  602. package/src/funcs/memoryStoresDeleteDocument.ts +1 -1
  603. package/src/funcs/memoryStoresDeleteMemory.ts +1 -1
  604. package/src/funcs/memoryStoresList.ts +1 -1
  605. package/src/funcs/memoryStoresListDocuments.ts +1 -1
  606. package/src/funcs/memoryStoresListMemories.ts +1 -1
  607. package/src/funcs/memoryStoresRetrieve.ts +1 -1
  608. package/src/funcs/memoryStoresRetrieveDocument.ts +1 -1
  609. package/src/funcs/memoryStoresRetrieveMemory.ts +1 -1
  610. package/src/funcs/memoryStoresUpdate.ts +1 -1
  611. package/src/funcs/memoryStoresUpdateDocument.ts +1 -1
  612. package/src/funcs/memoryStoresUpdateMemory.ts +1 -1
  613. package/src/funcs/modelsList.ts +1 -1
  614. package/src/funcs/promptsCreate.ts +1 -1
  615. package/src/funcs/promptsDelete.ts +1 -1
  616. package/src/funcs/promptsGetVersion.ts +1 -1
  617. package/src/funcs/promptsList.ts +1 -1
  618. package/src/funcs/promptsListVersions.ts +1 -1
  619. package/src/funcs/promptsRetrieve.ts +1 -1
  620. package/src/funcs/promptsUpdate.ts +1 -1
  621. package/src/funcs/remoteconfigsRetrieve.ts +1 -1
  622. package/src/funcs/toolsCreate.ts +1 -1
  623. package/src/funcs/toolsDelete.ts +1 -1
  624. package/src/funcs/toolsDuplicate.ts +1 -1
  625. package/src/funcs/toolsList.ts +1 -1
  626. package/src/funcs/toolsRetrieve.ts +1 -1
  627. package/src/funcs/toolsUpdate.ts +1 -1
  628. package/src/lib/config.ts +3 -3
  629. package/src/mcp-server/mcp-server.ts +1 -1
  630. package/src/mcp-server/server.ts +1 -1
  631. package/src/models/operations/createbudget.ts +2 -2
  632. package/src/models/operations/createcontact.ts +2 -2
  633. package/src/models/operations/createdataset.ts +2 -2
  634. package/src/models/operations/createdatasetitem.ts +2 -2
  635. package/src/models/operations/createdatasource.ts +2 -2
  636. package/src/models/operations/createeval.ts +28 -28
  637. package/src/models/operations/createtool.ts +14 -14
  638. package/src/models/operations/duplicatetool.ts +10 -10
  639. package/src/models/operations/fileget.ts +2 -2
  640. package/src/models/operations/filelist.ts +2 -2
  641. package/src/models/operations/fileupload.ts +2 -2
  642. package/src/models/operations/getagent.ts +2 -2
  643. package/src/models/operations/getalltools.ts +10 -10
  644. package/src/models/operations/getbudget.ts +2 -2
  645. package/src/models/operations/getevals.ts +28 -28
  646. package/src/models/operations/listagents.ts +2 -2
  647. package/src/models/operations/listbudgets.ts +2 -2
  648. package/src/models/operations/listcontacts.ts +2 -2
  649. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  650. package/src/models/operations/listdatasets.ts +2 -2
  651. package/src/models/operations/listdatasources.ts +2 -2
  652. package/src/models/operations/retrievecontact.ts +2 -2
  653. package/src/models/operations/retrievedatapoint.ts +2 -2
  654. package/src/models/operations/retrievedataset.ts +2 -2
  655. package/src/models/operations/retrievedatasource.ts +2 -2
  656. package/src/models/operations/retrievetool.ts +10 -10
  657. package/src/models/operations/runagent.ts +2 -2
  658. package/src/models/operations/streamrunagent.ts +2 -2
  659. package/src/models/operations/updatebudget.ts +2 -2
  660. package/src/models/operations/updatecontact.ts +2 -2
  661. package/src/models/operations/updatedatapoint.ts +2 -2
  662. package/src/models/operations/updatedataset.ts +2 -2
  663. package/src/models/operations/updatedatasource.ts +2 -2
  664. package/src/models/operations/updateeval.ts +28 -28
  665. package/src/models/operations/updatetool.ts +14 -14
  666. package/docs/sdks/orq/README.md +0 -10
  667. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
@@ -0,0 +1,1561 @@
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
+ * Tool message
14
+ */
15
+ export const RoleToolMessage = {
16
+ Tool: "tool",
17
+ } as const;
18
+ /**
19
+ * Tool message
20
+ */
21
+ export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
22
+
23
+ /**
24
+ * User message
25
+ */
26
+ export const RoleUserMessage = {
27
+ User: "user",
28
+ } as const;
29
+ /**
30
+ * User message
31
+ */
32
+ export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
33
+
34
+ /**
35
+ * Message role (user or tool for continuing executions)
36
+ */
37
+ export type InvokeAgentRole = RoleUserMessage | RoleToolMessage;
38
+
39
+ export const InvokeAgentPublicMessagePartKind = {
40
+ ToolResult: "tool_result",
41
+ } as const;
42
+ export type InvokeAgentPublicMessagePartKind = ClosedEnum<
43
+ typeof InvokeAgentPublicMessagePartKind
44
+ >;
45
+
46
+ /**
47
+ * Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
48
+ */
49
+ export type ToolResultPart = {
50
+ kind: InvokeAgentPublicMessagePartKind;
51
+ toolCallId: string;
52
+ result?: any | undefined;
53
+ metadata?: { [k: string]: any } | undefined;
54
+ };
55
+
56
+ export const PublicMessagePartKind = {
57
+ File: "file",
58
+ } as const;
59
+ export type PublicMessagePartKind = ClosedEnum<typeof PublicMessagePartKind>;
60
+
61
+ /**
62
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
63
+ */
64
+ export type FileInURIFormat = {
65
+ /**
66
+ * URL for the File content
67
+ */
68
+ uri: string;
69
+ /**
70
+ * Optional mimeType for the file
71
+ */
72
+ mimeType?: string | undefined;
73
+ /**
74
+ * Optional name for the file
75
+ */
76
+ name?: string | undefined;
77
+ };
78
+
79
+ /**
80
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
81
+ */
82
+ export type BinaryFormat = {
83
+ /**
84
+ * base64 encoded content of the file
85
+ */
86
+ bytes: string;
87
+ /**
88
+ * Optional mimeType for the file
89
+ */
90
+ mimeType?: string | undefined;
91
+ /**
92
+ * Optional name for the file
93
+ */
94
+ name?: string | undefined;
95
+ };
96
+
97
+ export type PublicMessagePartFile = BinaryFormat | FileInURIFormat;
98
+
99
+ /**
100
+ * File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
101
+ */
102
+ export type FilePart = {
103
+ kind: PublicMessagePartKind;
104
+ file: BinaryFormat | FileInURIFormat;
105
+ metadata?: { [k: string]: any } | undefined;
106
+ };
107
+
108
+ export const Kind = {
109
+ Text: "text",
110
+ } as const;
111
+ export type Kind = ClosedEnum<typeof Kind>;
112
+
113
+ /**
114
+ * Text content part. Use this to send text messages to the agent.
115
+ */
116
+ export type TextPart = {
117
+ kind: Kind;
118
+ text: string;
119
+ };
120
+
121
+ /**
122
+ * Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
123
+ */
124
+ export type PublicMessagePart = TextPart | FilePart | ToolResultPart;
125
+
126
+ export type Message = {
127
+ /**
128
+ * Optional A2A message ID in ULID format
129
+ */
130
+ messageId?: string | undefined;
131
+ /**
132
+ * Message role (user or tool for continuing executions)
133
+ */
134
+ role: RoleUserMessage | RoleToolMessage;
135
+ /**
136
+ * A2A message parts (text, file, or tool_result only)
137
+ */
138
+ parts: Array<TextPart | FilePart | ToolResultPart>;
139
+ };
140
+
141
+ /**
142
+ * Information about the contact making the request. If the contact does not exist, it will be created automatically.
143
+ */
144
+ export type Contact = {
145
+ /**
146
+ * Unique identifier for the contact
147
+ */
148
+ id: string;
149
+ /**
150
+ * Display name of the contact
151
+ */
152
+ displayName?: string | undefined;
153
+ /**
154
+ * Email address of the contact
155
+ */
156
+ email?: string | undefined;
157
+ /**
158
+ * A hash of key/value pairs containing any other data about the contact
159
+ */
160
+ metadata?: Array<{ [k: string]: any }> | undefined;
161
+ /**
162
+ * URL to the contact's avatar or logo
163
+ */
164
+ logoUrl?: string | undefined;
165
+ /**
166
+ * A list of tags associated with the contact
167
+ */
168
+ tags?: Array<string> | undefined;
169
+ };
170
+
171
+ /**
172
+ * Thread information to group related requests
173
+ */
174
+ export type InvokeAgentThread = {
175
+ /**
176
+ * Unique thread identifier to group related invocations.
177
+ */
178
+ id: string;
179
+ /**
180
+ * Optional tags to differentiate or categorize threads
181
+ */
182
+ tags?: Array<string> | undefined;
183
+ };
184
+
185
+ /**
186
+ * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
187
+ */
188
+ export type Memory = {
189
+ /**
190
+ * An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
191
+ */
192
+ entityId: string;
193
+ };
194
+
195
+ export type InvokeAgentRequestBody = {
196
+ /**
197
+ * Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
198
+ */
199
+ taskId?: string | undefined;
200
+ message: Message;
201
+ /**
202
+ * Optional variables for template replacement in system prompt, instructions, and messages
203
+ */
204
+ variables?: { [k: string]: any } | undefined;
205
+ /**
206
+ * Information about the contact making the request. If the contact does not exist, it will be created automatically.
207
+ */
208
+ contact?: Contact | undefined;
209
+ /**
210
+ * Thread information to group related requests
211
+ */
212
+ thread?: InvokeAgentThread | undefined;
213
+ /**
214
+ * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
215
+ */
216
+ memory?: Memory | undefined;
217
+ /**
218
+ * Optional metadata for the agent invocation as key-value pairs that will be included in traces
219
+ */
220
+ metadata?: { [k: string]: any } | undefined;
221
+ };
222
+
223
+ export type InvokeAgentRequest = {
224
+ /**
225
+ * The key or ID of the agent to invoke
226
+ */
227
+ key: string;
228
+ requestBody?: InvokeAgentRequestBody | undefined;
229
+ };
230
+
231
+ /**
232
+ * A2A entity type
233
+ */
234
+ export const InvokeAgentKind = {
235
+ Task: "task",
236
+ } as const;
237
+ /**
238
+ * A2A entity type
239
+ */
240
+ export type InvokeAgentKind = ClosedEnum<typeof InvokeAgentKind>;
241
+
242
+ /**
243
+ * Current task state
244
+ */
245
+ export const InvokeAgentState = {
246
+ Submitted: "submitted",
247
+ Working: "working",
248
+ InputRequired: "input-required",
249
+ Completed: "completed",
250
+ Failed: "failed",
251
+ Canceled: "canceled",
252
+ Rejected: "rejected",
253
+ AuthRequired: "auth-required",
254
+ Unknown: "unknown",
255
+ } as const;
256
+ /**
257
+ * Current task state
258
+ */
259
+ export type InvokeAgentState = ClosedEnum<typeof InvokeAgentState>;
260
+
261
+ export const InvokeAgentAgentsKind = {
262
+ Message: "message",
263
+ } as const;
264
+ export type InvokeAgentAgentsKind = ClosedEnum<typeof InvokeAgentAgentsKind>;
265
+
266
+ /**
267
+ * Extended A2A message role
268
+ */
269
+ export const InvokeAgentAgentsRole = {
270
+ User: "user",
271
+ Agent: "agent",
272
+ Tool: "tool",
273
+ System: "system",
274
+ } as const;
275
+ /**
276
+ * Extended A2A message role
277
+ */
278
+ export type InvokeAgentAgentsRole = ClosedEnum<typeof InvokeAgentAgentsRole>;
279
+
280
+ /**
281
+ * Optional status message
282
+ */
283
+ export type InvokeAgentMessage = {
284
+ kind: InvokeAgentAgentsKind;
285
+ messageId: string;
286
+ /**
287
+ * Extended A2A message role
288
+ */
289
+ role: InvokeAgentAgentsRole;
290
+ parts: Array<any>;
291
+ };
292
+
293
+ /**
294
+ * Task status information
295
+ */
296
+ export type InvokeAgentStatus = {
297
+ /**
298
+ * Current task state
299
+ */
300
+ state: InvokeAgentState;
301
+ /**
302
+ * ISO timestamp of status update
303
+ */
304
+ timestamp?: string | undefined;
305
+ /**
306
+ * Optional status message
307
+ */
308
+ message?: InvokeAgentMessage | undefined;
309
+ };
310
+
311
+ /**
312
+ * A2A Task response format
313
+ */
314
+ export type InvokeAgentResponseBody = {
315
+ /**
316
+ * The ID of the created agent execution task
317
+ */
318
+ id: string;
319
+ /**
320
+ * The context ID (workspace ID)
321
+ */
322
+ contextId: string;
323
+ /**
324
+ * A2A entity type
325
+ */
326
+ kind: InvokeAgentKind;
327
+ /**
328
+ * Task status information
329
+ */
330
+ status: InvokeAgentStatus;
331
+ /**
332
+ * Task metadata
333
+ */
334
+ metadata?: { [k: string]: any } | undefined;
335
+ };
336
+
337
+ /** @internal */
338
+ export const RoleToolMessage$inboundSchema: z.ZodNativeEnum<
339
+ typeof RoleToolMessage
340
+ > = z.nativeEnum(RoleToolMessage);
341
+
342
+ /** @internal */
343
+ export const RoleToolMessage$outboundSchema: z.ZodNativeEnum<
344
+ typeof RoleToolMessage
345
+ > = RoleToolMessage$inboundSchema;
346
+
347
+ /**
348
+ * @internal
349
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
350
+ */
351
+ export namespace RoleToolMessage$ {
352
+ /** @deprecated use `RoleToolMessage$inboundSchema` instead. */
353
+ export const inboundSchema = RoleToolMessage$inboundSchema;
354
+ /** @deprecated use `RoleToolMessage$outboundSchema` instead. */
355
+ export const outboundSchema = RoleToolMessage$outboundSchema;
356
+ }
357
+
358
+ /** @internal */
359
+ export const RoleUserMessage$inboundSchema: z.ZodNativeEnum<
360
+ typeof RoleUserMessage
361
+ > = z.nativeEnum(RoleUserMessage);
362
+
363
+ /** @internal */
364
+ export const RoleUserMessage$outboundSchema: z.ZodNativeEnum<
365
+ typeof RoleUserMessage
366
+ > = RoleUserMessage$inboundSchema;
367
+
368
+ /**
369
+ * @internal
370
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
371
+ */
372
+ export namespace RoleUserMessage$ {
373
+ /** @deprecated use `RoleUserMessage$inboundSchema` instead. */
374
+ export const inboundSchema = RoleUserMessage$inboundSchema;
375
+ /** @deprecated use `RoleUserMessage$outboundSchema` instead. */
376
+ export const outboundSchema = RoleUserMessage$outboundSchema;
377
+ }
378
+
379
+ /** @internal */
380
+ export const InvokeAgentRole$inboundSchema: z.ZodType<
381
+ InvokeAgentRole,
382
+ z.ZodTypeDef,
383
+ unknown
384
+ > = z.union([RoleUserMessage$inboundSchema, RoleToolMessage$inboundSchema]);
385
+
386
+ /** @internal */
387
+ export type InvokeAgentRole$Outbound = string | string;
388
+
389
+ /** @internal */
390
+ export const InvokeAgentRole$outboundSchema: z.ZodType<
391
+ InvokeAgentRole$Outbound,
392
+ z.ZodTypeDef,
393
+ InvokeAgentRole
394
+ > = z.union([RoleUserMessage$outboundSchema, RoleToolMessage$outboundSchema]);
395
+
396
+ /**
397
+ * @internal
398
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
399
+ */
400
+ export namespace InvokeAgentRole$ {
401
+ /** @deprecated use `InvokeAgentRole$inboundSchema` instead. */
402
+ export const inboundSchema = InvokeAgentRole$inboundSchema;
403
+ /** @deprecated use `InvokeAgentRole$outboundSchema` instead. */
404
+ export const outboundSchema = InvokeAgentRole$outboundSchema;
405
+ /** @deprecated use `InvokeAgentRole$Outbound` instead. */
406
+ export type Outbound = InvokeAgentRole$Outbound;
407
+ }
408
+
409
+ export function invokeAgentRoleToJSON(
410
+ invokeAgentRole: InvokeAgentRole,
411
+ ): string {
412
+ return JSON.stringify(InvokeAgentRole$outboundSchema.parse(invokeAgentRole));
413
+ }
414
+
415
+ export function invokeAgentRoleFromJSON(
416
+ jsonString: string,
417
+ ): SafeParseResult<InvokeAgentRole, SDKValidationError> {
418
+ return safeParse(
419
+ jsonString,
420
+ (x) => InvokeAgentRole$inboundSchema.parse(JSON.parse(x)),
421
+ `Failed to parse 'InvokeAgentRole' from JSON`,
422
+ );
423
+ }
424
+
425
+ /** @internal */
426
+ export const InvokeAgentPublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
427
+ typeof InvokeAgentPublicMessagePartKind
428
+ > = z.nativeEnum(InvokeAgentPublicMessagePartKind);
429
+
430
+ /** @internal */
431
+ export const InvokeAgentPublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
432
+ typeof InvokeAgentPublicMessagePartKind
433
+ > = InvokeAgentPublicMessagePartKind$inboundSchema;
434
+
435
+ /**
436
+ * @internal
437
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
438
+ */
439
+ export namespace InvokeAgentPublicMessagePartKind$ {
440
+ /** @deprecated use `InvokeAgentPublicMessagePartKind$inboundSchema` instead. */
441
+ export const inboundSchema = InvokeAgentPublicMessagePartKind$inboundSchema;
442
+ /** @deprecated use `InvokeAgentPublicMessagePartKind$outboundSchema` instead. */
443
+ export const outboundSchema = InvokeAgentPublicMessagePartKind$outboundSchema;
444
+ }
445
+
446
+ /** @internal */
447
+ export const ToolResultPart$inboundSchema: z.ZodType<
448
+ ToolResultPart,
449
+ z.ZodTypeDef,
450
+ unknown
451
+ > = z.object({
452
+ kind: InvokeAgentPublicMessagePartKind$inboundSchema,
453
+ tool_call_id: z.string(),
454
+ result: z.any().optional(),
455
+ metadata: z.record(z.any()).optional(),
456
+ }).transform((v) => {
457
+ return remap$(v, {
458
+ "tool_call_id": "toolCallId",
459
+ });
460
+ });
461
+
462
+ /** @internal */
463
+ export type ToolResultPart$Outbound = {
464
+ kind: string;
465
+ tool_call_id: string;
466
+ result?: any | undefined;
467
+ metadata?: { [k: string]: any } | undefined;
468
+ };
469
+
470
+ /** @internal */
471
+ export const ToolResultPart$outboundSchema: z.ZodType<
472
+ ToolResultPart$Outbound,
473
+ z.ZodTypeDef,
474
+ ToolResultPart
475
+ > = z.object({
476
+ kind: InvokeAgentPublicMessagePartKind$outboundSchema,
477
+ toolCallId: z.string(),
478
+ result: z.any().optional(),
479
+ metadata: z.record(z.any()).optional(),
480
+ }).transform((v) => {
481
+ return remap$(v, {
482
+ toolCallId: "tool_call_id",
483
+ });
484
+ });
485
+
486
+ /**
487
+ * @internal
488
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
489
+ */
490
+ export namespace ToolResultPart$ {
491
+ /** @deprecated use `ToolResultPart$inboundSchema` instead. */
492
+ export const inboundSchema = ToolResultPart$inboundSchema;
493
+ /** @deprecated use `ToolResultPart$outboundSchema` instead. */
494
+ export const outboundSchema = ToolResultPart$outboundSchema;
495
+ /** @deprecated use `ToolResultPart$Outbound` instead. */
496
+ export type Outbound = ToolResultPart$Outbound;
497
+ }
498
+
499
+ export function toolResultPartToJSON(toolResultPart: ToolResultPart): string {
500
+ return JSON.stringify(ToolResultPart$outboundSchema.parse(toolResultPart));
501
+ }
502
+
503
+ export function toolResultPartFromJSON(
504
+ jsonString: string,
505
+ ): SafeParseResult<ToolResultPart, SDKValidationError> {
506
+ return safeParse(
507
+ jsonString,
508
+ (x) => ToolResultPart$inboundSchema.parse(JSON.parse(x)),
509
+ `Failed to parse 'ToolResultPart' from JSON`,
510
+ );
511
+ }
512
+
513
+ /** @internal */
514
+ export const PublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
515
+ typeof PublicMessagePartKind
516
+ > = z.nativeEnum(PublicMessagePartKind);
517
+
518
+ /** @internal */
519
+ export const PublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
520
+ typeof PublicMessagePartKind
521
+ > = PublicMessagePartKind$inboundSchema;
522
+
523
+ /**
524
+ * @internal
525
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
526
+ */
527
+ export namespace PublicMessagePartKind$ {
528
+ /** @deprecated use `PublicMessagePartKind$inboundSchema` instead. */
529
+ export const inboundSchema = PublicMessagePartKind$inboundSchema;
530
+ /** @deprecated use `PublicMessagePartKind$outboundSchema` instead. */
531
+ export const outboundSchema = PublicMessagePartKind$outboundSchema;
532
+ }
533
+
534
+ /** @internal */
535
+ export const FileInURIFormat$inboundSchema: z.ZodType<
536
+ FileInURIFormat,
537
+ z.ZodTypeDef,
538
+ unknown
539
+ > = z.object({
540
+ uri: z.string(),
541
+ mimeType: z.string().optional(),
542
+ name: z.string().optional(),
543
+ });
544
+
545
+ /** @internal */
546
+ export type FileInURIFormat$Outbound = {
547
+ uri: string;
548
+ mimeType?: string | undefined;
549
+ name?: string | undefined;
550
+ };
551
+
552
+ /** @internal */
553
+ export const FileInURIFormat$outboundSchema: z.ZodType<
554
+ FileInURIFormat$Outbound,
555
+ z.ZodTypeDef,
556
+ FileInURIFormat
557
+ > = z.object({
558
+ uri: z.string(),
559
+ mimeType: z.string().optional(),
560
+ name: z.string().optional(),
561
+ });
562
+
563
+ /**
564
+ * @internal
565
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
566
+ */
567
+ export namespace FileInURIFormat$ {
568
+ /** @deprecated use `FileInURIFormat$inboundSchema` instead. */
569
+ export const inboundSchema = FileInURIFormat$inboundSchema;
570
+ /** @deprecated use `FileInURIFormat$outboundSchema` instead. */
571
+ export const outboundSchema = FileInURIFormat$outboundSchema;
572
+ /** @deprecated use `FileInURIFormat$Outbound` instead. */
573
+ export type Outbound = FileInURIFormat$Outbound;
574
+ }
575
+
576
+ export function fileInURIFormatToJSON(
577
+ fileInURIFormat: FileInURIFormat,
578
+ ): string {
579
+ return JSON.stringify(FileInURIFormat$outboundSchema.parse(fileInURIFormat));
580
+ }
581
+
582
+ export function fileInURIFormatFromJSON(
583
+ jsonString: string,
584
+ ): SafeParseResult<FileInURIFormat, SDKValidationError> {
585
+ return safeParse(
586
+ jsonString,
587
+ (x) => FileInURIFormat$inboundSchema.parse(JSON.parse(x)),
588
+ `Failed to parse 'FileInURIFormat' from JSON`,
589
+ );
590
+ }
591
+
592
+ /** @internal */
593
+ export const BinaryFormat$inboundSchema: z.ZodType<
594
+ BinaryFormat,
595
+ z.ZodTypeDef,
596
+ unknown
597
+ > = z.object({
598
+ bytes: z.string(),
599
+ mimeType: z.string().optional(),
600
+ name: z.string().optional(),
601
+ });
602
+
603
+ /** @internal */
604
+ export type BinaryFormat$Outbound = {
605
+ bytes: string;
606
+ mimeType?: string | undefined;
607
+ name?: string | undefined;
608
+ };
609
+
610
+ /** @internal */
611
+ export const BinaryFormat$outboundSchema: z.ZodType<
612
+ BinaryFormat$Outbound,
613
+ z.ZodTypeDef,
614
+ BinaryFormat
615
+ > = z.object({
616
+ bytes: z.string(),
617
+ mimeType: z.string().optional(),
618
+ name: z.string().optional(),
619
+ });
620
+
621
+ /**
622
+ * @internal
623
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
624
+ */
625
+ export namespace BinaryFormat$ {
626
+ /** @deprecated use `BinaryFormat$inboundSchema` instead. */
627
+ export const inboundSchema = BinaryFormat$inboundSchema;
628
+ /** @deprecated use `BinaryFormat$outboundSchema` instead. */
629
+ export const outboundSchema = BinaryFormat$outboundSchema;
630
+ /** @deprecated use `BinaryFormat$Outbound` instead. */
631
+ export type Outbound = BinaryFormat$Outbound;
632
+ }
633
+
634
+ export function binaryFormatToJSON(binaryFormat: BinaryFormat): string {
635
+ return JSON.stringify(BinaryFormat$outboundSchema.parse(binaryFormat));
636
+ }
637
+
638
+ export function binaryFormatFromJSON(
639
+ jsonString: string,
640
+ ): SafeParseResult<BinaryFormat, SDKValidationError> {
641
+ return safeParse(
642
+ jsonString,
643
+ (x) => BinaryFormat$inboundSchema.parse(JSON.parse(x)),
644
+ `Failed to parse 'BinaryFormat' from JSON`,
645
+ );
646
+ }
647
+
648
+ /** @internal */
649
+ export const PublicMessagePartFile$inboundSchema: z.ZodType<
650
+ PublicMessagePartFile,
651
+ z.ZodTypeDef,
652
+ unknown
653
+ > = z.union([
654
+ z.lazy(() => BinaryFormat$inboundSchema),
655
+ z.lazy(() => FileInURIFormat$inboundSchema),
656
+ ]);
657
+
658
+ /** @internal */
659
+ export type PublicMessagePartFile$Outbound =
660
+ | BinaryFormat$Outbound
661
+ | FileInURIFormat$Outbound;
662
+
663
+ /** @internal */
664
+ export const PublicMessagePartFile$outboundSchema: z.ZodType<
665
+ PublicMessagePartFile$Outbound,
666
+ z.ZodTypeDef,
667
+ PublicMessagePartFile
668
+ > = z.union([
669
+ z.lazy(() => BinaryFormat$outboundSchema),
670
+ z.lazy(() => FileInURIFormat$outboundSchema),
671
+ ]);
672
+
673
+ /**
674
+ * @internal
675
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
676
+ */
677
+ export namespace PublicMessagePartFile$ {
678
+ /** @deprecated use `PublicMessagePartFile$inboundSchema` instead. */
679
+ export const inboundSchema = PublicMessagePartFile$inboundSchema;
680
+ /** @deprecated use `PublicMessagePartFile$outboundSchema` instead. */
681
+ export const outboundSchema = PublicMessagePartFile$outboundSchema;
682
+ /** @deprecated use `PublicMessagePartFile$Outbound` instead. */
683
+ export type Outbound = PublicMessagePartFile$Outbound;
684
+ }
685
+
686
+ export function publicMessagePartFileToJSON(
687
+ publicMessagePartFile: PublicMessagePartFile,
688
+ ): string {
689
+ return JSON.stringify(
690
+ PublicMessagePartFile$outboundSchema.parse(publicMessagePartFile),
691
+ );
692
+ }
693
+
694
+ export function publicMessagePartFileFromJSON(
695
+ jsonString: string,
696
+ ): SafeParseResult<PublicMessagePartFile, SDKValidationError> {
697
+ return safeParse(
698
+ jsonString,
699
+ (x) => PublicMessagePartFile$inboundSchema.parse(JSON.parse(x)),
700
+ `Failed to parse 'PublicMessagePartFile' from JSON`,
701
+ );
702
+ }
703
+
704
+ /** @internal */
705
+ export const FilePart$inboundSchema: z.ZodType<
706
+ FilePart,
707
+ z.ZodTypeDef,
708
+ unknown
709
+ > = z.object({
710
+ kind: PublicMessagePartKind$inboundSchema,
711
+ file: z.union([
712
+ z.lazy(() => BinaryFormat$inboundSchema),
713
+ z.lazy(() => FileInURIFormat$inboundSchema),
714
+ ]),
715
+ metadata: z.record(z.any()).optional(),
716
+ });
717
+
718
+ /** @internal */
719
+ export type FilePart$Outbound = {
720
+ kind: string;
721
+ file: BinaryFormat$Outbound | FileInURIFormat$Outbound;
722
+ metadata?: { [k: string]: any } | undefined;
723
+ };
724
+
725
+ /** @internal */
726
+ export const FilePart$outboundSchema: z.ZodType<
727
+ FilePart$Outbound,
728
+ z.ZodTypeDef,
729
+ FilePart
730
+ > = z.object({
731
+ kind: PublicMessagePartKind$outboundSchema,
732
+ file: z.union([
733
+ z.lazy(() => BinaryFormat$outboundSchema),
734
+ z.lazy(() => FileInURIFormat$outboundSchema),
735
+ ]),
736
+ metadata: z.record(z.any()).optional(),
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 FilePart$ {
744
+ /** @deprecated use `FilePart$inboundSchema` instead. */
745
+ export const inboundSchema = FilePart$inboundSchema;
746
+ /** @deprecated use `FilePart$outboundSchema` instead. */
747
+ export const outboundSchema = FilePart$outboundSchema;
748
+ /** @deprecated use `FilePart$Outbound` instead. */
749
+ export type Outbound = FilePart$Outbound;
750
+ }
751
+
752
+ export function filePartToJSON(filePart: FilePart): string {
753
+ return JSON.stringify(FilePart$outboundSchema.parse(filePart));
754
+ }
755
+
756
+ export function filePartFromJSON(
757
+ jsonString: string,
758
+ ): SafeParseResult<FilePart, SDKValidationError> {
759
+ return safeParse(
760
+ jsonString,
761
+ (x) => FilePart$inboundSchema.parse(JSON.parse(x)),
762
+ `Failed to parse 'FilePart' from JSON`,
763
+ );
764
+ }
765
+
766
+ /** @internal */
767
+ export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
768
+ Kind,
769
+ );
770
+
771
+ /** @internal */
772
+ export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
773
+ Kind$inboundSchema;
774
+
775
+ /**
776
+ * @internal
777
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
778
+ */
779
+ export namespace Kind$ {
780
+ /** @deprecated use `Kind$inboundSchema` instead. */
781
+ export const inboundSchema = Kind$inboundSchema;
782
+ /** @deprecated use `Kind$outboundSchema` instead. */
783
+ export const outboundSchema = Kind$outboundSchema;
784
+ }
785
+
786
+ /** @internal */
787
+ export const TextPart$inboundSchema: z.ZodType<
788
+ TextPart,
789
+ z.ZodTypeDef,
790
+ unknown
791
+ > = z.object({
792
+ kind: Kind$inboundSchema,
793
+ text: z.string(),
794
+ });
795
+
796
+ /** @internal */
797
+ export type TextPart$Outbound = {
798
+ kind: string;
799
+ text: string;
800
+ };
801
+
802
+ /** @internal */
803
+ export const TextPart$outboundSchema: z.ZodType<
804
+ TextPart$Outbound,
805
+ z.ZodTypeDef,
806
+ TextPart
807
+ > = z.object({
808
+ kind: Kind$outboundSchema,
809
+ text: z.string(),
810
+ });
811
+
812
+ /**
813
+ * @internal
814
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
815
+ */
816
+ export namespace TextPart$ {
817
+ /** @deprecated use `TextPart$inboundSchema` instead. */
818
+ export const inboundSchema = TextPart$inboundSchema;
819
+ /** @deprecated use `TextPart$outboundSchema` instead. */
820
+ export const outboundSchema = TextPart$outboundSchema;
821
+ /** @deprecated use `TextPart$Outbound` instead. */
822
+ export type Outbound = TextPart$Outbound;
823
+ }
824
+
825
+ export function textPartToJSON(textPart: TextPart): string {
826
+ return JSON.stringify(TextPart$outboundSchema.parse(textPart));
827
+ }
828
+
829
+ export function textPartFromJSON(
830
+ jsonString: string,
831
+ ): SafeParseResult<TextPart, SDKValidationError> {
832
+ return safeParse(
833
+ jsonString,
834
+ (x) => TextPart$inboundSchema.parse(JSON.parse(x)),
835
+ `Failed to parse 'TextPart' from JSON`,
836
+ );
837
+ }
838
+
839
+ /** @internal */
840
+ export const PublicMessagePart$inboundSchema: z.ZodType<
841
+ PublicMessagePart,
842
+ z.ZodTypeDef,
843
+ unknown
844
+ > = z.union([
845
+ z.lazy(() => TextPart$inboundSchema),
846
+ z.lazy(() => FilePart$inboundSchema),
847
+ z.lazy(() => ToolResultPart$inboundSchema),
848
+ ]);
849
+
850
+ /** @internal */
851
+ export type PublicMessagePart$Outbound =
852
+ | TextPart$Outbound
853
+ | FilePart$Outbound
854
+ | ToolResultPart$Outbound;
855
+
856
+ /** @internal */
857
+ export const PublicMessagePart$outboundSchema: z.ZodType<
858
+ PublicMessagePart$Outbound,
859
+ z.ZodTypeDef,
860
+ PublicMessagePart
861
+ > = z.union([
862
+ z.lazy(() => TextPart$outboundSchema),
863
+ z.lazy(() => FilePart$outboundSchema),
864
+ z.lazy(() => ToolResultPart$outboundSchema),
865
+ ]);
866
+
867
+ /**
868
+ * @internal
869
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
870
+ */
871
+ export namespace PublicMessagePart$ {
872
+ /** @deprecated use `PublicMessagePart$inboundSchema` instead. */
873
+ export const inboundSchema = PublicMessagePart$inboundSchema;
874
+ /** @deprecated use `PublicMessagePart$outboundSchema` instead. */
875
+ export const outboundSchema = PublicMessagePart$outboundSchema;
876
+ /** @deprecated use `PublicMessagePart$Outbound` instead. */
877
+ export type Outbound = PublicMessagePart$Outbound;
878
+ }
879
+
880
+ export function publicMessagePartToJSON(
881
+ publicMessagePart: PublicMessagePart,
882
+ ): string {
883
+ return JSON.stringify(
884
+ PublicMessagePart$outboundSchema.parse(publicMessagePart),
885
+ );
886
+ }
887
+
888
+ export function publicMessagePartFromJSON(
889
+ jsonString: string,
890
+ ): SafeParseResult<PublicMessagePart, SDKValidationError> {
891
+ return safeParse(
892
+ jsonString,
893
+ (x) => PublicMessagePart$inboundSchema.parse(JSON.parse(x)),
894
+ `Failed to parse 'PublicMessagePart' from JSON`,
895
+ );
896
+ }
897
+
898
+ /** @internal */
899
+ export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
900
+ z.object({
901
+ messageId: z.string().optional(),
902
+ role: z.union([
903
+ RoleUserMessage$inboundSchema,
904
+ RoleToolMessage$inboundSchema,
905
+ ]),
906
+ parts: z.array(
907
+ z.union([
908
+ z.lazy(() => TextPart$inboundSchema),
909
+ z.lazy(() => FilePart$inboundSchema),
910
+ z.lazy(() => ToolResultPart$inboundSchema),
911
+ ]),
912
+ ),
913
+ });
914
+
915
+ /** @internal */
916
+ export type Message$Outbound = {
917
+ messageId?: string | undefined;
918
+ role: string | string;
919
+ parts: Array<TextPart$Outbound | FilePart$Outbound | ToolResultPart$Outbound>;
920
+ };
921
+
922
+ /** @internal */
923
+ export const Message$outboundSchema: z.ZodType<
924
+ Message$Outbound,
925
+ z.ZodTypeDef,
926
+ Message
927
+ > = z.object({
928
+ messageId: z.string().optional(),
929
+ role: z.union([
930
+ RoleUserMessage$outboundSchema,
931
+ RoleToolMessage$outboundSchema,
932
+ ]),
933
+ parts: z.array(
934
+ z.union([
935
+ z.lazy(() => TextPart$outboundSchema),
936
+ z.lazy(() => FilePart$outboundSchema),
937
+ z.lazy(() => ToolResultPart$outboundSchema),
938
+ ]),
939
+ ),
940
+ });
941
+
942
+ /**
943
+ * @internal
944
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
945
+ */
946
+ export namespace Message$ {
947
+ /** @deprecated use `Message$inboundSchema` instead. */
948
+ export const inboundSchema = Message$inboundSchema;
949
+ /** @deprecated use `Message$outboundSchema` instead. */
950
+ export const outboundSchema = Message$outboundSchema;
951
+ /** @deprecated use `Message$Outbound` instead. */
952
+ export type Outbound = Message$Outbound;
953
+ }
954
+
955
+ export function messageToJSON(message: Message): string {
956
+ return JSON.stringify(Message$outboundSchema.parse(message));
957
+ }
958
+
959
+ export function messageFromJSON(
960
+ jsonString: string,
961
+ ): SafeParseResult<Message, SDKValidationError> {
962
+ return safeParse(
963
+ jsonString,
964
+ (x) => Message$inboundSchema.parse(JSON.parse(x)),
965
+ `Failed to parse 'Message' from JSON`,
966
+ );
967
+ }
968
+
969
+ /** @internal */
970
+ export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
971
+ z.object({
972
+ id: z.string(),
973
+ display_name: z.string().optional(),
974
+ email: z.string().optional(),
975
+ metadata: z.array(z.record(z.any())).optional(),
976
+ logo_url: z.string().optional(),
977
+ tags: z.array(z.string()).optional(),
978
+ }).transform((v) => {
979
+ return remap$(v, {
980
+ "display_name": "displayName",
981
+ "logo_url": "logoUrl",
982
+ });
983
+ });
984
+
985
+ /** @internal */
986
+ export type Contact$Outbound = {
987
+ id: string;
988
+ display_name?: string | undefined;
989
+ email?: string | undefined;
990
+ metadata?: Array<{ [k: string]: any }> | undefined;
991
+ logo_url?: string | undefined;
992
+ tags?: Array<string> | undefined;
993
+ };
994
+
995
+ /** @internal */
996
+ export const Contact$outboundSchema: z.ZodType<
997
+ Contact$Outbound,
998
+ z.ZodTypeDef,
999
+ Contact
1000
+ > = z.object({
1001
+ id: z.string(),
1002
+ displayName: z.string().optional(),
1003
+ email: z.string().optional(),
1004
+ metadata: z.array(z.record(z.any())).optional(),
1005
+ logoUrl: z.string().optional(),
1006
+ tags: z.array(z.string()).optional(),
1007
+ }).transform((v) => {
1008
+ return remap$(v, {
1009
+ displayName: "display_name",
1010
+ logoUrl: "logo_url",
1011
+ });
1012
+ });
1013
+
1014
+ /**
1015
+ * @internal
1016
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1017
+ */
1018
+ export namespace Contact$ {
1019
+ /** @deprecated use `Contact$inboundSchema` instead. */
1020
+ export const inboundSchema = Contact$inboundSchema;
1021
+ /** @deprecated use `Contact$outboundSchema` instead. */
1022
+ export const outboundSchema = Contact$outboundSchema;
1023
+ /** @deprecated use `Contact$Outbound` instead. */
1024
+ export type Outbound = Contact$Outbound;
1025
+ }
1026
+
1027
+ export function contactToJSON(contact: Contact): string {
1028
+ return JSON.stringify(Contact$outboundSchema.parse(contact));
1029
+ }
1030
+
1031
+ export function contactFromJSON(
1032
+ jsonString: string,
1033
+ ): SafeParseResult<Contact, SDKValidationError> {
1034
+ return safeParse(
1035
+ jsonString,
1036
+ (x) => Contact$inboundSchema.parse(JSON.parse(x)),
1037
+ `Failed to parse 'Contact' from JSON`,
1038
+ );
1039
+ }
1040
+
1041
+ /** @internal */
1042
+ export const InvokeAgentThread$inboundSchema: z.ZodType<
1043
+ InvokeAgentThread,
1044
+ z.ZodTypeDef,
1045
+ unknown
1046
+ > = z.object({
1047
+ id: z.string(),
1048
+ tags: z.array(z.string()).optional(),
1049
+ });
1050
+
1051
+ /** @internal */
1052
+ export type InvokeAgentThread$Outbound = {
1053
+ id: string;
1054
+ tags?: Array<string> | undefined;
1055
+ };
1056
+
1057
+ /** @internal */
1058
+ export const InvokeAgentThread$outboundSchema: z.ZodType<
1059
+ InvokeAgentThread$Outbound,
1060
+ z.ZodTypeDef,
1061
+ InvokeAgentThread
1062
+ > = z.object({
1063
+ id: z.string(),
1064
+ tags: z.array(z.string()).optional(),
1065
+ });
1066
+
1067
+ /**
1068
+ * @internal
1069
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1070
+ */
1071
+ export namespace InvokeAgentThread$ {
1072
+ /** @deprecated use `InvokeAgentThread$inboundSchema` instead. */
1073
+ export const inboundSchema = InvokeAgentThread$inboundSchema;
1074
+ /** @deprecated use `InvokeAgentThread$outboundSchema` instead. */
1075
+ export const outboundSchema = InvokeAgentThread$outboundSchema;
1076
+ /** @deprecated use `InvokeAgentThread$Outbound` instead. */
1077
+ export type Outbound = InvokeAgentThread$Outbound;
1078
+ }
1079
+
1080
+ export function invokeAgentThreadToJSON(
1081
+ invokeAgentThread: InvokeAgentThread,
1082
+ ): string {
1083
+ return JSON.stringify(
1084
+ InvokeAgentThread$outboundSchema.parse(invokeAgentThread),
1085
+ );
1086
+ }
1087
+
1088
+ export function invokeAgentThreadFromJSON(
1089
+ jsonString: string,
1090
+ ): SafeParseResult<InvokeAgentThread, SDKValidationError> {
1091
+ return safeParse(
1092
+ jsonString,
1093
+ (x) => InvokeAgentThread$inboundSchema.parse(JSON.parse(x)),
1094
+ `Failed to parse 'InvokeAgentThread' from JSON`,
1095
+ );
1096
+ }
1097
+
1098
+ /** @internal */
1099
+ export const Memory$inboundSchema: z.ZodType<Memory, z.ZodTypeDef, unknown> = z
1100
+ .object({
1101
+ entity_id: z.string(),
1102
+ }).transform((v) => {
1103
+ return remap$(v, {
1104
+ "entity_id": "entityId",
1105
+ });
1106
+ });
1107
+
1108
+ /** @internal */
1109
+ export type Memory$Outbound = {
1110
+ entity_id: string;
1111
+ };
1112
+
1113
+ /** @internal */
1114
+ export const Memory$outboundSchema: z.ZodType<
1115
+ Memory$Outbound,
1116
+ z.ZodTypeDef,
1117
+ Memory
1118
+ > = z.object({
1119
+ entityId: z.string(),
1120
+ }).transform((v) => {
1121
+ return remap$(v, {
1122
+ entityId: "entity_id",
1123
+ });
1124
+ });
1125
+
1126
+ /**
1127
+ * @internal
1128
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1129
+ */
1130
+ export namespace Memory$ {
1131
+ /** @deprecated use `Memory$inboundSchema` instead. */
1132
+ export const inboundSchema = Memory$inboundSchema;
1133
+ /** @deprecated use `Memory$outboundSchema` instead. */
1134
+ export const outboundSchema = Memory$outboundSchema;
1135
+ /** @deprecated use `Memory$Outbound` instead. */
1136
+ export type Outbound = Memory$Outbound;
1137
+ }
1138
+
1139
+ export function memoryToJSON(memory: Memory): string {
1140
+ return JSON.stringify(Memory$outboundSchema.parse(memory));
1141
+ }
1142
+
1143
+ export function memoryFromJSON(
1144
+ jsonString: string,
1145
+ ): SafeParseResult<Memory, SDKValidationError> {
1146
+ return safeParse(
1147
+ jsonString,
1148
+ (x) => Memory$inboundSchema.parse(JSON.parse(x)),
1149
+ `Failed to parse 'Memory' from JSON`,
1150
+ );
1151
+ }
1152
+
1153
+ /** @internal */
1154
+ export const InvokeAgentRequestBody$inboundSchema: z.ZodType<
1155
+ InvokeAgentRequestBody,
1156
+ z.ZodTypeDef,
1157
+ unknown
1158
+ > = z.object({
1159
+ taskId: z.string().optional(),
1160
+ message: z.lazy(() => Message$inboundSchema),
1161
+ variables: z.record(z.any()).optional(),
1162
+ contact: z.lazy(() => Contact$inboundSchema).optional(),
1163
+ thread: z.lazy(() => InvokeAgentThread$inboundSchema).optional(),
1164
+ memory: z.lazy(() => Memory$inboundSchema).optional(),
1165
+ metadata: z.record(z.any()).optional(),
1166
+ });
1167
+
1168
+ /** @internal */
1169
+ export type InvokeAgentRequestBody$Outbound = {
1170
+ taskId?: string | undefined;
1171
+ message: Message$Outbound;
1172
+ variables?: { [k: string]: any } | undefined;
1173
+ contact?: Contact$Outbound | undefined;
1174
+ thread?: InvokeAgentThread$Outbound | undefined;
1175
+ memory?: Memory$Outbound | undefined;
1176
+ metadata?: { [k: string]: any } | undefined;
1177
+ };
1178
+
1179
+ /** @internal */
1180
+ export const InvokeAgentRequestBody$outboundSchema: z.ZodType<
1181
+ InvokeAgentRequestBody$Outbound,
1182
+ z.ZodTypeDef,
1183
+ InvokeAgentRequestBody
1184
+ > = z.object({
1185
+ taskId: z.string().optional(),
1186
+ message: z.lazy(() => Message$outboundSchema),
1187
+ variables: z.record(z.any()).optional(),
1188
+ contact: z.lazy(() => Contact$outboundSchema).optional(),
1189
+ thread: z.lazy(() => InvokeAgentThread$outboundSchema).optional(),
1190
+ memory: z.lazy(() => Memory$outboundSchema).optional(),
1191
+ metadata: z.record(z.any()).optional(),
1192
+ });
1193
+
1194
+ /**
1195
+ * @internal
1196
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1197
+ */
1198
+ export namespace InvokeAgentRequestBody$ {
1199
+ /** @deprecated use `InvokeAgentRequestBody$inboundSchema` instead. */
1200
+ export const inboundSchema = InvokeAgentRequestBody$inboundSchema;
1201
+ /** @deprecated use `InvokeAgentRequestBody$outboundSchema` instead. */
1202
+ export const outboundSchema = InvokeAgentRequestBody$outboundSchema;
1203
+ /** @deprecated use `InvokeAgentRequestBody$Outbound` instead. */
1204
+ export type Outbound = InvokeAgentRequestBody$Outbound;
1205
+ }
1206
+
1207
+ export function invokeAgentRequestBodyToJSON(
1208
+ invokeAgentRequestBody: InvokeAgentRequestBody,
1209
+ ): string {
1210
+ return JSON.stringify(
1211
+ InvokeAgentRequestBody$outboundSchema.parse(invokeAgentRequestBody),
1212
+ );
1213
+ }
1214
+
1215
+ export function invokeAgentRequestBodyFromJSON(
1216
+ jsonString: string,
1217
+ ): SafeParseResult<InvokeAgentRequestBody, SDKValidationError> {
1218
+ return safeParse(
1219
+ jsonString,
1220
+ (x) => InvokeAgentRequestBody$inboundSchema.parse(JSON.parse(x)),
1221
+ `Failed to parse 'InvokeAgentRequestBody' from JSON`,
1222
+ );
1223
+ }
1224
+
1225
+ /** @internal */
1226
+ export const InvokeAgentRequest$inboundSchema: z.ZodType<
1227
+ InvokeAgentRequest,
1228
+ z.ZodTypeDef,
1229
+ unknown
1230
+ > = z.object({
1231
+ key: z.string(),
1232
+ RequestBody: z.lazy(() => InvokeAgentRequestBody$inboundSchema).optional(),
1233
+ }).transform((v) => {
1234
+ return remap$(v, {
1235
+ "RequestBody": "requestBody",
1236
+ });
1237
+ });
1238
+
1239
+ /** @internal */
1240
+ export type InvokeAgentRequest$Outbound = {
1241
+ key: string;
1242
+ RequestBody?: InvokeAgentRequestBody$Outbound | undefined;
1243
+ };
1244
+
1245
+ /** @internal */
1246
+ export const InvokeAgentRequest$outboundSchema: z.ZodType<
1247
+ InvokeAgentRequest$Outbound,
1248
+ z.ZodTypeDef,
1249
+ InvokeAgentRequest
1250
+ > = z.object({
1251
+ key: z.string(),
1252
+ requestBody: z.lazy(() => InvokeAgentRequestBody$outboundSchema).optional(),
1253
+ }).transform((v) => {
1254
+ return remap$(v, {
1255
+ requestBody: "RequestBody",
1256
+ });
1257
+ });
1258
+
1259
+ /**
1260
+ * @internal
1261
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1262
+ */
1263
+ export namespace InvokeAgentRequest$ {
1264
+ /** @deprecated use `InvokeAgentRequest$inboundSchema` instead. */
1265
+ export const inboundSchema = InvokeAgentRequest$inboundSchema;
1266
+ /** @deprecated use `InvokeAgentRequest$outboundSchema` instead. */
1267
+ export const outboundSchema = InvokeAgentRequest$outboundSchema;
1268
+ /** @deprecated use `InvokeAgentRequest$Outbound` instead. */
1269
+ export type Outbound = InvokeAgentRequest$Outbound;
1270
+ }
1271
+
1272
+ export function invokeAgentRequestToJSON(
1273
+ invokeAgentRequest: InvokeAgentRequest,
1274
+ ): string {
1275
+ return JSON.stringify(
1276
+ InvokeAgentRequest$outboundSchema.parse(invokeAgentRequest),
1277
+ );
1278
+ }
1279
+
1280
+ export function invokeAgentRequestFromJSON(
1281
+ jsonString: string,
1282
+ ): SafeParseResult<InvokeAgentRequest, SDKValidationError> {
1283
+ return safeParse(
1284
+ jsonString,
1285
+ (x) => InvokeAgentRequest$inboundSchema.parse(JSON.parse(x)),
1286
+ `Failed to parse 'InvokeAgentRequest' from JSON`,
1287
+ );
1288
+ }
1289
+
1290
+ /** @internal */
1291
+ export const InvokeAgentKind$inboundSchema: z.ZodNativeEnum<
1292
+ typeof InvokeAgentKind
1293
+ > = z.nativeEnum(InvokeAgentKind);
1294
+
1295
+ /** @internal */
1296
+ export const InvokeAgentKind$outboundSchema: z.ZodNativeEnum<
1297
+ typeof InvokeAgentKind
1298
+ > = InvokeAgentKind$inboundSchema;
1299
+
1300
+ /**
1301
+ * @internal
1302
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1303
+ */
1304
+ export namespace InvokeAgentKind$ {
1305
+ /** @deprecated use `InvokeAgentKind$inboundSchema` instead. */
1306
+ export const inboundSchema = InvokeAgentKind$inboundSchema;
1307
+ /** @deprecated use `InvokeAgentKind$outboundSchema` instead. */
1308
+ export const outboundSchema = InvokeAgentKind$outboundSchema;
1309
+ }
1310
+
1311
+ /** @internal */
1312
+ export const InvokeAgentState$inboundSchema: z.ZodNativeEnum<
1313
+ typeof InvokeAgentState
1314
+ > = z.nativeEnum(InvokeAgentState);
1315
+
1316
+ /** @internal */
1317
+ export const InvokeAgentState$outboundSchema: z.ZodNativeEnum<
1318
+ typeof InvokeAgentState
1319
+ > = InvokeAgentState$inboundSchema;
1320
+
1321
+ /**
1322
+ * @internal
1323
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1324
+ */
1325
+ export namespace InvokeAgentState$ {
1326
+ /** @deprecated use `InvokeAgentState$inboundSchema` instead. */
1327
+ export const inboundSchema = InvokeAgentState$inboundSchema;
1328
+ /** @deprecated use `InvokeAgentState$outboundSchema` instead. */
1329
+ export const outboundSchema = InvokeAgentState$outboundSchema;
1330
+ }
1331
+
1332
+ /** @internal */
1333
+ export const InvokeAgentAgentsKind$inboundSchema: z.ZodNativeEnum<
1334
+ typeof InvokeAgentAgentsKind
1335
+ > = z.nativeEnum(InvokeAgentAgentsKind);
1336
+
1337
+ /** @internal */
1338
+ export const InvokeAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
1339
+ typeof InvokeAgentAgentsKind
1340
+ > = InvokeAgentAgentsKind$inboundSchema;
1341
+
1342
+ /**
1343
+ * @internal
1344
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1345
+ */
1346
+ export namespace InvokeAgentAgentsKind$ {
1347
+ /** @deprecated use `InvokeAgentAgentsKind$inboundSchema` instead. */
1348
+ export const inboundSchema = InvokeAgentAgentsKind$inboundSchema;
1349
+ /** @deprecated use `InvokeAgentAgentsKind$outboundSchema` instead. */
1350
+ export const outboundSchema = InvokeAgentAgentsKind$outboundSchema;
1351
+ }
1352
+
1353
+ /** @internal */
1354
+ export const InvokeAgentAgentsRole$inboundSchema: z.ZodNativeEnum<
1355
+ typeof InvokeAgentAgentsRole
1356
+ > = z.nativeEnum(InvokeAgentAgentsRole);
1357
+
1358
+ /** @internal */
1359
+ export const InvokeAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
1360
+ typeof InvokeAgentAgentsRole
1361
+ > = InvokeAgentAgentsRole$inboundSchema;
1362
+
1363
+ /**
1364
+ * @internal
1365
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1366
+ */
1367
+ export namespace InvokeAgentAgentsRole$ {
1368
+ /** @deprecated use `InvokeAgentAgentsRole$inboundSchema` instead. */
1369
+ export const inboundSchema = InvokeAgentAgentsRole$inboundSchema;
1370
+ /** @deprecated use `InvokeAgentAgentsRole$outboundSchema` instead. */
1371
+ export const outboundSchema = InvokeAgentAgentsRole$outboundSchema;
1372
+ }
1373
+
1374
+ /** @internal */
1375
+ export const InvokeAgentMessage$inboundSchema: z.ZodType<
1376
+ InvokeAgentMessage,
1377
+ z.ZodTypeDef,
1378
+ unknown
1379
+ > = z.object({
1380
+ kind: InvokeAgentAgentsKind$inboundSchema,
1381
+ messageId: z.string(),
1382
+ role: InvokeAgentAgentsRole$inboundSchema,
1383
+ parts: z.array(z.any()),
1384
+ });
1385
+
1386
+ /** @internal */
1387
+ export type InvokeAgentMessage$Outbound = {
1388
+ kind: string;
1389
+ messageId: string;
1390
+ role: string;
1391
+ parts: Array<any>;
1392
+ };
1393
+
1394
+ /** @internal */
1395
+ export const InvokeAgentMessage$outboundSchema: z.ZodType<
1396
+ InvokeAgentMessage$Outbound,
1397
+ z.ZodTypeDef,
1398
+ InvokeAgentMessage
1399
+ > = z.object({
1400
+ kind: InvokeAgentAgentsKind$outboundSchema,
1401
+ messageId: z.string(),
1402
+ role: InvokeAgentAgentsRole$outboundSchema,
1403
+ parts: z.array(z.any()),
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 InvokeAgentMessage$ {
1411
+ /** @deprecated use `InvokeAgentMessage$inboundSchema` instead. */
1412
+ export const inboundSchema = InvokeAgentMessage$inboundSchema;
1413
+ /** @deprecated use `InvokeAgentMessage$outboundSchema` instead. */
1414
+ export const outboundSchema = InvokeAgentMessage$outboundSchema;
1415
+ /** @deprecated use `InvokeAgentMessage$Outbound` instead. */
1416
+ export type Outbound = InvokeAgentMessage$Outbound;
1417
+ }
1418
+
1419
+ export function invokeAgentMessageToJSON(
1420
+ invokeAgentMessage: InvokeAgentMessage,
1421
+ ): string {
1422
+ return JSON.stringify(
1423
+ InvokeAgentMessage$outboundSchema.parse(invokeAgentMessage),
1424
+ );
1425
+ }
1426
+
1427
+ export function invokeAgentMessageFromJSON(
1428
+ jsonString: string,
1429
+ ): SafeParseResult<InvokeAgentMessage, SDKValidationError> {
1430
+ return safeParse(
1431
+ jsonString,
1432
+ (x) => InvokeAgentMessage$inboundSchema.parse(JSON.parse(x)),
1433
+ `Failed to parse 'InvokeAgentMessage' from JSON`,
1434
+ );
1435
+ }
1436
+
1437
+ /** @internal */
1438
+ export const InvokeAgentStatus$inboundSchema: z.ZodType<
1439
+ InvokeAgentStatus,
1440
+ z.ZodTypeDef,
1441
+ unknown
1442
+ > = z.object({
1443
+ state: InvokeAgentState$inboundSchema,
1444
+ timestamp: z.string().optional(),
1445
+ message: z.lazy(() => InvokeAgentMessage$inboundSchema).optional(),
1446
+ });
1447
+
1448
+ /** @internal */
1449
+ export type InvokeAgentStatus$Outbound = {
1450
+ state: string;
1451
+ timestamp?: string | undefined;
1452
+ message?: InvokeAgentMessage$Outbound | undefined;
1453
+ };
1454
+
1455
+ /** @internal */
1456
+ export const InvokeAgentStatus$outboundSchema: z.ZodType<
1457
+ InvokeAgentStatus$Outbound,
1458
+ z.ZodTypeDef,
1459
+ InvokeAgentStatus
1460
+ > = z.object({
1461
+ state: InvokeAgentState$outboundSchema,
1462
+ timestamp: z.string().optional(),
1463
+ message: z.lazy(() => InvokeAgentMessage$outboundSchema).optional(),
1464
+ });
1465
+
1466
+ /**
1467
+ * @internal
1468
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1469
+ */
1470
+ export namespace InvokeAgentStatus$ {
1471
+ /** @deprecated use `InvokeAgentStatus$inboundSchema` instead. */
1472
+ export const inboundSchema = InvokeAgentStatus$inboundSchema;
1473
+ /** @deprecated use `InvokeAgentStatus$outboundSchema` instead. */
1474
+ export const outboundSchema = InvokeAgentStatus$outboundSchema;
1475
+ /** @deprecated use `InvokeAgentStatus$Outbound` instead. */
1476
+ export type Outbound = InvokeAgentStatus$Outbound;
1477
+ }
1478
+
1479
+ export function invokeAgentStatusToJSON(
1480
+ invokeAgentStatus: InvokeAgentStatus,
1481
+ ): string {
1482
+ return JSON.stringify(
1483
+ InvokeAgentStatus$outboundSchema.parse(invokeAgentStatus),
1484
+ );
1485
+ }
1486
+
1487
+ export function invokeAgentStatusFromJSON(
1488
+ jsonString: string,
1489
+ ): SafeParseResult<InvokeAgentStatus, SDKValidationError> {
1490
+ return safeParse(
1491
+ jsonString,
1492
+ (x) => InvokeAgentStatus$inboundSchema.parse(JSON.parse(x)),
1493
+ `Failed to parse 'InvokeAgentStatus' from JSON`,
1494
+ );
1495
+ }
1496
+
1497
+ /** @internal */
1498
+ export const InvokeAgentResponseBody$inboundSchema: z.ZodType<
1499
+ InvokeAgentResponseBody,
1500
+ z.ZodTypeDef,
1501
+ unknown
1502
+ > = z.object({
1503
+ id: z.string(),
1504
+ contextId: z.string(),
1505
+ kind: InvokeAgentKind$inboundSchema,
1506
+ status: z.lazy(() => InvokeAgentStatus$inboundSchema),
1507
+ metadata: z.record(z.any()).optional(),
1508
+ });
1509
+
1510
+ /** @internal */
1511
+ export type InvokeAgentResponseBody$Outbound = {
1512
+ id: string;
1513
+ contextId: string;
1514
+ kind: string;
1515
+ status: InvokeAgentStatus$Outbound;
1516
+ metadata?: { [k: string]: any } | undefined;
1517
+ };
1518
+
1519
+ /** @internal */
1520
+ export const InvokeAgentResponseBody$outboundSchema: z.ZodType<
1521
+ InvokeAgentResponseBody$Outbound,
1522
+ z.ZodTypeDef,
1523
+ InvokeAgentResponseBody
1524
+ > = z.object({
1525
+ id: z.string(),
1526
+ contextId: z.string(),
1527
+ kind: InvokeAgentKind$outboundSchema,
1528
+ status: z.lazy(() => InvokeAgentStatus$outboundSchema),
1529
+ metadata: z.record(z.any()).optional(),
1530
+ });
1531
+
1532
+ /**
1533
+ * @internal
1534
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1535
+ */
1536
+ export namespace InvokeAgentResponseBody$ {
1537
+ /** @deprecated use `InvokeAgentResponseBody$inboundSchema` instead. */
1538
+ export const inboundSchema = InvokeAgentResponseBody$inboundSchema;
1539
+ /** @deprecated use `InvokeAgentResponseBody$outboundSchema` instead. */
1540
+ export const outboundSchema = InvokeAgentResponseBody$outboundSchema;
1541
+ /** @deprecated use `InvokeAgentResponseBody$Outbound` instead. */
1542
+ export type Outbound = InvokeAgentResponseBody$Outbound;
1543
+ }
1544
+
1545
+ export function invokeAgentResponseBodyToJSON(
1546
+ invokeAgentResponseBody: InvokeAgentResponseBody,
1547
+ ): string {
1548
+ return JSON.stringify(
1549
+ InvokeAgentResponseBody$outboundSchema.parse(invokeAgentResponseBody),
1550
+ );
1551
+ }
1552
+
1553
+ export function invokeAgentResponseBodyFromJSON(
1554
+ jsonString: string,
1555
+ ): SafeParseResult<InvokeAgentResponseBody, SDKValidationError> {
1556
+ return safeParse(
1557
+ jsonString,
1558
+ (x) => InvokeAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
1559
+ `Failed to parse 'InvokeAgentResponseBody' from JSON`,
1560
+ );
1561
+ }