@qvac/sdk 0.10.2 → 0.11.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 (200) hide show
  1. package/NOTICE +92 -54
  2. package/dist/client/api/cancel.d.ts +24 -32
  3. package/dist/client/api/cancel.js +58 -31
  4. package/dist/client/api/client-request-id.d.ts +17 -0
  5. package/dist/client/api/client-request-id.js +27 -0
  6. package/dist/client/api/completion-stream.d.ts +1 -1
  7. package/dist/client/api/completion-stream.js +34 -3
  8. package/dist/client/api/diffusion.d.ts +46 -0
  9. package/dist/client/api/diffusion.js +50 -1
  10. package/dist/client/api/download-asset.d.ts +12 -2
  11. package/dist/client/api/download-asset.js +21 -3
  12. package/dist/client/api/embed.d.ts +8 -4
  13. package/dist/client/api/embed.js +14 -1
  14. package/dist/client/api/get-model-info.d.ts +1 -1
  15. package/dist/client/api/index.d.ts +1 -0
  16. package/dist/client/api/index.js +1 -0
  17. package/dist/client/api/load-model.d.ts +12 -4
  18. package/dist/client/api/load-model.js +25 -1
  19. package/dist/client/api/rag.d.ts +9 -3
  20. package/dist/client/api/rag.js +23 -3
  21. package/dist/client/api/transcribe.d.ts +20 -8
  22. package/dist/client/api/transcribe.js +58 -4
  23. package/dist/client/api/unload-model.d.ts +5 -2
  24. package/dist/client/api/unload-model.js +9 -4
  25. package/dist/client/api/upscale.d.ts +45 -0
  26. package/dist/client/api/upscale.js +99 -0
  27. package/dist/client/rpc/expo-rpc-client.js +2 -1
  28. package/dist/client/rpc/node-rpc-client.js +18 -7
  29. package/dist/client/rpc/rpc-client.d.ts +2 -2
  30. package/dist/client/rpc/rpc-client.js +10 -4
  31. package/dist/client/rpc/rpc-error.d.ts +9 -0
  32. package/dist/client/rpc/rpc-error.js +92 -0
  33. package/dist/examples/cancel-by-request-id.d.ts +38 -0
  34. package/dist/examples/cancel-by-request-id.js +103 -0
  35. package/dist/examples/diffusion-esrgan-upscale.d.ts +2 -0
  36. package/dist/examples/diffusion-esrgan-upscale.js +78 -0
  37. package/dist/examples/download-with-cancel.js +10 -10
  38. package/dist/examples/embed-multi-gpu.d.ts +2 -0
  39. package/dist/examples/embed-multi-gpu.js +46 -0
  40. package/dist/examples/llamacpp-multi-gpu.d.ts +2 -0
  41. package/dist/examples/llamacpp-multi-gpu.js +57 -0
  42. package/dist/examples/rag/rag-hyperdb/cancellation.js +20 -17
  43. package/dist/examples/tools/llamacpp-tools-gemma4.d.ts +2 -0
  44. package/dist/examples/tools/llamacpp-tools-gemma4.js +76 -0
  45. package/dist/examples/tools/llamacpp-tools-qwen35.d.ts +2 -0
  46. package/dist/examples/tools/llamacpp-tools-qwen35.js +70 -0
  47. package/dist/examples/transcription/whispercpp-microphone-conversation.d.ts +2 -0
  48. package/dist/examples/transcription/whispercpp-microphone-conversation.js +102 -0
  49. package/dist/examples/tts/supertonic.js +1 -1
  50. package/dist/expo/plugins/withMobileBundle.d.ts +20 -4
  51. package/dist/expo/plugins/withMobileBundle.js +44 -6
  52. package/dist/index.d.ts +5 -2
  53. package/dist/index.js +21 -1
  54. package/dist/models/registry/models.d.ts +186 -318
  55. package/dist/models/registry/models.js +1522 -1667
  56. package/dist/pear/pre.d.ts +3 -0
  57. package/dist/pear/pre.js +3 -0
  58. package/dist/schemas/cancel.d.ts +167 -28
  59. package/dist/schemas/cancel.js +119 -19
  60. package/dist/schemas/common.d.ts +427 -208
  61. package/dist/schemas/common.js +3 -1
  62. package/dist/schemas/completion-event.d.ts +14 -0
  63. package/dist/schemas/completion-event.js +11 -1
  64. package/dist/schemas/completion-stream.d.ts +15 -1
  65. package/dist/schemas/completion-stream.js +25 -7
  66. package/dist/schemas/download-asset.d.ts +15 -9
  67. package/dist/schemas/download-asset.js +17 -6
  68. package/dist/schemas/embed.d.ts +1 -0
  69. package/dist/schemas/embed.js +5 -0
  70. package/dist/schemas/error.d.ts +31 -0
  71. package/dist/schemas/error.js +29 -1
  72. package/dist/schemas/finetune.d.ts +2 -0
  73. package/dist/schemas/finetune.js +5 -0
  74. package/dist/schemas/get-model-info.d.ts +6 -6
  75. package/dist/schemas/llamacpp-config.d.ts +54 -8
  76. package/dist/schemas/llamacpp-config.js +12 -0
  77. package/dist/schemas/load-model.d.ts +1911 -1260
  78. package/dist/schemas/load-model.js +15 -0
  79. package/dist/schemas/model-src-utils.d.ts +14 -14
  80. package/dist/schemas/model-types.d.ts +10 -10
  81. package/dist/schemas/ocr.d.ts +3 -3
  82. package/dist/schemas/plugin.d.ts +40 -1
  83. package/dist/schemas/plugin.js +10 -1
  84. package/dist/schemas/rag.d.ts +9 -0
  85. package/dist/schemas/rag.js +17 -9
  86. package/dist/schemas/registry.d.ts +30 -30
  87. package/dist/schemas/reload-config.d.ts +14 -14
  88. package/dist/schemas/sdcpp-config.d.ts +131 -17
  89. package/dist/schemas/sdcpp-config.js +163 -1
  90. package/dist/schemas/sdk-config.d.ts +649 -271
  91. package/dist/schemas/sdk-errors-client.d.ts +1 -0
  92. package/dist/schemas/sdk-errors-client.js +5 -0
  93. package/dist/schemas/sdk-errors-server.d.ts +5 -0
  94. package/dist/schemas/sdk-errors-server.js +25 -0
  95. package/dist/schemas/text-to-speech.d.ts +78 -78
  96. package/dist/schemas/transcription-config.d.ts +24 -24
  97. package/dist/schemas/transcription.d.ts +56 -2
  98. package/dist/schemas/transcription.js +27 -0
  99. package/dist/schemas/translate.d.ts +2 -0
  100. package/dist/schemas/translate.js +13 -2
  101. package/dist/schemas/translation-config.d.ts +40 -40
  102. package/dist/schemas/unload-model.d.ts +2 -1
  103. package/dist/schemas/unload-model.js +4 -1
  104. package/dist/scripts/run-unit-tests.js +15 -2
  105. package/dist/server/bare/ops/cancel.d.ts +27 -1
  106. package/dist/server/bare/ops/cancel.js +36 -10
  107. package/dist/server/bare/ops/embed.d.ts +3 -3
  108. package/dist/server/bare/ops/embed.js +144 -28
  109. package/dist/server/bare/ops/kv-cache-utils.d.ts +0 -7
  110. package/dist/server/bare/ops/kv-cache-utils.js +8 -47
  111. package/dist/server/bare/ops/transcribe.d.ts +10 -5
  112. package/dist/server/bare/ops/transcribe.js +196 -41
  113. package/dist/server/bare/ops/translate.d.ts +1 -1
  114. package/dist/server/bare/ops/translate.js +197 -88
  115. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +12 -3
  116. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +170 -172
  117. package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +125 -21
  118. package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +154 -0
  119. package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +448 -0
  120. package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +21 -73
  121. package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +18 -101
  122. package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +30 -3
  123. package/dist/server/bare/plugins/llamacpp-completion/plugin.js +157 -85
  124. package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +10 -0
  125. package/dist/server/bare/plugins/llamacpp-completion/transform.js +34 -0
  126. package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +7 -0
  127. package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +10 -1
  128. package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -15
  129. package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +5 -1
  130. package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +3 -3
  131. package/dist/server/bare/plugins/onnx-ocr/plugin.js +3 -0
  132. package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +39 -39
  133. package/dist/server/bare/plugins/onnx-tts/plugin.js +6 -0
  134. package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +29 -21
  135. package/dist/server/bare/plugins/parakeet-transcription/plugin.js +4 -1
  136. package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +8 -0
  137. package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +3 -0
  138. package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +40 -0
  139. package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +91 -16
  140. package/dist/server/bare/plugins/sdcpp-generation/plugin.js +97 -7
  141. package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +22 -3
  142. package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +50 -14
  143. package/dist/server/bare/rag-hyperdb/index.d.ts +1 -1
  144. package/dist/server/bare/rag-hyperdb/index.js +1 -1
  145. package/dist/server/bare/rag-hyperdb/rag-operation-manager.d.ts +26 -4
  146. package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +65 -28
  147. package/dist/server/bare/runtime/disposable-scope.d.ts +36 -0
  148. package/dist/server/bare/runtime/disposable-scope.js +69 -0
  149. package/dist/server/bare/runtime/index.d.ts +8 -0
  150. package/dist/server/bare/runtime/index.js +3 -0
  151. package/dist/server/bare/runtime/request-context.d.ts +49 -0
  152. package/dist/server/bare/runtime/request-context.js +1 -0
  153. package/dist/server/bare/runtime/request-id.d.ts +12 -0
  154. package/dist/server/bare/runtime/request-id.js +14 -0
  155. package/dist/server/bare/runtime/request-registry-singleton.d.ts +4 -0
  156. package/dist/server/bare/runtime/request-registry-singleton.js +27 -0
  157. package/dist/server/bare/runtime/request-registry.d.ts +136 -0
  158. package/dist/server/bare/runtime/request-registry.js +297 -0
  159. package/dist/server/bare/runtime/with-request-context.d.ts +22 -0
  160. package/dist/server/bare/runtime/with-request-context.js +53 -0
  161. package/dist/server/bare/types/addon-responses.d.ts +11 -1
  162. package/dist/server/rpc/handler-registry.js +26 -7
  163. package/dist/server/rpc/handlers/cancel-delegated.js +28 -31
  164. package/dist/server/rpc/handlers/cancelHandler.d.ts +30 -1
  165. package/dist/server/rpc/handlers/cancelHandler.js +54 -22
  166. package/dist/server/rpc/handlers/delete-cache.d.ts +9 -0
  167. package/dist/server/rpc/handlers/delete-cache.js +13 -15
  168. package/dist/server/rpc/handlers/download-asset.js +133 -40
  169. package/dist/server/rpc/handlers/index.d.ts +2 -0
  170. package/dist/server/rpc/handlers/index.js +2 -0
  171. package/dist/server/rpc/handlers/load-model/download-manager.d.ts +60 -2
  172. package/dist/server/rpc/handlers/load-model/download-manager.js +141 -8
  173. package/dist/server/rpc/handlers/load-model/handler.js +213 -98
  174. package/dist/server/rpc/handlers/load-model/http.js +3 -3
  175. package/dist/server/rpc/handlers/load-model/hyperdrive.js +1 -1
  176. package/dist/server/rpc/handlers/load-model/registry.js +1 -1
  177. package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +20 -1
  178. package/dist/server/rpc/handlers/load-model/resolve-session.js +6 -5
  179. package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -2
  180. package/dist/server/rpc/handlers/load-model/resolve.js +9 -6
  181. package/dist/server/rpc/handlers/load-model/types.d.ts +24 -0
  182. package/dist/server/rpc/handlers/rag.js +133 -15
  183. package/dist/server/rpc/handlers/upscale-stream.d.ts +3 -0
  184. package/dist/server/rpc/handlers/upscale-stream.js +4 -0
  185. package/dist/server/utils/completion-normalizer.js +8 -0
  186. package/dist/server/utils/tools/dialect.js +4 -0
  187. package/dist/server/utils/tools/parser.js +16 -1
  188. package/dist/server/utils/tools/parsers/gemma4native.d.ts +4 -0
  189. package/dist/server/utils/tools/parsers/gemma4native.js +60 -0
  190. package/dist/server/utils/tools/parsers/qwen35.d.ts +4 -0
  191. package/dist/server/utils/tools/parsers/qwen35.js +120 -0
  192. package/dist/utils/aggregate-events.d.ts +9 -0
  193. package/dist/utils/aggregate-events.js +18 -3
  194. package/dist/utils/decorate-promise.d.ts +34 -0
  195. package/dist/utils/decorate-promise.js +35 -0
  196. package/dist/utils/errors-client.d.ts +3 -0
  197. package/dist/utils/errors-client.js +5 -0
  198. package/dist/utils/errors-server.d.ts +85 -0
  199. package/dist/utils/errors-server.js +97 -0
  200. package/package.json +20 -15
