@orq-ai/node 3.14.7 → 4.0.0-rc.0

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 (494) hide show
  1. package/bin/mcp-server.js +210 -213
  2. package/bin/mcp-server.js.map +38 -38
  3. package/docs/sdks/agents/README.md +8 -4
  4. package/docs/sdks/budgets/README.md +4 -2
  5. package/docs/sdks/tools/README.md +4 -2
  6. package/examples/package-lock.json +5 -6
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +2 -2
  9. package/lib/config.js +2 -2
  10. package/lib/config.js.map +1 -1
  11. package/mcp-server/mcp-server.js +1 -1
  12. package/mcp-server/mcp-server.js.map +1 -1
  13. package/mcp-server/server.js +1 -1
  14. package/mcp-server/server.js.map +1 -1
  15. package/models/operations/createbudget.js +2 -2
  16. package/models/operations/createcontact.js +2 -2
  17. package/models/operations/createdataset.js +2 -2
  18. package/models/operations/createdatasetitem.js +8 -8
  19. package/models/operations/createdatasource.js +2 -2
  20. package/models/operations/createeval.js +28 -28
  21. package/models/operations/createtool.js +10 -10
  22. package/models/operations/duplicatetool.js +10 -10
  23. package/models/operations/fileget.js +2 -2
  24. package/models/operations/filelist.js +2 -2
  25. package/models/operations/fileupload.js +2 -2
  26. package/models/operations/getalltools.js +10 -10
  27. package/models/operations/getbudget.js +2 -2
  28. package/models/operations/getevals.js +28 -28
  29. package/models/operations/listbudgets.js +2 -2
  30. package/models/operations/listcontacts.js +2 -2
  31. package/models/operations/listdatasetdatapoints.js +8 -8
  32. package/models/operations/listdatasets.js +2 -2
  33. package/models/operations/listdatasources.js +2 -2
  34. package/models/operations/retrievecontact.js +2 -2
  35. package/models/operations/retrievedatapoint.js +8 -8
  36. package/models/operations/retrievedataset.js +2 -2
  37. package/models/operations/retrievedatasource.js +2 -2
  38. package/models/operations/retrievetool.js +10 -10
  39. package/models/operations/updatebudget.js +2 -2
  40. package/models/operations/updatecontact.js +2 -2
  41. package/models/operations/updatedatapoint.js +8 -8
  42. package/models/operations/updatedataset.js +2 -2
  43. package/models/operations/updatedatasource.js +2 -2
  44. package/models/operations/updateeval.js +28 -28
  45. package/models/operations/updatetool.js +10 -10
  46. package/package.json +4 -4
  47. package/src/lib/config.ts +2 -2
  48. package/src/mcp-server/mcp-server.ts +1 -1
  49. package/src/mcp-server/server.ts +1 -1
  50. package/src/models/operations/createbudget.ts +2 -2
  51. package/src/models/operations/createcontact.ts +2 -2
  52. package/src/models/operations/createdataset.ts +2 -2
  53. package/src/models/operations/createdatasetitem.ts +8 -8
  54. package/src/models/operations/createdatasource.ts +2 -2
  55. package/src/models/operations/createeval.ts +28 -28
  56. package/src/models/operations/createtool.ts +10 -10
  57. package/src/models/operations/duplicatetool.ts +10 -10
  58. package/src/models/operations/fileget.ts +2 -2
  59. package/src/models/operations/filelist.ts +2 -2
  60. package/src/models/operations/fileupload.ts +2 -2
  61. package/src/models/operations/getalltools.ts +10 -10
  62. package/src/models/operations/getbudget.ts +2 -2
  63. package/src/models/operations/getevals.ts +28 -28
  64. package/src/models/operations/listbudgets.ts +2 -2
  65. package/src/models/operations/listcontacts.ts +2 -2
  66. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  67. package/src/models/operations/listdatasets.ts +2 -2
  68. package/src/models/operations/listdatasources.ts +2 -2
  69. package/src/models/operations/retrievecontact.ts +2 -2
  70. package/src/models/operations/retrievedatapoint.ts +8 -8
  71. package/src/models/operations/retrievedataset.ts +2 -2
  72. package/src/models/operations/retrievedatasource.ts +2 -2
  73. package/src/models/operations/retrievetool.ts +10 -10
  74. package/src/models/operations/updatebudget.ts +2 -2
  75. package/src/models/operations/updatecontact.ts +2 -2
  76. package/src/models/operations/updatedatapoint.ts +8 -8
  77. package/src/models/operations/updatedataset.ts +2 -2
  78. package/src/models/operations/updatedatasource.ts +2 -2
  79. package/src/models/operations/updateeval.ts +28 -28
  80. package/src/models/operations/updatetool.ts +10 -10
  81. package/packages/orq-rc/FUNCTIONS.md +0 -103
  82. package/packages/orq-rc/README.md +0 -909
  83. package/packages/orq-rc/RUNTIMES.md +0 -48
  84. package/packages/orq-rc/docs/sdks/agents/README.md +0 -1319
  85. package/packages/orq-rc/docs/sdks/budgets/README.md +0 -401
  86. package/packages/orq-rc/docs/sdks/chunking/README.md +0 -95
  87. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -450
  88. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -836
  89. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -312
  90. package/packages/orq-rc/docs/sdks/evals/README.md +0 -339
  91. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -89
  92. package/packages/orq-rc/docs/sdks/files/README.md +0 -301
  93. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1489
  94. package/packages/orq-rc/docs/sdks/memorystores/README.md +0 -1172
  95. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -83
  96. package/packages/orq-rc/docs/sdks/models/README.md +0 -76
  97. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -591
  98. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -77
  99. package/packages/orq-rc/docs/sdks/tools/README.md +0 -490
  100. package/packages/orq-rc/examples/README.md +0 -31
  101. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  102. package/packages/orq-rc/examples/package-lock.json +0 -627
  103. package/packages/orq-rc/examples/package.json +0 -18
  104. package/packages/orq-rc/jsr.json +0 -28
  105. package/packages/orq-rc/package-lock.json +0 -3071
  106. package/packages/orq-rc/package.json +0 -43
  107. package/packages/orq-rc/src/core.ts +0 -13
  108. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -172
  109. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -176
  110. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -167
  111. package/packages/orq-rc/src/funcs/agentsList.ts +0 -167
  112. package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
  113. package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
  114. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -175
  115. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
  116. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
  117. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -163
  118. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -190
  119. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -188
  120. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -176
  121. package/packages/orq-rc/src/funcs/budgetsCreate.ts +0 -160
  122. package/packages/orq-rc/src/funcs/budgetsDelete.ts +0 -167
  123. package/packages/orq-rc/src/funcs/budgetsGet.ts +0 -166
  124. package/packages/orq-rc/src/funcs/budgetsList.ts +0 -170
  125. package/packages/orq-rc/src/funcs/budgetsUpdate.ts +0 -167
  126. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  127. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
  128. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
  129. package/packages/orq-rc/src/funcs/contactsList.ts +0 -169
  130. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
  131. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
  132. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  133. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  134. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  135. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  136. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  137. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  138. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  139. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  140. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  141. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  142. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  143. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  144. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  145. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  146. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  147. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  148. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  149. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  150. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  151. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  152. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  153. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  154. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  155. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  156. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  157. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  158. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  159. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  160. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  161. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  162. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  163. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  164. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  165. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  166. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  167. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  168. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  169. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  170. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  171. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  172. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  173. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  174. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  175. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  176. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -171
  177. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -175
  178. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  179. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  180. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -184
  181. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -179
  182. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  183. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -181
  184. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -176
  185. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  186. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -178
  187. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -173
  188. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  189. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -179
  190. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -174
  191. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  192. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  193. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
  194. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  195. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  196. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  197. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  198. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  199. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  200. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  201. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  202. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +0 -175
  203. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  204. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  205. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  206. package/packages/orq-rc/src/hooks/global.ts +0 -44
  207. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  208. package/packages/orq-rc/src/hooks/index.ts +0 -6
  209. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  210. package/packages/orq-rc/src/hooks/types.ts +0 -112
  211. package/packages/orq-rc/src/index.ts +0 -9
  212. package/packages/orq-rc/src/lib/base64.ts +0 -37
  213. package/packages/orq-rc/src/lib/config.ts +0 -74
  214. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  215. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  216. package/packages/orq-rc/src/lib/env.ts +0 -89
  217. package/packages/orq-rc/src/lib/event-streams.ts +0 -135
  218. package/packages/orq-rc/src/lib/files.ts +0 -82
  219. package/packages/orq-rc/src/lib/http.ts +0 -323
  220. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  221. package/packages/orq-rc/src/lib/logger.ts +0 -9
  222. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  223. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  224. package/packages/orq-rc/src/lib/retries.ts +0 -218
  225. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  226. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  227. package/packages/orq-rc/src/lib/security.ts +0 -264
  228. package/packages/orq-rc/src/lib/url.ts +0 -33
  229. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -111
  230. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
  231. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  232. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  233. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  234. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  235. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -117
  236. package/packages/orq-rc/src/mcp-server/resources.ts +0 -172
  237. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  238. package/packages/orq-rc/src/mcp-server/server.ts +0 -259
  239. package/packages/orq-rc/src/mcp-server/shared.ts +0 -74
  240. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +0 -37
  241. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +0 -35
  242. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +0 -37
  243. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +0 -37
  244. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
  245. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
  246. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +0 -37
  247. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
  248. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
  249. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +0 -37
  250. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +0 -37
  251. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +0 -37
  252. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +0 -37
  253. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +0 -37
  254. package/packages/orq-rc/src/mcp-server/tools/budgetsDelete.ts +0 -35
  255. package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +0 -37
  256. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +0 -37
  257. package/packages/orq-rc/src/mcp-server/tools/budgetsUpdate.ts +0 -37
  258. package/packages/orq-rc/src/mcp-server/tools/chunkingParse.ts +0 -37
  259. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  260. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
  261. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
  262. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
  263. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
  264. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  265. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  266. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  267. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  268. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  269. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  270. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  271. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  272. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  273. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  274. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  275. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  276. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  277. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  278. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  279. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  280. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
  281. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
  282. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
  283. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
  284. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  285. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  286. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  287. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  289. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  290. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  291. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  292. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  293. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  294. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunks.ts +0 -35
  295. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  296. package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.ts +0 -35
  297. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  298. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  299. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunksPaginated.ts +0 -35
  300. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  301. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  302. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  303. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  304. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
  305. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  306. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  307. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  308. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +0 -35
  309. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +0 -37
  310. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +0 -37
  311. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +0 -35
  312. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +0 -40
  313. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +0 -40
  314. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +0 -37
  315. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +0 -37
  316. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +0 -37
  317. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +0 -37
  318. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +0 -37
  319. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +0 -37
  320. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +0 -37
  321. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +0 -37
  322. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +0 -37
  323. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  324. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  325. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  326. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  327. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  328. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  329. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  330. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  331. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  332. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +0 -37
  333. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +0 -35
  334. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +0 -37
  335. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +0 -37
  336. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +0 -37
  337. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +0 -37
  338. package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
  339. package/packages/orq-rc/src/models/components/deployments.ts +0 -8147
  340. package/packages/orq-rc/src/models/components/index.ts +0 -6
  341. package/packages/orq-rc/src/models/components/security.ts +0 -71
  342. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  343. package/packages/orq-rc/src/models/errors/createagent.ts +0 -80
  344. package/packages/orq-rc/src/models/errors/createeval.ts +0 -80
  345. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -80
  346. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -91
  347. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -80
  348. package/packages/orq-rc/src/models/errors/duplicatetool.ts +0 -91
  349. package/packages/orq-rc/src/models/errors/getagent.ts +0 -80
  350. package/packages/orq-rc/src/models/errors/getagenttask.ts +0 -80
  351. package/packages/orq-rc/src/models/errors/getevals.ts +0 -80
  352. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -80
  353. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -90
  354. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  355. package/packages/orq-rc/src/models/errors/index.ts +0 -29
  356. package/packages/orq-rc/src/models/errors/listagenttasks.ts +0 -80
  357. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  358. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  359. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -91
  360. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  361. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -80
  362. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -80
  363. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -80
  364. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -83
  365. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -80
  366. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -80
  367. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -91
  368. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -78
  369. package/packages/orq-rc/src/models/operations/createagent.ts +0 -3104
  370. package/packages/orq-rc/src/models/operations/createbudget.ts +0 -745
  371. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -428
  372. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -267
  373. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -302
  374. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -6943
  375. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  376. package/packages/orq-rc/src/models/operations/createeval.ts +0 -9341
  377. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  378. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -1850
  379. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -274
  380. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -287
  381. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -2032
  382. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -7812
  383. package/packages/orq-rc/src/models/operations/createtool.ts +0 -4077
  384. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -78
  385. package/packages/orq-rc/src/models/operations/deletebudget.ts +0 -69
  386. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  387. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -243
  388. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -69
  389. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -87
  390. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -78
  391. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  392. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -66
  393. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  394. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -87
  395. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -98
  396. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -78
  397. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  398. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -75
  399. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -6547
  400. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -10532
  401. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1266
  402. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2606
  403. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -10655
  404. package/packages/orq-rc/src/models/operations/duplicatetool.ts +0 -2349
  405. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  406. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  407. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  408. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -327
  409. package/packages/orq-rc/src/models/operations/getagent.ts +0 -957
  410. package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -259
  411. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -318
  412. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -338
  413. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -1277
  414. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2572
  415. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -2308
  416. package/packages/orq-rc/src/models/operations/getbudget.ts +0 -441
  417. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -230
  418. package/packages/orq-rc/src/models/operations/getevals.ts +0 -7486
  419. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
  420. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -1292
  421. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -2437
  422. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2444
  423. package/packages/orq-rc/src/models/operations/index.ts +0 -102
  424. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -1569
  425. package/packages/orq-rc/src/models/operations/listactions.ts +0 -526
  426. package/packages/orq-rc/src/models/operations/listagents.ts +0 -1077
  427. package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -1106
  428. package/packages/orq-rc/src/models/operations/listbudgets.ts +0 -617
  429. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
  430. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -507
  431. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -500
  432. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -4086
  433. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  434. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -454
  435. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -1303
  436. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
  437. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2580
  438. package/packages/orq-rc/src/models/operations/parse.ts +0 -1295
  439. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  440. package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -426
  441. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -210
  442. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -3853
  443. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -291
  444. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  445. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -201
  446. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -220
  447. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -1160
  448. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -2333
  449. package/packages/orq-rc/src/models/operations/runagent.ts +0 -4342
  450. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -3573
  451. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -1367
  452. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -4355
  453. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -3321
  454. package/packages/orq-rc/src/models/operations/updatebudget.ts +0 -628
  455. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -448
  456. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -325
  457. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -6934
  458. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -386
  459. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  460. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -9704
  461. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -2341
  462. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -283
  463. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -296
  464. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -1363
  465. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -8176
  466. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -4288
  467. package/packages/orq-rc/src/sdk/agents.ts +0 -238
  468. package/packages/orq-rc/src/sdk/budgets.ts +0 -99
  469. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  470. package/packages/orq-rc/src/sdk/contacts.ts +0 -99
  471. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  472. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  473. package/packages/orq-rc/src/sdk/evals.ts +0 -69
  474. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  475. package/packages/orq-rc/src/sdk/files.ts +0 -78
  476. package/packages/orq-rc/src/sdk/index.ts +0 -5
  477. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  478. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  479. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  480. package/packages/orq-rc/src/sdk/models.ts +0 -25
  481. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  482. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  483. package/packages/orq-rc/src/sdk/sdk.ts +0 -97
  484. package/packages/orq-rc/src/sdk/tools.ts +0 -117
  485. package/packages/orq-rc/src/types/async.ts +0 -68
  486. package/packages/orq-rc/src/types/blobs.ts +0 -32
  487. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  488. package/packages/orq-rc/src/types/enums.ts +0 -16
  489. package/packages/orq-rc/src/types/fp.ts +0 -50
  490. package/packages/orq-rc/src/types/index.ts +0 -11
  491. package/packages/orq-rc/src/types/operations.ts +0 -105
  492. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  493. package/packages/orq-rc/src/types/streams.ts +0 -21
  494. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,1295 +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
