@qvac/inference 0.21.0 → 0.22.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.
- package/NOTICE +50 -25
- package/README.md +44 -1
- package/dist/api/assess-model-fit.d.ts +4 -4
- package/dist/api/assess-model-fit.js +4 -4
- package/dist/api/audio-gen.d.ts +4 -1
- package/dist/api/audio-gen.js +4 -1
- package/dist/api/batch-completion.js +1 -1
- package/dist/api/completion-stream.js +1 -1
- package/dist/api/decide.d.ts +26 -0
- package/dist/api/decide.js +26 -0
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/text-to-speech.d.ts +1 -0
- package/dist/api/text-to-speech.js +15 -19
- package/dist/api/transcribe.js +5 -2
- package/dist/api/video-request.d.ts +5 -5
- package/dist/api/video.d.ts +5 -4
- package/dist/api/video.js +5 -4
- package/dist/errors/index.d.ts +3 -0
- package/dist/errors/index.js +5 -0
- package/dist/handlers/assess-model-fit.d.ts +5 -3
- package/dist/handlers/assess-model-fit.js +80 -28
- package/dist/handlers/get-loaded-model-info.js +1 -2
- package/dist/handlers/load-model/safe-fetch.js +5 -6
- package/dist/handlers/registry.d.ts +3 -1
- package/dist/handlers/registry.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/logger.js +1 -1
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +563 -816
- package/dist/models/registry/models.js +2873 -3110
- package/dist/models/registry/resource-profiles.d.ts +1 -2
- package/dist/models/registry/resource-profiles.js +203 -2
- package/dist/plugins/builtin/asr-ggml/config.d.ts +7 -1
- package/dist/plugins/builtin/asr-ggml/config.js +6 -0
- package/dist/plugins/builtin/asr-ggml/logging.d.ts +1 -1
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +1 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +28 -10
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +27 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +23 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +6 -27
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +147 -60
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +1 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +40 -24
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -1
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -4
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +18 -0
- package/dist/plugins/builtin/ggml-ocr/params.js +37 -0
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +18 -10
- package/dist/plugins/builtin/ggml-ocr/plugin.js +16 -38
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +21 -14
- package/dist/plugins/builtin/ggml-vla/plugin.js +1 -1
- package/dist/plugins/builtin/index.d.ts +2 -0
- package/dist/plugins/builtin/index.js +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -7
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +109 -189
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +32 -90
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +60 -211
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +2 -49
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +2 -46
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +185 -87
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +4 -5
- package/dist/plugins/builtin/llamacpp-completion/transform.js +1 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +6 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +97 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +91 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +129 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +216 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +43 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +12 -5
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +1 -1
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +3 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +143 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.js +96 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.d.ts +6 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.js +70 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +25 -13
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +9 -73
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +52 -31
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +18 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +10 -6
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +2 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +1 -1
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +59 -33
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +12 -9
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +22 -0
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.js +79 -0
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +17 -5
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +164 -29
- package/dist/plugins/builtin/tts-ggml/plugin.js +38 -1
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +58 -35
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +6 -2
- package/dist/plugins/ops/kv-cache-utils.d.ts +1 -1
- package/dist/plugins/ops/kv-cache-utils.js +10 -25
- package/dist/plugins/ops/load-model.js +21 -16
- package/dist/plugins/ops/transcribe.js +17 -1
- package/dist/registry.js +1 -0
- package/dist/resources/model-fit/assess.d.ts +15 -23
- package/dist/resources/model-fit/assess.js +207 -271
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +3 -1
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +6 -1
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +2 -0
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +5 -3
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +9 -1
- package/dist/resources/model-fit/floor.d.ts +10 -10
- package/dist/resources/model-fit/floor.js +13 -13
- package/dist/resources/model-fit/kv-cache.d.ts +23 -0
- package/dist/resources/model-fit/kv-cache.js +85 -0
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +11 -6
- package/dist/resources/model-fit/native-probe/advisory-fit.js +12 -27
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +8 -0
- package/dist/resources/model-fit/native-probe/classify-fit.js +32 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +4 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.js +24 -14
- package/dist/resources/model-fit/native-probe/engine-fit.d.ts +14 -0
- package/dist/resources/model-fit/native-probe/engine-fit.js +1 -1
- package/dist/resources/model-fit/native-probe/engines/asr.d.ts +4 -0
- package/dist/resources/model-fit/native-probe/engines/asr.js +23 -0
- package/dist/resources/model-fit/native-probe/engines/audiogen.js +29 -1
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +16 -6
- package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/engines/llama.js +19 -123
- package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +8 -0
- package/dist/resources/model-fit/native-probe/engines/nmt.js +11 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +9 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.js +13 -0
- package/dist/resources/model-fit/native-probe/engines/tts.d.ts +2 -0
- package/dist/resources/model-fit/native-probe/engines/tts.js +49 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +5 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +38 -23
- package/dist/resources/model-fit/platform.d.ts +4 -4
- package/dist/resources/model-fit/platform.js +6 -8
- package/dist/resources/model-fit/types.d.ts +3 -117
- package/dist/rpc/inventory.js +5 -7
- package/dist/runtime/env.d.ts +0 -2
- package/dist/runtime/env.js +2 -9
- package/dist/runtime/model-config-utils.js +6 -1
- package/dist/runtime/request-context.d.ts +1 -1
- package/dist/runtime/request-context.js +8 -0
- package/dist/runtime/state.js +5 -0
- package/dist/schemas/assess-model-fit.d.ts +100 -43
- package/dist/schemas/assess-model-fit.js +66 -29
- package/dist/schemas/audio-gen.d.ts +186 -18
- package/dist/schemas/audio-gen.js +180 -48
- package/dist/schemas/batch-completion-stream.d.ts +202 -34
- package/dist/schemas/bci-config.d.ts +2 -0
- package/dist/schemas/bci.d.ts +23 -2
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/common.d.ts +1083 -158
- package/dist/schemas/common.js +5 -2
- package/dist/schemas/completion-stream.d.ts +232 -37
- package/dist/schemas/completion-stream.js +64 -20
- package/dist/schemas/config.d.ts +477 -12
- package/dist/schemas/config.js +21 -1
- package/dist/schemas/decision.d.ts +602 -0
- package/dist/schemas/decision.js +205 -0
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/engine-addon-map.d.ts +7 -0
- package/dist/schemas/engine-addon-map.js +23 -3
- package/dist/schemas/errors.d.ts +1 -0
- package/dist/schemas/errors.js +5 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/llamacpp-config.d.ts +42 -2
- package/dist/schemas/llamacpp-config.js +27 -0
- package/dist/schemas/load-model.d.ts +5247 -1309
- package/dist/schemas/load-model.js +88 -9
- package/dist/schemas/model-config-schemas.d.ts +233 -8
- package/dist/schemas/model-config-schemas.js +4 -1
- package/dist/schemas/model-fit-policy.d.ts +17 -0
- package/dist/schemas/model-fit-policy.js +17 -0
- package/dist/schemas/model-info.d.ts +20 -2
- package/dist/schemas/model-info.js +2 -1
- package/dist/schemas/model-resource-profile.d.ts +3 -4
- package/dist/schemas/model-resource-profile.js +1 -4
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +10 -1
- package/dist/schemas/model-types.js +3 -0
- package/dist/schemas/ocr.d.ts +74 -0
- package/dist/schemas/ocr.js +42 -0
- package/dist/schemas/plugin.d.ts +8 -2
- package/dist/schemas/plugin.js +6 -0
- package/dist/schemas/profiling.d.ts +4 -4
- package/dist/schemas/registry.d.ts +26 -0
- package/dist/schemas/registry.js +3 -0
- package/dist/schemas/reload-config.d.ts +10 -2
- package/dist/schemas/rpc-server.js +3 -3
- package/dist/schemas/sdcpp-config.d.ts +26 -0
- package/dist/schemas/sdcpp-config.js +8 -7
- package/dist/schemas/system-resources.d.ts +4 -4
- package/dist/schemas/text-to-speech.d.ts +402 -3
- package/dist/schemas/text-to-speech.js +129 -11
- package/dist/schemas/tools.d.ts +13 -4
- package/dist/schemas/tools.js +18 -6
- package/dist/schemas/transcription-config.d.ts +15 -0
- package/dist/schemas/transcription-config.js +38 -3
- package/dist/schemas/transcription.d.ts +46 -4
- package/dist/schemas/transcription.js +51 -4
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/schemas/vla.d.ts +9 -2
- package/dist/schemas/vla.js +9 -5
- package/dist/surface.d.ts +1 -1
- package/dist/surface.js +1 -1
- package/dist/utils/addon-responses.d.ts +1 -0
- package/dist/utils/asr-events.d.ts +1 -0
- package/dist/utils/asr-events.js +2 -1
- package/dist/utils/cache/types.d.ts +7 -0
- package/dist/utils/mcp-adapter.js +12 -8
- package/dist/utils/tool-helpers.d.ts +1 -1
- package/dist/utils/tool-helpers.js +20 -52
- package/dist/utils/tools/parsers/dsml.js +8 -5
- package/dist/utils/tools/parsers/qwen35.js +7 -4
- package/dist/utils/tools/shared.d.ts +3 -0
- package/dist/utils/tools/shared.js +62 -0
- package/dist/utils/transcribe-metadata.d.ts +8 -1
- package/dist/utils/transcribe-metadata.js +13 -3
- package/dist/utils/tts-stats.d.ts +1 -0
- package/package.json +41 -32
- package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-arm64.js +0 -36
- package/dist/resources/model-fit/calibration/darwin-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-x64.js +0 -38
- package/dist/resources/model-fit/calibration/fit.d.ts +0 -73
- package/dist/resources/model-fit/calibration/fit.js +0 -152
- package/dist/resources/model-fit/calibration/index.d.ts +0 -37
- package/dist/resources/model-fit/calibration/index.js +0 -75
- package/dist/resources/model-fit/calibration/linux-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-arm64.js +0 -38
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +0 -39
- package/dist/resources/model-fit/calibration/linux-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64.js +0 -38
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +0 -39
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +0 -36
- package/dist/resources/model-fit/calibration/win32-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64.js +0 -38
- package/dist/resources/model-fit/estimators/llm.d.ts +0 -46
- package/dist/resources/model-fit/estimators/llm.js +0 -222
- package/dist/resources/model-fit/estimators/whisper.d.ts +0 -10
- package/dist/resources/model-fit/estimators/whisper.js +0 -76
|
@@ -154,10 +154,12 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
154
154
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
155
155
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
156
156
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
157
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
157
158
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
158
159
|
"onnx-tts": "onnx-tts";
|
|
159
160
|
"tts-ggml": "tts-ggml";
|
|
160
161
|
"parakeet-transcription": "parakeet-transcription";
|
|
162
|
+
"moss-transcribe": "moss-transcribe";
|
|
161
163
|
"ggml-ocr": "ggml-ocr";
|
|
162
164
|
"sdcpp-generation": "sdcpp-generation";
|
|
163
165
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -193,10 +195,12 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
193
195
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
194
196
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
195
197
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
198
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
196
199
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
197
200
|
"onnx-tts": "onnx-tts";
|
|
198
201
|
"tts-ggml": "tts-ggml";
|
|
199
202
|
"parakeet-transcription": "parakeet-transcription";
|
|
203
|
+
"moss-transcribe": "moss-transcribe";
|
|
200
204
|
"ggml-ocr": "ggml-ocr";
|
|
201
205
|
"sdcpp-generation": "sdcpp-generation";
|
|
202
206
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -245,10 +249,12 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
245
249
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
246
250
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
247
251
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
252
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
248
253
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
249
254
|
"onnx-tts": "onnx-tts";
|
|
250
255
|
"tts-ggml": "tts-ggml";
|
|
251
256
|
"parakeet-transcription": "parakeet-transcription";
|
|
257
|
+
"moss-transcribe": "moss-transcribe";
|
|
252
258
|
"ggml-ocr": "ggml-ocr";
|
|
253
259
|
"sdcpp-generation": "sdcpp-generation";
|
|
254
260
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -284,10 +290,12 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
284
290
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
285
291
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
286
292
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
293
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
287
294
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
288
295
|
"onnx-tts": "onnx-tts";
|
|
289
296
|
"tts-ggml": "tts-ggml";
|
|
290
297
|
"parakeet-transcription": "parakeet-transcription";
|
|
298
|
+
"moss-transcribe": "moss-transcribe";
|
|
291
299
|
"ggml-ocr": "ggml-ocr";
|
|
292
300
|
"sdcpp-generation": "sdcpp-generation";
|
|
293
301
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -323,10 +331,12 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
323
331
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
324
332
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
325
333
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
334
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
326
335
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
327
336
|
"onnx-tts": "onnx-tts";
|
|
328
337
|
"tts-ggml": "tts-ggml";
|
|
329
338
|
"parakeet-transcription": "parakeet-transcription";
|
|
339
|
+
"moss-transcribe": "moss-transcribe";
|
|
330
340
|
"ggml-ocr": "ggml-ocr";
|
|
331
341
|
"sdcpp-generation": "sdcpp-generation";
|
|
332
342
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -559,10 +569,12 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
559
569
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
560
570
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
561
571
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
572
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
562
573
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
563
574
|
"onnx-tts": "onnx-tts";
|
|
564
575
|
"tts-ggml": "tts-ggml";
|
|
565
576
|
"parakeet-transcription": "parakeet-transcription";
|
|
577
|
+
"moss-transcribe": "moss-transcribe";
|
|
566
578
|
"ggml-ocr": "ggml-ocr";
|
|
567
579
|
"sdcpp-generation": "sdcpp-generation";
|
|
568
580
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -598,10 +610,12 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
598
610
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
599
611
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
600
612
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
613
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
601
614
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
602
615
|
"onnx-tts": "onnx-tts";
|
|
603
616
|
"tts-ggml": "tts-ggml";
|
|
604
617
|
"parakeet-transcription": "parakeet-transcription";
|
|
618
|
+
"moss-transcribe": "moss-transcribe";
|
|
605
619
|
"ggml-ocr": "ggml-ocr";
|
|
606
620
|
"sdcpp-generation": "sdcpp-generation";
|
|
607
621
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -650,10 +664,12 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
650
664
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
651
665
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
652
666
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
667
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
653
668
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
654
669
|
"onnx-tts": "onnx-tts";
|
|
655
670
|
"tts-ggml": "tts-ggml";
|
|
656
671
|
"parakeet-transcription": "parakeet-transcription";
|
|
672
|
+
"moss-transcribe": "moss-transcribe";
|
|
657
673
|
"ggml-ocr": "ggml-ocr";
|
|
658
674
|
"sdcpp-generation": "sdcpp-generation";
|
|
659
675
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -689,10 +705,12 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
689
705
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
690
706
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
691
707
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
708
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
692
709
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
693
710
|
"onnx-tts": "onnx-tts";
|
|
694
711
|
"tts-ggml": "tts-ggml";
|
|
695
712
|
"parakeet-transcription": "parakeet-transcription";
|
|
713
|
+
"moss-transcribe": "moss-transcribe";
|
|
696
714
|
"ggml-ocr": "ggml-ocr";
|
|
697
715
|
"sdcpp-generation": "sdcpp-generation";
|
|
698
716
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -728,10 +746,12 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
728
746
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
729
747
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
730
748
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
749
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
731
750
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
732
751
|
"onnx-tts": "onnx-tts";
|
|
733
752
|
"tts-ggml": "tts-ggml";
|
|
734
753
|
"parakeet-transcription": "parakeet-transcription";
|
|
754
|
+
"moss-transcribe": "moss-transcribe";
|
|
735
755
|
"ggml-ocr": "ggml-ocr";
|
|
736
756
|
"sdcpp-generation": "sdcpp-generation";
|
|
737
757
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -840,7 +860,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
840
860
|
engine?: string | undefined;
|
|
841
861
|
expectedSize?: number | undefined;
|
|
842
862
|
sha256Checksum?: string | undefined;
|
|
843
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
863
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
844
864
|
} | undefined;
|
|
845
865
|
dstVocabSrc?: string | {
|
|
846
866
|
src: string;
|
|
@@ -853,7 +873,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
853
873
|
engine?: string | undefined;
|
|
854
874
|
expectedSize?: number | undefined;
|
|
855
875
|
sha256Checksum?: string | undefined;
|
|
856
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
876
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
857
877
|
} | undefined;
|
|
858
878
|
normalize?: number | undefined;
|
|
859
879
|
pivotModel?: {
|
|
@@ -868,7 +888,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
868
888
|
engine?: string | undefined;
|
|
869
889
|
expectedSize?: number | undefined;
|
|
870
890
|
sha256Checksum?: string | undefined;
|
|
871
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
891
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
872
892
|
};
|
|
873
893
|
mode?: "full" | undefined;
|
|
874
894
|
beamsize?: number | undefined;
|
|
@@ -890,7 +910,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
890
910
|
engine?: string | undefined;
|
|
891
911
|
expectedSize?: number | undefined;
|
|
892
912
|
sha256Checksum?: string | undefined;
|
|
893
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
913
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
894
914
|
} | undefined;
|
|
895
915
|
dstVocabSrc?: string | {
|
|
896
916
|
src: string;
|
|
@@ -903,7 +923,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
903
923
|
engine?: string | undefined;
|
|
904
924
|
expectedSize?: number | undefined;
|
|
905
925
|
sha256Checksum?: string | undefined;
|
|
906
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
926
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
907
927
|
} | undefined;
|
|
908
928
|
normalize?: number | undefined;
|
|
909
929
|
} | undefined;
|
|
@@ -944,7 +964,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
944
964
|
engine?: string | undefined;
|
|
945
965
|
expectedSize?: number | undefined;
|
|
946
966
|
sha256Checksum?: string | undefined;
|
|
947
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
967
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
948
968
|
} | undefined;
|
|
949
969
|
dstVocabSrc?: string | {
|
|
950
970
|
src: string;
|
|
@@ -957,7 +977,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
957
977
|
engine?: string | undefined;
|
|
958
978
|
expectedSize?: number | undefined;
|
|
959
979
|
sha256Checksum?: string | undefined;
|
|
960
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
980
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
961
981
|
} | undefined;
|
|
962
982
|
normalize?: number | undefined;
|
|
963
983
|
pivotModel?: {
|
|
@@ -972,7 +992,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
972
992
|
engine?: string | undefined;
|
|
973
993
|
expectedSize?: number | undefined;
|
|
974
994
|
sha256Checksum?: string | undefined;
|
|
975
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
995
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
976
996
|
};
|
|
977
997
|
mode?: "full" | undefined;
|
|
978
998
|
beamsize?: number | undefined;
|
|
@@ -994,7 +1014,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
994
1014
|
engine?: string | undefined;
|
|
995
1015
|
expectedSize?: number | undefined;
|
|
996
1016
|
sha256Checksum?: string | undefined;
|
|
997
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
1017
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
998
1018
|
} | undefined;
|
|
999
1019
|
dstVocabSrc?: string | {
|
|
1000
1020
|
src: string;
|
|
@@ -1007,7 +1027,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1007
1027
|
engine?: string | undefined;
|
|
1008
1028
|
expectedSize?: number | undefined;
|
|
1009
1029
|
sha256Checksum?: string | undefined;
|
|
1010
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
1030
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
1011
1031
|
} | undefined;
|
|
1012
1032
|
normalize?: number | undefined;
|
|
1013
1033
|
} | undefined;
|
package/dist/schemas/vla.d.ts
CHANGED
|
@@ -41,10 +41,17 @@ export type VlaEmbodimentSelection = string | number | {
|
|
|
41
41
|
numCameras?: number;
|
|
42
42
|
};
|
|
43
43
|
export declare const vlaConfigSchema: z.ZodObject<{
|
|
44
|
-
backend: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
backend: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
45
45
|
cpu: "cpu";
|
|
46
46
|
auto: "auto";
|
|
47
|
-
|
|
47
|
+
cuda: "cuda";
|
|
48
|
+
vulkan: "vulkan";
|
|
49
|
+
metal: "metal";
|
|
50
|
+
opencl: "opencl";
|
|
51
|
+
hip: "hip";
|
|
52
|
+
rocm: "rocm";
|
|
53
|
+
sycl: "sycl";
|
|
54
|
+
}>>>;
|
|
48
55
|
verbosity: z.ZodOptional<z.ZodNumber>;
|
|
49
56
|
embodiment: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
50
57
|
tag: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/vla.js
CHANGED
|
@@ -72,11 +72,15 @@ export const vlaEmbodimentSelectionSchema = z.union([
|
|
|
72
72
|
// ============================================
|
|
73
73
|
export const vlaConfigSchema = z.object({
|
|
74
74
|
backend: z
|
|
75
|
-
.enum(['auto', 'cpu'])
|
|
75
|
+
.array(z.enum(['auto', 'cpu', 'cuda', 'vulkan', 'metal', 'opencl', 'hip', 'rocm', 'sycl']))
|
|
76
|
+
.min(1)
|
|
77
|
+
.refine((value) => !value.includes('cpu') || value.length === 1, 'CPU must be selected on its own')
|
|
76
78
|
.optional()
|
|
77
|
-
.describe(
|
|
78
|
-
"
|
|
79
|
-
|
|
79
|
+
.describe("Ordered backend names, such as ['cuda', 'vulkan']. " +
|
|
80
|
+
"Omitted or ['auto'] uses the native default order. " +
|
|
81
|
+
'Supported GPU names: cuda, vulkan, metal, opencl, hip, rocm, sycl. ' +
|
|
82
|
+
'Names are tried in order; if none has an accepted device, selection falls back to the native default order. ' +
|
|
83
|
+
"['cpu'] forces CPU regardless of available accelerators and must be used on its own."),
|
|
80
84
|
verbosity: z
|
|
81
85
|
.number()
|
|
82
86
|
.int()
|
|
@@ -165,7 +169,7 @@ export const vlaStatsSchema = z.object({
|
|
|
165
169
|
backendDevice: z
|
|
166
170
|
.number()
|
|
167
171
|
.optional()
|
|
168
|
-
.describe('0 = CPU backend, 1 = GPU backend
|
|
172
|
+
.describe('0 = CPU backend, 1 = GPU backend, including CUDA, ROCm, Vulkan, Metal, or OpenCL.')
|
|
169
173
|
});
|
|
170
174
|
// ============================================
|
|
171
175
|
// Run request / response (wire format)
|
package/dist/surface.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { TOOL_SEARCH_NAME, buildToolSearchTool, executeToolSearch, loadedToolNam
|
|
|
4
4
|
export * from './schemas/index.js';
|
|
5
5
|
export * from './profiling/index.js';
|
|
6
6
|
export * from './constants/index.js';
|
|
7
|
-
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL } from './schemas/engine-addon-map.js';
|
|
7
|
+
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL, LEGACY_REGISTRY_ENGINE_RULES } from './schemas/engine-addon-map.js';
|
|
8
8
|
export { generateProfileId } from './profiling/clock.js';
|
|
9
9
|
export { readModelExecutionMs } from './profiling/model-execution.js';
|
|
10
10
|
export { readBackendDiagnostics } from './profiling/backend-diagnostics.js';
|
package/dist/surface.js
CHANGED
|
@@ -13,7 +13,7 @@ export * from './profiling/index.js';
|
|
|
13
13
|
export * from './constants/index.js';
|
|
14
14
|
// Value-clean helpers @qvac/sdk's registry codegen and server-side profiler reach
|
|
15
15
|
// for; not part of either barrel, so re-exported explicitly here.
|
|
16
|
-
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL } from './schemas/engine-addon-map.js';
|
|
16
|
+
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL, LEGACY_REGISTRY_ENGINE_RULES } from './schemas/engine-addon-map.js';
|
|
17
17
|
export { generateProfileId } from './profiling/clock.js';
|
|
18
18
|
export { readModelExecutionMs } from './profiling/model-execution.js';
|
|
19
19
|
export { readBackendDiagnostics } from './profiling/backend-diagnostics.js';
|
|
@@ -47,6 +47,7 @@ export interface TtsStats {
|
|
|
47
47
|
* fields are populated on both paths.
|
|
48
48
|
*/
|
|
49
49
|
export interface TtsOutputChunk {
|
|
50
|
+
text?: string;
|
|
50
51
|
outputArray: ArrayLike<number>;
|
|
51
52
|
/** Rate of `outputArray`; moves with `outputSampleRate` and the enhancer. */
|
|
52
53
|
sampleRate?: number;
|
|
@@ -2,6 +2,7 @@ import type ASRGgml from '@qvac/asr-ggml';
|
|
|
2
2
|
export declare function isVadEvent(event: ASRGgml.ASRStreamOutput): event is ASRGgml.VadEvent;
|
|
3
3
|
export declare function isEndOfTurnEvent(event: ASRGgml.ASRStreamOutput): event is ASRGgml.EndOfTurnEvent;
|
|
4
4
|
export declare function toVadStateEvent(event: ASRGgml.VadEvent): {
|
|
5
|
+
speakerId?: number;
|
|
5
6
|
speaking: boolean;
|
|
6
7
|
probability: number;
|
|
7
8
|
source: "silero" | "energy" | "sortformer";
|
package/dist/utils/asr-events.js
CHANGED
|
@@ -14,7 +14,8 @@ export function toVadStateEvent(event) {
|
|
|
14
14
|
return {
|
|
15
15
|
speaking: event.speaking,
|
|
16
16
|
probability: event.score,
|
|
17
|
-
source: event.source
|
|
17
|
+
source: event.source,
|
|
18
|
+
...(event.speakerId !== undefined && { speakerId: event.speakerId })
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
export function toEndOfTurnEvent(event) {
|
|
@@ -4,4 +4,11 @@ export interface CacheMessage {
|
|
|
4
4
|
attachments?: {
|
|
5
5
|
path: string;
|
|
6
6
|
}[] | undefined;
|
|
7
|
+
toolCalls?: {
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
name: string;
|
|
10
|
+
arguments: Record<string, unknown>;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
toolCallId?: string | undefined;
|
|
13
|
+
toolName?: string | undefined;
|
|
7
14
|
}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { mapValues } from './object.js';
|
|
2
|
-
const VALID_TYPES = ['string', 'number', 'integer', 'boolean', 'object', 'array'];
|
|
2
|
+
const VALID_TYPES = ['string', 'number', 'integer', 'boolean', 'object', 'array', 'null'];
|
|
3
3
|
function isValidType(value) {
|
|
4
|
+
if (Array.isArray(value))
|
|
5
|
+
return value.length > 0 && value.every(isValidType);
|
|
4
6
|
return typeof value === 'string' && VALID_TYPES.includes(value);
|
|
5
7
|
}
|
|
6
8
|
function convertMcpToolToTool(mcpTool) {
|
|
7
|
-
|
|
9
|
+
// `$defs` and other top-level keywords stay, so a nested `$ref` still resolves.
|
|
10
|
+
const { $schema: _schema, title: _title, ...inputSchema } = mcpTool.inputSchema;
|
|
8
11
|
const properties = inputSchema.properties ?? {};
|
|
9
12
|
const required = inputSchema.required ?? [];
|
|
13
|
+
// Only an unrecognised `type` is replaced; a missing one is left alone because
|
|
14
|
+
// `anyOf`/`oneOf` properties carry their types in the branches.
|
|
10
15
|
const convertedProperties = mapValues(properties, (prop) => {
|
|
11
|
-
const { type
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
...
|
|
15
|
-
...(enumVal && { enum: enumVal })
|
|
16
|
-
};
|
|
16
|
+
const { type } = prop;
|
|
17
|
+
return type === undefined || isValidType(type)
|
|
18
|
+
? prop
|
|
19
|
+
: { ...prop, type: 'string' };
|
|
17
20
|
});
|
|
18
21
|
return {
|
|
19
22
|
type: 'function',
|
|
20
23
|
name: mcpTool.name,
|
|
21
24
|
description: mcpTool.description ?? '',
|
|
22
25
|
parameters: {
|
|
26
|
+
...inputSchema,
|
|
23
27
|
type: 'object',
|
|
24
28
|
properties: convertedProperties,
|
|
25
29
|
required: required.length > 0 ? required : undefined
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { type Tool, type ToolCall, type ToolCallWithCall } from '../schemas/tools.js';
|
|
3
3
|
type ZodObjectType = z.ZodObject<z.ZodRawShape>;
|
|
4
4
|
export type ToolHandler = (args: Record<string, unknown>) => Promise<unknown>;
|
|
@@ -1,66 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { toolSchema } from '../schemas/tools.js';
|
|
2
3
|
import { InvalidToolsArrayError, InvalidToolSchemaError } from '../errors/index.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
default:
|
|
17
|
-
return 'string';
|
|
4
|
+
// Zod's integer bounds; they add nothing a tool grammar needs.
|
|
5
|
+
const SAFE_INTEGER_BOUNDS = new Set([Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]);
|
|
6
|
+
function dropSafeIntegerBounds(node) {
|
|
7
|
+
if (Array.isArray(node))
|
|
8
|
+
return node.map(dropSafeIntegerBounds);
|
|
9
|
+
if (!node || typeof node !== 'object')
|
|
10
|
+
return node;
|
|
11
|
+
const out = {};
|
|
12
|
+
for (const [key, value] of Object.entries(node)) {
|
|
13
|
+
if ((key === 'minimum' || key === 'maximum') && SAFE_INTEGER_BOUNDS.has(value)) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
out[key] = dropSafeIntegerBounds(value);
|
|
18
17
|
}
|
|
18
|
+
return out;
|
|
19
|
+
}
|
|
20
|
+
function zodToToolParameters(schema) {
|
|
21
|
+
const { $schema: _schema, ...json } = dropSafeIntegerBounds(z.toJSONSchema(schema, { io: 'input', unrepresentable: 'any' }));
|
|
22
|
+
return { ...json, type: 'object', properties: json['properties'] ?? {} };
|
|
19
23
|
}
|
|
20
24
|
export function convertToolInput(input) {
|
|
21
|
-
const zodSchema = input.parameters;
|
|
22
|
-
// Try both shape and def.shape for Zod v4 compatibility
|
|
23
|
-
const shape = zodSchema.shape || (typeof zodSchema.def?.shape === 'object' ? zodSchema.def.shape : {});
|
|
24
|
-
const properties = {};
|
|
25
|
-
const required = [];
|
|
26
|
-
for (const [key, value] of Object.entries(shape)) {
|
|
27
|
-
const field = value;
|
|
28
|
-
const fieldType = field.type || field.def?.type || 'string';
|
|
29
|
-
const isOptional = fieldType === 'optional';
|
|
30
|
-
let actualType = isOptional ? 'string' : fieldType;
|
|
31
|
-
let actualDescription = field.description;
|
|
32
|
-
if (isOptional && field.def?.innerType) {
|
|
33
|
-
const innerType = field.def.innerType;
|
|
34
|
-
actualType = innerType.type || innerType.def?.type || 'string';
|
|
35
|
-
// Get description from inner type if not on wrapper
|
|
36
|
-
if (!actualDescription && innerType.description) {
|
|
37
|
-
actualDescription = innerType.description;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
properties[key] = {
|
|
41
|
-
type: zodTypeToJsonSchemaType(actualType)
|
|
42
|
-
};
|
|
43
|
-
if (actualDescription) {
|
|
44
|
-
properties[key].description = actualDescription;
|
|
45
|
-
}
|
|
46
|
-
if (field.def?.values) {
|
|
47
|
-
properties[key].enum = field.def.values;
|
|
48
|
-
}
|
|
49
|
-
if (!isOptional) {
|
|
50
|
-
required.push(key);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
25
|
const tool = {
|
|
54
26
|
type: 'function',
|
|
55
27
|
name: input.name,
|
|
56
28
|
description: input.description,
|
|
57
29
|
...(input.deferLoading !== undefined && { deferLoading: input.deferLoading }),
|
|
58
30
|
...(input.group !== undefined && { group: input.group }),
|
|
59
|
-
parameters:
|
|
60
|
-
type: 'object',
|
|
61
|
-
properties,
|
|
62
|
-
required: required.length > 0 ? required : undefined
|
|
63
|
-
}
|
|
31
|
+
parameters: zodToToolParameters(input.parameters)
|
|
64
32
|
};
|
|
65
33
|
return toolSchema.parse(tool);
|
|
66
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateStableToolCallId, validateToolArguments } from '../shared.js';
|
|
1
|
+
import { generateStableToolCallId, coerceByParameterTypes, parameterAllowsNull, parameterTypes, validateToolArguments } from '../shared.js';
|
|
2
2
|
// DeepSeek marks DSML tags with a fullwidth vertical line (U+FF5C `|`), not
|
|
3
3
|
// the ASCII pipe used by the visually similar `<|...|>` markers of the harmony
|
|
4
4
|
// and gemma4 dialects — the two must not be conflated. V4 wraps calls in
|
|
@@ -41,10 +41,13 @@ function coerceBySchemaType(value, type) {
|
|
|
41
41
|
return value;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
function coerceParamValue(raw, isString,
|
|
44
|
+
function coerceParamValue(raw, isString, schema) {
|
|
45
45
|
const trimmed = raw.trim();
|
|
46
|
-
if (isString === undefined)
|
|
47
|
-
|
|
46
|
+
if (isString === undefined) {
|
|
47
|
+
if (trimmed === 'null' && parameterAllowsNull(schema))
|
|
48
|
+
return null;
|
|
49
|
+
return coerceByParameterTypes(trimmed, parameterTypes(schema), coerceBySchemaType);
|
|
50
|
+
}
|
|
48
51
|
if (isString === 'true')
|
|
49
52
|
return trimmed;
|
|
50
53
|
try {
|
|
@@ -147,7 +150,7 @@ export function parseDsmlFormat(text, tools) {
|
|
|
147
150
|
}
|
|
148
151
|
const isString = STRING_ATTR_REGEX.exec(attrs)?.[1]?.toLowerCase();
|
|
149
152
|
try {
|
|
150
|
-
args[key] = coerceParamValue(param[2], isString, properties[key]
|
|
153
|
+
args[key] = coerceParamValue(param[2], isString, properties[key]);
|
|
151
154
|
}
|
|
152
155
|
catch (err) {
|
|
153
156
|
parseError = `${key}: ${err instanceof Error ? err.message : String(err)}`;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { generateStableToolCallId, validateToolArguments } from '../shared.js';
|
|
1
|
+
import { generateStableToolCallId, coerceByParameterTypes, parameterAllowsNull, parameterTypes, validateToolArguments } from '../shared.js';
|
|
2
2
|
// Coerce raw parameter text to the type declared in the tool's JSON schema.
|
|
3
3
|
// String values are raw (not JSON-quoted); arrays/objects are valid JSON.
|
|
4
4
|
function coerceParamValue(raw, schema) {
|
|
5
5
|
const trimmed = raw.trim();
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
8
|
-
|
|
6
|
+
if (trimmed === 'null' && parameterAllowsNull(schema))
|
|
7
|
+
return null;
|
|
8
|
+
return coerceByParameterTypes(trimmed, parameterTypes(schema), coerceToType);
|
|
9
|
+
}
|
|
10
|
+
function coerceToType(trimmed, type) {
|
|
11
|
+
switch (type) {
|
|
9
12
|
case 'number': {
|
|
10
13
|
if (trimmed.length === 0)
|
|
11
14
|
throw new Error(`invalid numeric value: ""`);
|
|
@@ -4,6 +4,9 @@ export type ParserResult = {
|
|
|
4
4
|
toolCalls: ToolCall[];
|
|
5
5
|
errors: ToolCallError[];
|
|
6
6
|
};
|
|
7
|
+
export declare function parameterTypes(schema: unknown): string[];
|
|
8
|
+
export declare function coerceByParameterTypes(raw: string, types: string[], coerce: (raw: string, type: string) => unknown): unknown;
|
|
9
|
+
export declare function parameterAllowsNull(schema: unknown): boolean;
|
|
7
10
|
export declare function stripThinkingBlocks(text: string): string;
|
|
8
11
|
export declare function generateStableToolCallId(name: string, args: Record<string, unknown>): string;
|
|
9
12
|
export declare function isValidToolCall(obj: unknown): obj is {
|
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
// A parameter's candidate types in declaration order, `null` excluded. Type
|
|
2
|
+
// arrays and `anyOf`/`oneOf` branches are flattened; a branch with only `enum`
|
|
3
|
+
// contributes the types of its values.
|
|
4
|
+
export function parameterTypes(schema) {
|
|
5
|
+
if (!schema || typeof schema !== 'object')
|
|
6
|
+
return [];
|
|
7
|
+
const { type, anyOf, oneOf, enum: enumValues } = schema;
|
|
8
|
+
let types = [];
|
|
9
|
+
if (typeof type === 'string')
|
|
10
|
+
types = [type];
|
|
11
|
+
else if (Array.isArray(type))
|
|
12
|
+
types = type;
|
|
13
|
+
else if (Array.isArray(anyOf) || Array.isArray(oneOf)) {
|
|
14
|
+
types = (Array.isArray(anyOf) ? anyOf : oneOf).flatMap(parameterTypes);
|
|
15
|
+
}
|
|
16
|
+
else if (Array.isArray(enumValues)) {
|
|
17
|
+
types = enumValues.map((v) => (v === null ? 'null' : typeof v));
|
|
18
|
+
}
|
|
19
|
+
const names = types.filter((t) => typeof t === 'string' && t !== 'null');
|
|
20
|
+
return [...new Set(names)];
|
|
21
|
+
}
|
|
22
|
+
function matchesType(value, type) {
|
|
23
|
+
switch (type) {
|
|
24
|
+
case 'object':
|
|
25
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
26
|
+
case 'array':
|
|
27
|
+
return Array.isArray(value);
|
|
28
|
+
default:
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// Coerces raw parameter text against a union by trying each candidate type in
|
|
33
|
+
// declaration order with `string` last, keeping the first that succeeds. A
|
|
34
|
+
// single-type parameter keeps the parser's own coercion and error.
|
|
35
|
+
export function coerceByParameterTypes(raw, types, coerce) {
|
|
36
|
+
if (types.length === 0)
|
|
37
|
+
return raw;
|
|
38
|
+
if (types.length === 1)
|
|
39
|
+
return coerce(raw, types[0]);
|
|
40
|
+
const ordered = [...types.filter((t) => t !== 'string'), ...types.filter((t) => t === 'string')];
|
|
41
|
+
let firstError;
|
|
42
|
+
for (const type of ordered) {
|
|
43
|
+
try {
|
|
44
|
+
const value = coerce(raw, type);
|
|
45
|
+
if (matchesType(value, type))
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
firstError ??= err;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
throw firstError ?? new Error(`value does not match any of: ${types.join(', ')}`);
|
|
53
|
+
}
|
|
54
|
+
export function parameterAllowsNull(schema) {
|
|
55
|
+
if (!schema || typeof schema !== 'object')
|
|
56
|
+
return false;
|
|
57
|
+
const { type, anyOf, oneOf } = schema;
|
|
58
|
+
if (type === 'null' || (Array.isArray(type) && type.includes('null')))
|
|
59
|
+
return true;
|
|
60
|
+
const branches = Array.isArray(anyOf) ? anyOf : Array.isArray(oneOf) ? oneOf : [];
|
|
61
|
+
return branches.some(parameterAllowsNull);
|
|
62
|
+
}
|
|
1
63
|
export function stripThinkingBlocks(text) {
|
|
2
64
|
return text.replace(/<think>[\s\S]*?<\/think>/gi, '');
|
|
3
65
|
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { type TranscribeSegment } from '../schemas/index.js';
|
|
2
2
|
/**
|
|
3
|
-
* A native transcript segment, as emitted by
|
|
3
|
+
* A native transcript segment, as emitted by the engines of
|
|
4
4
|
* `@qvac/asr-ggml` and by `@qvac/bci-whispercpp`. `text` plus the timing
|
|
5
5
|
* fields are shared; `isEndOfTurn` and `startsWord` are parakeet-only, and
|
|
6
6
|
* `windowStartTimestep` is BCI delta-streaming-only.
|
|
7
7
|
*/
|
|
8
8
|
export interface AsrAddonSegment {
|
|
9
9
|
text: string;
|
|
10
|
+
speakerId?: number;
|
|
11
|
+
speaker?: string;
|
|
12
|
+
speakerSegments?: {
|
|
13
|
+
speakerId: number;
|
|
14
|
+
start: number;
|
|
15
|
+
end: number;
|
|
16
|
+
}[];
|
|
10
17
|
start?: number;
|
|
11
18
|
end?: number;
|
|
12
19
|
toAppend?: boolean;
|