package/NOTICE CHANGED
@@ -61,6 +61,8 @@ Third-Party Model Licenses
61
61
 
62
62
  --- apache-2.0 (Apache License 2.0) ---
63
63
 
64
+ bci-embedder
65
+ https://github.com/tetherto/qvac/releases/download/bci-test-assets-v0.1.0/bci-embedder.bin
64
66
  crnn_mobilenet_v3_small
65
67
  https://github.com/felixdittrich92/OnnxTR
66
68
  db_mobilenet_v3_large
@@ -83,6 +85,14 @@ Third-Party Model Licenses
83
85
  https://huggingface.co/personalizedrefrigerator/whisper-base-fr
84
86
  fr-tiny-ggml-model-f16
85
87
  https://huggingface.co/JaepaX/whisper-tiny-fr
88
+ ggml-bci-windowed
89
+ https://github.com/tetherto/qvac/releases/download/bci-test-assets-v0.1.0/ggml-bci-windowed.bin
90
+ google_gemma-4-31B-it-GGUF
91
+ https://huggingface.co/bartowski/google_gemma-4-31B-it-GGUF
92
+ google_gemma-4-E2B-it-GGUF
93
+ https://huggingface.co/bartowski/google_gemma-4-E2B-it-GGUF
94
+ google_gemma-4-E4B-it-GGUF
95
+ https://huggingface.co/bartowski/google_gemma-4-E4B-it-GGUF
86
96
  gpt-oss-120b-Q4_K_M-00001-of-00002