-
12
- /**
13
- * Return format: chunks (with metadata) or texts (plain strings)
14
- */
15
- export const ParseChunkingRequestChunkingRequestReturnType = {
16
- Chunks: "chunks",
17
- Texts: "texts",
18
- } as const;
19
- /**
20
- * Return format: chunks (with metadata) or texts (plain strings)
21
- */
22
- export type ParseChunkingRequestChunkingRequestReturnType = ClosedEnum<
23
- typeof ParseChunkingRequestChunkingRequestReturnType
24
- >;
25
-
26
- export const AgenticChunker = {
27
- Agentic: "agentic",
28
- } as const;
29
- export type AgenticChunker = ClosedEnum<typeof AgenticChunker>;
30
-
31
- /**
32
- * Agentic LLM-powered chunker that uses AI to determine optimal split points. Best for complex documents requiring intelligent segmentation.
33
- */
34
- export type AgenticChunkerStrategy = {
35
- /**
36
- * The text content to be chunked
37
- */
38
- text: string;
39
- /**
40
- * Whether to include metadata for each chunk
41
- */
42
- metadata?: boolean | undefined;
43
- /**
44
- * Return format: chunks (with metadata) or texts (plain strings)
45
- */
46
- returnType?: ParseChunkingRequestChunkingRequestReturnType | undefined;
47
- strategy: AgenticChunker;
48
- /**
49
- * Chat model to use for chunking. (Available models)[https://docs.orq.ai/docs/proxy#chat-models]
50
- */
51
- model: string;
52
- /**
53
- * Maximum tokens per chunk
54
- */
55
- chunkSize?: number | undefined;
56
- /**
57
- * Size of candidate splits for LLM evaluation
58
- */
59
- candidateSize?: number | undefined;
60
- /**
61
- * Minimum characters allowed per chunk
62
- */
63
- minCharactersPerChunk?: number | undefined;
64
- };
65
-
66
- /**
67
- * Return format: chunks (with metadata) or texts (plain strings)
68
- */
69
- export const ParseChunkingRequestChunkingReturnType = {
70
- Chunks: "chunks",
71
- Texts: "texts",
72
- } as const;
73
- /**
74
- * Return format: chunks (with metadata) or texts (plain strings)
75
- */
76
- export type ParseChunkingRequestChunkingReturnType = ClosedEnum<
77
- typeof ParseChunkingRequestChunkingReturnType
78
- >;
79
-
80
- export const SemanticChunker = {
81
- Semantic: "semantic",
82
- } as const;
83
- export type SemanticChunker = ClosedEnum<typeof SemanticChunker>;
84
-
85
- export const Threshold2 = {
86
- Auto: "auto",
87
- } as const;
88
- export type Threshold2 = ClosedEnum<typeof Threshold2>;
89
-
90
- /**
91
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
92
- */
93
- export type Threshold = number | Threshold2;
94
-
95
- /**
96
- * Chunking mode: window-based or sentence-based similarity
97
- */
98
- export const Mode = {
99
- Window: "window",
100
- Sentence: "sentence",
101
- } as const;
102
- /**
103
- * Chunking mode: window-based or sentence-based similarity
104
- */
105
- export type Mode = ClosedEnum<typeof Mode>;
106
-
107
- /**
108
- * Groups semantically similar sentences using embeddings. Excellent for maintaining topic coherence and context within chunks.
109
- */
110
- export type SemanticChunkerStrategy = {
111
- /**
112
- * The text content to be chunked
113
- */
114
- text: string;
115
- /**
116
- * Whether to include metadata for each chunk
117
- */
118
- metadata?: boolean | undefined;
119
- /**
120
- * Return format: chunks (with metadata) or texts (plain strings)
121
- */
122
- returnType?: ParseChunkingRequestChunkingReturnType | undefined;
123
- strategy: SemanticChunker;
124
- /**
125
- * Maximum tokens per chunk
126
- */
127
- chunkSize?: number | undefined;
128
- /**
129
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
130
- */
131
- threshold?: number | Threshold2 | undefined;
132
- /**
133
- * Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
134
- */
135
- embeddingModel: string;
136
- /**
137
- * Chunking mode: window-based or sentence-based similarity
138
- */
139
- mode?: Mode | undefined;
140
- /**
141
- * Window size for similarity comparison
142
- */
143
- similarityWindow?: number | undefined;
144
- };
145
-
146
- /**
147
- * Return format: chunks (with metadata) or texts (plain strings)
148
- */
149
- export const ParseChunkingRequestReturnType = {
150
- Chunks: "chunks",
151
- Texts: "texts",
152
- } as const;
153
- /**
154
- * Return format: chunks (with metadata) or texts (plain strings)
155
- */
156
- export type ParseChunkingRequestReturnType = ClosedEnum<
157
- typeof ParseChunkingRequestReturnType
158
- >;
159
-
160
- export const RecursiveChunker = {
161
- Recursive: "recursive",
162
- } as const;
163
- export type RecursiveChunker = ClosedEnum<typeof RecursiveChunker>;
164
-
165
- /**
166
- * Recursively splits text using a hierarchy of separators (paragraphs, sentences, words). Versatile general-purpose chunker that preserves document structure.
167
- */
168
- export type RecursiveChunkerStrategy = {
169
- /**
170
- * The text content to be chunked
171
- */
172
- text: string;
173
- /**
174
- * Whether to include metadata for each chunk
175
- */
176
- metadata?: boolean | undefined;
177
- /**
178
- * Return format: chunks (with metadata) or texts (plain strings)
179
- */
180
- returnType?: ParseChunkingRequestReturnType | undefined;
181
- strategy: RecursiveChunker;
182
- /**
183
- * Maximum tokens per chunk
184
- */
185
- chunkSize?: number | undefined;
186
- /**
187
- * Hierarchy of separators to use for splitting
188
- */
189
- separators?: Array<string> | undefined;
190
- /**
191
- * Minimum characters allowed per chunk
192
- */
193
- minCharactersPerChunk?: number | undefined;
194
- };
195
-
196
- /**
197
- * Return format: chunks (with metadata) or texts (plain strings)
198
- */
199
- export const ChunkingRequestReturnType = {
200
- Chunks: "chunks",
201
- Texts: "texts",
202
- } as const;
203
- /**
204
- * Return format: chunks (with metadata) or texts (plain strings)
205
- */
206
- export type ChunkingRequestReturnType = ClosedEnum<
207
- typeof ChunkingRequestReturnType
208
- >;
209
-
210
- export const SentenceChunker = {
211
- Sentence: "sentence",
212
- } as const;
213
- export type SentenceChunker = ClosedEnum<typeof SentenceChunker>;
214
-
215
- /**
216
- * Splits text at sentence boundaries while respecting token limits. Ideal for maintaining semantic coherence and readability.
217
- */
218
- export type SentenceChunkerStrategy = {
219
- /**
220
- * The text content to be chunked
221
- */
222
- text: string;
223
- /**
224
- * Whether to include metadata for each chunk
225
- */
226
- metadata?: boolean | undefined;
227
- /**
228
- * Return format: chunks (with metadata) or texts (plain strings)
229
- */
230
- returnType?: ChunkingRequestReturnType | undefined;
231
- strategy: SentenceChunker;
232
- /**
233
- * Maximum tokens per chunk
234
- */
235
- chunkSize?: number | undefined;
236
- /**
237
- * Number of overlapping tokens between chunks
238
- */
239
- chunkOverlap?: number | undefined;
240
- /**
241
- * Minimum number of sentences per chunk
242
- */
243
- minSentencesPerChunk?: number | undefined;
244
- };
245
-
246
- /**
247
- * Return format: chunks (with metadata) or texts (plain strings)
248
- */
249
- export const ReturnTypeT = {
250
- Chunks: "chunks",
251
- Texts: "texts",
252
- } as const;
253
- /**
254
- * Return format: chunks (with metadata) or texts (plain strings)
255
- */
256
- export type ReturnTypeT = ClosedEnum<typeof ReturnTypeT>;
257
-
258
- export const TokenChunker = {
259
- Token: "token",
260
- } as const;
261
- export type TokenChunker = ClosedEnum<typeof TokenChunker>;
262
-
263
- /**
264
- * Splits text based on token count. Best for ensuring chunks fit within LLM context windows and maintaining consistent chunk sizes for embedding models.
265
- */
266
- export type TokenChunkerStrategy = {
267
- /**
268
- * The text content to be chunked
269
- */
270
- text: string;
271
- /**
272
- * Whether to include metadata for each chunk
273
- */
274
- metadata?: boolean | undefined;
275
- /**
276
- * Return format: chunks (with metadata) or texts (plain strings)
277
- */
278
- returnType?: ReturnTypeT | undefined;
279
- strategy: TokenChunker;
280
- /**
281
- * Maximum tokens per chunk
282
- */
283
- chunkSize?: number | undefined;
284
- /**
285
- * Number of tokens to overlap between chunks
286
- */
287
- chunkOverlap?: number | undefined;
288
- };
289
-
290
- /**
291
- * Request payload for text chunking with strategy-specific configuration
292
- */
293
- export type ParseChunkingRequest =
294
- | SemanticChunkerStrategy
295
- | AgenticChunkerStrategy
296
- | TokenChunkerStrategy
297
- | SentenceChunkerStrategy
298
- | RecursiveChunkerStrategy;
299
-
300
- export type ParseMetadata = {
301
- startIndex: number | null;
302
- endIndex: number | null;
303
- tokenCount: number | null;
304
- };
305
-
306
- export type Chunks = {
307
- /**
308
- * The text content of the chunk
309
- */
310
- text: string;
311
- /**
312
- * The position index of this chunk in the sequence
313
- */
314
- index: number;
315
- metadata?: ParseMetadata | undefined;
316
- };
317
-
318
- /**
319
- * Text successfully chunked
320
- */
321
- export type ParseResponseBody = {
322
- chunks: Array<Chunks>;
323
- };
324
-
325
- /** @internal */
326
- export const ParseChunkingRequestChunkingRequestReturnType$inboundSchema:
327
- z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> = z
328
- .nativeEnum(ParseChunkingRequestChunkingRequestReturnType);
329
-
330
- /** @internal */
331
- export const ParseChunkingRequestChunkingRequestReturnType$outboundSchema:
332
- z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> =
333
- ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
334
-
335
- /**
336
- * @internal
337
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
338
- */
339
- export namespace ParseChunkingRequestChunkingRequestReturnType$ {
340
- /** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$inboundSchema` instead. */
341
- export const inboundSchema =
342
- ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
343
- /** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$outboundSchema` instead. */
344
- export const outboundSchema =
345
- ParseChunkingRequestChunkingRequestReturnType$outboundSchema;
346
- }
347
-
348
- /** @internal */
349
- export const AgenticChunker$inboundSchema: z.ZodNativeEnum<
350
- typeof AgenticChunker
351
- > = z.nativeEnum(AgenticChunker);
352
-
353
- /** @internal */
354
- export const AgenticChunker$outboundSchema: z.ZodNativeEnum<
355
- typeof AgenticChunker
356
- > = AgenticChunker$inboundSchema;
357
-
358
- /**
359
- * @internal
360
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
361
- */
362
- export namespace AgenticChunker$ {
363
- /** @deprecated use `AgenticChunker$inboundSchema` instead. */
364
- export const inboundSchema = AgenticChunker$inboundSchema;
365
- /** @deprecated use `AgenticChunker$outboundSchema` instead. */
366
- export const outboundSchema = AgenticChunker$outboundSchema;
367
- }
368
-
369
- /** @internal */
370
- export const AgenticChunkerStrategy$inboundSchema: z.ZodType<
371
- AgenticChunkerStrategy,
372
- z.ZodTypeDef,
373
- unknown
374
- > = z.object({
375
- text: z.string(),
376
- metadata: z.boolean().default(true),
377
- return_type: ParseChunkingRequestChunkingRequestReturnType$inboundSchema
378
- .default("chunks"),
379
- strategy: AgenticChunker$inboundSchema,
380
- model: z.string(),
381
- chunk_size: z.number().int().default(1024),
382
- candidate_size: z.number().int().default(128),
383
- min_characters_per_chunk: z.number().int().default(24),
384
- }).transform((v) => {
385
- return remap$(v, {
386
- "return_type": "returnType",
387
- "chunk_size": "chunkSize",
388
- "candidate_size": "candidateSize",
389
- "min_characters_per_chunk": "minCharactersPerChunk",
390
- });
391
- });
392
-
393
- /** @internal */
394
- export type AgenticChunkerStrategy$Outbound = {
395
- text: string;
396
- metadata: boolean;
397
- return_type: string;
398
- strategy: string;
399
- model: string;
400
- chunk_size: number;
401
- candidate_size: number;
402
- min_characters_per_chunk: number;
403
- };
404
-
405
- /** @internal */
406
- export const AgenticChunkerStrategy$outboundSchema: z.ZodType<
407
- AgenticChunkerStrategy$Outbound,
408
- z.ZodTypeDef,
409
- AgenticChunkerStrategy
410
- > = z.object({
411
- text: z.string(),
412
- metadata: z.boolean().default(true),
413
- returnType: ParseChunkingRequestChunkingRequestReturnType$outboundSchema
414
- .default("chunks"),
415
- strategy: AgenticChunker$outboundSchema,
416
- model: z.string(),
417
- chunkSize: z.number().int().default(1024),
418
- candidateSize: z.number().int().default(128),
419
- minCharactersPerChunk: z.number().int().default(24),
420
- }).transform((v) => {
421
- return remap$(v, {
422
- returnType: "return_type",
423
- chunkSize: "chunk_size",
424
- candidateSize: "candidate_size",
425
- minCharactersPerChunk: "min_characters_per_chunk",
426
- });
427
- });
428
-
429
- /**
430
- * @internal
431
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
432
- */
433
- export namespace AgenticChunkerStrategy$ {
434
- /** @deprecated use `AgenticChunkerStrategy$inboundSchema` instead. */
435
- export const inboundSchema = AgenticChunkerStrategy$inboundSchema;
436
- /** @deprecated use `AgenticChunkerStrategy$outboundSchema` instead. */
437
- export const outboundSchema = AgenticChunkerStrategy$outboundSchema;
438
- /** @deprecated use `AgenticChunkerStrategy$Outbound` instead. */
439
- export type Outbound = AgenticChunkerStrategy$Outbound;
440
- }
441
-
442
- export function agenticChunkerStrategyToJSON(
443
- agenticChunkerStrategy: AgenticChunkerStrategy,
444
- ): string {
445
- return JSON.stringify(
446
- AgenticChunkerStrategy$outboundSchema.parse(agenticChunkerStrategy),
447
- );
448
- }
449
-
450
- export function agenticChunkerStrategyFromJSON(
451
- jsonString: string,
452
- ): SafeParseResult<AgenticChunkerStrategy, SDKValidationError> {
453
- return safeParse(
454
- jsonString,
455
- (x) => AgenticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
456
- `Failed to parse 'AgenticChunkerStrategy' from JSON`,
457
- );
458
- }
459
-
460
- /** @internal */
461
- export const ParseChunkingRequestChunkingReturnType$inboundSchema:
462
- z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> = z.nativeEnum(
463
- ParseChunkingRequestChunkingReturnType,
464
- );
465
-
466
- /** @internal */
467
- export const ParseChunkingRequestChunkingReturnType$outboundSchema:
468
- z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> =
469
- ParseChunkingRequestChunkingReturnType$inboundSchema;
470
-
471
- /**
472
- * @internal
473
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
474
- */
475
- export namespace ParseChunkingRequestChunkingReturnType$ {
476
- /** @deprecated use `ParseChunkingRequestChunkingReturnType$inboundSchema` instead. */
477
- export const inboundSchema =
478
- ParseChunkingRequestChunkingReturnType$inboundSchema;
479
- /** @deprecated use `ParseChunkingRequestChunkingReturnType$outboundSchema` instead. */
480
- export const outboundSchema =
481
- ParseChunkingRequestChunkingReturnType$outboundSchema;
482
- }
483
-
484
- /** @internal */
485
- export const SemanticChunker$inboundSchema: z.ZodNativeEnum<
486
- typeof SemanticChunker
487
- > = z.nativeEnum(SemanticChunker);
488
-
489
- /** @internal */
490
- export const SemanticChunker$outboundSchema: z.ZodNativeEnum<
491
- typeof SemanticChunker
492
- > = SemanticChunker$inboundSchema;
493
-
494
- /**
495
- * @internal
496
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
497
- */
498
- export namespace SemanticChunker$ {
499
- /** @deprecated use `SemanticChunker$inboundSchema` instead. */
500
- export const inboundSchema = SemanticChunker$inboundSchema;
501
- /** @deprecated use `SemanticChunker$outboundSchema` instead. */
502
- export const outboundSchema = SemanticChunker$outboundSchema;
503
- }
504
-
505
- /** @internal */
506
- export const Threshold2$inboundSchema: z.ZodNativeEnum<typeof Threshold2> = z
507
- .nativeEnum(Threshold2);
508
-
509
- /** @internal */
510
- export const Threshold2$outboundSchema: z.ZodNativeEnum<typeof Threshold2> =
511
- Threshold2$inboundSchema;
512
-
513
- /**
514
- * @internal
515
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
516
- */
517
- export namespace Threshold2$ {
518
- /** @deprecated use `Threshold2$inboundSchema` instead. */
519
- export const inboundSchema = Threshold2$inboundSchema;
520
- /** @deprecated use `Threshold2$outboundSchema` instead. */
521
- export const outboundSchema = Threshold2$outboundSchema;
522
- }
523
-
524
- /** @internal */
525
- export const Threshold$inboundSchema: z.ZodType<
526
- Threshold,
527
- z.ZodTypeDef,
528
- unknown
529
- > = z.union([z.number(), Threshold2$inboundSchema]);
530
-
531
- /** @internal */
532
- export type Threshold$Outbound = number | string;
533
-
534
- /** @internal */
535
- export const Threshold$outboundSchema: z.ZodType<
536
- Threshold$Outbound,
537
- z.ZodTypeDef,
538
- Threshold
539
- > = z.union([z.number(), Threshold2$outboundSchema]);
540
-
541
- /**
542
- * @internal
543
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
544
- */
545
- export namespace Threshold$ {
546
- /** @deprecated use `Threshold$inboundSchema` instead. */
547
- export const inboundSchema = Threshold$inboundSchema;
548
- /** @deprecated use `Threshold$outboundSchema` instead. */
549
- export const outboundSchema = Threshold$outboundSchema;
550
- /** @deprecated use `Threshold$Outbound` instead. */
551
- export type Outbound = Threshold$Outbound;
552
- }
553
-
554
- export function thresholdToJSON(threshold: Threshold): string {
555
- return JSON.stringify(Threshold$outboundSchema.parse(threshold));
556
- }
557
-
558
- export function thresholdFromJSON(
559
- jsonString: string,
560
- ): SafeParseResult<Threshold, SDKValidationError> {
561
- return safeParse(
562
- jsonString,
563
- (x) => Threshold$inboundSchema.parse(JSON.parse(x)),
564
- `Failed to parse 'Threshold' from JSON`,
565
- );
566
- }
567
-
568
- /** @internal */
569
- export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
570
- Mode,
571
- );
572
-
573
- /** @internal */
574
- export const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode> =
575
- Mode$inboundSchema;
576
-
577
- /**
578
- * @internal
579
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
580
- */
581
- export namespace Mode$ {
582
- /** @deprecated use `Mode$inboundSchema` instead. */
583
- export const inboundSchema = Mode$inboundSchema;
584
- /** @deprecated use `Mode$outboundSchema` instead. */
585
- export const outboundSchema = Mode$outboundSchema;
586
- }
587
-
588
- /** @internal */
589
- export const SemanticChunkerStrategy$inboundSchema: z.ZodType<
590
- SemanticChunkerStrategy,
591
- z.ZodTypeDef,
592
- unknown
593
- > = z.object({
594
- text: z.string(),
595
- metadata: z.boolean().default(true),
596
- return_type: ParseChunkingRequestChunkingReturnType$inboundSchema.default(
597
- "chunks",
598
- ),
599
- strategy: SemanticChunker$inboundSchema,
600
- chunk_size: z.number().int().default(512),
601
- threshold: z.union([z.number(), Threshold2$inboundSchema]).optional(),
602
- embedding_model: z.string(),
603
- mode: Mode$inboundSchema.default("window"),
604
- similarity_window: z.number().int().default(1),
605
- }).transform((v) => {
606
- return remap$(v, {
607
- "return_type": "returnType",
608
- "chunk_size": "chunkSize",
609
- "embedding_model": "embeddingModel",
610
- "similarity_window": "similarityWindow",
611
- });
612
- });
613
-
614
- /** @internal */
615
- export type SemanticChunkerStrategy$Outbound = {
616
- text: string;
617
- metadata: boolean;
618
- return_type: string;
619
- strategy: string;
620
- chunk_size: number;
621
- threshold?: number | string | undefined;
622
- embedding_model: string;
623
- mode: string;
624
- similarity_window: number;
625
- };
626
-
627
- /** @internal */
628
- export const SemanticChunkerStrategy$outboundSchema: z.ZodType<
629
- SemanticChunkerStrategy$Outbound,
630
- z.ZodTypeDef,
631
- SemanticChunkerStrategy
632
- > = z.object({
633
- text: z.string(),
634
- metadata: z.boolean().default(true),
635
- returnType: ParseChunkingRequestChunkingReturnType$outboundSchema.default(
636
- "chunks",
637
- ),
638
- strategy: SemanticChunker$outboundSchema,
639
- chunkSize: z.number().int().default(512),
640
- threshold: z.union([z.number(), Threshold2$outboundSchema]).optional(),
641
- embeddingModel: z.string(),
642
- mode: Mode$outboundSchema.default("window"),
643
- similarityWindow: z.number().int().default(1),
644
- }).transform((v) => {
645
- return remap$(v, {
646
- returnType: "return_type",
647
- chunkSize: "chunk_size",
648
- embeddingModel: "embedding_model",
649
- similarityWindow: "similarity_window",
650
- });
651
- });
652
-
653
- /**
654
- * @internal
655
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
656
- */
657
- export namespace SemanticChunkerStrategy$ {
658
- /** @deprecated use `SemanticChunkerStrategy$inboundSchema` instead. */
659
- export const inboundSchema = SemanticChunkerStrategy$inboundSchema;
660
- /** @deprecated use `SemanticChunkerStrategy$outboundSchema` instead. */
661
- export const outboundSchema = SemanticChunkerStrategy$outboundSchema;
662
- /** @deprecated use `SemanticChunkerStrategy$Outbound` instead. */
663
- export type Outbound = SemanticChunkerStrategy$Outbound;
664
- }
665
-
666
- export function semanticChunkerStrategyToJSON(
667
- semanticChunkerStrategy: SemanticChunkerStrategy,
668
- ): string {
669
- return JSON.stringify(
670
- SemanticChunkerStrategy$outboundSchema.parse(semanticChunkerStrategy),
671
- );
672
- }
673
-
674
- export function semanticChunkerStrategyFromJSON(
675
- jsonString: string,
676
- ): SafeParseResult<SemanticChunkerStrategy, SDKValidationError> {
677
- return safeParse(
678
- jsonString,
679
- (x) => SemanticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
680
- `Failed to parse 'SemanticChunkerStrategy' from JSON`,
681
- );
682
- }
683
-
684
- /** @internal */
685
- export const ParseChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
686
- typeof ParseChunkingRequestReturnType
687
- > = z.nativeEnum(ParseChunkingRequestReturnType);
688
-
689
- /** @internal */
690
- export const ParseChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
691
- typeof ParseChunkingRequestReturnType
692
- > = ParseChunkingRequestReturnType$inboundSchema;
693
-
694
- /**
695
- * @internal
696
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
697
- */
698
- export namespace ParseChunkingRequestReturnType$ {
699
- /** @deprecated use `ParseChunkingRequestReturnType$inboundSchema` instead. */
700
- export const inboundSchema = ParseChunkingRequestReturnType$inboundSchema;
701
- /** @deprecated use `ParseChunkingRequestReturnType$outboundSchema` instead. */
702
- export const outboundSchema = ParseChunkingRequestReturnType$outboundSchema;
703
- }
704
-
705
- /** @internal */
706
- export const RecursiveChunker$inboundSchema: z.ZodNativeEnum<
707
- typeof RecursiveChunker
708
- > = z.nativeEnum(RecursiveChunker);
709
-
710
- /** @internal */
711
- export const RecursiveChunker$outboundSchema: z.ZodNativeEnum<
712
- typeof RecursiveChunker
713
- > = RecursiveChunker$inboundSchema;
714
-
715
- /**
716
- * @internal
717
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
718
- */
719
- export namespace RecursiveChunker$ {
720
- /** @deprecated use `RecursiveChunker$inboundSchema` instead. */
721
- export const inboundSchema = RecursiveChunker$inboundSchema;
722
- /** @deprecated use `RecursiveChunker$outboundSchema` instead. */
723
- export const outboundSchema = RecursiveChunker$outboundSchema;
724
- }
725
-
726
- /** @internal */
727
- export const RecursiveChunkerStrategy$inboundSchema: z.ZodType<
728
- RecursiveChunkerStrategy,
729
- z.ZodTypeDef,
730
- unknown
731
- > = z.object({
732
- text: z.string(),
733
- metadata: z.boolean().default(true),
734
- return_type: ParseChunkingRequestReturnType$inboundSchema.default("chunks"),
735
- strategy: RecursiveChunker$inboundSchema,
736
- chunk_size: z.number().int().default(512),
737
- separators: z.array(z.string()).optional(),
738
- min_characters_per_chunk: z.number().int().default(24),
739
- }).transform((v) => {
740
- return remap$(v, {
741
- "return_type": "returnType",
742
- "chunk_size": "chunkSize",
743
- "min_characters_per_chunk": "minCharactersPerChunk",
744
- });
745
- });
746
-
747
- /** @internal */
748
- export type RecursiveChunkerStrategy$Outbound = {
749
- text: string;
750
- metadata: boolean;
751
- return_type: string;
752
- strategy: string;
753
- chunk_size: number;
754
- separators?: Array<string> | undefined;
755
- min_characters_per_chunk: number;
756
- };
757
-
758
- /** @internal */
759
- export const RecursiveChunkerStrategy$outboundSchema: z.ZodType<
760
- RecursiveChunkerStrategy$Outbound,
761
- z.ZodTypeDef,
762
- RecursiveChunkerStrategy
763
- > = z.object({
764
- text: z.string(),
765
- metadata: z.boolean().default(true),
766
- returnType: ParseChunkingRequestReturnType$outboundSchema.default("chunks"),
767
- strategy: RecursiveChunker$outboundSchema,
768
- chunkSize: z.number().int().default(512),
769
- separators: z.array(z.string()).optional(),
770
- minCharactersPerChunk: z.number().int().default(24),
771
- }).transform((v) => {
772
- return remap$(v, {
773
- returnType: "return_type",
774
- chunkSize: "chunk_size",
775
- minCharactersPerChunk: "min_characters_per_chunk",
776
- });
777
- });
778
-
779
- /**
780
- * @internal
781
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
782
- */
783
- export namespace RecursiveChunkerStrategy$ {
784
- /** @deprecated use `RecursiveChunkerStrategy$inboundSchema` instead. */
785
- export const inboundSchema = RecursiveChunkerStrategy$inboundSchema;
786
- /** @deprecated use `RecursiveChunkerStrategy$outboundSchema` instead. */
787
- export const outboundSchema = RecursiveChunkerStrategy$outboundSchema;
788
- /** @deprecated use `RecursiveChunkerStrategy$Outbound` instead. */
789
- export type Outbound = RecursiveChunkerStrategy$Outbound;
790
- }
791
-
792
- export function recursiveChunkerStrategyToJSON(
793
- recursiveChunkerStrategy: RecursiveChunkerStrategy,
794
- ): string {
795
- return JSON.stringify(
796
- RecursiveChunkerStrategy$outboundSchema.parse(recursiveChunkerStrategy),
797
- );
798
- }
799
-
800
- export function recursiveChunkerStrategyFromJSON(
801
- jsonString: string,
802
- ): SafeParseResult<RecursiveChunkerStrategy, SDKValidationError> {
803
- return safeParse(
804
- jsonString,
805
- (x) => RecursiveChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
806
- `Failed to parse 'RecursiveChunkerStrategy' from JSON`,
807
- );
808
- }
809
-
810
- /** @internal */
811
- export const ChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
812
- typeof ChunkingRequestReturnType
813
- > = z.nativeEnum(ChunkingRequestReturnType);
814
-
815
- /** @internal */
816
- export const ChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
817
- typeof ChunkingRequestReturnType
818
- > = ChunkingRequestReturnType$inboundSchema;
819
-
820
- /**
821
- * @internal
822
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
823
- */
824
- export namespace ChunkingRequestReturnType$ {
825
- /** @deprecated use `ChunkingRequestReturnType$inboundSchema` instead. */
826
- export const inboundSchema = ChunkingRequestReturnType$inboundSchema;
827
- /** @deprecated use `ChunkingRequestReturnType$outboundSchema` instead. */
828
- export const outboundSchema = ChunkingRequestReturnType$outboundSchema;
829
- }
830
-
831
- /** @internal */
832
- export const SentenceChunker$inboundSchema: z.ZodNativeEnum<
833
- typeof SentenceChunker
834
- > = z.nativeEnum(SentenceChunker);
835
-
836
- /** @internal */
837
- export const SentenceChunker$outboundSchema: z.ZodNativeEnum<
838
- typeof SentenceChunker
839
- > = SentenceChunker$inboundSchema;
840
-
841
- /**
842
- * @internal
843
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
844
- */
845
- export namespace SentenceChunker$ {
846
- /** @deprecated use `SentenceChunker$inboundSchema` instead. */
847
- export const inboundSchema = SentenceChunker$inboundSchema;
848
- /** @deprecated use `SentenceChunker$outboundSchema` instead. */
849
- export const outboundSchema = SentenceChunker$outboundSchema;
850
- }
851
-
852
- /** @internal */
853
- export const SentenceChunkerStrategy$inboundSchema: z.ZodType<
854
- SentenceChunkerStrategy,
855
- z.ZodTypeDef,
856
- unknown
857
- > = z.object({
858
- text: z.string(),
859
- metadata: z.boolean().default(true),
860
- return_type: ChunkingRequestReturnType$inboundSchema.default("chunks"),
861
- strategy: SentenceChunker$inboundSchema,
862
- chunk_size: z.number().int().default(512),
863
- chunk_overlap: z.number().int().default(0),
864
- min_sentences_per_chunk: z.number().int().default(1),
865
- }).transform((v) => {
866
- return remap$(v, {
867
- "return_type": "returnType",
868
- "chunk_size": "chunkSize",
869
- "chunk_overlap": "chunkOverlap",
870
- "min_sentences_per_chunk": "minSentencesPerChunk",
871
- });
872
- });
873
-
874
- /** @internal */
875
- export type SentenceChunkerStrategy$Outbound = {
876
- text: string;
877
- metadata: boolean;
878
- return_type: string;
879
- strategy: string;
880
- chunk_size: number;
881
- chunk_overlap: number;
882
- min_sentences_per_chunk: number;
883
- };
884
-
885
- /** @internal */
886
- export const SentenceChunkerStrategy$outboundSchema: z.ZodType<
887
- SentenceChunkerStrategy$Outbound,
888
- z.ZodTypeDef,
889
- SentenceChunkerStrategy
890
- > = z.object({
891
- text: z.string(),
892
- metadata: z.boolean().default(true),
893
- returnType: ChunkingRequestReturnType$outboundSchema.default("chunks"),
894
- strategy: SentenceChunker$outboundSchema,
895
- chunkSize: z.number().int().default(512),
896
- chunkOverlap: z.number().int().default(0),
897
- minSentencesPerChunk: z.number().int().default(1),
898
- }).transform((v) => {
899
- return remap$(v, {
900
- returnType: "return_type",
901
- chunkSize: "chunk_size",
902
- chunkOverlap: "chunk_overlap",
903
- minSentencesPerChunk: "min_sentences_per_chunk",
904
- });
905
- });
906
-
907
- /**
908
- * @internal
909
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
910
- */
911
- export namespace SentenceChunkerStrategy$ {
912
- /** @deprecated use `SentenceChunkerStrategy$inboundSchema` instead. */
913
- export const inboundSchema = SentenceChunkerStrategy$inboundSchema;
914
- /** @deprecated use `SentenceChunkerStrategy$outboundSchema` instead. */
915
- export const outboundSchema = SentenceChunkerStrategy$outboundSchema;
916
- /** @deprecated use `SentenceChunkerStrategy$Outbound` instead. */
917
- export type Outbound = SentenceChunkerStrategy$Outbound;
918
- }
919
-
920
- export function sentenceChunkerStrategyToJSON(
921
- sentenceChunkerStrategy: SentenceChunkerStrategy,
922
- ): string {
923
- return JSON.stringify(
924
- SentenceChunkerStrategy$outboundSchema.parse(sentenceChunkerStrategy),
925
- );
926
- }
927
-
928
- export function sentenceChunkerStrategyFromJSON(
929
- jsonString: string,
930
- ): SafeParseResult<SentenceChunkerStrategy, SDKValidationError> {
931
- return safeParse(
932
- jsonString,
933
- (x) => SentenceChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
934
- `Failed to parse 'SentenceChunkerStrategy' from JSON`,
935
- );
936
- }
937
-
938
- /** @internal */
939
- export const ReturnTypeT$inboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> = z
940
- .nativeEnum(ReturnTypeT);
941
-
942
- /** @internal */
943
- export const ReturnTypeT$outboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> =
944
- ReturnTypeT$inboundSchema;
945
-
946
- /**
947
- * @internal
948
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
949
- */
950
- export namespace ReturnTypeT$ {
951
- /** @deprecated use `ReturnTypeT$inboundSchema` instead. */
952
- export const inboundSchema = ReturnTypeT$inboundSchema;
953
- /** @deprecated use `ReturnTypeT$outboundSchema` instead. */
954
- export const outboundSchema = ReturnTypeT$outboundSchema;
955
- }
956
-
957
- /** @internal */
958
- export const TokenChunker$inboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
959
- z.nativeEnum(TokenChunker);
960
-
961
- /** @internal */
962
- export const TokenChunker$outboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
963
- TokenChunker$inboundSchema;
964
-
965
- /**
966
- * @internal
967
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
968
- */
969
- export namespace TokenChunker$ {
970
- /** @deprecated use `TokenChunker$inboundSchema` instead. */
971
- export const inboundSchema = TokenChunker$inboundSchema;
972
- /** @deprecated use `TokenChunker$outboundSchema` instead. */
973
- export const outboundSchema = TokenChunker$outboundSchema;
974
- }
975
-
976
- /** @internal */
977
- export const TokenChunkerStrategy$inboundSchema: z.ZodType<
978
- TokenChunkerStrategy,
979
- z.ZodTypeDef,
980
- unknown
981
- > = z.object({
982
- text: z.string(),
983
- metadata: z.boolean().default(true),
984
- return_type: ReturnTypeT$inboundSchema.default("chunks"),
985
- strategy: TokenChunker$inboundSchema,
986
- chunk_size: z.number().int().default(512),
987
- chunk_overlap: z.number().int().default(0),
988
- }).transform((v) => {
989
- return remap$(v, {
990
- "return_type": "returnType",
991
- "chunk_size": "chunkSize",
992
- "chunk_overlap": "chunkOverlap",
993
- });
994
- });
995
-
996
- /** @internal */
997
- export type TokenChunkerStrategy$Outbound = {
998
- text: string;
999
- metadata: boolean;
1000
- return_type: string;
1001
- strategy: string;
1002
- chunk_size: number;
1003
- chunk_overlap: number;
1004
- };
1005
-
1006
- /** @internal */
1007
- export const TokenChunkerStrategy$outboundSchema: z.ZodType<
1008
- TokenChunkerStrategy$Outbound,
1009
- z.ZodTypeDef,
1010
- TokenChunkerStrategy
1011
- > = z.object({
1012
- text: z.string(),
1013
- metadata: z.boolean().default(true),
1014
- returnType: ReturnTypeT$outboundSchema.default("chunks"),
1015
- strategy: TokenChunker$outboundSchema,
1016
- chunkSize: z.number().int().default(512),
1017
- chunkOverlap: z.number().int().default(0),
1018
- }).transform((v) => {
1019
- return remap$(v, {
1020
- returnType: "return_type",
1021
- chunkSize: "chunk_size",
1022
- chunkOverlap: "chunk_overlap",
1023
- });
1024
- });
1025
-
1026
- /**
1027
- * @internal
1028
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1029
- */
1030
- export namespace TokenChunkerStrategy$ {
1031
- /** @deprecated use `TokenChunkerStrategy$inboundSchema` instead. */
1032
- export const inboundSchema = TokenChunkerStrategy$inboundSchema;
1033
- /** @deprecated use `TokenChunkerStrategy$outboundSchema` instead. */
1034
- export const outboundSchema = TokenChunkerStrategy$outboundSchema;
1035
- /** @deprecated use `TokenChunkerStrategy$Outbound` instead. */
1036
- export type Outbound = TokenChunkerStrategy$Outbound;
1037
- }
1038
-
1039
- export function tokenChunkerStrategyToJSON(
1040
- tokenChunkerStrategy: TokenChunkerStrategy,
1041
- ): string {
1042
- return JSON.stringify(
1043
- TokenChunkerStrategy$outboundSchema.parse(tokenChunkerStrategy),
1044
- );
1045
- }
1046
-
1047
- export function tokenChunkerStrategyFromJSON(
1048
- jsonString: string,
1049
- ): SafeParseResult<TokenChunkerStrategy, SDKValidationError> {
1050
- return safeParse(
1051
- jsonString,
1052
- (x) => TokenChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
1053
- `Failed to parse 'TokenChunkerStrategy' from JSON`,
1054
- );
1055
- }
1056
-
1057
- /** @internal */
1058
- export const ParseChunkingRequest$inboundSchema: z.ZodType<
1059
- ParseChunkingRequest,
1060
- z.ZodTypeDef,
1061
- unknown
1062
- > = z.union([
1063
- z.lazy(() => SemanticChunkerStrategy$inboundSchema),
1064
- z.lazy(() => AgenticChunkerStrategy$inboundSchema),
1065
- z.lazy(() => TokenChunkerStrategy$inboundSchema),
1066
- z.lazy(() => SentenceChunkerStrategy$inboundSchema),
1067
- z.lazy(() => RecursiveChunkerStrategy$inboundSchema),
1068
- ]);
1069
-
1070
- /** @internal */
1071
- export type ParseChunkingRequest$Outbound =
1072
- | SemanticChunkerStrategy$Outbound
1073
- | AgenticChunkerStrategy$Outbound
1074
- | TokenChunkerStrategy$Outbound
1075
- | SentenceChunkerStrategy$Outbound
1076
- | RecursiveChunkerStrategy$Outbound;
1077
-
1078
- /** @internal */
1079
- export const ParseChunkingRequest$outboundSchema: z.ZodType<
1080
- ParseChunkingRequest$Outbound,
1081
- z.ZodTypeDef,
1082
- ParseChunkingRequest
1083
- > = z.union([
1084
- z.lazy(() => SemanticChunkerStrategy$outboundSchema),
1085
- z.lazy(() => AgenticChunkerStrategy$outboundSchema),
1086
- z.lazy(() => TokenChunkerStrategy$outboundSchema),
1087
- z.lazy(() => SentenceChunkerStrategy$outboundSchema),
1088
- z.lazy(() => RecursiveChunkerStrategy$outboundSchema),
1089
- ]);
1090
-
1091
- /**
1092
- * @internal
1093
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1094
- */
1095
- export namespace ParseChunkingRequest$ {
1096
- /** @deprecated use `ParseChunkingRequest$inboundSchema` instead. */
1097
- export const inboundSchema = ParseChunkingRequest$inboundSchema;
1098
- /** @deprecated use `ParseChunkingRequest$outboundSchema` instead. */
1099
- export const outboundSchema = ParseChunkingRequest$outboundSchema;
1100
- /** @deprecated use `ParseChunkingRequest$Outbound` instead. */
1101
- export type Outbound = ParseChunkingRequest$Outbound;
1102
- }
1103
-
1104
- export function parseChunkingRequestToJSON(
1105
- parseChunkingRequest: ParseChunkingRequest,
1106
- ): string {
1107
- return JSON.stringify(
1108
- ParseChunkingRequest$outboundSchema.parse(parseChunkingRequest),
1109
- );
1110
- }
1111
-
1112
- export function parseChunkingRequestFromJSON(
1113
- jsonString: string,
1114
- ): SafeParseResult<ParseChunkingRequest, SDKValidationError> {
1115
- return safeParse(
1116
- jsonString,
1117
- (x) => ParseChunkingRequest$inboundSchema.parse(JSON.parse(x)),
1118
- `Failed to parse 'ParseChunkingRequest' from JSON`,
1119
- );
1120
- }
1121
-
1122
- /** @internal */
1123
- export const ParseMetadata$inboundSchema: z.ZodType<
1124
- ParseMetadata,
1125
- z.ZodTypeDef,
1126
- unknown
1127
- > = z.object({
1128
- start_index: z.nullable(z.number()),
1129
- end_index: z.nullable(z.number()),
1130
- token_count: z.nullable(z.number()),
1131
- }).transform((v) => {
1132
- return remap$(v, {
1133
- "start_index": "startIndex",
1134
- "end_index": "endIndex",
1135
- "token_count": "tokenCount",
1136
- });
1137
- });
1138
-
1139
- /** @internal */
1140
- export type ParseMetadata$Outbound = {
1141
- start_index: number | null;
1142
- end_index: number | null;
1143
- token_count: number | null;
1144
- };
1145
-
1146
- /** @internal */
1147
- export const ParseMetadata$outboundSchema: z.ZodType<
1148
- ParseMetadata$Outbound,
1149
- z.ZodTypeDef,
1150
- ParseMetadata
1151
- > = z.object({
1152
- startIndex: z.nullable(z.number()),
1153
- endIndex: z.nullable(z.number()),
1154
- tokenCount: z.nullable(z.number()),
1155
- }).transform((v) => {
1156
- return remap$(v, {
1157
- startIndex: "start_index",
1158
- endIndex: "end_index",
1159
- tokenCount: "token_count",
1160
- });
1161
- });
1162
-
1163
- /**
1164
- * @internal
1165
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1166
- */
1167
- export namespace ParseMetadata$ {
1168
- /** @deprecated use `ParseMetadata$inboundSchema` instead. */
1169
- export const inboundSchema = ParseMetadata$inboundSchema;
1170
- /** @deprecated use `ParseMetadata$outboundSchema` instead. */
1171
- export const outboundSchema = ParseMetadata$outboundSchema;
1172
- /** @deprecated use `ParseMetadata$Outbound` instead. */
1173
- export type Outbound = ParseMetadata$Outbound;
1174
- }
1175
-
1176
- export function parseMetadataToJSON(parseMetadata: ParseMetadata): string {
1177
- return JSON.stringify(ParseMetadata$outboundSchema.parse(parseMetadata));
1178
- }
1179
-
1180
- export function parseMetadataFromJSON(
1181
- jsonString: string,
1182
- ): SafeParseResult<ParseMetadata, SDKValidationError> {
1183
- return safeParse(
1184
- jsonString,
1185
- (x) => ParseMetadata$inboundSchema.parse(JSON.parse(x)),
1186
- `Failed to parse 'ParseMetadata' from JSON`,
1187
- );
1188
- }
1189
-
1190
- /** @internal */
1191
- export const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown> = z
1192
- .object({
1193
- text: z.string(),
1194
- index: z.number(),
1195
- metadata: z.lazy(() => ParseMetadata$inboundSchema).optional(),
1196
- });
1197
-
1198
- /** @internal */
1199
- export type Chunks$Outbound = {
1200
- text: string;
1201
- index: number;
1202
- metadata?: ParseMetadata$Outbound | undefined;
1203
- };
1204
-
1205
- /** @internal */
1206
- export const Chunks$outboundSchema: z.ZodType<
1207
- Chunks$Outbound,
1208
- z.ZodTypeDef,
1209
- Chunks
1210
- > = z.object({
1211
- text: z.string(),
1212
- index: z.number(),
1213
- metadata: z.lazy(() => ParseMetadata$outboundSchema).optional(),
1214
- });
1215
-
1216
- /**
1217
- * @internal
1218
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1219
- */
1220
- export namespace Chunks$ {
1221
- /** @deprecated use `Chunks$inboundSchema` instead. */
1222
- export const inboundSchema = Chunks$inboundSchema;
1223
- /** @deprecated use `Chunks$outboundSchema` instead. */
1224
- export const outboundSchema = Chunks$outboundSchema;
1225
- /** @deprecated use `Chunks$Outbound` instead. */
1226
- export type Outbound = Chunks$Outbound;
1227
- }
1228
-
1229
- export function chunksToJSON(chunks: Chunks): string {
1230
- return JSON.stringify(Chunks$outboundSchema.parse(chunks));
1231
- }
1232
-
1233
- export function chunksFromJSON(
1234
- jsonString: string,
1235
- ): SafeParseResult<Chunks, SDKValidationError> {
1236
- return safeParse(
1237
- jsonString,
1238
- (x) => Chunks$inboundSchema.parse(JSON.parse(x)),
1239
- `Failed to parse 'Chunks' from JSON`,
1240
- );
1241
- }
1242
-
1243
- /** @internal */
1244
- export const ParseResponseBody$inboundSchema: z.ZodType<
1245
- ParseResponseBody,
1246
- z.ZodTypeDef,
1247
- unknown
1248
- > = z.object({
1249
- chunks: z.array(z.lazy(() => Chunks$inboundSchema)),
1250
- });
1251
-
1252
- /** @internal */
1253
- export type ParseResponseBody$Outbound = {
1254
- chunks: Array<Chunks$Outbound>;
1255
- };
1256
-
1257
- /** @internal */
1258
- export const ParseResponseBody$outboundSchema: z.ZodType<
1259
- ParseResponseBody$Outbound,
1260
- z.ZodTypeDef,
1261
- ParseResponseBody
1262
- > = z.object({
1263
- chunks: z.array(z.lazy(() => Chunks$outboundSchema)),
1264
- });
1265
-
1266
- /**
1267
- * @internal
1268
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1269
- */
1270
- export namespace ParseResponseBody$ {
1271
- /** @deprecated use `ParseResponseBody$inboundSchema` instead. */
1272
- export const inboundSchema = ParseResponseBody$inboundSchema;
1273
- /** @deprecated use `ParseResponseBody$outboundSchema` instead. */
1274
- export const outboundSchema = ParseResponseBody$outboundSchema;
1275
- /** @deprecated use `ParseResponseBody$Outbound` instead. */
1276
- export type Outbound = ParseResponseBody$Outbound;
1277
- }
1278
-
1279
- export function parseResponseBodyToJSON(
1280
- parseResponseBody: ParseResponseBody,
1281
- ): string {
1282
- return JSON.stringify(
1283
- ParseResponseBody$outboundSchema.parse(parseResponseBody),
1284
- );
1285
- }
1286
-
1287
- export function parseResponseBodyFromJSON(
1288
- jsonString: string,
1289
- ): SafeParseResult<ParseResponseBody, SDKValidationError> {
1290
- return safeParse(
1291
- jsonString,
1292
- (x) => ParseResponseBody$inboundSchema.parse(JSON.parse(x)),
1293
- `Failed to parse 'ParseResponseBody' from JSON`,
1294
- );
1295
- }