@orq-ai/node 4.1.4 → 4.2.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 (559) hide show
  1. package/README.md +18 -0
  2. package/bin/mcp-server.js +835 -380
  3. package/bin/mcp-server.js.map +61 -58
  4. package/examples/package-lock.json +4 -7
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/lib/config.js.map +1 -1
  9. package/mcp-server/mcp-server.js +1 -1
  10. package/mcp-server/mcp-server.js.map +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/mcp-server/server.js.map +1 -1
  13. package/models/components/conversationresponse.js +2 -2
  14. package/models/components/invokedeploymentrequest.d.ts +1 -1
  15. package/models/components/partdoneevent.js +2 -2
  16. package/models/components/reasoningpart.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createconversation.js +2 -2
  19. package/models/operations/createdataset.js +2 -2
  20. package/models/operations/createdatasetitem.js +8 -8
  21. package/models/operations/createdatasource.js +2 -2
  22. package/models/operations/createeval.js +28 -28
  23. package/models/operations/createtool.js +12 -12
  24. package/models/operations/deploymentgetconfig.d.ts +1 -1
  25. package/models/operations/deploymentstream.d.ts +1 -1
  26. package/models/operations/fileget.js +2 -2
  27. package/models/operations/filelist.js +2 -2
  28. package/models/operations/fileupload.js +2 -2
  29. package/models/operations/generateconversationname.js +2 -2
  30. package/models/operations/getalltools.js +12 -12
  31. package/models/operations/getevals.js +28 -28
  32. package/models/operations/listcontacts.js +2 -2
  33. package/models/operations/listdatasetdatapoints.js +8 -8
  34. package/models/operations/listdatasets.js +2 -2
  35. package/models/operations/listdatasources.js +2 -2
  36. package/models/operations/retrievecontact.js +2 -2
  37. package/models/operations/retrieveconversation.js +2 -2
  38. package/models/operations/retrievedatapoint.js +8 -8
  39. package/models/operations/retrievedataset.js +2 -2
  40. package/models/operations/retrievedatasource.js +2 -2
  41. package/models/operations/retrievetool.js +12 -12
  42. package/models/operations/runagent.js +2 -2
  43. package/models/operations/streamrunagent.js +2 -2
  44. package/models/operations/updatecontact.js +2 -2
  45. package/models/operations/updateconversation.js +2 -2
  46. package/models/operations/updatedatapoint.js +8 -8
  47. package/models/operations/updatedataset.js +2 -2
  48. package/models/operations/updatedatasource.js +2 -2
  49. package/models/operations/updateeval.js +28 -28
  50. package/models/operations/updatetool.js +14 -14
  51. package/package.json +4 -3
  52. package/src/lib/config.ts +3 -3
  53. package/src/mcp-server/mcp-server.ts +1 -1
  54. package/src/mcp-server/server.ts +1 -1
  55. package/src/models/components/conversationresponse.ts +2 -2
  56. package/src/models/components/invokedeploymentrequest.ts +1 -1
  57. package/src/models/components/partdoneevent.ts +2 -2
  58. package/src/models/components/reasoningpart.ts +2 -2
  59. package/src/models/operations/createcontact.ts +2 -2
  60. package/src/models/operations/createconversation.ts +2 -2
  61. package/src/models/operations/createdataset.ts +2 -2
  62. package/src/models/operations/createdatasetitem.ts +8 -8
  63. package/src/models/operations/createdatasource.ts +2 -2
  64. package/src/models/operations/createeval.ts +28 -28
  65. package/src/models/operations/createtool.ts +12 -12
  66. package/src/models/operations/deploymentgetconfig.ts +1 -1
  67. package/src/models/operations/deploymentstream.ts +1 -1
  68. package/src/models/operations/fileget.ts +2 -2
  69. package/src/models/operations/filelist.ts +2 -2
  70. package/src/models/operations/fileupload.ts +2 -2
  71. package/src/models/operations/generateconversationname.ts +2 -2
  72. package/src/models/operations/getalltools.ts +12 -12
  73. package/src/models/operations/getevals.ts +28 -28
  74. package/src/models/operations/listcontacts.ts +2 -2
  75. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  76. package/src/models/operations/listdatasets.ts +2 -2
  77. package/src/models/operations/listdatasources.ts +2 -2
  78. package/src/models/operations/retrievecontact.ts +2 -2
  79. package/src/models/operations/retrieveconversation.ts +2 -2
  80. package/src/models/operations/retrievedatapoint.ts +8 -8
  81. package/src/models/operations/retrievedataset.ts +2 -2
  82. package/src/models/operations/retrievedatasource.ts +2 -2
  83. package/src/models/operations/retrievetool.ts +12 -12
  84. package/src/models/operations/runagent.ts +2 -2
  85. package/src/models/operations/streamrunagent.ts +2 -2
  86. package/src/models/operations/updatecontact.ts +2 -2
  87. package/src/models/operations/updateconversation.ts +2 -2
  88. package/src/models/operations/updatedatapoint.ts +8 -8
  89. package/src/models/operations/updatedataset.ts +2 -2
  90. package/src/models/operations/updatedatasource.ts +2 -2
  91. package/src/models/operations/updateeval.ts +28 -28
  92. package/src/models/operations/updatetool.ts +14 -14
  93. package/_speakeasy/.github/action-inputs-config.json +0 -53
  94. package/_speakeasy/.github/action-security-config.json +0 -88
  95. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  96. package/packages/orq-rc/examples/package-lock.json +0 -619
  97. package/packages/orq-rc/examples/package.json +0 -18
  98. package/packages/orq-rc/jsr.json +0 -28
  99. package/packages/orq-rc/package-lock.json +0 -3552
  100. package/packages/orq-rc/package.json +0 -40
  101. package/packages/orq-rc/src/core.ts +0 -13
  102. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -170
  103. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  104. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  105. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  106. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  107. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  108. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  109. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  110. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  111. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  112. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  113. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
  114. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
  115. package/packages/orq-rc/src/funcs/contactsList.ts +0 -170
  116. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
  117. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
  118. package/packages/orq-rc/src/funcs/conversationsCreate.ts +0 -161
  119. package/packages/orq-rc/src/funcs/conversationsDelete.ts +0 -180
  120. package/packages/orq-rc/src/funcs/conversationsGenerateName.ts +0 -194
  121. package/packages/orq-rc/src/funcs/conversationsList.ts +0 -181
  122. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +0 -180
  123. package/packages/orq-rc/src/funcs/conversationsUpdate.ts +0 -184
  124. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  125. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  126. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  127. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  128. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  129. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  130. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  131. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  132. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  133. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  134. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  135. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  136. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  137. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  138. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  139. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  140. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  141. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  142. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  143. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
  144. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  145. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  146. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -190
  147. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  148. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  149. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  150. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  151. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  152. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  153. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  154. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  155. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  156. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  157. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  158. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  159. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  160. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  161. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  162. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  163. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  164. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  165. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  166. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  167. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  168. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  169. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  170. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  171. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  172. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -175
  173. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  174. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  175. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -184
  176. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -179
  177. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  178. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -183
  179. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  180. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  181. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -178
  182. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -173
  183. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  184. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -179
  185. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -174
  186. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  187. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  188. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
  189. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  190. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  191. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  192. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  193. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  194. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  195. package/packages/orq-rc/src/funcs/routerChatCompletions.ts +0 -172
  196. package/packages/orq-rc/src/funcs/routerImagesGenerate.ts +0 -160
  197. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -172
  198. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  199. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  200. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  201. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  202. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  203. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  204. package/packages/orq-rc/src/hooks/global.ts +0 -44
  205. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  206. package/packages/orq-rc/src/hooks/index.ts +0 -6
  207. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  208. package/packages/orq-rc/src/hooks/types.ts +0 -112
  209. package/packages/orq-rc/src/index.ts +0 -9
  210. package/packages/orq-rc/src/lib/base64.ts +0 -37
  211. package/packages/orq-rc/src/lib/config.ts +0 -74
  212. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  213. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  214. package/packages/orq-rc/src/lib/env.ts +0 -89
  215. package/packages/orq-rc/src/lib/event-streams.ts +0 -135
  216. package/packages/orq-rc/src/lib/files.ts +0 -82
  217. package/packages/orq-rc/src/lib/http.ts +0 -323
  218. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  219. package/packages/orq-rc/src/lib/logger.ts +0 -9
  220. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  221. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  222. package/packages/orq-rc/src/lib/retries.ts +0 -218
  223. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  224. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  225. package/packages/orq-rc/src/lib/security.ts +0 -264
  226. package/packages/orq-rc/src/lib/url.ts +0 -33
  227. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -111
  228. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
  229. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  230. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  231. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  232. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  233. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -121
  234. package/packages/orq-rc/src/mcp-server/resources.ts +0 -176
  235. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  236. package/packages/orq-rc/src/mcp-server/server.ts +0 -267
  237. package/packages/orq-rc/src/mcp-server/shared.ts +0 -74
  238. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +0 -37
  239. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +0 -35
  240. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +0 -40
  241. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +0 -41
  242. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +0 -40
  243. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +0 -37
  244. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +0 -37
  245. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +0 -40
  246. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +0 -37
  247. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +0 -40
  248. package/packages/orq-rc/src/mcp-server/tools/chunkingParse.ts +0 -37
  249. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  250. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
  251. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
  252. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
  253. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
  254. package/packages/orq-rc/src/mcp-server/tools/conversationsCreate.ts +0 -37
  255. package/packages/orq-rc/src/mcp-server/tools/conversationsDelete.ts +0 -35
  256. package/packages/orq-rc/src/mcp-server/tools/conversationsGenerateName.ts +0 -40
  257. package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +0 -41
  258. package/packages/orq-rc/src/mcp-server/tools/conversationsRetrieve.ts +0 -37
  259. package/packages/orq-rc/src/mcp-server/tools/conversationsUpdate.ts +0 -40
  260. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  261. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  262. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  263. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  264. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  265. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  266. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  267. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  268. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  269. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  270. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  271. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  272. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  273. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  274. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  275. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  276. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
  277. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
  278. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
  279. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
  280. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
  281. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -39
  282. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
  283. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  284. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  285. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  286. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  287. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  289. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  290. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  291. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  292. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  293. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunks.ts +0 -35
  294. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  295. package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.ts +0 -35
  296. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  297. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  298. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunksPaginated.ts +0 -35
  299. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  300. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  301. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  302. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  303. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
  304. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  305. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  306. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  307. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +0 -35
  308. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +0 -37
  309. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +0 -37
  310. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +0 -35
  311. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +0 -40
  312. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +0 -40
  313. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +0 -37
  314. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +0 -37
  315. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +0 -37
  316. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +0 -37
  317. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +0 -37
  318. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +0 -37
  319. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +0 -37
  320. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +0 -37
  321. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +0 -37
  322. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  323. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  324. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  325. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  326. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  327. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  328. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  329. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  330. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  331. package/packages/orq-rc/src/mcp-server/tools/routerChatCompletions.ts +0 -37
  332. package/packages/orq-rc/src/mcp-server/tools/routerImagesGenerate.ts +0 -37
  333. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +0 -37
  334. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +0 -35
  335. package/packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersions.ts +0 -37
  336. package/packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -39
  337. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +0 -37
  338. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +0 -37
  339. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +0 -37
  340. package/packages/orq-rc/src/mcp-server/tools.ts +0 -133
  341. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -173
  342. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -309
  343. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -125
  344. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -150
  345. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -125
  346. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -801
  347. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -305
  348. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -185
  349. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -822
  350. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -1399
  351. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  352. package/packages/orq-rc/src/models/components/conversationresponse.ts +0 -194
  353. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -340
  354. package/packages/orq-rc/src/models/components/datapart.ts +0 -58
  355. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -112
  356. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -125
  357. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -105
  358. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -113
  359. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  360. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  361. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  362. package/packages/orq-rc/src/models/components/index.ts +0 -55
  363. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -5271
  364. package/packages/orq-rc/src/models/components/partdelta.ts +0 -80
  365. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -120
  366. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -216
  367. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -99
  368. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -90
  369. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  370. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  371. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  372. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -526
  373. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -118
  374. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -124
  375. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -148
  376. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -27
  377. package/packages/orq-rc/src/models/components/security.ts +0 -56
  378. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  379. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  380. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  381. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  382. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -108
  383. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -83
  384. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -121
  385. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -392
  386. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -360
  387. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -336
  388. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -123
  389. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  390. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -130
  391. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -141
  392. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -132
  393. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  394. package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
  395. package/packages/orq-rc/src/models/errors/createeval.ts +0 -67
  396. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -67
  397. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -78
  398. package/packages/orq-rc/src/models/errors/deleteconversation.ts +0 -67
  399. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -67
  400. package/packages/orq-rc/src/models/errors/generateconversationname.ts +0 -132
  401. package/packages/orq-rc/src/models/errors/getevals.ts +0 -67
  402. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -67
  403. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -67
  404. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
  405. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -67
  406. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -69
  407. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -77
  408. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  409. package/packages/orq-rc/src/models/errors/index.ts +0 -35
  410. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -128
  411. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  412. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  413. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -67
  414. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -78
  415. package/packages/orq-rc/src/models/errors/retrieveconversation.ts +0 -67
  416. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  417. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -67
  418. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -67
  419. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -67
  420. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -70
  421. package/packages/orq-rc/src/models/errors/updateconversation.ts +0 -67
  422. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -67
  423. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -67
  424. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -78
  425. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -63
  426. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -8610
  427. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -770
  428. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -8948
  429. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -341
  430. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -237
  431. package/packages/orq-rc/src/models/operations/createconversation.ts +0 -314
  432. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -257
  433. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -4044
  434. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -662
  435. package/packages/orq-rc/src/models/operations/createeval.ts +0 -5397
  436. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -226
  437. package/packages/orq-rc/src/models/operations/createimage.ts +0 -966
  438. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -1489
  439. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -241
  440. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -245
  441. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -310
  442. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5320
  443. package/packages/orq-rc/src/models/operations/createtool.ts +0 -3791
  444. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -63
  445. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -81
  446. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -198
  447. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -54
  448. package/packages/orq-rc/src/models/operations/deleteconversation.ts +0 -63
  449. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -72
  450. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -63
  451. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -72
  452. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -51
  453. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -63
  454. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -72
  455. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -83
  456. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -63
  457. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -54
  458. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -60
  459. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -3596
  460. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -7042
  461. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1136
  462. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2005
  463. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -7134
  464. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -63
  465. package/packages/orq-rc/src/models/operations/fileget.ts +0 -181
  466. package/packages/orq-rc/src/models/operations/filelist.ts +0 -268
  467. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -258
  468. package/packages/orq-rc/src/models/operations/generateconversationname.ts +0 -319
  469. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -280
  470. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -305
  471. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -325
  472. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -1991
  473. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -2214
  474. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -185
  475. package/packages/orq-rc/src/models/operations/getevals.ts +0 -4268
  476. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -258
  477. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -1070
  478. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1875
  479. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1892
  480. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -274
  481. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
  482. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -276
  483. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -194
  484. package/packages/orq-rc/src/models/operations/index.ts +0 -106
  485. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -957
  486. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1878
  487. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3811
  488. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -395
  489. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -408
  490. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -420
  491. package/packages/orq-rc/src/models/operations/listconversations.ts +0 -151
  492. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -2486
  493. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -334
  494. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -363
  495. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -1048
  496. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -207
  497. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -1989
  498. package/packages/orq-rc/src/models/operations/parse.ts +0 -945
  499. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -146
  500. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3956
  501. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -180
  502. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -262
  503. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2334
  504. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -246
  505. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -231
  506. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -183
  507. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -192
  508. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -234
  509. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -2262
  510. package/packages/orq-rc/src/models/operations/runagent.ts +0 -6502
  511. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -2775
  512. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -838
  513. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -6833
  514. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -9054
  515. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -361
  516. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -280
  517. package/packages/orq-rc/src/models/operations/updateconversation.ts +0 -377
  518. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -4058
  519. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -326
  520. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -288
  521. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -5776
  522. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1925
  523. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -250
  524. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -254
  525. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -375
  526. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5618
  527. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -4114
  528. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  529. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  530. package/packages/orq-rc/src/sdk/contacts.ts +0 -99
  531. package/packages/orq-rc/src/sdk/conversations.ts +0 -125
  532. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  533. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  534. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  535. package/packages/orq-rc/src/sdk/evaluators.ts +0 -45
  536. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  537. package/packages/orq-rc/src/sdk/files.ts +0 -78
  538. package/packages/orq-rc/src/sdk/index.ts +0 -5
  539. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  540. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  541. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  542. package/packages/orq-rc/src/sdk/models.ts +0 -25
  543. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  544. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  545. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  546. package/packages/orq-rc/src/sdk/router.ts +0 -52
  547. package/packages/orq-rc/src/sdk/sdk.ts +0 -109
  548. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  549. package/packages/orq-rc/src/types/async.ts +0 -68
  550. package/packages/orq-rc/src/types/blobs.ts +0 -32
  551. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  552. package/packages/orq-rc/src/types/enums.ts +0 -45
  553. package/packages/orq-rc/src/types/fp.ts +0 -50
  554. package/packages/orq-rc/src/types/index.ts +0 -11
  555. package/packages/orq-rc/src/types/operations.ts +0 -105
  556. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  557. package/packages/orq-rc/src/types/streams.ts +0 -21
  558. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  559. package/packages/orq-rc/tsconfig.json +0 -40