87
97
  https://huggingface.co/unsloth/gpt-oss-120b-GGUF
88
98
  gpt-oss-20b-GGUF
@@ -123,6 +133,18 @@ Third-Party Model Licenses
123
133
  https://huggingface.co/Qwen/Qwen3-8B-GGUF
124
134
  Qwen3-VL-2B-Instruct-GGUF
125
135
  https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct-GGUF
136
+ Qwen3.5-0.8B-GGUF
137
+ https://huggingface.co/unsloth/Qwen3.5-0.8B-GGUF
138
+ Qwen3.5-2B-GGUF
139
+ https://huggingface.co/unsloth/Qwen3.5-2B-GGUF
140
+ Qwen3.5-4B-GGUF
141
+ https://huggingface.co/unsloth/Qwen3.5-4B-GGUF
142
+ Qwen3.5-9B-GGUF
143
+ https://huggingface.co/unsloth/Qwen3.5-9B-GGUF
144
+ Qwen3.6-27B-GGUF
145
+ https://huggingface.co/unsloth/Qwen3.6-27B-GGUF
146
+ Qwen3.6-35B-A3B-GGUF
147
+ https://huggingface.co/unsloth/Qwen3.6-35B-A3B-GGUF
126
148
  recognizer_arabic
127
149
  https://www.jaided.ai/easyocr/modelhub/
128
150
  recognizer_bengali
@@ -162,30 +184,41 @@ Third-Party Model Licenses
162
184
  SmolVLM2-500M-Video-Instruct-GGUF
163
185
  https://huggingface.co/ggml-org/SmolVLM2-500M-Video-Instruct-GGUF
164
186
 
187
+ --- bsd-3-clause (BSD 3-Clause License) ---
188
+
189
+ RealESRGAN_x4plus
190
+ https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth
191
+ RealESRGAN_x4plus_anime_6B
192
+ https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth
193
+ RealESRNet_x4plus
194
+ https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.1/RealESRNet_x4plus.pth
195
+
165
196
  --- cc-by-4.0 (Creative Commons Attribution 4.0 International) ---
166
197
 
167
198
  AfriqueGemma-4B-GGUF
168
199
  https://huggingface.co/mradermacher/AfriqueGemma-4B-GGUF
