@trymirai/uzu 0.3.0 → 0.4.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 (455) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +253 -245
  3. package/index.d.mts +1 -43
  4. package/index.d.mts.map +1 -1
  5. package/index.d.ts +1 -43
  6. package/index.d.ts.map +1 -1
  7. package/index.js +2 -88
  8. package/index.js.map +1 -1
  9. package/index.mjs +1 -43
  10. package/index.mjs.map +1 -1
  11. package/internal/tslib.js +6 -33
  12. package/napi/index.d.ts +975 -0
  13. package/napi/index.js +626 -0
  14. package/napi/index.mjs +3 -0
  15. package/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
  16. package/package.json +26 -63
  17. package/src/index.ts +1 -43
  18. package/src/napi/index.d.ts +975 -0
  19. package/src/napi/index.js +626 -0
  20. package/src/napi/index.mjs +3 -0
  21. package/src/napi/{uzu.node → uzu.darwin-arm64.node} +0 -0
  22. package/src/version.ts +1 -1
  23. package/version.d.mts +1 -1
  24. package/version.d.ts +1 -1
  25. package/version.js +1 -1
  26. package/version.mjs +1 -1
  27. package/bridging/asyncBatchSize.d.mts +0 -10
  28. package/bridging/asyncBatchSize.d.mts.map +0 -1
  29. package/bridging/asyncBatchSize.d.ts +0 -10
  30. package/bridging/asyncBatchSize.d.ts.map +0 -1
  31. package/bridging/asyncBatchSize.js +0 -21
  32. package/bridging/asyncBatchSize.js.map +0 -1
  33. package/bridging/asyncBatchSize.mjs +0 -17
  34. package/bridging/asyncBatchSize.mjs.map +0 -1
  35. package/bridging/chatSession.d.mts +0 -11
  36. package/bridging/chatSession.d.mts.map +0 -1
  37. package/bridging/chatSession.d.ts +0 -11
  38. package/bridging/chatSession.d.ts.map +0 -1
  39. package/bridging/chatSession.js +0 -22
  40. package/bridging/chatSession.js.map +0 -1
  41. package/bridging/chatSession.mjs +0 -18
  42. package/bridging/chatSession.mjs.map +0 -1
  43. package/bridging/classificationFeature.d.mts +0 -9
  44. package/bridging/classificationFeature.d.mts.map +0 -1
  45. package/bridging/classificationFeature.d.ts +0 -9
  46. package/bridging/classificationFeature.d.ts.map +0 -1
  47. package/bridging/classificationFeature.js +0 -18
  48. package/bridging/classificationFeature.js.map +0 -1
  49. package/bridging/classificationFeature.mjs +0 -14
  50. package/bridging/classificationFeature.mjs.map +0 -1
  51. package/bridging/classificationLabel.d.mts +0 -12
  52. package/bridging/classificationLabel.d.mts.map +0 -1
  53. package/bridging/classificationLabel.d.ts +0 -12
  54. package/bridging/classificationLabel.d.ts.map +0 -1
  55. package/bridging/classificationLabel.js +0 -26
  56. package/bridging/classificationLabel.js.map +0 -1
  57. package/bridging/classificationLabel.mjs +0 -22
  58. package/bridging/classificationLabel.mjs.map +0 -1
  59. package/bridging/classificationOutput.d.mts +0 -10
  60. package/bridging/classificationOutput.d.mts.map +0 -1
  61. package/bridging/classificationOutput.d.ts +0 -10
  62. package/bridging/classificationOutput.d.ts.map +0 -1
  63. package/bridging/classificationOutput.js +0 -16
  64. package/bridging/classificationOutput.js.map +0 -1
  65. package/bridging/classificationOutput.mjs +0 -12
  66. package/bridging/classificationOutput.mjs.map +0 -1
  67. package/bridging/classificationSession.d.mts +0 -9
  68. package/bridging/classificationSession.d.mts.map +0 -1
  69. package/bridging/classificationSession.d.ts +0 -9
  70. package/bridging/classificationSession.d.ts.map +0 -1
  71. package/bridging/classificationSession.js +0 -16
  72. package/bridging/classificationSession.js.map +0 -1
  73. package/bridging/classificationSession.mjs +0 -12
  74. package/bridging/classificationSession.mjs.map +0 -1
  75. package/bridging/classificationStats.d.mts +0 -14
  76. package/bridging/classificationStats.d.mts.map +0 -1
  77. package/bridging/classificationStats.d.ts +0 -14
  78. package/bridging/classificationStats.d.ts.map +0 -1
  79. package/bridging/classificationStats.js +0 -20
  80. package/bridging/classificationStats.js.map +0 -1
  81. package/bridging/classificationStats.mjs +0 -16
  82. package/bridging/classificationStats.mjs.map +0 -1
  83. package/bridging/config.d.mts +0 -26
  84. package/bridging/config.d.mts.map +0 -1
  85. package/bridging/config.d.ts +0 -26
  86. package/bridging/config.d.ts.map +0 -1
  87. package/bridging/config.js +0 -53
  88. package/bridging/config.js.map +0 -1
  89. package/bridging/config.mjs +0 -49
  90. package/bridging/config.mjs.map +0 -1
  91. package/bridging/contextLength.d.mts +0 -11
  92. package/bridging/contextLength.d.mts.map +0 -1
  93. package/bridging/contextLength.d.ts +0 -11
  94. package/bridging/contextLength.d.ts.map +0 -1
  95. package/bridging/contextLength.js +0 -25
  96. package/bridging/contextLength.js.map +0 -1
  97. package/bridging/contextLength.mjs +0 -21
  98. package/bridging/contextLength.mjs.map +0 -1
  99. package/bridging/contextMode.d.mts +0 -12
  100. package/bridging/contextMode.d.mts.map +0 -1
  101. package/bridging/contextMode.d.ts +0 -12
  102. package/bridging/contextMode.d.ts.map +0 -1
  103. package/bridging/contextMode.js +0 -26
  104. package/bridging/contextMode.js.map +0 -1
  105. package/bridging/contextMode.mjs +0 -22
  106. package/bridging/contextMode.mjs.map +0 -1
  107. package/bridging/downloadHandle.d.mts +0 -14
  108. package/bridging/downloadHandle.d.mts.map +0 -1
  109. package/bridging/downloadHandle.d.ts +0 -14
  110. package/bridging/downloadHandle.d.ts.map +0 -1
  111. package/bridging/downloadHandle.js +0 -36
  112. package/bridging/downloadHandle.js.map +0 -1
  113. package/bridging/downloadHandle.mjs +0 -32
  114. package/bridging/downloadHandle.mjs.map +0 -1
  115. package/bridging/downloadProgressUpdate.d.mts +0 -9
  116. package/bridging/downloadProgressUpdate.d.mts.map +0 -1
  117. package/bridging/downloadProgressUpdate.d.ts +0 -9
  118. package/bridging/downloadProgressUpdate.d.ts.map +0 -1
  119. package/bridging/downloadProgressUpdate.js +0 -15
  120. package/bridging/downloadProgressUpdate.js.map +0 -1
  121. package/bridging/downloadProgressUpdate.mjs +0 -11
  122. package/bridging/downloadProgressUpdate.mjs.map +0 -1
  123. package/bridging/downloadState.d.mts +0 -19
  124. package/bridging/downloadState.d.mts.map +0 -1
  125. package/bridging/downloadState.d.ts +0 -19
  126. package/bridging/downloadState.d.ts.map +0 -1
  127. package/bridging/downloadState.js +0 -45
  128. package/bridging/downloadState.js.map +0 -1
  129. package/bridging/downloadState.mjs +0 -41
  130. package/bridging/downloadState.mjs.map +0 -1
  131. package/bridging/engine.d.mts +0 -29
  132. package/bridging/engine.d.mts.map +0 -1
  133. package/bridging/engine.d.ts +0 -29
  134. package/bridging/engine.d.ts.map +0 -1
  135. package/bridging/engine.js +0 -117
  136. package/bridging/engine.js.map +0 -1
  137. package/bridging/engine.mjs +0 -113
  138. package/bridging/engine.mjs.map +0 -1
  139. package/bridging/finishReason.d.mts +0 -7
  140. package/bridging/finishReason.d.mts.map +0 -1
  141. package/bridging/finishReason.d.ts +0 -7
  142. package/bridging/finishReason.d.ts.map +0 -1
  143. package/bridging/finishReason.js +0 -11
  144. package/bridging/finishReason.js.map +0 -1
  145. package/bridging/finishReason.mjs +0 -8
  146. package/bridging/finishReason.mjs.map +0 -1
  147. package/bridging/grammarConfig.d.mts +0 -13
  148. package/bridging/grammarConfig.d.mts.map +0 -1
  149. package/bridging/grammarConfig.d.ts +0 -13
  150. package/bridging/grammarConfig.d.ts.map +0 -1
  151. package/bridging/grammarConfig.js +0 -36
  152. package/bridging/grammarConfig.js.map +0 -1
  153. package/bridging/grammarConfig.mjs +0 -31
  154. package/bridging/grammarConfig.mjs.map +0 -1
  155. package/bridging/input.d.mts +0 -11
  156. package/bridging/input.d.mts.map +0 -1
  157. package/bridging/input.d.ts +0 -11
  158. package/bridging/input.d.ts.map +0 -1
  159. package/bridging/input.js +0 -25
  160. package/bridging/input.js.map +0 -1
  161. package/bridging/input.mjs +0 -21
  162. package/bridging/input.mjs.map +0 -1
  163. package/bridging/licenseStatus.d.mts +0 -14
  164. package/bridging/licenseStatus.d.mts.map +0 -1
  165. package/bridging/licenseStatus.d.ts +0 -14
  166. package/bridging/licenseStatus.d.ts.map +0 -1
  167. package/bridging/licenseStatus.js +0 -42
  168. package/bridging/licenseStatus.js.map +0 -1
  169. package/bridging/licenseStatus.mjs +0 -38
  170. package/bridging/licenseStatus.mjs.map +0 -1
  171. package/bridging/message.d.mts +0 -15
  172. package/bridging/message.d.mts.map +0 -1
  173. package/bridging/message.d.ts +0 -15
  174. package/bridging/message.d.ts.map +0 -1
  175. package/bridging/message.js +0 -43
  176. package/bridging/message.js.map +0 -1
  177. package/bridging/message.mjs +0 -39
  178. package/bridging/message.mjs.map +0 -1
  179. package/bridging/model.d.mts +0 -19
  180. package/bridging/model.d.mts.map +0 -1
  181. package/bridging/model.d.ts +0 -19
  182. package/bridging/model.d.ts.map +0 -1
  183. package/bridging/model.js +0 -39
  184. package/bridging/model.js.map +0 -1
  185. package/bridging/model.mjs +0 -35
  186. package/bridging/model.mjs.map +0 -1
  187. package/bridging/modelKind.d.mts +0 -8
  188. package/bridging/modelKind.d.mts.map +0 -1
  189. package/bridging/modelKind.d.ts +0 -8
  190. package/bridging/modelKind.d.ts.map +0 -1
  191. package/bridging/modelKind.js +0 -30
  192. package/bridging/modelKind.js.map +0 -1
  193. package/bridging/modelKind.mjs +0 -25
  194. package/bridging/modelKind.mjs.map +0 -1
  195. package/bridging/modelType.d.mts +0 -9
  196. package/bridging/modelType.d.mts.map +0 -1
  197. package/bridging/modelType.d.ts +0 -9
  198. package/bridging/modelType.d.ts.map +0 -1
  199. package/bridging/modelType.js +0 -35
  200. package/bridging/modelType.js.map +0 -1
  201. package/bridging/modelType.mjs +0 -30
  202. package/bridging/modelType.mjs.map +0 -1
  203. package/bridging/napi.d.mts +0 -4
  204. package/bridging/napi.d.mts.map +0 -1
  205. package/bridging/napi.d.ts +0 -4
  206. package/bridging/napi.d.ts.map +0 -1
  207. package/bridging/napi.js +0 -3
  208. package/bridging/napi.js.map +0 -1
  209. package/bridging/napi.mjs +0 -2
  210. package/bridging/napi.mjs.map +0 -1
  211. package/bridging/output.d.mts +0 -13
  212. package/bridging/output.d.mts.map +0 -1
  213. package/bridging/output.d.ts +0 -13
  214. package/bridging/output.d.ts.map +0 -1
  215. package/bridging/output.js +0 -36
  216. package/bridging/output.js.map +0 -1
  217. package/bridging/output.mjs +0 -32
  218. package/bridging/output.mjs.map +0 -1
  219. package/bridging/parsedText.d.mts +0 -10
  220. package/bridging/parsedText.d.mts.map +0 -1
  221. package/bridging/parsedText.d.ts +0 -10
  222. package/bridging/parsedText.d.ts.map +0 -1
  223. package/bridging/parsedText.js +0 -24
  224. package/bridging/parsedText.js.map +0 -1
  225. package/bridging/parsedText.mjs +0 -20
  226. package/bridging/parsedText.mjs.map +0 -1
  227. package/bridging/prefillStepSize.d.mts +0 -11
  228. package/bridging/prefillStepSize.d.mts.map +0 -1
  229. package/bridging/prefillStepSize.d.ts +0 -11
  230. package/bridging/prefillStepSize.d.ts.map +0 -1
  231. package/bridging/prefillStepSize.js +0 -28
  232. package/bridging/prefillStepSize.js.map +0 -1
  233. package/bridging/prefillStepSize.mjs +0 -24
  234. package/bridging/prefillStepSize.mjs.map +0 -1
  235. package/bridging/preset.d.mts +0 -14
  236. package/bridging/preset.d.mts.map +0 -1
  237. package/bridging/preset.d.ts +0 -14
  238. package/bridging/preset.d.ts.map +0 -1
  239. package/bridging/preset.js +0 -41
  240. package/bridging/preset.js.map +0 -1
  241. package/bridging/preset.mjs +0 -37
  242. package/bridging/preset.mjs.map +0 -1
  243. package/bridging/role.d.mts +0 -6
  244. package/bridging/role.d.mts.map +0 -1
  245. package/bridging/role.d.ts +0 -6
  246. package/bridging/role.d.ts.map +0 -1
  247. package/bridging/role.js +0 -10
  248. package/bridging/role.js.map +0 -1
  249. package/bridging/role.mjs +0 -7
  250. package/bridging/role.mjs.map +0 -1
  251. package/bridging/runConfig.d.mts +0 -18
  252. package/bridging/runConfig.d.mts.map +0 -1
  253. package/bridging/runConfig.d.ts +0 -18
  254. package/bridging/runConfig.d.ts.map +0 -1
  255. package/bridging/runConfig.js +0 -42
  256. package/bridging/runConfig.js.map +0 -1
  257. package/bridging/runConfig.mjs +0 -38
  258. package/bridging/runConfig.mjs.map +0 -1
  259. package/bridging/runStats.d.mts +0 -8
  260. package/bridging/runStats.d.mts.map +0 -1
  261. package/bridging/runStats.d.ts +0 -8
  262. package/bridging/runStats.d.ts.map +0 -1
  263. package/bridging/runStats.js +0 -16
  264. package/bridging/runStats.js.map +0 -1
  265. package/bridging/runStats.mjs +0 -12
  266. package/bridging/runStats.mjs.map +0 -1
  267. package/bridging/samplingMethod.d.mts +0 -11
  268. package/bridging/samplingMethod.d.mts.map +0 -1
  269. package/bridging/samplingMethod.d.ts +0 -11
  270. package/bridging/samplingMethod.d.ts.map +0 -1
  271. package/bridging/samplingMethod.js +0 -37
  272. package/bridging/samplingMethod.js.map +0 -1
  273. package/bridging/samplingMethod.mjs +0 -33
  274. package/bridging/samplingMethod.mjs.map +0 -1
  275. package/bridging/samplingPolicy.d.mts +0 -11
  276. package/bridging/samplingPolicy.d.mts.map +0 -1
  277. package/bridging/samplingPolicy.d.ts +0 -11
  278. package/bridging/samplingPolicy.d.ts.map +0 -1
  279. package/bridging/samplingPolicy.js +0 -25
  280. package/bridging/samplingPolicy.js.map +0 -1
  281. package/bridging/samplingPolicy.mjs +0 -21
  282. package/bridging/samplingPolicy.mjs.map +0 -1
  283. package/bridging/samplingProcessingOrder.d.mts +0 -8
  284. package/bridging/samplingProcessingOrder.d.mts.map +0 -1
  285. package/bridging/samplingProcessingOrder.d.ts +0 -8
  286. package/bridging/samplingProcessingOrder.d.ts.map +0 -1
  287. package/bridging/samplingProcessingOrder.js +0 -30
  288. package/bridging/samplingProcessingOrder.js.map +0 -1
  289. package/bridging/samplingProcessingOrder.mjs +0 -25
  290. package/bridging/samplingProcessingOrder.mjs.map +0 -1
  291. package/bridging/samplingSeed.d.mts +0 -10
  292. package/bridging/samplingSeed.d.mts.map +0 -1
  293. package/bridging/samplingSeed.d.ts +0 -10
  294. package/bridging/samplingSeed.d.ts.map +0 -1
  295. package/bridging/samplingSeed.js +0 -21
  296. package/bridging/samplingSeed.js.map +0 -1
  297. package/bridging/samplingSeed.mjs +0 -17
  298. package/bridging/samplingSeed.mjs.map +0 -1
  299. package/bridging/stats.d.mts +0 -11
  300. package/bridging/stats.d.mts.map +0 -1
  301. package/bridging/stats.d.ts +0 -11
  302. package/bridging/stats.d.ts.map +0 -1
  303. package/bridging/stats.js +0 -20
  304. package/bridging/stats.js.map +0 -1
  305. package/bridging/stats.mjs +0 -16
  306. package/bridging/stats.mjs.map +0 -1
  307. package/bridging/stepStats.d.mts +0 -14
  308. package/bridging/stepStats.d.mts.map +0 -1
  309. package/bridging/stepStats.d.ts +0 -14
  310. package/bridging/stepStats.d.ts.map +0 -1
  311. package/bridging/stepStats.js +0 -27
  312. package/bridging/stepStats.js.map +0 -1
  313. package/bridging/stepStats.mjs +0 -23
  314. package/bridging/stepStats.mjs.map +0 -1
  315. package/bridging/text.d.mts +0 -9
  316. package/bridging/text.d.mts.map +0 -1
  317. package/bridging/text.d.ts +0 -9
  318. package/bridging/text.d.ts.map +0 -1
  319. package/bridging/text.js +0 -17
  320. package/bridging/text.js.map +0 -1
  321. package/bridging/text.mjs +0 -13
  322. package/bridging/text.mjs.map +0 -1
  323. package/bridging/textToSpeechSession.d.mts +0 -8
  324. package/bridging/textToSpeechSession.d.mts.map +0 -1
  325. package/bridging/textToSpeechSession.d.ts +0 -8
  326. package/bridging/textToSpeechSession.d.ts.map +0 -1
  327. package/bridging/textToSpeechSession.js +0 -14
  328. package/bridging/textToSpeechSession.js.map +0 -1
  329. package/bridging/textToSpeechSession.mjs +0 -10
  330. package/bridging/textToSpeechSession.mjs.map +0 -1
  331. package/bridging/totalStats.d.mts +0 -9
  332. package/bridging/totalStats.d.mts.map +0 -1
  333. package/bridging/totalStats.d.ts +0 -9
  334. package/bridging/totalStats.d.ts.map +0 -1
  335. package/bridging/totalStats.js +0 -18
  336. package/bridging/totalStats.js.map +0 -1
  337. package/bridging/totalStats.mjs +0 -14
  338. package/bridging/totalStats.mjs.map +0 -1
  339. package/error.d.mts +0 -18
  340. package/error.d.mts.map +0 -1
  341. package/error.d.ts +0 -18
  342. package/error.d.ts.map +0 -1
  343. package/error.js +0 -46
  344. package/error.js.map +0 -1
  345. package/error.mjs +0 -41
  346. package/error.mjs.map +0 -1
  347. package/interactors/chatModelInteractor.d.mts +0 -34
  348. package/interactors/chatModelInteractor.d.mts.map +0 -1
  349. package/interactors/chatModelInteractor.d.ts +0 -34
  350. package/interactors/chatModelInteractor.d.ts.map +0 -1
  351. package/interactors/chatModelInteractor.js +0 -93
  352. package/interactors/chatModelInteractor.js.map +0 -1
  353. package/interactors/chatModelInteractor.mjs +0 -89
  354. package/interactors/chatModelInteractor.mjs.map +0 -1
  355. package/interactors/chatModelsInteractor.d.mts +0 -12
  356. package/interactors/chatModelsInteractor.d.mts.map +0 -1
  357. package/interactors/chatModelsInteractor.d.ts +0 -12
  358. package/interactors/chatModelsInteractor.d.ts.map +0 -1
  359. package/interactors/chatModelsInteractor.js +0 -25
  360. package/interactors/chatModelsInteractor.js.map +0 -1
  361. package/interactors/chatModelsInteractor.mjs +0 -21
  362. package/interactors/chatModelsInteractor.mjs.map +0 -1
  363. package/interactors/chatSessionInteractor.d.mts +0 -26
  364. package/interactors/chatSessionInteractor.d.mts.map +0 -1
  365. package/interactors/chatSessionInteractor.d.ts +0 -26
  366. package/interactors/chatSessionInteractor.d.ts.map +0 -1
  367. package/interactors/chatSessionInteractor.js +0 -54
  368. package/interactors/chatSessionInteractor.js.map +0 -1
  369. package/interactors/chatSessionInteractor.mjs +0 -50
  370. package/interactors/chatSessionInteractor.mjs.map +0 -1
  371. package/interactors/downloadInteractor.d.mts +0 -16
  372. package/interactors/downloadInteractor.d.mts.map +0 -1
  373. package/interactors/downloadInteractor.d.ts +0 -16
  374. package/interactors/downloadInteractor.d.ts.map +0 -1
  375. package/interactors/downloadInteractor.js +0 -38
  376. package/interactors/downloadInteractor.js.map +0 -1
  377. package/interactors/downloadInteractor.mjs +0 -34
  378. package/interactors/downloadInteractor.mjs.map +0 -1
  379. package/interactors/engineInteractor.d.mts +0 -15
  380. package/interactors/engineInteractor.d.mts.map +0 -1
  381. package/interactors/engineInteractor.d.ts +0 -15
  382. package/interactors/engineInteractor.d.ts.map +0 -1
  383. package/interactors/engineInteractor.js +0 -30
  384. package/interactors/engineInteractor.js.map +0 -1
  385. package/interactors/engineInteractor.mjs +0 -26
  386. package/interactors/engineInteractor.mjs.map +0 -1
  387. package/interactors/interactor.d.mts +0 -6
  388. package/interactors/interactor.d.mts.map +0 -1
  389. package/interactors/interactor.d.ts +0 -6
  390. package/interactors/interactor.d.ts.map +0 -1
  391. package/interactors/interactor.js +0 -3
  392. package/interactors/interactor.js.map +0 -1
  393. package/interactors/interactor.mjs +0 -2
  394. package/interactors/interactor.mjs.map +0 -1
  395. package/napi/uzu.d.ts +0 -325
  396. package/napi/uzu.js +0 -121
  397. package/napi/uzu.mjs +0 -74
  398. package/src/bridging/asyncBatchSize.ts +0 -24
  399. package/src/bridging/chatSession.ts +0 -28
  400. package/src/bridging/classificationFeature.ts +0 -20
  401. package/src/bridging/classificationLabel.ts +0 -43
  402. package/src/bridging/classificationOutput.ts +0 -22
  403. package/src/bridging/classificationSession.ts +0 -17
  404. package/src/bridging/classificationStats.ts +0 -45
  405. package/src/bridging/config.ts +0 -122
  406. package/src/bridging/contextLength.ts +0 -29
  407. package/src/bridging/contextMode.ts +0 -31
  408. package/src/bridging/downloadHandle.ts +0 -41
  409. package/src/bridging/downloadProgressUpdate.ts +0 -21
  410. package/src/bridging/downloadState.ts +0 -62
  411. package/src/bridging/engine.ts +0 -141
  412. package/src/bridging/finishReason.ts +0 -6
  413. package/src/bridging/grammarConfig.ts +0 -40
  414. package/src/bridging/input.ts +0 -29
  415. package/src/bridging/licenseStatus.ts +0 -39
  416. package/src/bridging/message.ts +0 -50
  417. package/src/bridging/model.ts +0 -68
  418. package/src/bridging/modelKind.ts +0 -27
  419. package/src/bridging/modelType.ts +0 -32
  420. package/src/bridging/napi.ts +0 -3
  421. package/src/bridging/output.ts +0 -40
  422. package/src/bridging/parsedText.ts +0 -27
  423. package/src/bridging/prefillStepSize.ts +0 -32
  424. package/src/bridging/preset.ts +0 -48
  425. package/src/bridging/role.ts +0 -5
  426. package/src/bridging/runConfig.ts +0 -57
  427. package/src/bridging/runStats.ts +0 -17
  428. package/src/bridging/samplingMethod.ts +0 -49
  429. package/src/bridging/samplingPolicy.ts +0 -29
  430. package/src/bridging/samplingProcessingOrder.ts +0 -31
  431. package/src/bridging/samplingSeed.ts +0 -24
  432. package/src/bridging/stats.ts +0 -22
  433. package/src/bridging/stepStats.ts +0 -49
  434. package/src/bridging/text.ts +0 -18
  435. package/src/bridging/textToSpeechSession.ts +0 -15
  436. package/src/bridging/totalStats.ts +0 -20
  437. package/src/error.ts +0 -42
  438. package/src/interactors/chatModelInteractor.ts +0 -126
  439. package/src/interactors/chatModelsInteractor.ts +0 -29
  440. package/src/interactors/chatSessionInteractor.ts +0 -80
  441. package/src/interactors/downloadInteractor.ts +0 -47
  442. package/src/interactors/engineInteractor.ts +0 -38
  443. package/src/interactors/interactor.ts +0 -7
  444. package/src/napi/uzu.d.ts +0 -325
  445. package/src/napi/uzu.js +0 -121
  446. package/src/napi/uzu.mjs +0 -74
  447. package/src/utilities/env.ts +0 -9
  448. package/utilities/env.d.mts +0 -2
  449. package/utilities/env.d.mts.map +0 -1
  450. package/utilities/env.d.ts +0 -2
  451. package/utilities/env.d.ts.map +0 -1
  452. package/utilities/env.js +0 -14
  453. package/utilities/env.js.map +0 -1
  454. package/utilities/env.mjs +0 -10
  455. package/utilities/env.mjs.map +0 -1