@@ -1,1399 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
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
- import {
12
- DataPart,
13
- DataPart$inboundSchema,
14
- DataPart$Outbound,
15
- DataPart$outboundSchema,
16
- } from "./datapart.js";
17
- import {
18
- FilePart,
19
- FilePart$inboundSchema,
20
- FilePart$Outbound,
21
- FilePart$outboundSchema,
22
- } from "./filepart.js";
23
- import {
24
- TextPart,
25
- TextPart$inboundSchema,
26
- TextPart$Outbound,
27
- TextPart$outboundSchema,
28
- } from "./textpart.js";
29
- import {
30
- ToolCallPart,
31
- ToolCallPart$inboundSchema,
32
- ToolCallPart$Outbound,
33
- ToolCallPart$outboundSchema,
34
- } from "./toolcallpart.js";
35
- import {
36
- ToolResultPart,
37
- ToolResultPart$inboundSchema,
38
- ToolResultPart$Outbound,
39
- ToolResultPart$outboundSchema,
40
- } from "./toolresultpart.js";
41
-
42
- export const AgentThoughtStreamingEventRole = {
43
- User: "user",
44
- Agent: "agent",
45
- Tool: "tool",
46
- System: "system",
47
- } as const;
48
- export type AgentThoughtStreamingEventRole = ClosedEnum<
49
- typeof AgentThoughtStreamingEventRole
50
- >;
51
-
52
- export type AgentThoughtStreamingEventParts =
53
- | TextPart
54
- | DataPart
55
- | FilePart
56
- | ToolCallPart
57
- | ToolResultPart;
58
-
59
- export type MessageDifference = {
60
- messageId: string;
61
- role: AgentThoughtStreamingEventRole;
62
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
63
- metadata?: { [k: string]: any } | undefined;
64
- agentId: string;
65
- agentExecutionId: string;
66
- workspaceId: string;
67
- };
68
-
69
- /**
70
- * The reason the model stopped generating tokens.
71
- */
72
- export const AgentThoughtStreamingEventFinishReason = {
73
- Stop: "stop",
74
- Length: "length",
75
- ToolCalls: "tool_calls",
76
- ContentFilter: "content_filter",
77
- FunctionCall: "function_call",
78
- } as const;
79
- /**
80
- * The reason the model stopped generating tokens.
81
- */
82
- export type AgentThoughtStreamingEventFinishReason = ClosedEnum<
83
- typeof AgentThoughtStreamingEventFinishReason
84
- >;
85
-
86
- export const AgentThoughtStreamingEventDataType = {
87
- Function: "function",
88
- } as const;
89
- export type AgentThoughtStreamingEventDataType = ClosedEnum<
90
- typeof AgentThoughtStreamingEventDataType
91
- >;
92
-
93
- export type AgentThoughtStreamingEventFunction = {
94
- /**
95
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
96
- */
97
- name?: string | undefined;
98
- /**
99
- * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
100
- */
101
- arguments?: string | undefined;
102
- };
103
-
104
- export type AgentThoughtStreamingEventToolCalls = {
105
- index?: number | undefined;
106
- id?: string | undefined;
107
- type?: AgentThoughtStreamingEventDataType | undefined;
108
- function?: AgentThoughtStreamingEventFunction | undefined;
109
- /**
110
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
111
- */
112
- thoughtSignature?: string | undefined;
113
- };
114
-
115
- export const AgentThoughtStreamingEventDataRole = {
116
- Assistant: "assistant",
117
- } as const;
118
- export type AgentThoughtStreamingEventDataRole = ClosedEnum<
119
- typeof AgentThoughtStreamingEventDataRole
120
- >;
121
-
122
- /**
123
- * If the audio output modality is requested, this object contains data about the audio response from the model.
124
- */
125
- export type AgentThoughtStreamingEventAudio = {
126
- id: string;
127
- expiresAt: number;
128
- data: string;
129
- transcript: string;
130
- };
131
-
132
- /**
133
- * A chat completion message generated by the model.
134
- */
135
- export type AgentThoughtStreamingEventMessage = {
136
- content?: string | null | undefined;
137
- refusal?: string | null | undefined;
138
- toolCalls?: Array<AgentThoughtStreamingEventToolCalls> | undefined;
139
- role?: AgentThoughtStreamingEventDataRole | undefined;
140
- /**
141
- * Internal thought process of the model
142
- */
143
- reasoning?: string | null | undefined;
144
- /**
145
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
146
- */
147
- reasoningSignature?: string | null | undefined;
148
- /**
149
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
150
- */
151
- redactedReasoning?: string | undefined;
152
- /**
153
- * If the audio output modality is requested, this object contains data about the audio response from the model.
154
- */
155
- audio?: AgentThoughtStreamingEventAudio | null | undefined;
156
- };
157
-
158
- export type TopLogprobs = {
159
- /**
160
- * The token.
161
- */
162
- token: string;
163
- /**
164
- * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
165
- */
166
- logprob: number;
167
- /**
168
- * A list of integers representing the UTF-8 bytes representation of the token.
169
- */
170
- bytes: Array<number> | null;
171
- };
172
-
173
- export type AgentThoughtStreamingEventContent = {
174
- /**
175
- * The token.
176
- */
177
- token: string;
178
- /**
179
- * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
180
- */
181
- logprob: number;
182
- /**
183
- * A list of integers representing the UTF-8 bytes representation of the token.
184
- */
185
- bytes: Array<number> | null;
186
- /**
187
- * List of the most likely tokens and their log probability, at this token position.
188
- */
189
- topLogprobs: Array<TopLogprobs>;
190
- };
191
-
192
- export type AgentThoughtStreamingEventTopLogprobs = {
193
- /**
194
- * The token.
195
- */
196
- token: string;
197
- /**
198
- * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
199
- */
200
- logprob: number;
201
- /**
202
- * A list of integers representing the UTF-8 bytes representation of the token.
203
- */
204
- bytes: Array<number> | null;
205
- };
206
-
207
- export type Refusal = {
208
- /**
209
- * The token.
210
- */
211
- token: string;
212
- /**
213
- * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
214
- */
215
- logprob: number;
216
- /**
217
- * A list of integers representing the UTF-8 bytes representation of the token.
218
- */
219
- bytes: Array<number> | null;
220
- /**
221
- * List of the most likely tokens and their log probability, at this token position.
222
- */
223
- topLogprobs: Array<AgentThoughtStreamingEventTopLogprobs>;
224
- };
225
-
226
- /**
227
- * Log probability information for the choice.
228
- */
229
- export type Logprobs = {
230
- /**
231
- * A list of message content tokens with log probability information.
232
- */
233
- content: Array<AgentThoughtStreamingEventContent> | null;
234
- /**
235
- * A list of message refusal tokens with log probability information.
236
- */
237
- refusal: Array<Refusal> | null;
238
- };
239
-
240
- export type Choice = {
241
- /**
242
- * The reason the model stopped generating tokens.
243
- */
244
- finishReason: AgentThoughtStreamingEventFinishReason | null;
245
- /**
246
- * The index of the choice in the list of choices.
247
- */
248
- index?: number | undefined;
249
- /**
250
- * A chat completion message generated by the model.
251
- */
252
- message: AgentThoughtStreamingEventMessage;
253
- /**
254
- * Log probability information for the choice.
255
- */
256
- logprobs?: Logprobs | null | undefined;
257
- };
258
-
259
- export type AgentThoughtStreamingEventPromptTokensDetails = {
260
- cachedTokens?: number | null | undefined;
261
- cacheCreationTokens?: number | null | undefined;
262
- /**
263
- * The number of audio input tokens consumed by the request.
264
- */
265
- audioTokens?: number | null | undefined;
266
- };
267
-
268
- export type AgentThoughtStreamingEventCompletionTokensDetails = {
269
- reasoningTokens?: number | null | undefined;
270
- acceptedPredictionTokens?: number | null | undefined;
271
- rejectedPredictionTokens?: number | null | undefined;
272
- /**
273
- * The number of audio output tokens produced by the response.
274
- */
275
- audioTokens?: number | null | undefined;
276
- };
277
-
278
- /**
279
- * Usage statistics for the completion request.
280
- */
281
- export type AgentThoughtStreamingEventUsage = {
282
- /**
283
- * Number of tokens in the generated completion.
284
- */
285
- completionTokens?: number | undefined;
286
- /**
287
- * Number of tokens in the prompt.
288
- */
289
- promptTokens?: number | undefined;
290
- /**
291
- * Total number of tokens used in the request (prompt + completion).
292
- */
293
- totalTokens?: number | undefined;
294
- promptTokensDetails?:
295
- | AgentThoughtStreamingEventPromptTokensDetails
296
- | null
297
- | undefined;
298
- completionTokensDetails?:
299
- | AgentThoughtStreamingEventCompletionTokensDetails
300
- | null
301
- | undefined;
302
- };
303
-
304
- export type AgentThoughtStreamingEventData = {
305
- agentId: string;
306
- messageDifference: { [k: string]: MessageDifference };
307
- choice?: Choice | undefined;
308
- choiceIndex?: number | undefined;
309
- iteration: number;
310
- accumulatedExecutionTime: number;
311
- responseId?: string | undefined;
312
- /**
313
- * Usage statistics for the completion request.
314
- */
315
- usage?: AgentThoughtStreamingEventUsage | undefined;
316
- };
317
-
318
- /**
319
- * Emitted during agent reasoning. Contains the incremental message changes, model choices, iteration count, and token usage for this processing step.
320
- */
321
- export type AgentThoughtStreamingEvent = {
322
- type: "event.agents.thought";
323
- /**
324
- * ISO timestamp of the event
325
- */
326
- timestamp: string;
327
- data: AgentThoughtStreamingEventData;
328
- };
329
-
330
- /** @internal */
331
- export const AgentThoughtStreamingEventRole$inboundSchema: z.ZodNativeEnum<
332
- typeof AgentThoughtStreamingEventRole
333
- > = z.nativeEnum(AgentThoughtStreamingEventRole);
334
- /** @internal */
335
- export const AgentThoughtStreamingEventRole$outboundSchema: z.ZodNativeEnum<
336
- typeof AgentThoughtStreamingEventRole
337
- > = AgentThoughtStreamingEventRole$inboundSchema;
338
-
339
- /** @internal */
340
- export const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<
341
- AgentThoughtStreamingEventParts,
342
- z.ZodTypeDef,
343
- unknown
344
- > = z.union([
345
- TextPart$inboundSchema,
346
- DataPart$inboundSchema,
347
- FilePart$inboundSchema,
348
- ToolCallPart$inboundSchema,
349
- ToolResultPart$inboundSchema,
350
- ]);
351
- /** @internal */
352
- export type AgentThoughtStreamingEventParts$Outbound =
353
- | TextPart$Outbound
354
- | DataPart$Outbound
355
- | FilePart$Outbound
356
- | ToolCallPart$Outbound
357
- | ToolResultPart$Outbound;
358
-
359
- /** @internal */
360
- export const AgentThoughtStreamingEventParts$outboundSchema: z.ZodType<
361
- AgentThoughtStreamingEventParts$Outbound,
362
- z.ZodTypeDef,
363
- AgentThoughtStreamingEventParts
364
- > = z.union([
365
- TextPart$outboundSchema,
366
- DataPart$outboundSchema,
367
- FilePart$outboundSchema,
368
- ToolCallPart$outboundSchema,
369
- ToolResultPart$outboundSchema,
370
- ]);
371
-
372
- export function agentThoughtStreamingEventPartsToJSON(
373
- agentThoughtStreamingEventParts: AgentThoughtStreamingEventParts,
374
- ): string {
375
- return JSON.stringify(
376
- AgentThoughtStreamingEventParts$outboundSchema.parse(
377
- agentThoughtStreamingEventParts,
378
- ),
379
- );
380
- }
381
- export function agentThoughtStreamingEventPartsFromJSON(
382
- jsonString: string,
383
- ): SafeParseResult<AgentThoughtStreamingEventParts, SDKValidationError> {
384
- return safeParse(
385
- jsonString,
386
- (x) => AgentThoughtStreamingEventParts$inboundSchema.parse(JSON.parse(x)),
387
- `Failed to parse 'AgentThoughtStreamingEventParts' from JSON`,
388
- );
389
- }
390
-
391
- /** @internal */
392
- export const MessageDifference$inboundSchema: z.ZodType<
393
- MessageDifference,
394
- z.ZodTypeDef,
395
- unknown
396
- > = z.object({
397
- messageId: z.string(),
398
- role: AgentThoughtStreamingEventRole$inboundSchema,
399
- parts: z.array(
400
- z.union([
401
- TextPart$inboundSchema,
402
- DataPart$inboundSchema,
403
- FilePart$inboundSchema,
404
- ToolCallPart$inboundSchema,
405
- ToolResultPart$inboundSchema,
406
- ]),
407
- ),
408
- metadata: z.record(z.any()).optional(),
409
- agent_id: z.string(),
410
- agent_execution_id: z.string(),
411
- workspace_id: z.string(),
412
- }).transform((v) => {
413
- return remap$(v, {
414
- "agent_id": "agentId",
415
- "agent_execution_id": "agentExecutionId",
416
- "workspace_id": "workspaceId",
417
- });
418
- });
419
- /** @internal */
420
- export type MessageDifference$Outbound = {
421
- messageId: string;
422
- role: string;
423
- parts: Array<
424
- | TextPart$Outbound
425
- | DataPart$Outbound
426
- | FilePart$Outbound
427
- | ToolCallPart$Outbound
428
- | ToolResultPart$Outbound
429
- >;
430
- metadata?: { [k: string]: any } | undefined;
431
- agent_id: string;
432
- agent_execution_id: string;
433
- workspace_id: string;
434
- };
435
-
436
- /** @internal */
437
- export const MessageDifference$outboundSchema: z.ZodType<
438
- MessageDifference$Outbound,
439
- z.ZodTypeDef,
440
- MessageDifference
441
- > = z.object({
442
- messageId: z.string(),
443
- role: AgentThoughtStreamingEventRole$outboundSchema,
444
- parts: z.array(
445
- z.union([
446
- TextPart$outboundSchema,
447
- DataPart$outboundSchema,
448
- FilePart$outboundSchema,
449
- ToolCallPart$outboundSchema,
450
- ToolResultPart$outboundSchema,
451
- ]),
452
- ),
453
- metadata: z.record(z.any()).optional(),
454
- agentId: z.string(),
455
- agentExecutionId: z.string(),
456
- workspaceId: z.string(),
457
- }).transform((v) => {
458
- return remap$(v, {
459
- agentId: "agent_id",
460
- agentExecutionId: "agent_execution_id",
461
- workspaceId: "workspace_id",
462
- });
463
- });
464
-
465
- export function messageDifferenceToJSON(
466
- messageDifference: MessageDifference,
467
- ): string {
468
- return JSON.stringify(
469
- MessageDifference$outboundSchema.parse(messageDifference),
470
- );
471
- }
472
- export function messageDifferenceFromJSON(
473
- jsonString: string,
474
- ): SafeParseResult<MessageDifference, SDKValidationError> {
475
- return safeParse(
476
- jsonString,
477
- (x) => MessageDifference$inboundSchema.parse(JSON.parse(x)),
478
- `Failed to parse 'MessageDifference' from JSON`,
479
- );
480
- }
481
-
482
- /** @internal */
483
- export const AgentThoughtStreamingEventFinishReason$inboundSchema:
484
- z.ZodNativeEnum<typeof AgentThoughtStreamingEventFinishReason> = z.nativeEnum(
485
- AgentThoughtStreamingEventFinishReason,
486
- );
487
- /** @internal */
488
- export const AgentThoughtStreamingEventFinishReason$outboundSchema:
489
- z.ZodNativeEnum<typeof AgentThoughtStreamingEventFinishReason> =
490
- AgentThoughtStreamingEventFinishReason$inboundSchema;
491
-
492
- /** @internal */
493
- export const AgentThoughtStreamingEventDataType$inboundSchema: z.ZodNativeEnum<
494
- typeof AgentThoughtStreamingEventDataType
495
- > = z.nativeEnum(AgentThoughtStreamingEventDataType);
496
- /** @internal */
497
- export const AgentThoughtStreamingEventDataType$outboundSchema: z.ZodNativeEnum<
498
- typeof AgentThoughtStreamingEventDataType
499
- > = AgentThoughtStreamingEventDataType$inboundSchema;
500
-
501
- /** @internal */
502
- export const AgentThoughtStreamingEventFunction$inboundSchema: z.ZodType<
503
- AgentThoughtStreamingEventFunction,
504
- z.ZodTypeDef,
505
- unknown
506
- > = z.object({
507
- name: z.string().optional(),
508
- arguments: z.string().optional(),
509
- });
510
- /** @internal */
511
- export type AgentThoughtStreamingEventFunction$Outbound = {
512
- name?: string | undefined;
513
- arguments?: string | undefined;
514
- };
515
-
516
- /** @internal */
517
- export const AgentThoughtStreamingEventFunction$outboundSchema: z.ZodType<
518
- AgentThoughtStreamingEventFunction$Outbound,
519
- z.ZodTypeDef,
520
- AgentThoughtStreamingEventFunction
521
- > = z.object({
522
- name: z.string().optional(),
523
- arguments: z.string().optional(),
524
- });
525
-
526
- export function agentThoughtStreamingEventFunctionToJSON(
527
- agentThoughtStreamingEventFunction: AgentThoughtStreamingEventFunction,
528
- ): string {
529
- return JSON.stringify(
530
- AgentThoughtStreamingEventFunction$outboundSchema.parse(
531
- agentThoughtStreamingEventFunction,
532
- ),
533
- );
534
- }
535
- export function agentThoughtStreamingEventFunctionFromJSON(
536
- jsonString: string,
537
- ): SafeParseResult<AgentThoughtStreamingEventFunction, SDKValidationError> {
538
- return safeParse(
539
- jsonString,
540
- (x) =>
541
- AgentThoughtStreamingEventFunction$inboundSchema.parse(JSON.parse(x)),
542
- `Failed to parse 'AgentThoughtStreamingEventFunction' from JSON`,
543
- );
544
- }
545
-
546
- /** @internal */
547
- export const AgentThoughtStreamingEventToolCalls$inboundSchema: z.ZodType<
548
- AgentThoughtStreamingEventToolCalls,
549
- z.ZodTypeDef,
550
- unknown
551
- > = z.object({
552
- index: z.number().optional(),
553
- id: z.string().optional(),
554
- type: AgentThoughtStreamingEventDataType$inboundSchema.optional(),
555
- function: z.lazy(() => AgentThoughtStreamingEventFunction$inboundSchema)
556
- .optional(),
557
- thought_signature: z.string().optional(),
558
- }).transform((v) => {
559
- return remap$(v, {
560
- "thought_signature": "thoughtSignature",
561
- });
562
- });
563
- /** @internal */
564
- export type AgentThoughtStreamingEventToolCalls$Outbound = {
565
- index?: number | undefined;
566
- id?: string | undefined;
567
- type?: string | undefined;
568
- function?: AgentThoughtStreamingEventFunction$Outbound | undefined;
569
- thought_signature?: string | undefined;
570
- };
571
-
572
- /** @internal */
573
- export const AgentThoughtStreamingEventToolCalls$outboundSchema: z.ZodType<
574
- AgentThoughtStreamingEventToolCalls$Outbound,
575
- z.ZodTypeDef,
576
- AgentThoughtStreamingEventToolCalls
577
- > = z.object({
578
- index: z.number().optional(),
579
- id: z.string().optional(),
580
- type: AgentThoughtStreamingEventDataType$outboundSchema.optional(),
581
- function: z.lazy(() => AgentThoughtStreamingEventFunction$outboundSchema)
582
- .optional(),
583
- thoughtSignature: z.string().optional(),
584
- }).transform((v) => {
585
- return remap$(v, {
586
- thoughtSignature: "thought_signature",
587
- });
588
- });
589
-
590
- export function agentThoughtStreamingEventToolCallsToJSON(
591
- agentThoughtStreamingEventToolCalls: AgentThoughtStreamingEventToolCalls,
592
- ): string {
593
- return JSON.stringify(
594
- AgentThoughtStreamingEventToolCalls$outboundSchema.parse(
595
- agentThoughtStreamingEventToolCalls,
596
- ),
597
- );
598
- }
599
- export function agentThoughtStreamingEventToolCallsFromJSON(
600
- jsonString: string,
601
- ): SafeParseResult<AgentThoughtStreamingEventToolCalls, SDKValidationError> {
602
- return safeParse(
603
- jsonString,
604
- (x) =>
605
- AgentThoughtStreamingEventToolCalls$inboundSchema.parse(JSON.parse(x)),
606
- `Failed to parse 'AgentThoughtStreamingEventToolCalls' from JSON`,
607
- );
608
- }
609
-
610
- /** @internal */
611
- export const AgentThoughtStreamingEventDataRole$inboundSchema: z.ZodNativeEnum<
612
- typeof AgentThoughtStreamingEventDataRole
613
- > = z.nativeEnum(AgentThoughtStreamingEventDataRole);
614
- /** @internal */
615
- export const AgentThoughtStreamingEventDataRole$outboundSchema: z.ZodNativeEnum<
616
- typeof AgentThoughtStreamingEventDataRole
617
- > = AgentThoughtStreamingEventDataRole$inboundSchema;
618
-
619
- /** @internal */
620
- export const AgentThoughtStreamingEventAudio$inboundSchema: z.ZodType<
621
- AgentThoughtStreamingEventAudio,
622
- z.ZodTypeDef,
623
- unknown
624
- > = z.object({
625
- id: z.string(),
626
- expires_at: z.number().int(),
627
- data: z.string(),
628
- transcript: z.string(),
629
- }).transform((v) => {
630
- return remap$(v, {
631
- "expires_at": "expiresAt",
632
- });
633
- });
634
- /** @internal */
635
- export type AgentThoughtStreamingEventAudio$Outbound = {
636
- id: string;
637
- expires_at: number;
638
- data: string;
639
- transcript: string;
640
- };
641
-
642
- /** @internal */
643
- export const AgentThoughtStreamingEventAudio$outboundSchema: z.ZodType<
644
- AgentThoughtStreamingEventAudio$Outbound,
645
- z.ZodTypeDef,
646
- AgentThoughtStreamingEventAudio
647
- > = z.object({
648
- id: z.string(),
649
- expiresAt: z.number().int(),
650
- data: z.string(),
651
- transcript: z.string(),
652
- }).transform((v) => {
653
- return remap$(v, {
654
- expiresAt: "expires_at",
655
- });
656
- });
657
-
658
- export function agentThoughtStreamingEventAudioToJSON(
659
- agentThoughtStreamingEventAudio: AgentThoughtStreamingEventAudio,
660
- ): string {
661
- return JSON.stringify(
662
- AgentThoughtStreamingEventAudio$outboundSchema.parse(
663
- agentThoughtStreamingEventAudio,
664
- ),
665
- );
666
- }
667
- export function agentThoughtStreamingEventAudioFromJSON(
668
- jsonString: string,
669
- ): SafeParseResult<AgentThoughtStreamingEventAudio, SDKValidationError> {
670
- return safeParse(
671
- jsonString,
672
- (x) => AgentThoughtStreamingEventAudio$inboundSchema.parse(JSON.parse(x)),
673
- `Failed to parse 'AgentThoughtStreamingEventAudio' from JSON`,
674
- );
675
- }
676
-
677
- /** @internal */
678
- export const AgentThoughtStreamingEventMessage$inboundSchema: z.ZodType<
679
- AgentThoughtStreamingEventMessage,
680
- z.ZodTypeDef,
681
- unknown
682
- > = z.object({
683
- content: z.nullable(z.string()).optional(),
684
- refusal: z.nullable(z.string()).optional(),
685
- tool_calls: z.array(
686
- z.lazy(() => AgentThoughtStreamingEventToolCalls$inboundSchema),
687
- ).optional(),
688
- role: AgentThoughtStreamingEventDataRole$inboundSchema.optional(),
689
- reasoning: z.nullable(z.string()).optional(),
690
- reasoning_signature: z.nullable(z.string()).optional(),
691
- redacted_reasoning: z.string().optional(),
692
- audio: z.nullable(z.lazy(() => AgentThoughtStreamingEventAudio$inboundSchema))
693
- .optional(),
694
- }).transform((v) => {
695
- return remap$(v, {
696
- "tool_calls": "toolCalls",
697
- "reasoning_signature": "reasoningSignature",
698
- "redacted_reasoning": "redactedReasoning",
699
- });
700
- });
701
- /** @internal */
702
- export type AgentThoughtStreamingEventMessage$Outbound = {
703
- content?: string | null | undefined;
704
- refusal?: string | null | undefined;
705
- tool_calls?: Array<AgentThoughtStreamingEventToolCalls$Outbound> | undefined;
706
- role?: string | undefined;
707
- reasoning?: string | null | undefined;
708
- reasoning_signature?: string | null | undefined;
709
- redacted_reasoning?: string | undefined;
710
- audio?: AgentThoughtStreamingEventAudio$Outbound | null | undefined;
711
- };
712
-
713
- /** @internal */
714
- export const AgentThoughtStreamingEventMessage$outboundSchema: z.ZodType<
715
- AgentThoughtStreamingEventMessage$Outbound,
716
- z.ZodTypeDef,
717
- AgentThoughtStreamingEventMessage
718
- > = z.object({
719
- content: z.nullable(z.string()).optional(),
720
- refusal: z.nullable(z.string()).optional(),
721
- toolCalls: z.array(
722
- z.lazy(() => AgentThoughtStreamingEventToolCalls$outboundSchema),
723
- ).optional(),
724
- role: AgentThoughtStreamingEventDataRole$outboundSchema.optional(),
725
- reasoning: z.nullable(z.string()).optional(),
726
- reasoningSignature: z.nullable(z.string()).optional(),
727
- redactedReasoning: z.string().optional(),
728
- audio: z.nullable(
729
- z.lazy(() => AgentThoughtStreamingEventAudio$outboundSchema),
730
- ).optional(),
731
- }).transform((v) => {
732
- return remap$(v, {
733
- toolCalls: "tool_calls",
734
- reasoningSignature: "reasoning_signature",
735
- redactedReasoning: "redacted_reasoning",
736
- });
737
- });
738
-
739
- export function agentThoughtStreamingEventMessageToJSON(
740
- agentThoughtStreamingEventMessage: AgentThoughtStreamingEventMessage,
741
- ): string {
742
- return JSON.stringify(
743
- AgentThoughtStreamingEventMessage$outboundSchema.parse(
744
- agentThoughtStreamingEventMessage,
745
- ),
746
- );
747
- }
748
- export function agentThoughtStreamingEventMessageFromJSON(
749
- jsonString: string,
750
- ): SafeParseResult<AgentThoughtStreamingEventMessage, SDKValidationError> {
751
- return safeParse(
752
- jsonString,
753
- (x) => AgentThoughtStreamingEventMessage$inboundSchema.parse(JSON.parse(x)),
754
- `Failed to parse 'AgentThoughtStreamingEventMessage' from JSON`,
755
- );
756
- }
757
-
758
- /** @internal */
759
- export const TopLogprobs$inboundSchema: z.ZodType<
760
- TopLogprobs,
761
- z.ZodTypeDef,
762
- unknown
763
- > = z.object({
764
- token: z.string(),
765
- logprob: z.number(),
766
- bytes: z.nullable(z.array(z.number())),
767
- });
768
- /** @internal */
769
- export type TopLogprobs$Outbound = {
770
- token: string;
771
- logprob: number;
772
- bytes: Array<number> | null;
773
- };
774
-
775
- /** @internal */
776
- export const TopLogprobs$outboundSchema: z.ZodType<
777
- TopLogprobs$Outbound,
778
- z.ZodTypeDef,
779
- TopLogprobs
780
- > = z.object({
781
- token: z.string(),
782
- logprob: z.number(),
783
- bytes: z.nullable(z.array(z.number())),
784
- });
785
-
786
- export function topLogprobsToJSON(topLogprobs: TopLogprobs): string {
787
- return JSON.stringify(TopLogprobs$outboundSchema.parse(topLogprobs));
788
- }
789
- export function topLogprobsFromJSON(
790
- jsonString: string,
791
- ): SafeParseResult<TopLogprobs, SDKValidationError> {
792
- return safeParse(
793
- jsonString,
794
- (x) => TopLogprobs$inboundSchema.parse(JSON.parse(x)),
795
- `Failed to parse 'TopLogprobs' from JSON`,
796
- );
797
- }
798
-
799
- /** @internal */
800
- export const AgentThoughtStreamingEventContent$inboundSchema: z.ZodType<
801
- AgentThoughtStreamingEventContent,
802
- z.ZodTypeDef,
803
- unknown
804
- > = z.object({
805
- token: z.string(),
806
- logprob: z.number(),
807
- bytes: z.nullable(z.array(z.number())),
808
- top_logprobs: z.array(z.lazy(() => TopLogprobs$inboundSchema)),
809
- }).transform((v) => {
810
- return remap$(v, {
811
- "top_logprobs": "topLogprobs",
812
- });
813
- });
814
- /** @internal */
815
- export type AgentThoughtStreamingEventContent$Outbound = {
816
- token: string;
817
- logprob: number;
818
- bytes: Array<number> | null;
819
- top_logprobs: Array<TopLogprobs$Outbound>;
820
- };
821
-
822
- /** @internal */
823
- export const AgentThoughtStreamingEventContent$outboundSchema: z.ZodType<
824
- AgentThoughtStreamingEventContent$Outbound,
825
- z.ZodTypeDef,
826
- AgentThoughtStreamingEventContent
827
- > = z.object({
828
- token: z.string(),
829
- logprob: z.number(),
830
- bytes: z.nullable(z.array(z.number())),
831
- topLogprobs: z.array(z.lazy(() => TopLogprobs$outboundSchema)),
832
- }).transform((v) => {
833
- return remap$(v, {
834
- topLogprobs: "top_logprobs",
835
- });
836
- });
837
-
838
- export function agentThoughtStreamingEventContentToJSON(
839
- agentThoughtStreamingEventContent: AgentThoughtStreamingEventContent,
840
- ): string {
841
- return JSON.stringify(
842
- AgentThoughtStreamingEventContent$outboundSchema.parse(
843
- agentThoughtStreamingEventContent,
844
- ),
845
- );
846
- }
847
- export function agentThoughtStreamingEventContentFromJSON(
848
- jsonString: string,
849
- ): SafeParseResult<AgentThoughtStreamingEventContent, SDKValidationError> {
850
- return safeParse(
851
- jsonString,
852
- (x) => AgentThoughtStreamingEventContent$inboundSchema.parse(JSON.parse(x)),
853
- `Failed to parse 'AgentThoughtStreamingEventContent' from JSON`,
854
- );
855
- }
856
-
857
- /** @internal */
858
- export const AgentThoughtStreamingEventTopLogprobs$inboundSchema: z.ZodType<
859
- AgentThoughtStreamingEventTopLogprobs,
860
- z.ZodTypeDef,
861
- unknown
862
- > = z.object({
863
- token: z.string(),
864
- logprob: z.number(),
865
- bytes: z.nullable(z.array(z.number())),
866
- });
867
- /** @internal */
868
- export type AgentThoughtStreamingEventTopLogprobs$Outbound = {
869
- token: string;
870
- logprob: number;
871
- bytes: Array<number> | null;
872
- };
873
-
874
- /** @internal */
875
- export const AgentThoughtStreamingEventTopLogprobs$outboundSchema: z.ZodType<
876
- AgentThoughtStreamingEventTopLogprobs$Outbound,
877
- z.ZodTypeDef,
878
- AgentThoughtStreamingEventTopLogprobs
879
- > = z.object({
880
- token: z.string(),
881
- logprob: z.number(),
882
- bytes: z.nullable(z.array(z.number())),
883
- });
884
-
885
- export function agentThoughtStreamingEventTopLogprobsToJSON(
886
- agentThoughtStreamingEventTopLogprobs: AgentThoughtStreamingEventTopLogprobs,
887
- ): string {
888
- return JSON.stringify(
889
- AgentThoughtStreamingEventTopLogprobs$outboundSchema.parse(
890
- agentThoughtStreamingEventTopLogprobs,
891
- ),
892
- );
893
- }
894
- export function agentThoughtStreamingEventTopLogprobsFromJSON(
895
- jsonString: string,
896
- ): SafeParseResult<AgentThoughtStreamingEventTopLogprobs, SDKValidationError> {
897
- return safeParse(
898
- jsonString,
899
- (x) =>
900
- AgentThoughtStreamingEventTopLogprobs$inboundSchema.parse(JSON.parse(x)),
901
- `Failed to parse 'AgentThoughtStreamingEventTopLogprobs' from JSON`,
902
- );
903
- }
904
-
905
- /** @internal */
906
- export const Refusal$inboundSchema: z.ZodType<Refusal, z.ZodTypeDef, unknown> =
907
- z.object({
908
- token: z.string(),
909
- logprob: z.number(),
910
- bytes: z.nullable(z.array(z.number())),
911
- top_logprobs: z.array(
912
- z.lazy(() => AgentThoughtStreamingEventTopLogprobs$inboundSchema),
913
- ),
914
- }).transform((v) => {
915
- return remap$(v, {
916
- "top_logprobs": "topLogprobs",
917
- });
918
- });
919
- /** @internal */
920
- export type Refusal$Outbound = {
921
- token: string;
922
- logprob: number;
923
- bytes: Array<number> | null;
924
- top_logprobs: Array<AgentThoughtStreamingEventTopLogprobs$Outbound>;
925
- };
926
-
927
- /** @internal */
928
- export const Refusal$outboundSchema: z.ZodType<
929
- Refusal$Outbound,
930
- z.ZodTypeDef,
931
- Refusal
932
- > = z.object({
933
- token: z.string(),
934
- logprob: z.number(),
935
- bytes: z.nullable(z.array(z.number())),
936
- topLogprobs: z.array(
937
- z.lazy(() => AgentThoughtStreamingEventTopLogprobs$outboundSchema),
938
- ),
939
- }).transform((v) => {
940
- return remap$(v, {
941
- topLogprobs: "top_logprobs",
942
- });
943
- });
944
-
945
- export function refusalToJSON(refusal: Refusal): string {
946
- return JSON.stringify(Refusal$outboundSchema.parse(refusal));
947
- }
948
- export function refusalFromJSON(
949
- jsonString: string,
950
- ): SafeParseResult<Refusal, SDKValidationError> {
951
- return safeParse(
952
- jsonString,
953
- (x) => Refusal$inboundSchema.parse(JSON.parse(x)),
954
- `Failed to parse 'Refusal' from JSON`,
955
- );
956
- }
957
-
958
- /** @internal */
959
- export const Logprobs$inboundSchema: z.ZodType<
960
- Logprobs,
961
- z.ZodTypeDef,
962
- unknown
963
- > = z.object({
964
- content: z.nullable(
965
- z.array(z.lazy(() => AgentThoughtStreamingEventContent$inboundSchema)),
966
- ),
967
- refusal: z.nullable(z.array(z.lazy(() => Refusal$inboundSchema))),
968
- });
969
- /** @internal */
970
- export type Logprobs$Outbound = {
971
- content: Array<AgentThoughtStreamingEventContent$Outbound> | null;
972
- refusal: Array<Refusal$Outbound> | null;
973
- };
974
-
975
- /** @internal */
976
- export const Logprobs$outboundSchema: z.ZodType<
977
- Logprobs$Outbound,
978
- z.ZodTypeDef,
979
- Logprobs
980
- > = z.object({
981
- content: z.nullable(
982
- z.array(z.lazy(() => AgentThoughtStreamingEventContent$outboundSchema)),
983
- ),
984
- refusal: z.nullable(z.array(z.lazy(() => Refusal$outboundSchema))),
985
- });
986
-
987
- export function logprobsToJSON(logprobs: Logprobs): string {
988
- return JSON.stringify(Logprobs$outboundSchema.parse(logprobs));
989
- }
990
- export function logprobsFromJSON(
991
- jsonString: string,
992
- ): SafeParseResult<Logprobs, SDKValidationError> {
993
- return safeParse(
994
- jsonString,
995
- (x) => Logprobs$inboundSchema.parse(JSON.parse(x)),
996
- `Failed to parse 'Logprobs' from JSON`,
997
- );
998
- }
999
-
1000
- /** @internal */
1001
- export const Choice$inboundSchema: z.ZodType<Choice, z.ZodTypeDef, unknown> = z
1002
- .object({
1003
- finish_reason: z.nullable(
1004
- AgentThoughtStreamingEventFinishReason$inboundSchema,
1005
- ),
1006
- index: z.number().default(0),
1007
- message: z.lazy(() => AgentThoughtStreamingEventMessage$inboundSchema),
1008
- logprobs: z.nullable(z.lazy(() => Logprobs$inboundSchema)).optional(),
1009
- }).transform((v) => {
1010
- return remap$(v, {
1011
- "finish_reason": "finishReason",
1012
- });
1013
- });
1014
- /** @internal */
1015
- export type Choice$Outbound = {
1016
- finish_reason: string | null;
1017
- index: number;
1018
- message: AgentThoughtStreamingEventMessage$Outbound;
1019
- logprobs?: Logprobs$Outbound | null | undefined;
1020
- };
1021
-
1022
- /** @internal */
1023
- export const Choice$outboundSchema: z.ZodType<
1024
- Choice$Outbound,
1025
- z.ZodTypeDef,
1026
- Choice
1027
- > = z.object({
1028
- finishReason: z.nullable(
1029
- AgentThoughtStreamingEventFinishReason$outboundSchema,
1030
- ),
1031
- index: z.number().default(0),
1032
- message: z.lazy(() => AgentThoughtStreamingEventMessage$outboundSchema),
1033
- logprobs: z.nullable(z.lazy(() => Logprobs$outboundSchema)).optional(),
1034
- }).transform((v) => {
1035
- return remap$(v, {
1036
- finishReason: "finish_reason",
1037
- });
1038
- });
1039
-
1040
- export function choiceToJSON(choice: Choice): string {
1041
- return JSON.stringify(Choice$outboundSchema.parse(choice));
1042
- }
1043
- export function choiceFromJSON(
1044
- jsonString: string,
1045
- ): SafeParseResult<Choice, SDKValidationError> {
1046
- return safeParse(
1047
- jsonString,
1048
- (x) => Choice$inboundSchema.parse(JSON.parse(x)),
1049
- `Failed to parse 'Choice' from JSON`,
1050
- );
1051
- }
1052
-
1053
- /** @internal */
1054
- export const AgentThoughtStreamingEventPromptTokensDetails$inboundSchema:
1055
- z.ZodType<
1056
- AgentThoughtStreamingEventPromptTokensDetails,
1057
- z.ZodTypeDef,
1058
- unknown
1059
- > = z.object({
1060
- cached_tokens: z.nullable(z.number().int()).optional(),
1061
- cache_creation_tokens: z.nullable(z.number().int()).optional(),
1062
- audio_tokens: z.nullable(z.number().int()).optional(),
1063
- }).transform((v) => {
1064
- return remap$(v, {
1065
- "cached_tokens": "cachedTokens",
1066
- "cache_creation_tokens": "cacheCreationTokens",
1067
- "audio_tokens": "audioTokens",
1068
- });
1069
- });
1070
- /** @internal */
1071
- export type AgentThoughtStreamingEventPromptTokensDetails$Outbound = {
1072
- cached_tokens?: number | null | undefined;
1073
- cache_creation_tokens?: number | null | undefined;
1074
- audio_tokens?: number | null | undefined;
1075
- };
1076
-
1077
- /** @internal */
1078
- export const AgentThoughtStreamingEventPromptTokensDetails$outboundSchema:
1079
- z.ZodType<
1080
- AgentThoughtStreamingEventPromptTokensDetails$Outbound,
1081
- z.ZodTypeDef,
1082
- AgentThoughtStreamingEventPromptTokensDetails
1083
- > = z.object({
1084
- cachedTokens: z.nullable(z.number().int()).optional(),
1085
- cacheCreationTokens: z.nullable(z.number().int()).optional(),
1086
- audioTokens: z.nullable(z.number().int()).optional(),
1087
- }).transform((v) => {
1088
- return remap$(v, {
1089
- cachedTokens: "cached_tokens",
1090
- cacheCreationTokens: "cache_creation_tokens",
1091
- audioTokens: "audio_tokens",
1092
- });
1093
- });
1094
-
1095
- export function agentThoughtStreamingEventPromptTokensDetailsToJSON(
1096
- agentThoughtStreamingEventPromptTokensDetails:
1097
- AgentThoughtStreamingEventPromptTokensDetails,
1098
- ): string {
1099
- return JSON.stringify(
1100
- AgentThoughtStreamingEventPromptTokensDetails$outboundSchema.parse(
1101
- agentThoughtStreamingEventPromptTokensDetails,
1102
- ),
1103
- );
1104
- }
1105
- export function agentThoughtStreamingEventPromptTokensDetailsFromJSON(
1106
- jsonString: string,
1107
- ): SafeParseResult<
1108
- AgentThoughtStreamingEventPromptTokensDetails,
1109
- SDKValidationError
1110
- > {
1111
- return safeParse(
1112
- jsonString,
1113
- (x) =>
1114
- AgentThoughtStreamingEventPromptTokensDetails$inboundSchema.parse(
1115
- JSON.parse(x),
1116
- ),
1117
- `Failed to parse 'AgentThoughtStreamingEventPromptTokensDetails' from JSON`,
1118
- );
1119
- }
1120
-
1121
- /** @internal */
1122
- export const AgentThoughtStreamingEventCompletionTokensDetails$inboundSchema:
1123
- z.ZodType<
1124
- AgentThoughtStreamingEventCompletionTokensDetails,
1125
- z.ZodTypeDef,
1126
- unknown
1127
- > = z.object({
1128
- reasoning_tokens: z.nullable(z.number()).optional(),
1129
- accepted_prediction_tokens: z.nullable(z.number()).optional(),
1130
- rejected_prediction_tokens: z.nullable(z.number()).optional(),
1131
- audio_tokens: z.nullable(z.number().int()).optional(),
1132
- }).transform((v) => {
1133
- return remap$(v, {
1134
- "reasoning_tokens": "reasoningTokens",
1135
- "accepted_prediction_tokens": "acceptedPredictionTokens",
1136
- "rejected_prediction_tokens": "rejectedPredictionTokens",
1137
- "audio_tokens": "audioTokens",
1138
- });
1139
- });
1140
- /** @internal */
1141
- export type AgentThoughtStreamingEventCompletionTokensDetails$Outbound = {
1142
- reasoning_tokens?: number | null | undefined;
1143
- accepted_prediction_tokens?: number | null | undefined;
1144
- rejected_prediction_tokens?: number | null | undefined;
1145
- audio_tokens?: number | null | undefined;
1146
- };
1147
-
1148
- /** @internal */
1149
- export const AgentThoughtStreamingEventCompletionTokensDetails$outboundSchema:
1150
- z.ZodType<
1151
- AgentThoughtStreamingEventCompletionTokensDetails$Outbound,
1152
- z.ZodTypeDef,
1153
- AgentThoughtStreamingEventCompletionTokensDetails
1154
- > = z.object({
1155
- reasoningTokens: z.nullable(z.number()).optional(),
1156
- acceptedPredictionTokens: z.nullable(z.number()).optional(),
1157
- rejectedPredictionTokens: z.nullable(z.number()).optional(),
1158
- audioTokens: z.nullable(z.number().int()).optional(),
1159
- }).transform((v) => {
1160
- return remap$(v, {
1161
- reasoningTokens: "reasoning_tokens",
1162
- acceptedPredictionTokens: "accepted_prediction_tokens",
1163
- rejectedPredictionTokens: "rejected_prediction_tokens",
1164
- audioTokens: "audio_tokens",
1165
- });
1166
- });
1167
-
1168
- export function agentThoughtStreamingEventCompletionTokensDetailsToJSON(
1169
- agentThoughtStreamingEventCompletionTokensDetails:
1170
- AgentThoughtStreamingEventCompletionTokensDetails,
1171
- ): string {
1172
- return JSON.stringify(
1173
- AgentThoughtStreamingEventCompletionTokensDetails$outboundSchema.parse(
1174
- agentThoughtStreamingEventCompletionTokensDetails,
1175
- ),
1176
- );
1177
- }
1178
- export function agentThoughtStreamingEventCompletionTokensDetailsFromJSON(
1179
- jsonString: string,
1180
- ): SafeParseResult<
1181
- AgentThoughtStreamingEventCompletionTokensDetails,
1182
- SDKValidationError
1183
- > {
1184
- return safeParse(
1185
- jsonString,
1186
- (x) =>
1187
- AgentThoughtStreamingEventCompletionTokensDetails$inboundSchema.parse(
1188
- JSON.parse(x),
1189
- ),
1190
- `Failed to parse 'AgentThoughtStreamingEventCompletionTokensDetails' from JSON`,
1191
- );
1192
- }
1193
-
1194
- /** @internal */
1195
- export const AgentThoughtStreamingEventUsage$inboundSchema: z.ZodType<
1196
- AgentThoughtStreamingEventUsage,
1197
- z.ZodTypeDef,
1198
- unknown
1199
- > = z.object({
1200
- completion_tokens: z.number().optional(),
1201
- prompt_tokens: z.number().optional(),
1202
- total_tokens: z.number().optional(),
1203
- prompt_tokens_details: z.nullable(
1204
- z.lazy(() => AgentThoughtStreamingEventPromptTokensDetails$inboundSchema),
1205
- ).optional(),
1206
- completion_tokens_details: z.nullable(
1207
- z.lazy(() =>
1208
- AgentThoughtStreamingEventCompletionTokensDetails$inboundSchema
1209
- ),
1210
- ).optional(),
1211
- }).transform((v) => {
1212
- return remap$(v, {
1213
- "completion_tokens": "completionTokens",
1214
- "prompt_tokens": "promptTokens",
1215
- "total_tokens": "totalTokens",
1216
- "prompt_tokens_details": "promptTokensDetails",
1217
- "completion_tokens_details": "completionTokensDetails",
1218
- });
1219
- });
1220
- /** @internal */
1221
- export type AgentThoughtStreamingEventUsage$Outbound = {
1222
- completion_tokens?: number | undefined;
1223
- prompt_tokens?: number | undefined;
1224
- total_tokens?: number | undefined;
1225
- prompt_tokens_details?:
1226
- | AgentThoughtStreamingEventPromptTokensDetails$Outbound
1227
- | null
1228
- | undefined;
1229
- completion_tokens_details?:
1230
- | AgentThoughtStreamingEventCompletionTokensDetails$Outbound
1231
- | null
1232
- | undefined;
1233
- };
1234
-
1235
- /** @internal */
1236
- export const AgentThoughtStreamingEventUsage$outboundSchema: z.ZodType<
1237
- AgentThoughtStreamingEventUsage$Outbound,
1238
- z.ZodTypeDef,
1239
- AgentThoughtStreamingEventUsage
1240
- > = z.object({
1241
- completionTokens: z.number().optional(),
1242
- promptTokens: z.number().optional(),
1243
- totalTokens: z.number().optional(),
1244
- promptTokensDetails: z.nullable(
1245
- z.lazy(() => AgentThoughtStreamingEventPromptTokensDetails$outboundSchema),
1246
- ).optional(),
1247
- completionTokensDetails: z.nullable(
1248
- z.lazy(() =>
1249
- AgentThoughtStreamingEventCompletionTokensDetails$outboundSchema
1250
- ),
1251
- ).optional(),
1252
- }).transform((v) => {
1253
- return remap$(v, {
1254
- completionTokens: "completion_tokens",
1255
- promptTokens: "prompt_tokens",
1256
- totalTokens: "total_tokens",
1257
- promptTokensDetails: "prompt_tokens_details",
1258
- completionTokensDetails: "completion_tokens_details",
1259
- });
1260
- });
1261
-
1262
- export function agentThoughtStreamingEventUsageToJSON(
1263
- agentThoughtStreamingEventUsage: AgentThoughtStreamingEventUsage,
1264
- ): string {
1265
- return JSON.stringify(
1266
- AgentThoughtStreamingEventUsage$outboundSchema.parse(
1267
- agentThoughtStreamingEventUsage,
1268
- ),
1269
- );
1270
- }
1271
- export function agentThoughtStreamingEventUsageFromJSON(
1272
- jsonString: string,
1273
- ): SafeParseResult<AgentThoughtStreamingEventUsage, SDKValidationError> {
1274
- return safeParse(
1275
- jsonString,
1276
- (x) => AgentThoughtStreamingEventUsage$inboundSchema.parse(JSON.parse(x)),
1277
- `Failed to parse 'AgentThoughtStreamingEventUsage' from JSON`,
1278
- );
1279
- }
1280
-
1281
- /** @internal */
1282
- export const AgentThoughtStreamingEventData$inboundSchema: z.ZodType<
1283
- AgentThoughtStreamingEventData,
1284
- z.ZodTypeDef,
1285
- unknown
1286
- > = z.object({
1287
- agent_id: z.string(),
1288
- message_difference: z.record(z.lazy(() => MessageDifference$inboundSchema)),
1289
- choice: z.lazy(() => Choice$inboundSchema).optional(),
1290
- choiceIndex: z.number().optional(),
1291
- iteration: z.number(),
1292
- accumulated_execution_time: z.number(),
1293
- responseId: z.string().optional(),
1294
- usage: z.lazy(() => AgentThoughtStreamingEventUsage$inboundSchema).optional(),
1295
- }).transform((v) => {
1296
- return remap$(v, {
1297
- "agent_id": "agentId",
1298
- "message_difference": "messageDifference",
1299
- "accumulated_execution_time": "accumulatedExecutionTime",
1300
- });
1301
- });
1302
- /** @internal */
1303
- export type AgentThoughtStreamingEventData$Outbound = {
1304
- agent_id: string;
1305
- message_difference: { [k: string]: MessageDifference$Outbound };
1306
- choice?: Choice$Outbound | undefined;
1307
- choiceIndex?: number | undefined;
1308
- iteration: number;
1309
- accumulated_execution_time: number;
1310
- responseId?: string | undefined;
1311
- usage?: AgentThoughtStreamingEventUsage$Outbound | undefined;
1312
- };
1313
-
1314
- /** @internal */
1315
- export const AgentThoughtStreamingEventData$outboundSchema: z.ZodType<
1316
- AgentThoughtStreamingEventData$Outbound,
1317
- z.ZodTypeDef,
1318
- AgentThoughtStreamingEventData
1319
- > = z.object({
1320
- agentId: z.string(),
1321
- messageDifference: z.record(z.lazy(() => MessageDifference$outboundSchema)),
1322
- choice: z.lazy(() => Choice$outboundSchema).optional(),
1323
- choiceIndex: z.number().optional(),
1324
- iteration: z.number(),
1325
- accumulatedExecutionTime: z.number(),
1326
- responseId: z.string().optional(),
1327
- usage: z.lazy(() => AgentThoughtStreamingEventUsage$outboundSchema)
1328
- .optional(),
1329
- }).transform((v) => {
1330
- return remap$(v, {
1331
- agentId: "agent_id",
1332
- messageDifference: "message_difference",
1333
- accumulatedExecutionTime: "accumulated_execution_time",
1334
- });
1335
- });
1336
-
1337
- export function agentThoughtStreamingEventDataToJSON(
1338
- agentThoughtStreamingEventData: AgentThoughtStreamingEventData,
1339
- ): string {
1340
- return JSON.stringify(
1341
- AgentThoughtStreamingEventData$outboundSchema.parse(
1342
- agentThoughtStreamingEventData,
1343
- ),
1344
- );
1345
- }
1346
- export function agentThoughtStreamingEventDataFromJSON(
1347
- jsonString: string,
1348
- ): SafeParseResult<AgentThoughtStreamingEventData, SDKValidationError> {
1349
- return safeParse(
1350
- jsonString,
1351
- (x) => AgentThoughtStreamingEventData$inboundSchema.parse(JSON.parse(x)),
1352
- `Failed to parse 'AgentThoughtStreamingEventData' from JSON`,
1353
- );
1354
- }
1355
-
1356
- /** @internal */
1357
- export const AgentThoughtStreamingEvent$inboundSchema: z.ZodType<
1358
- AgentThoughtStreamingEvent,
1359
- z.ZodTypeDef,
1360
- unknown
1361
- > = z.object({
1362
- type: z.literal("event.agents.thought"),
1363
- timestamp: z.string(),
1364
- data: z.lazy(() => AgentThoughtStreamingEventData$inboundSchema),
1365
- });
1366
- /** @internal */
1367
- export type AgentThoughtStreamingEvent$Outbound = {
1368
- type: "event.agents.thought";
1369
- timestamp: string;
1370
- data: AgentThoughtStreamingEventData$Outbound;
1371
- };
1372
-
1373
- /** @internal */
1374
- export const AgentThoughtStreamingEvent$outboundSchema: z.ZodType<
1375
- AgentThoughtStreamingEvent$Outbound,
1376
- z.ZodTypeDef,
1377
- AgentThoughtStreamingEvent
1378
- > = z.object({
1379
- type: z.literal("event.agents.thought"),
1380
- timestamp: z.string(),
1381
- data: z.lazy(() => AgentThoughtStreamingEventData$outboundSchema),
1382
- });
1383
-
1384
- export function agentThoughtStreamingEventToJSON(
1385
- agentThoughtStreamingEvent: AgentThoughtStreamingEvent,
1386
- ): string {
1387
- return JSON.stringify(
1388
- AgentThoughtStreamingEvent$outboundSchema.parse(agentThoughtStreamingEvent),
1389
- );
1390
- }
1391
- export function agentThoughtStreamingEventFromJSON(
1392
- jsonString: string,
1393
- ): SafeParseResult<AgentThoughtStreamingEvent, SDKValidationError> {
1394
- return safeParse(
1395
- jsonString,
1396
- (x) => AgentThoughtStreamingEvent$inboundSchema.parse(JSON.parse(x)),
1397
- `Failed to parse 'AgentThoughtStreamingEvent' from JSON`,
1398
- );
1399
- }