169
- decoder_joint_int8
170
- https://huggingface.co/nasedkinpv/parakeet-tdt-0.6b-v3-onnx-int8
171
200
  decoder_joint-model
172
201
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
173
202
  diar_streaming_sortformer_4spk-v2-onnx
174
203
  https://huggingface.co/cgus/diar_streaming_sortformer_4spk-v2-onnx
175
- encoder_int8
176
- https://huggingface.co/nasedkinpv/parakeet-tdt-0.6b-v3-onnx-int8
177
204
  encoder-model
178
205
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
179
206
  parakeet-ctc-0.6b-ONNX
180
207
  https://huggingface.co/onnx-community/parakeet-ctc-0.6b-ONNX
208
+ parakeet-ctc-0.6b.q8_0
209
+ https://huggingface.co/nvidia/parakeet-ctc-0.6b
210
+ parakeet-eou-120m-v1.q8_0
211
+ https://huggingface.co/nvidia/parakeet_realtime_eou_120m-v1
181
212
  parakeet-rs
182
213
  https://huggingface.co/altunenes/parakeet-rs
183
214
  parakeet-tdt-0.6b-v3-onnx
184
215
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
216
+ parakeet-tdt-0.6b-v3.q8_0
217
+ https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3
185
218
  preprocessor
186
219
  https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx
187
- sortformer_int8
188
- https://huggingface.co/nvidia/diar_streaming_sortformer_4spk-v2
220
+ sortformer-4spk-v1.q8_0
221
+ https://huggingface.co/nvidia/diar_sortformer_4spk-v1
189
222
 
190
223
  --- gemma (Gemma Terms of Use) ---
191
224
 
@@ -218,6 +251,14 @@ Third-Party Model Licenses
218
251
  https://huggingface.co/1bitLLM/bitnet_b1_58-xl
219
252
  chatterbox-multilingual-ONNX
220
253
  https://huggingface.co/onnx-community/chatterbox-multilingual-ONNX
254
+ chatterbox-s3gen
255
+ s3:///qvac_models_compiled/chatterbox/2026-05-08/chatterbox-s3gen.gguf
256
+ chatterbox-s3gen-mtl
257
+ s3:///qvac_models_compiled/chatterbox/2026-05-08/chatterbox-s3gen-mtl.gguf
258
+ chatterbox-t3-mtl
259
+ s3:///qvac_models_compiled/chatterbox/2026-05-08/chatterbox-t3-mtl.gguf
260
+ chatterbox-t3-turbo
261
+ s3:///qvac_models_compiled/chatterbox/2026-05-08/chatterbox-t3-turbo.gguf
221
262
  chatterbox-turbo-ONNX
222
263
  https://huggingface.co/ResembleAI/chatterbox-turbo-ONNX
223
264
  de-base-ggml-model-f16
@@ -369,8 +410,6 @@ Third-Party Model Licenses
369
410
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/entr
370
411
  model.enuk.intgemm.alphas
371
412
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enuk
372
- model.enzh.intgemm.alphas
373
- https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enzh
374
413
  model.esen.intgemm.alphas
375
414
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/esen
376
415
  model.eten.intgemm.alphas
@@ -379,8 +418,6 @@ Third-Party Model Licenses
379
418
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/faen
380
419
  model.fien.intgemm.alphas
381
420
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/fien
382
- model.fire.intgemm.alphas
383
- https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/fire
384
421
  model.fren.intgemm.alphas
385
422
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/fren
386
423
  model.guen.intgemm.alphas
@@ -449,17 +486,19 @@ Third-Party Model Licenses
449
486
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/uken
450
487
  model.vien.intgemm.alphas
451
488
  https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/vien
452
- model.zhen.intgemm.alphas
453
- https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/zhen
454
489
 
455
490
  --- openrail ---
456
491
 
492
+ supertonic
493
+ s3:///qvac_models_compiled/supertonic/2026-05-08/supertonic.gguf
457
494
  supertonic
458
495
  https://huggingface.co/Supertone/supertonic
459
496
  supertonic-2
460
497
  https://huggingface.co/Supertone/supertonic-2
461
498
  Supertonic-TTS-ONNX
462
499
  https://huggingface.co/onnx-community/Supertonic-TTS-ONNX
500
+ supertonic2
501
+ s3:///qvac_models_compiled/supertonic/2026-05-08/supertonic2.gguf
463
502
 
464
503
  --- openrail++ ---
465
504
 
@@ -492,38 +531,41 @@ JavaScript Dependencies
492
531
  @qvac/decoder-audio@0.3.7
493
532
  https://github.com/tetherto/qvac
494
533
  @qvac/diagnostics@0.1.1
495
- @qvac/diffusion-cpp@0.3.0
534
+ @qvac/diffusion-cpp@0.7.0
496
535
  https://github.com/tetherto/qvac
497
536
  @qvac/dl-base@0.1.1
498
537
  @qvac/dl-hyperdrive@0.1.1
499
- @qvac/embed-llamacpp@0.14.0
538
+ @qvac/embed-llamacpp@0.16.0
500
539
  https://github.com/tetherto/qvac
501
540
  @qvac/error@0.1.1
502
541
  @qvac/infer-base@0.1.1
542
+ @qvac/infer-base@0.4.0
543
+ https://github.com/tetherto/qvac
503
544
  @qvac/infer-base@0.4.1
504
545
  https://github.com/tetherto/qvac
505
546
  @qvac/langdetect-text@0.1.2
506
547
  https://github.com/tetherto/qvac
507
- @qvac/llm-llamacpp@0.17.3
548
+ @qvac/llm-llamacpp@0.20.1
508
549
  https://github.com/tetherto/qvac