package/napi/index.js ADDED
@@ -0,0 +1,626 @@
1
+ // prettier-ignore
2
+ /* eslint-disable */
3
+ // @ts-nocheck
4
+ /* auto-generated by NAPI-RS */
5
+
6
+ const { createRequire } = require('node:module')
7
+ require = createRequire(__filename)
8
+
9
+ const { readFileSync } = require('node:fs')
10
+ let nativeBinding = null
11
+ const loadErrors = []
12
+
13
+ const isMusl = () => {
14
+ let musl = false
15
+ if (process.platform === 'linux') {
16
+ musl = isMuslFromFilesystem()
17
+ if (musl === null) {
18
+ musl = isMuslFromReport()
19
+ }
20
+ if (musl === null) {
21
+ musl = isMuslFromChildProcess()
22
+ }
23
+ }
24
+ return musl
25
+ }
26
+
27
+ const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
28
+
29
+ const isMuslFromFilesystem = () => {
30
+ try {
31
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
32
+ } catch {
33
+ return null
34
+ }
35
+ }
36
+
37
+ const isMuslFromReport = () => {
38
+ let report = null
39
+ if (typeof process.report?.getReport === 'function') {
40
+ process.report.excludeNetwork = true
41
+ report = process.report.getReport()
42
+ }
43
+ if (!report) {
44
+ return null
45
+ }
46
+ if (report.header && report.header.glibcVersionRuntime) {
47
+ return false
48
+ }
49
+ if (Array.isArray(report.sharedObjects)) {
50
+ if (report.sharedObjects.some(isFileMusl)) {
51
+ return true
52
+ }
53
+ }
54
+ return false
55
+ }
56
+
57
+ const isMuslFromChildProcess = () => {
58
+ try {
59
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
60
+ } catch (e) {
61
+ // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
62
+ return false
63
+ }
64
+ }
65
+
66
+ function requireNative() {
67
+ if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
68
+ try {
69
+ nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
70
+ } catch (err) {
71
+ loadErrors.push(err)
72
+ }
73
+ } else if (process.platform === 'android') {
74
+ if (process.arch === 'arm64') {
75
+ try {
76
+ return require('./uzu.android-arm64.node')
77
+ } catch (e) {
78
+ loadErrors.push(e)
79
+ }
80
+ try {
81
+ const binding = require('@trymirai/uzu-android-arm64')
82
+ const bindingPackageVersion = require('@trymirai/uzu-android-arm64/package.json').version
83
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
84
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ }
86
+ return binding
87
+ } catch (e) {
88
+ loadErrors.push(e)
89
+ }
90
+ } else if (process.arch === 'arm') {
91
+ try {
92
+ return require('./uzu.android-arm-eabi.node')
93
+ } catch (e) {
94
+ loadErrors.push(e)
95
+ }
96
+ try {
97
+ const binding = require('@trymirai/uzu-android-arm-eabi')
98
+ const bindingPackageVersion = require('@trymirai/uzu-android-arm-eabi/package.json').version
99
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
100
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ }
102
+ return binding
103
+ } catch (e) {
104
+ loadErrors.push(e)
105
+ }
106
+ } else {
107
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
108
+ }
109
+ } else if (process.platform === 'win32') {
110
+ if (process.arch === 'x64') {
111
+ try {
112
+ return require('./uzu.win32-x64-msvc.node')
113
+ } catch (e) {
114
+ loadErrors.push(e)
115
+ }
116
+ try {
117
+ const binding = require('@trymirai/uzu-win32-x64-msvc')
118
+ const bindingPackageVersion = require('@trymirai/uzu-win32-x64-msvc/package.json').version
119
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
120
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
+ }
122
+ return binding
123
+ } catch (e) {
124
+ loadErrors.push(e)
125
+ }
126
+ } else if (process.arch === 'ia32') {
127
+ try {
128
+ return require('./uzu.win32-ia32-msvc.node')
129
+ } catch (e) {
130
+ loadErrors.push(e)
131
+ }
132
+ try {
133
+ const binding = require('@trymirai/uzu-win32-ia32-msvc')
134
+ const bindingPackageVersion = require('@trymirai/uzu-win32-ia32-msvc/package.json').version
135
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
136
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ }
138
+ return binding
139
+ } catch (e) {
140
+ loadErrors.push(e)
141
+ }
142
+ } else if (process.arch === 'arm64') {
143
+ try {
144
+ return require('./uzu.win32-arm64-msvc.node')
145
+ } catch (e) {
146
+ loadErrors.push(e)
147
+ }
148
+ try {
149
+ const binding = require('@trymirai/uzu-win32-arm64-msvc')
150
+ const bindingPackageVersion = require('@trymirai/uzu-win32-arm64-msvc/package.json').version
151
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
152
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
153
+ }
154
+ return binding
155
+ } catch (e) {
156
+ loadErrors.push(e)
157
+ }
158
+ } else {
159
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
160
+ }
161
+ } else if (process.platform === 'darwin') {
162
+ try {
163
+ return require('./uzu.darwin-universal.node')
164
+ } catch (e) {
165
+ loadErrors.push(e)
166
+ }
167
+ try {
168
+ const binding = require('@trymirai/uzu-darwin-universal')
169
+ const bindingPackageVersion = require('@trymirai/uzu-darwin-universal/package.json').version
170
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
+ }
173
+ return binding
174
+ } catch (e) {
175
+ loadErrors.push(e)
176
+ }
177
+ if (process.arch === 'x64') {
178
+ try {
179
+ return require('./uzu.darwin-x64.node')
180
+ } catch (e) {
181
+ loadErrors.push(e)
182
+ }
183
+ try {
184
+ const binding = require('@trymirai/uzu-darwin-x64')
185
+ const bindingPackageVersion = require('@trymirai/uzu-darwin-x64/package.json').version
186
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
187
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
188
+ }
189
+ return binding
190
+ } catch (e) {
191
+ loadErrors.push(e)
192
+ }
193
+ } else if (process.arch === 'arm64') {
194
+ try {
195
+ return require('./uzu.darwin-arm64.node')
196
+ } catch (e) {
197
+ loadErrors.push(e)
198
+ }
199
+ try {
200
+ const binding = require('@trymirai/uzu-darwin-arm64')
201
+ const bindingPackageVersion = require('@trymirai/uzu-darwin-arm64/package.json').version
202
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
+ }
205
+ return binding
206
+ } catch (e) {
207
+ loadErrors.push(e)
208
+ }
209
+ } else {
210
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
211
+ }
212
+ } else if (process.platform === 'freebsd') {
213
+ if (process.arch === 'x64') {
214
+ try {
215
+ return require('./uzu.freebsd-x64.node')
216
+ } catch (e) {
217
+ loadErrors.push(e)
218
+ }
219
+ try {
220
+ const binding = require('@trymirai/uzu-freebsd-x64')
221
+ const bindingPackageVersion = require('@trymirai/uzu-freebsd-x64/package.json').version
222
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
223
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
224
+ }
225
+ return binding
226
+ } catch (e) {
227
+ loadErrors.push(e)
228
+ }
229
+ } else if (process.arch === 'arm64') {
230
+ try {
231
+ return require('./uzu.freebsd-arm64.node')
232
+ } catch (e) {
233
+ loadErrors.push(e)
234
+ }
235
+ try {
236
+ const binding = require('@trymirai/uzu-freebsd-arm64')
237
+ const bindingPackageVersion = require('@trymirai/uzu-freebsd-arm64/package.json').version
238
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
239
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
240
+ }
241
+ return binding
242
+ } catch (e) {
243
+ loadErrors.push(e)
244
+ }
245
+ } else {
246
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
247
+ }
248
+ } else if (process.platform === 'linux') {
249
+ if (process.arch === 'x64') {
250
+ if (isMusl()) {
251
+ try {
252
+ return require('./uzu.linux-x64-musl.node')
253
+ } catch (e) {
254
+ loadErrors.push(e)
255
+ }
256
+ try {
257
+ const binding = require('@trymirai/uzu-linux-x64-musl')
258
+ const bindingPackageVersion = require('@trymirai/uzu-linux-x64-musl/package.json').version
259
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
260
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
261
+ }
262
+ return binding
263
+ } catch (e) {
264
+ loadErrors.push(e)
265
+ }
266
+ } else {
267
+ try {
268
+ return require('./uzu.linux-x64-gnu.node')
269
+ } catch (e) {
270
+ loadErrors.push(e)
271
+ }
272
+ try {
273
+ const binding = require('@trymirai/uzu-linux-x64-gnu')
274
+ const bindingPackageVersion = require('@trymirai/uzu-linux-x64-gnu/package.json').version
275
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
276
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
277
+ }
278
+ return binding
279
+ } catch (e) {
280
+ loadErrors.push(e)
281
+ }
282
+ }
283
+ } else if (process.arch === 'arm64') {
284
+ if (isMusl()) {
285
+ try {
286
+ return require('./uzu.linux-arm64-musl.node')
287
+ } catch (e) {
288
+ loadErrors.push(e)
289
+ }
290
+ try {
291
+ const binding = require('@trymirai/uzu-linux-arm64-musl')
292
+ const bindingPackageVersion = require('@trymirai/uzu-linux-arm64-musl/package.json').version
293
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
294
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ }
296
+ return binding
297
+ } catch (e) {
298
+ loadErrors.push(e)
299
+ }
300
+ } else {
301
+ try {
302
+ return require('./uzu.linux-arm64-gnu.node')
303
+ } catch (e) {
304
+ loadErrors.push(e)
305
+ }
306
+ try {
307
+ const binding = require('@trymirai/uzu-linux-arm64-gnu')
308
+ const bindingPackageVersion = require('@trymirai/uzu-linux-arm64-gnu/package.json').version
309
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
310
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
311
+ }
312
+ return binding
313
+ } catch (e) {
314
+ loadErrors.push(e)
315
+ }
316
+ }
317
+ } else if (process.arch === 'arm') {
318
+ if (isMusl()) {
319
+ try {
320
+ return require('./uzu.linux-arm-musleabihf.node')
321
+ } catch (e) {
322
+ loadErrors.push(e)
323
+ }
324
+ try {
325
+ const binding = require('@trymirai/uzu-linux-arm-musleabihf')
326
+ const bindingPackageVersion = require('@trymirai/uzu-linux-arm-musleabihf/package.json').version
327
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
328
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ }
330
+ return binding
331
+ } catch (e) {
332
+ loadErrors.push(e)
333
+ }
334
+ } else {
335
+ try {
336
+ return require('./uzu.linux-arm-gnueabihf.node')
337
+ } catch (e) {
338
+ loadErrors.push(e)
339
+ }
340
+ try {
341
+ const binding = require('@trymirai/uzu-linux-arm-gnueabihf')
342
+ const bindingPackageVersion = require('@trymirai/uzu-linux-arm-gnueabihf/package.json').version
343
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
344
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
345
+ }
346
+ return binding
347
+ } catch (e) {
348
+ loadErrors.push(e)
349
+ }
350
+ }
351
+ } else if (process.arch === 'riscv64') {
352
+ if (isMusl()) {
353
+ try {
354
+ return require('./uzu.linux-riscv64-musl.node')
355
+ } catch (e) {
356
+ loadErrors.push(e)
357
+ }
358
+ try {
359
+ const binding = require('@trymirai/uzu-linux-riscv64-musl')
360
+ const bindingPackageVersion = require('@trymirai/uzu-linux-riscv64-musl/package.json').version
361
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ }
364
+ return binding
365
+ } catch (e) {
366
+ loadErrors.push(e)
367
+ }
368
+ } else {
369
+ try {
370
+ return require('./uzu.linux-riscv64-gnu.node')
371
+ } catch (e) {
372
+ loadErrors.push(e)
373
+ }
374
+ try {
375
+ const binding = require('@trymirai/uzu-linux-riscv64-gnu')
376
+ const bindingPackageVersion = require('@trymirai/uzu-linux-riscv64-gnu/package.json').version
377
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
378
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379
+ }
380
+ return binding
381
+ } catch (e) {
382
+ loadErrors.push(e)
383
+ }
384
+ }
385
+ } else if (process.arch === 'ppc64') {
386
+ try {
387
+ return require('./uzu.linux-ppc64-gnu.node')
388
+ } catch (e) {
389
+ loadErrors.push(e)
390
+ }
391
+ try {
392
+ const binding = require('@trymirai/uzu-linux-ppc64-gnu')
393
+ const bindingPackageVersion = require('@trymirai/uzu-linux-ppc64-gnu/package.json').version
394
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
395
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ }
397
+ return binding
398
+ } catch (e) {
399
+ loadErrors.push(e)
400
+ }
401
+ } else if (process.arch === 's390x') {
402
+ try {
403
+ return require('./uzu.linux-s390x-gnu.node')
404
+ } catch (e) {
405
+ loadErrors.push(e)
406
+ }
407
+ try {
408
+ const binding = require('@trymirai/uzu-linux-s390x-gnu')
409
+ const bindingPackageVersion = require('@trymirai/uzu-linux-s390x-gnu/package.json').version
410
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
+ }
413
+ return binding
414
+ } catch (e) {
415
+ loadErrors.push(e)
416
+ }
417
+ } else {
418
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
419
+ }
420
+ } else if (process.platform === 'openharmony') {
421
+ if (process.arch === 'arm64') {
422
+ try {
423
+ return require('./uzu.openharmony-arm64.node')
424
+ } catch (e) {
425
+ loadErrors.push(e)
426
+ }
427
+ try {
428
+ const binding = require('@trymirai/uzu-openharmony-arm64')
429
+ const bindingPackageVersion = require('@trymirai/uzu-openharmony-arm64/package.json').version
430
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
+ }
433
+ return binding
434
+ } catch (e) {
435
+ loadErrors.push(e)
436
+ }
437
+ } else if (process.arch === 'x64') {
438
+ try {
439
+ return require('./uzu.openharmony-x64.node')
440
+ } catch (e) {
441
+ loadErrors.push(e)
442
+ }
443
+ try {
444
+ const binding = require('@trymirai/uzu-openharmony-x64')
445
+ const bindingPackageVersion = require('@trymirai/uzu-openharmony-x64/package.json').version
446
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
447
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ }
449
+ return binding
450
+ } catch (e) {
451
+ loadErrors.push(e)
452
+ }
453
+ } else if (process.arch === 'arm') {
454
+ try {
455
+ return require('./uzu.openharmony-arm.node')
456
+ } catch (e) {
457
+ loadErrors.push(e)
458
+ }
459
+ try {
460
+ const binding = require('@trymirai/uzu-openharmony-arm')
461
+ const bindingPackageVersion = require('@trymirai/uzu-openharmony-arm/package.json').version
462
+ if (bindingPackageVersion !== '0.4.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
463
+ throw new Error(`Native binding package version mismatch, expected 0.4.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ }
465
+ return binding
466
+ } catch (e) {
467
+ loadErrors.push(e)
468
+ }
469
+ } else {
470
+ loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
471
+ }
472
+ } else {
473
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
474
+ }
475
+ }
476
+
477
+ nativeBinding = requireNative()
478
+
479
+ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
480
+ try {
481
+ nativeBinding = require('./uzu.wasi.cjs')
482
+ } catch (err) {
483
+ if (process.env.NAPI_RS_FORCE_WASI) {
484
+ loadErrors.push(err)
485
+ }
486
+ }
487
+ if (!nativeBinding) {
488
+ try {
489
+ nativeBinding = require('@trymirai/uzu-wasm32-wasi')
490
+ } catch (err) {
491
+ if (process.env.NAPI_RS_FORCE_WASI) {
492
+ loadErrors.push(err)
493
+ }
494
+ }
495
+ }
496
+ }
497
+
498
+ if (!nativeBinding) {
499
+ if (loadErrors.length > 0) {
500
+ throw new Error(
501
+ `Cannot find native binding. ` +
502
+ `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
503
+ 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
504
+ { cause: loadErrors }
505
+ )
506
+ }
507
+ throw new Error(`Failed to load native binding`)
508
+ }
509
+
510
+ module.exports = nativeBinding
511
+ module.exports.ChatSession = nativeBinding.ChatSession
512
+ module.exports.ChatSessionStream = nativeBinding.ChatSessionStream
513
+ module.exports.ChatSessionStreamChunkError = nativeBinding.ChatSessionStreamChunkError
514
+ module.exports.ChatSessionStreamChunkReplies = nativeBinding.ChatSessionStreamChunkReplies
515
+ module.exports.ClassificationSession = nativeBinding.ClassificationSession
516
+ module.exports.TextToSpeechSession = nativeBinding.TextToSpeechSession
517
+ module.exports.TextToSpeechSessionStream = nativeBinding.TextToSpeechSessionStream
518
+ module.exports.TextToSpeechSessionStreamChunkError = nativeBinding.TextToSpeechSessionStreamChunkError
519
+ module.exports.TextToSpeechSessionStreamChunkPcmBatch = nativeBinding.TextToSpeechSessionStreamChunkPcmBatch
520
+ module.exports.ChatSessionState = nativeBinding.ChatSessionState
521
+ module.exports.ClassificationSessionState = nativeBinding.ClassificationSessionState
522
+ module.exports.TextToSpeechSessionState = nativeBinding.TextToSpeechSessionState
523
+ module.exports.CancelToken = nativeBinding.CancelToken
524
+ module.exports.ChatConfig = nativeBinding.ChatConfig
525
+ module.exports.ChatContentBlockAudio = nativeBinding.ChatContentBlockAudio
526
+ module.exports.ChatContentBlockBuiltinTools = nativeBinding.ChatContentBlockBuiltinTools
527
+ module.exports.ChatContentBlockConversationStartDate = nativeBinding.ChatContentBlockConversationStartDate
528
+ module.exports.ChatContentBlockCustom = nativeBinding.ChatContentBlockCustom
529
+ module.exports.ChatContentBlockFile = nativeBinding.ChatContentBlockFile
530
+ module.exports.ChatContentBlockIdentity = nativeBinding.ChatContentBlockIdentity
531
+ module.exports.ChatContentBlockImage = nativeBinding.ChatContentBlockImage
532
+ module.exports.ChatContentBlockKnowledgeCutoff = nativeBinding.ChatContentBlockKnowledgeCutoff
533
+ module.exports.ChatContentBlockReasoning = nativeBinding.ChatContentBlockReasoning
534
+ module.exports.ChatContentBlockReasoningEffort = nativeBinding.ChatContentBlockReasoningEffort
535
+ module.exports.ChatContentBlockText = nativeBinding.ChatContentBlockText
536
+ module.exports.ChatContentBlockToolCall = nativeBinding.ChatContentBlockToolCall
537
+ module.exports.ChatContentBlockToolCallCandidate = nativeBinding.ChatContentBlockToolCallCandidate
538
+ module.exports.ChatContentBlockToolCallResult = nativeBinding.ChatContentBlockToolCallResult
539
+ module.exports.ChatContentBlockTools = nativeBinding.ChatContentBlockTools
540
+ module.exports.ChatContentBlockTranslation = nativeBinding.ChatContentBlockTranslation
541
+ module.exports.ChatContentBlockVideo = nativeBinding.ChatContentBlockVideo
542
+ module.exports.ChatMessage = nativeBinding.ChatMessage
543
+ module.exports.ChatModelCapabilities = nativeBinding.ChatModelCapabilities
544
+ module.exports.ChatReply = nativeBinding.ChatReply
545
+ module.exports.ChatReplyConfig = nativeBinding.ChatReplyConfig
546
+ module.exports.ChatReplyStats = nativeBinding.ChatReplyStats
547
+ module.exports.ChatRoleAssistant = nativeBinding.ChatRoleAssistant
548
+ module.exports.ChatRoleCustom = nativeBinding.ChatRoleCustom
549
+ module.exports.ChatRoleDeveloper = nativeBinding.ChatRoleDeveloper
550
+ module.exports.ChatRoleSystem = nativeBinding.ChatRoleSystem
551
+ module.exports.ChatRoleTool = nativeBinding.ChatRoleTool
552
+ module.exports.ChatRoleUser = nativeBinding.ChatRoleUser
553
+ module.exports.ChatSpeculationPresetClassification = nativeBinding.ChatSpeculationPresetClassification
554
+ module.exports.ChatSpeculationPresetGeneralChat = nativeBinding.ChatSpeculationPresetGeneralChat
555
+ module.exports.ChatSpeculationPresetSummarization = nativeBinding.ChatSpeculationPresetSummarization
556
+ module.exports.ClassificationLabel = nativeBinding.ClassificationLabel
557
+ module.exports.ClassificationMessage = nativeBinding.ClassificationMessage
558
+ module.exports.ClassificationOutput = nativeBinding.ClassificationOutput
559
+ module.exports.ClassificationStats = nativeBinding.ClassificationStats
560
+ module.exports.ContextLengthCustom = nativeBinding.ContextLengthCustom
561
+ module.exports.ContextLengthDefault = nativeBinding.ContextLengthDefault
562
+ module.exports.ContextLengthMaximal = nativeBinding.ContextLengthMaximal
563
+ module.exports.Feature = nativeBinding.Feature
564
+ module.exports.File = nativeBinding.File
565
+ module.exports.GrammarJsonAny = nativeBinding.GrammarJsonAny
566
+ module.exports.GrammarJsonSchema = nativeBinding.GrammarJsonSchema
567
+ module.exports.GrammarRegex = nativeBinding.GrammarRegex
568
+ module.exports.Hash = nativeBinding.Hash
569
+ module.exports.Image = nativeBinding.Image
570
+ module.exports.Metadata = nativeBinding.Metadata
571
+ module.exports.Model = nativeBinding.Model
572
+ module.exports.ModelAccessibilityLocal = nativeBinding.ModelAccessibilityLocal
573
+ module.exports.ModelAccessibilityRemote = nativeBinding.ModelAccessibilityRemote
574
+ module.exports.ModelBackend = nativeBinding.ModelBackend
575
+ module.exports.ModelFamily = nativeBinding.ModelFamily
576
+ module.exports.ModelProperties = nativeBinding.ModelProperties
577
+ module.exports.ModelQuantization = nativeBinding.ModelQuantization
578
+ module.exports.ModelReferenceHuggingFace = nativeBinding.ModelReferenceHuggingFace
579
+ module.exports.ModelReferenceLocal = nativeBinding.ModelReferenceLocal
580
+ module.exports.ModelReferenceMirai = nativeBinding.ModelReferenceMirai
581
+ module.exports.ModelRegistry = nativeBinding.ModelRegistry
582
+ module.exports.ModelSpecializationChat = nativeBinding.ModelSpecializationChat
583
+ module.exports.ModelSpecializationClassification = nativeBinding.ModelSpecializationClassification
584
+ module.exports.ModelSpecializationSpeculation = nativeBinding.ModelSpecializationSpeculation
585
+ module.exports.ModelSpecializationTextToSpeech = nativeBinding.ModelSpecializationTextToSpeech
586
+ module.exports.ModelSpecializationTranslation = nativeBinding.ModelSpecializationTranslation
587
+ module.exports.ModelVendor = nativeBinding.ModelVendor
588
+ module.exports.PcmBatch = nativeBinding.PcmBatch
589
+ module.exports.Repository = nativeBinding.Repository
590
+ module.exports.SamplingMethodGreedy = nativeBinding.SamplingMethodGreedy
591
+ module.exports.SamplingMethodStochastic = nativeBinding.SamplingMethodStochastic
592
+ module.exports.SamplingPolicyCustom = nativeBinding.SamplingPolicyCustom
593
+ module.exports.SamplingPolicyDefault = nativeBinding.SamplingPolicyDefault
594
+ module.exports.SamplingSeedCustom = nativeBinding.SamplingSeedCustom
595
+ module.exports.SamplingSeedDefault = nativeBinding.SamplingSeedDefault
596
+ module.exports.TextToSpeechStats = nativeBinding.TextToSpeechStats
597
+ module.exports.Token = nativeBinding.Token
598
+ module.exports.ToolCall = nativeBinding.ToolCall
599
+ module.exports.ToolDescriptionFunction = nativeBinding.ToolDescriptionFunction
600
+ module.exports.ToolFunction = nativeBinding.ToolFunction
601
+ module.exports.ToolNamespace = nativeBinding.ToolNamespace
602
+ module.exports.TranslationPayloadImage = nativeBinding.TranslationPayloadImage
603
+ module.exports.TranslationPayloadText = nativeBinding.TranslationPayloadText
604
+ module.exports.Value = nativeBinding.Value
605
+ module.exports.ChatContentBlockType = nativeBinding.ChatContentBlockType
606
+ module.exports.ChatReplyFinishReason = nativeBinding.ChatReplyFinishReason
607
+ module.exports.ClassificationRole = nativeBinding.ClassificationRole
608
+ module.exports.HashMethod = nativeBinding.HashMethod
609
+ module.exports.ImageFormat = nativeBinding.ImageFormat
610
+ module.exports.ImageTheme = nativeBinding.ImageTheme
611
+ module.exports.ReasoningEffort = nativeBinding.ReasoningEffort
612
+ module.exports.Device = nativeBinding.Device
613
+ module.exports.Downloader = nativeBinding.Downloader
614
+ module.exports.DownloaderStream = nativeBinding.DownloaderStream
615
+ module.exports.DownloaderStreamUpdate = nativeBinding.DownloaderStreamUpdate
616
+ module.exports.DownloadPhaseDownloaded = nativeBinding.DownloadPhaseDownloaded
617
+ module.exports.DownloadPhaseDownloading = nativeBinding.DownloadPhaseDownloading
618
+ module.exports.DownloadPhaseError = nativeBinding.DownloadPhaseError
619
+ module.exports.DownloadPhaseLocked = nativeBinding.DownloadPhaseLocked
620
+ module.exports.DownloadPhaseNotDownloaded = nativeBinding.DownloadPhaseNotDownloaded
621
+ module.exports.DownloadPhasePaused = nativeBinding.DownloadPhasePaused
622
+ module.exports.DownloadState = nativeBinding.DownloadState
623
+ module.exports.Engine = nativeBinding.Engine
624
+ module.exports.EngineCallback = nativeBinding.EngineCallback
625
+ module.exports.EngineConfig = nativeBinding.EngineConfig
626
+ module.exports.Keyring = nativeBinding.Keyring
package/napi/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import cjs from './index.js';
2
+
3
+ export default cjs;