509
550
  @qvac/logging@0.1.0
510
- @qvac/ocr-onnx@0.4.2
551
+ @qvac/ocr-onnx@0.5.0
552
+ https://github.com/tetherto/qvac
553
+ @qvac/onnx@0.15.0
511
554
  https://github.com/tetherto/qvac
512
- @qvac/onnx@0.14.0
555
+ @qvac/rag@0.5.0
513
556
  https://github.com/tetherto/qvac
514
- @qvac/rag@0.4.4
557
+ @qvac/registry-client@0.5.0
515
558
  https://github.com/tetherto/qvac
516
- @qvac/registry-client@0.4.1
559
+ @qvac/registry-schema@0.2.0
517
560
  https://github.com/tetherto/qvac
518
- @qvac/registry-schema@0.1.2
519
561
  @qvac/response@0.1.2
520
- @qvac/transcription-parakeet@0.3.2
562
+ @qvac/transcription-parakeet@0.5.0
521
563
  https://github.com/tetherto/qvac
522
- @qvac/transcription-whispercpp@0.6.7
564
+ @qvac/transcription-whispercpp@0.7.0
523
565
  https://github.com/tetherto/qvac
524
- @qvac/translation-nmtcpp@2.1.0
566
+ @qvac/translation-nmtcpp@3.0.0
525
567
  https://github.com/tetherto/qvac
526
- @qvac/tts-onnx@0.8.5
568
+ @qvac/tts-onnx@0.9.0
527
569
  https://github.com/tetherto/qvac
528
570
  adaptive-timeout@1.0.1
529
571
  https://github.com/holepunchto/adaptive-timeout
@@ -555,19 +597,19 @@ JavaScript Dependencies
555
597
  https://github.com/holepunchto/bare-events
556
598
  bare-events@2.8.2
557
599
  https://github.com/holepunchto/bare-events
558
- bare-fetch@2.9.0
600
+ bare-fetch@2.8.1
559
601
  https://github.com/holepunchto/bare-fetch
560
602
  bare-ffmpeg@1.2.2
561
603
  https://github.com/holepunchto/bare-ffmpeg
562
604
  bare-form-data@1.2.1
563
605
  https://github.com/holepunchto/bare-form-data
564
- bare-fs@4.7.1
606
+ bare-fs@4.6.0
565
607
  https://github.com/holepunchto/bare-fs
566
608
  bare-hrtime@2.1.1
567
609
  https://github.com/holepunchto/bare-hrtime
568
610
  bare-http-parser@1.1.3
569
611
  https://github.com/holepunchto/bare-http-parser
570
- bare-http1@4.5.6
612
+ bare-http1@4.5.5
571
613
  https://github.com/holepunchto/bare-http1
572
614
  bare-https@2.1.3
573
615
  https://github.com/holepunchto/bare-https
@@ -577,9 +619,7 @@ JavaScript Dependencies
577
619
  https://github.com/holepunchto/bare-lief
578
620
  bare-link@3.2.1
579
621
  https://github.com/holepunchto/bare-link
580
- bare-mime@1.0.0
581
- https://github.com/holepunchto/bare-mime
582
- bare-module@6.2.0
622
+ bare-module@6.1.3
583
623
  https://github.com/holepunchto/bare-module
584
624
  bare-module-lexer@1.4.7
585
625
  https://github.com/holepunchto/bare-module-lexer
@@ -593,7 +633,7 @@ JavaScript Dependencies
593
633
  https://github.com/holepunchto/bare-node
594
634
  bare-node-worker-threads@1.0.0
595
635
  https://github.com/holepunchto/bare-node
596
- bare-os@3.9.0
636
+ bare-os@3.8.7
597
637
  https://github.com/holepunchto/bare-os
598
638
  bare-path@3.0.0
599
639
  https://github.com/holepunchto/bare-path
@@ -601,51 +641,53 @@ JavaScript Dependencies
601
641
  https://github.com/holepunchto/bare-pipe
602
642
  bare-process@4.4.1
603
643
  https://github.com/holepunchto/bare-process
604
- bare-rpc@1.2.0
644
+ bare-rpc@1.3.2
605
645
  https://github.com/holepunchto/bare-rpc
606
- bare-runtime@1.28.4
646
+ bare-runtime@1.28.1
607
647
  https://github.com/holepunchto/bare-runtime
608
- bare-runtime-darwin-arm64@1.28.4
648
+ bare-runtime-darwin-arm64@1.28.1
609
649
  https://github.com/holepunchto/bare-runtime
610
- bare-semver@1.0.3
650
+ bare-semver@1.0.2
611
651
  https://github.com/holepunchto/bare-semver
612
652
  bare-signals@4.2.0
613
653
  https://github.com/holepunchto/bare-signals
614
654
  bare-stdio@1.0.2
615
655
  https://github.com/holepunchto/bare-stdio
616
- bare-stream@2.13.1
656
+ bare-stream@2.12.0
617
657
  https://github.com/holepunchto/bare-stream
618
- bare-structured-clone@1.5.4
658
+ bare-structured-clone@1.5.3
619
659
  https://github.com/holepunchto/bare-structured-clone
620
660
  bare-subprocess@5.2.3
621
661
  https://github.com/holepunchto/bare-subprocess
622
- bare-tcp@2.2.12
662
+ bare-tcp@2.2.7
623
663
  https://github.com/holepunchto/bare-tcp
624
664
  bare-thread@1.2.0
625
665
  https://github.com/holepunchto/bare-thread
626
- bare-tls@2.2.3
666
+ bare-tls@2.2.1
627
667
  https://github.com/holepunchto/bare-tls
628
668
  bare-tty@5.1.0
629
669
  https://github.com/holepunchto/bare-tty
630
670
  bare-type@1.1.0
631
671
  https://github.com/holepunchto/bare-type
632
- bare-url@2.4.2
672
+ bare-url@2.4.0
633
673
  https://github.com/holepunchto/bare-url
634
674
  bare-worker@4.1.6
635
675
  https://github.com/holepunchto/bare-worker
636
- bare-zlib@1.3.3
676
+ bare-zlib@1.3.1
637
677
  https://github.com/holepunchto/bare-zlib
638
- blind-relay@1.5.0
678
+ blind-relay@1.4.0
639
679
  https://github.com/holepunchto/blind-relay
640
680
  compact-encoding@2.19.2
641
681
  https://github.com/holepunchto/compact-encoding
682
+ compact-encoding@3.0.1
683
+ https://github.com/holepunchto/compact-encoding
642
684
  device-file@2.3.1
643
685
  https://github.com/holepunchto/device-file
644
686
  events-universal@1.0.1
645
687
  https://github.com/holepunchto/events-universal
646
688
  fd-lock@2.1.1
647
689
  https://github.com/holepunchto/fd-lock
648
- fs-native-extensions@1.5.0
690
+ fs-native-extensions@1.4.5
649
691
  https://github.com/holepunchto/fs-native-extensions
650
692
  hyperblobs@2.11.1
651
693
  https://github.com/holepunchto/hyperblobs
@@ -659,11 +701,9 @@ JavaScript Dependencies
659
701
  https://github.com/holepunchto/hypercore-storage
660
702
  hyperdb@4.22.3
661
703
  https://github.com/holepunchto/hyperdb
662
- hyperdht-address@1.0.1
663
- https://github.com/holepunchto/hyperdht-address
664
704
  hyperdht-stats@1.10.0
665
705
  https://github.com/holepunchto/hyperdht-stats
666
- hyperdispatch@1.5.1
706
+ hyperdispatch@1.6.0
667
707
  https://github.com/holepunchto/hyperdispatch
668
708
  hyperdrive@13.3.2
669
709
  https://github.com/holepunchto/hyperdrive
@@ -673,7 +713,7 @@ JavaScript Dependencies
673
713
  https://github.com/holepunchto/hyperswarm-stats
674
714
  index-encoder@3.5.0
675
715
  https://github.com/holepunchto/index-encoder
676
- mirror-drive@1.14.2
716
+ mirror-drive@1.14.1
677
717
  https://github.com/holepunchto/mirror-drive
678
718
  noise-handshake@4.2.0
679
719
  https://github.com/holepunchto/noise-handshake
@@ -745,8 +785,8 @@ JavaScript Dependencies
745
785
  https://github.com/holepunchto/corestore
746
786
  debounceify@1.1.0
747
787
  https://github.com/mafintosh/debounceify
748
- dht-rpc@6.26.4
749
- https://github.com/holepunchto/dht-rpc
788
+ dht-rpc@6.26.3
789
+ https://github.com/mafintosh/dht-rpc
750
790
  events@3.3.0
751
791
  https://github.com/Gozala/events
752
792
  fast-fifo@1.3.2
@@ -765,7 +805,7 @@ JavaScript Dependencies
765
805
  https://github.com/holepunchto/hypercore
766
806
  hypercore-crypto@3.6.1
767
807
  https://github.com/mafintosh/hypercore-crypto
768
- hyperdht@6.30.0
808
+ hyperdht@6.29.6
769
809
  https://github.com/holepunchto/hyperdht
770
810
  hyperswarm@4.17.0
771
811
  https://github.com/holepunchto/hyperswarm
@@ -783,8 +823,8 @@ JavaScript Dependencies
783
823
  https://github.com/mafintosh/nat-sampler
784
824
  protocol-buffers-encodings@1.2.0
785
825
  https://github.com/mafintosh/protocol-buffers-encodings
786
- protomux@3.10.3
787
- https://github.com/holepunchto/protomux
826
+ protomux@3.10.1
827
+ https://github.com/mafintosh/protomux
788
828
  queue-tick@1.0.1
789
829
  https://github.com/mafintosh/queue-tick
790
830
  random-array-iterator@1.0.0
@@ -833,8 +873,6 @@ JavaScript Dependencies
833
873
  https://github.com/mafintosh/unix-path-resolve
834
874
  unordered-set@2.0.1
835
875
  https://github.com/mafintosh/unordered-set
836
- uuid-random@1.3.2
837
- https://github.com/jchook/uuid-random
838
876
  varint@5.0.0
839
877
  https://github.com/chrisdickinson/varint
840
878
  xache@1.2.1
@@ -1,43 +1,35 @@
1
- import { type CancelParams } from "../../schemas/index";
1
+ import { type CancelClientInput } from "../../schemas/index";
2
2
  /**
3
3
  * Cancels an ongoing operation.
4
4
  *
5
- * @param params - The parameters for the cancellation
6
- * @param params.operation - The type of operation to cancel ("inference", "downloadAsset", or "rag")
7
- * @param params.modelId - The model ID (required for inference cancellation)
8
- * @param params.downloadKey - The download key (required for download cancellation)
9
- * @param params.clearCache - If true, deletes the partial download file (default: false)
10
- * @param params.delegate - Delegation target for remote download cancellation (optional)
11
- * @param params.workspace - The RAG workspace to cancel (optional, defaults to "default")
12
- * @throws {QvacErrorBase} When the response type is invalid or when the cancellation fails
5
+ * Two cancel paths are supported:
6
+ * - **By `requestId`** (primary) — pass the `requestId` exposed on
7
+ * the result of a long-running call (`completion(...)`,
8
+ * `loadModel(...)`, `downloadAsset(...)`, `embed(...)`,
9
+ * `transcribe(...)`, `ragIngest(...)`, etc.) to cancel exactly
10
+ * that request. A cancel that races the originating call is
11
+ * recorded and applied retroactively when the begin arrives.
12
+ * - **Broad by `modelId`** (escape hatch) — `{ modelId, kind? }`
13
+ * cancels every in-flight request on that model. Useful for
14
+ * model unload, app shutdown, or admin sweeps where the caller
15
+ * doesn't have a `requestId` to hand.
13
16
  *
14
- * @example
15
- * // Cancel inference
16
- * await cancel({ operation: "inference", modelId: "model-123" });
17
- *
18
- * @example
19
- * // Pause download (preserves partial file for automatic resume)
20
- * await cancel({ operation: "downloadAsset", downloadKey: "download-key" });
17
+ * The legacy `{ operation: "inference" | "embeddings", modelId }`
18
+ * sugars remain callable for source compatibility. For migration off
19
+ * the removed `{ operation: "downloadAsset" | "rag" }` shapes, see
20
+ * the 0.11.0 changelog / release notes.
21
21
  *
22
- * @example
23
- * // Cancel download completely (deletes partial file)
24
- * await cancel({ operation: "downloadAsset", downloadKey: "download-key", clearCache: true });
25
- *
26
- * @example
27
- * // Cancel delegated remote download
28
- * await cancel({
29
- * operation: "downloadAsset",
30
- * downloadKey: "download-key",
31
- * delegate: { providerPublicKey: "peerHex" },
32
- * });
22
+ * @param params - The cancellation parameters.
23
+ * @throws {QvacErrorBase} When the response type is invalid or the cancellation fails.
33
24
  *
34
25
  * @example
35
- * // Cancel RAG operation on default workspace
36
- * await cancel({ operation: "rag" });
26
+ * // Cancel by requestId (primary path)
27
+ * const run = completion({ ... });
28
+ * await cancel({ requestId: run.requestId });
37
29
  *
38
30
  * @example
39
- * // Cancel RAG operation on specific workspace
40
- * await cancel({ operation: "rag", workspace: "my-workspace" });
31
+ * // Broad-cancel every inference running on a model
32
+ * await cancel({ modelId: "model-123", kind: "completion" });
41
33
  */
42
- export declare function cancel(params: CancelParams): Promise<void>;
34
+ export declare function cancel(params: CancelClientInput): Promise<void>;
43
35
  //# sourceMappingURL=cancel.d.ts.map
@@ -4,47 +4,40 @@ import { InvalidResponseError, CancelFailedError } from "../../utils/errors-clie
4
4
  /**
5
5
  * Cancels an ongoing operation.
6
6
  *
7
- * @param params - The parameters for the cancellation
8
- * @param params.operation - The type of operation to cancel ("inference", "downloadAsset", or "rag")
9
- * @param params.modelId - The model ID (required for inference cancellation)
10
- * @param params.downloadKey - The download key (required for download cancellation)
11
- * @param params.clearCache - If true, deletes the partial download file (default: false)
12
- * @param params.delegate - Delegation target for remote download cancellation (optional)
13
- * @param params.workspace - The RAG workspace to cancel (optional, defaults to "default")
14
- * @throws {QvacErrorBase} When the response type is invalid or when the cancellation fails
7
+ * Two cancel paths are supported:
8
+ * - **By `requestId`** (primary) — pass the `requestId` exposed on
9
+ * the result of a long-running call (`completion(...)`,
10
+ * `loadModel(...)`, `downloadAsset(...)`, `embed(...)`,
11
+ * `transcribe(...)`, `ragIngest(...)`, etc.) to cancel exactly
12
+ * that request. A cancel that races the originating call is
13
+ * recorded and applied retroactively when the begin arrives.
14
+ * - **Broad by `modelId`** (escape hatch) — `{ modelId, kind? }`
15
+ * cancels every in-flight request on that model. Useful for
16
+ * model unload, app shutdown, or admin sweeps where the caller
17
+ * doesn't have a `requestId` to hand.
15
18
  *
16
- * @example
17
- * // Cancel inference
18
- * await cancel({ operation: "inference", modelId: "model-123" });
19
- *
20
- * @example
21
- * // Pause download (preserves partial file for automatic resume)
22
- * await cancel({ operation: "downloadAsset", downloadKey: "download-key" });
19
+ * The legacy `{ operation: "inference" | "embeddings", modelId }`
20
+ * sugars remain callable for source compatibility. For migration off
21
+ * the removed `{ operation: "downloadAsset" | "rag" }` shapes, see
22
+ * the 0.11.0 changelog / release notes.
23
23
  *
24
- * @example
25
- * // Cancel download completely (deletes partial file)
26
- * await cancel({ operation: "downloadAsset", downloadKey: "download-key", clearCache: true });
27
- *
28
- * @example
29
- * // Cancel delegated remote download
30
- * await cancel({
31
- * operation: "downloadAsset",
32
- * downloadKey: "download-key",
33
- * delegate: { providerPublicKey: "peerHex" },
34
- * });
24
+ * @param params - The cancellation parameters.
25
+ * @throws {QvacErrorBase} When the response type is invalid or the cancellation fails.
35
26
  *
36
27
  * @example
37
- * // Cancel RAG operation on default workspace
38
- * await cancel({ operation: "rag" });
28
+ * // Cancel by requestId (primary path)
29
+ * const run = completion({ ... });
30
+ * await cancel({ requestId: run.requestId });
39
31
  *
40
32
  * @example
41
- * // Cancel RAG operation on specific workspace
42
- * await cancel({ operation: "rag", workspace: "my-workspace" });
33
+ * // Broad-cancel every inference running on a model
34
+ * await cancel({ modelId: "model-123", kind: "completion" });
43
35
  */
44
36
  export async function cancel(params) {
37
+ const wireParams = normalizeCancelParams(params);
45
38
  const request = {
46
39
  type: "cancel",
47
- ...params,
40
+ ...wireParams,
48
41
  };
49
42
  const response = await send(request);
50
43
  if (response.type !== "cancel") {
@@ -54,3 +47,37 @@ export async function cancel(params) {
54
47
  throw new CancelFailedError(response.error);
55
48
  }
56
49
  }
50
+ function normalizeCancelParams(params) {
51
+ if ("operation" in params) {
52
+ if (params.operation === "request" || params.operation === "broad") {
53
+ return params;
54
+ }
55
+ // Legacy per-kind sugar: { operation: "inference"|"embeddings", modelId }
56
+ if (params.operation === "inference") {
57
+ return {
58
+ operation: "broad",
59
+ modelId: params.modelId,
60
+ kind: "completion",
61
+ };
62
+ }
63
+ return { operation: "broad", modelId: params.modelId, kind: "embeddings" };
64
+ }
65
+ if ("requestId" in params) {
66
+ const wire = {
67
+ operation: "request",
68
+ requestId: params.requestId,
69
+ };
70
+ if (params.clearCache !== undefined) {
71
+ wire.clearCache = params.clearCache;
72
+ }
73
+ return wire;
74
+ }
75
+ const broad = {
76
+ operation: "broad",
77
+ modelId: params.modelId,
78
+ };
79
+ if (params.kind !== undefined) {
80
+ broad.kind = params.kind;
81
+ }
82
+ return broad;
83
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * UUIDv4 generator for client-side request ids. The Web Crypto API
3
+ * ships `crypto.randomUUID` everywhere we run today (Bun, modern Node,
4
+ * modern browsers, React Native via the polyfill that the workbench-
5
+ * desktop / RN runtime config injects). The fallback exists so the SDK
6
+ * never crashes in an exotic JS environment without
7
+ * `crypto.randomUUID` — `requestId` semantics still hold (uniqueness,
8
+ * opaque to the caller), just without the UUIDv4 wire shape.
9
+ *
10
+ * Shared with the long-running call sites that decorate their promises
11
+ * with `requestId`: `completion(...)`, `loadModel(...)`,
12
+ * `downloadAsset(...)`. The decorated promise's `op.requestId` and the
13
+ * server's registry entry's `requestId` must match — generating once
14
+ * here keeps that invariant.
15
+ */
16
+ export declare function generateClientRequestId(): string;
17
+ //# sourceMappingURL=client-request-id.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * UUIDv4 generator for client-side request ids. The Web Crypto API
3
+ * ships `crypto.randomUUID` everywhere we run today (Bun, modern Node,
4
+ * modern browsers, React Native via the polyfill that the workbench-
5
+ * desktop / RN runtime config injects). The fallback exists so the SDK
6
+ * never crashes in an exotic JS environment without
7
+ * `crypto.randomUUID` — `requestId` semantics still hold (uniqueness,
8
+ * opaque to the caller), just without the UUIDv4 wire shape.
9
+ *
10
+ * Shared with the long-running call sites that decorate their promises
11
+ * with `requestId`: `completion(...)`, `loadModel(...)`,
12
+ * `downloadAsset(...)`. The decorated promise's `op.requestId` and the
13
+ * server's registry entry's `requestId` must match — generating once
14
+ * here keeps that invariant.
15
+ */
16
+ export function generateClientRequestId() {
17
+ const c = globalThis.crypto;
18
+ if (c?.randomUUID)
19
+ return c.randomUUID();
20
+ // Fallback: 128 random bits encoded as a hex string. Distinct enough
21
+ // for in-flight cancel targeting; not a wire-spec UUID.
22
+ const bytes = new Uint8Array(16);
23
+ for (let i = 0; i < bytes.length; i++) {
24
+ bytes[i] = Math.floor(Math.random() * 256);
25
+ }
26
+ return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
27
+ }
@@ -28,7 +28,7 @@ type CompletionParams = Omit<CompletionClientParams, "tools"> & {
28
28
  * @param params.mcp - Optional array of MCP client inputs for tool integration
29
29
  * @param params.captureThinking - Best-effort parsing of `<think>` blocks into `thinkingDelta` events; `final.raw.fullText` always preserves the original output
30
30
  * @param params.emitRawDeltas - When true, every raw model token is also emitted as a `rawDelta` event
31
- * @param params.toolDialect - Override the SDK's name-based dialect detection. Use when your model emits a known format (`"hermes"`, `"pythonic"`, or `"json"`) the auto-router doesn't recognise. Drives both streaming frame detection and finalization parsing.
31
+ * @param params.toolDialect - Override the SDK's name-based dialect detection. Supported values: `"hermes"`, `"pythonic"`, `"json"`, `"harmony"`, `"qwen35"` (Qwen3.5/3.6), `"gemma4"`. Use when the auto-router doesn't recognise your model name. Drives both streaming frame detection and finalization parsing.
32
32
  * Common override case: Llama 3.x tool-calling fine-tunes that emit the native pythonic header (`<|start_header_id|>tool_call<|end_header_id|>...<|eot_id|>`).
33
33
  * @param params.responseFormat - Optional structured-output constraint applied to the model's output:
34
34
  * - `{ type: "text" }` — no constraint (default behavior)