@qvac/inference 0.21.1 → 0.23.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 +89 -41
- 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 +5 -2
- package/dist/api/batch-completion.js +1 -1
- package/dist/api/completion-stream.d.ts +2 -1
- package/dist/api/completion-stream.js +4 -2
- package/dist/api/decide.d.ts +26 -0
- package/dist/api/decide.js +26 -0
- package/dist/api/diffusion.d.ts +18 -1
- package/dist/api/diffusion.js +18 -1
- package/dist/api/download-asset.js +1 -1
- package/dist/api/finetune.js +1 -1
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +39 -37
- package/dist/api/index.js +38 -36
- package/dist/api/load-model.js +2 -2
- package/dist/api/logging-stream-registry.js +11 -7
- package/dist/api/logging-stream.d.ts +11 -1
- package/dist/api/logging-stream.js +11 -2
- package/dist/api/registry.d.ts +2 -1
- package/dist/api/registry.js +5 -4
- package/dist/api/rerank.d.ts +17 -0
- package/dist/api/rerank.js +36 -0
- package/dist/api/subscribe-logs.js +5 -3
- 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/unload-model.js +1 -1
- package/dist/api/video-request.d.ts +5 -5
- package/dist/api/video.d.ts +5 -4
- package/dist/api/video.js +6 -5
- package/dist/api/vla.js +1 -1
- package/dist/api/world-result.js +1 -1
- package/dist/api/world.d.ts +1 -1
- package/dist/api/world.js +1 -1
- package/dist/config/resolve-config.d.ts +1 -1
- package/dist/config/resolve-config.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/dispatch.d.ts +3 -2
- package/dist/dispatch.js +16 -4
- package/dist/errors/index.d.ts +9 -0
- package/dist/errors/index.js +18 -1
- package/dist/handlers/assess-model-fit.d.ts +5 -3
- package/dist/handlers/assess-model-fit.js +84 -32
- package/dist/handlers/cancelHandler.js +1 -1
- package/dist/handlers/completion-orchestrate.js +2 -2
- package/dist/handlers/download-asset.js +2 -2
- package/dist/handlers/finetune.js +1 -1
- package/dist/handlers/get-loaded-model-info.js +3 -5
- package/dist/handlers/get-model-info.js +1 -1
- package/dist/handlers/load-model/coreml-sidecars.d.ts +15 -0
- package/dist/handlers/load-model/coreml-sidecars.js +71 -8
- package/dist/handlers/load-model/download-manager.d.ts +1 -1
- package/dist/handlers/load-model/download-stats.d.ts +2 -2
- package/dist/handlers/load-model/download-stats.js +3 -3
- package/dist/handlers/load-model/handler.js +10 -7
- package/dist/handlers/load-model/http-verify.d.ts +1 -1
- package/dist/handlers/load-model/http.d.ts +1 -1
- package/dist/handlers/load-model/http.js +3 -3
- package/dist/handlers/load-model/hyperdrive.d.ts +1 -1
- package/dist/handlers/load-model/hyperdrive.js +2 -2
- package/dist/handlers/load-model/index.d.ts +2 -2
- package/dist/handlers/load-model/index.js +2 -2
- package/dist/handlers/load-model/registry-companion-set.d.ts +1 -1
- package/dist/handlers/load-model/registry-companion-set.js +1 -1
- package/dist/handlers/load-model/registry-download-utils.d.ts +3 -3
- package/dist/handlers/load-model/registry-download-utils.js +2 -2
- package/dist/handlers/load-model/registry.d.ts +2 -2
- package/dist/handlers/load-model/registry.js +5 -5
- package/dist/handlers/load-model/resolve-session.d.ts +1 -1
- package/dist/handlers/load-model/resolve-session.js +11 -3
- package/dist/handlers/load-model/resolve.d.ts +1 -1
- package/dist/handlers/load-model/resolve.js +5 -5
- package/dist/handlers/load-model/safe-fetch.js +5 -6
- package/dist/handlers/logging-stream.d.ts +2 -1
- package/dist/handlers/logging-stream.js +23 -7
- package/dist/handlers/registry.d.ts +3 -1
- package/dist/handlers/registry.js +7 -5
- package/dist/handlers/types.d.ts +7 -1
- package/dist/handlers/vector-index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +1 -1
- package/dist/logging/index.d.ts +5 -5
- package/dist/logging/index.js +4 -4
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +2 -2
- package/dist/{resources/model-fit → model-fit}/assess.d.ts +18 -26
- package/dist/{resources/model-fit → model-fit}/assess.js +210 -274
- package/dist/{resources/model-fit/native-probe/classify-fit.d.ts → model-fit/classify.d.ts} +2 -2
- package/dist/{resources/model-fit/native-probe/classify-fit.js → model-fit/classify.js} +36 -5
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.d.ts → model-fit/description/fetch.d.ts} +4 -2
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.js → model-fit/description/fetch.js} +11 -6
- package/dist/{resources/model-fit/fit-stub/project-fit-from-load.d.ts → model-fit/description/project.d.ts} +3 -3
- package/dist/{resources/model-fit/fit-stub/project-fit-from-load.js → model-fit/description/project.js} +4 -2
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts → model-fit/description/resolve-load.d.ts} +6 -4
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.js → model-fit/description/resolve-load.js} +14 -6
- package/dist/model-fit/floor.d.ts +31 -0
- package/dist/{resources/model-fit → model-fit}/floor.js +13 -13
- package/dist/model-fit/kv-cache.d.ts +23 -0
- package/dist/model-fit/kv-cache.js +85 -0
- package/dist/{resources/model-fit/native-probe/advisory-fit.d.ts → model-fit/load-check.d.ts} +17 -14
- package/dist/{resources/model-fit/native-probe/advisory-fit.js → model-fit/load-check.js} +23 -64
- package/dist/model-fit/platform.d.ts +14 -0
- package/dist/model-fit/platform.js +26 -0
- package/dist/{resources/model-fit/native-probe/create-fit-request.d.ts → model-fit/request/create.d.ts} +5 -2
- package/dist/model-fit/request/create.js +61 -0
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/asr.d.ts +5 -1
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/asr.js +32 -1
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/audiogen.d.ts +1 -1
- package/dist/model-fit/request/engines/audiogen.js +63 -0
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/diffusion.d.ts +1 -1
- package/dist/model-fit/request/engines/diffusion.js +93 -0
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/llama.d.ts +2 -3
- package/dist/model-fit/request/engines/llama.js +44 -0
- package/dist/model-fit/request/engines/nmt.d.ts +8 -0
- package/dist/model-fit/request/engines/nmt.js +11 -0
- package/dist/model-fit/request/engines/ocr.d.ts +9 -0
- package/dist/model-fit/request/engines/ocr.js +13 -0
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/tts.d.ts +3 -1
- package/dist/{resources/model-fit/native-probe → model-fit/request}/engines/tts.js +50 -4
- package/dist/{resources/model-fit/native-probe/engine-fit.d.ts → model-fit/run/engine.d.ts} +17 -4
- package/dist/{resources/model-fit/native-probe/engine-fit.js → model-fit/run/engine.js} +2 -2
- package/dist/model-fit/run/run.d.ts +43 -0
- package/dist/model-fit/run/run.js +204 -0
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +2 -2
- package/dist/models/registry/models.d.ts +1072 -815
- package/dist/models/registry/models.js +3704 -3405
- package/dist/models/registry/resource-profiles.d.ts +1 -2
- package/dist/models/registry/resource-profiles.js +406 -3
- 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 +29 -11
- 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 +7 -28
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +2 -2
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +106 -13
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +5 -4
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +20 -3
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +3 -3
- package/dist/plugins/builtin/ggml-classification/plugin.js +1 -1
- 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 +9 -0
- package/dist/plugins/builtin/ggml-ocr/plugin.js +17 -39
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +9 -2
- package/dist/plugins/builtin/ggml-vla/plugin.js +4 -4
- package/dist/plugins/builtin/index.d.ts +15 -12
- package/dist/plugins/builtin/index.js +15 -12
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +5 -7
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +6 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +10 -7
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +141 -204
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +36 -92
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +67 -216
- 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 +208 -19
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +28 -20
- package/dist/plugins/builtin/llamacpp-completion/transform.js +5 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +5 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +89 -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 +222 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +44 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +9 -1
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +15 -5
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +9 -0
- package/dist/plugins/builtin/llamacpp-rerank/helpers.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-rerank/helpers.js +16 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.d.ts +5 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.js +117 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.d.ts +91 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.js +45 -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 +17 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +10 -74
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +25 -4
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +20 -5
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.d.ts +5 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.js +168 -52
- package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +5 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +28 -13
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +83 -1
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +55 -52
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.d.ts +15 -0
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.js +19 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.d.ts +8 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.js +9 -0
- 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.d.ts +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +5 -2
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +19 -7
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +151 -1
- package/dist/plugins/builtin/tts-ggml/plugin.js +39 -2
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +28 -4
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +8 -4
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/ops/kv-cache-utils.d.ts +5 -4
- package/dist/plugins/ops/kv-cache-utils.js +25 -33
- package/dist/plugins/ops/load-model.d.ts +8 -2
- package/dist/plugins/ops/load-model.js +33 -19
- package/dist/plugins/ops/transcribe.js +18 -2
- package/dist/plugins/ops/translate.js +3 -3
- package/dist/plugins/ops/unload-model.js +1 -1
- package/dist/plugins/turbovec-backend.js +5 -5
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +1 -1
- package/dist/profiling/controller.d.ts +1 -1
- package/dist/profiling/controller.js +2 -2
- package/dist/profiling/events.d.ts +1 -1
- package/dist/profiling/events.js +2 -2
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +3 -3
- package/dist/profiling/index.d.ts +13 -13
- package/dist/profiling/index.js +12 -12
- package/dist/profiling/operation-metrics.d.ts +1 -1
- package/dist/profiling/operation-metrics.js +2 -2
- package/dist/profiling/operation-wrappers.js +3 -3
- package/dist/profiling/profiler.js +1 -1
- package/dist/rag/handler.js +1 -1
- package/dist/rag/handlers/close-workspace.js +1 -1
- package/dist/rag/handlers/delete-embeddings.js +1 -1
- package/dist/rag/handlers/delete-workspace.js +1 -1
- package/dist/rag/handlers/ingest.js +1 -1
- package/dist/rag/handlers/list-workspaces.d.ts +1 -1
- package/dist/rag/handlers/list-workspaces.js +1 -1
- package/dist/rag/handlers/reindex.js +1 -1
- package/dist/rag/handlers/save-embeddings.js +1 -1
- package/dist/rag/handlers/search.js +1 -1
- package/dist/rag/index.d.ts +11 -11
- package/dist/rag/index.js +11 -11
- package/dist/rag/rag-workspace-manager.js +1 -1
- package/dist/registry.js +3 -1
- package/dist/resources/collector.d.ts +1 -1
- package/dist/resources/collector.js +1 -1
- package/dist/resources/instance.d.ts +1 -1
- package/dist/resources/instance.js +1 -1
- package/dist/resources/native.d.ts +1 -1
- package/dist/resources/normalize.d.ts +1 -1
- 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/index.d.ts +5 -5
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/lifecycle.js +7 -7
- package/dist/runtime/model-config-utils.js +9 -1
- package/dist/runtime/model-registry.d.ts +3 -1
- package/dist/runtime/model-registry.js +2 -1
- package/dist/runtime/registry-client.js +1 -1
- package/dist/runtime/request-context.d.ts +3 -3
- package/dist/runtime/request-context.js +22 -1
- package/dist/runtime/request-registry.d.ts +1 -1
- package/dist/runtime/request-registry.js +1 -1
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +7 -2
- package/dist/runtime/vector-index-backend.d.ts +2 -2
- package/dist/runtime/vector-index-registry.d.ts +5 -5
- package/dist/runtime/vector-index-registry.js +36 -13
- package/dist/schemas/assess-model-fit.d.ts +106 -43
- package/dist/schemas/assess-model-fit.js +69 -32
- package/dist/schemas/audio-gen.d.ts +199 -19
- package/dist/schemas/audio-gen.js +183 -51
- package/dist/schemas/batch-completion-stream.d.ts +210 -36
- package/dist/schemas/batch-completion-stream.js +3 -3
- package/dist/schemas/bci-config.d.ts +3 -0
- package/dist/schemas/bci-config.js +2 -2
- package/dist/schemas/bci.d.ts +24 -3
- package/dist/schemas/bci.js +2 -2
- package/dist/schemas/cancel.d.ts +10 -0
- package/dist/schemas/cancel.js +2 -0
- package/dist/schemas/common.d.ts +1465 -162
- package/dist/schemas/common.js +37 -31
- package/dist/schemas/completion-event.d.ts +8 -2
- package/dist/schemas/completion-event.js +4 -1
- package/dist/schemas/completion-stream.d.ts +243 -39
- package/dist/schemas/completion-stream.js +100 -29
- package/dist/schemas/config.d.ts +1326 -18
- package/dist/schemas/config.js +30 -8
- package/dist/schemas/decision.d.ts +610 -0
- package/dist/schemas/decision.js +219 -0
- package/dist/schemas/download-asset.d.ts +10 -4
- package/dist/schemas/download-asset.js +1 -1
- package/dist/schemas/engine-addon-map.d.ts +9 -1
- package/dist/schemas/engine-addon-map.js +26 -5
- package/dist/schemas/errors.d.ts +2 -0
- package/dist/schemas/errors.js +11 -1
- package/dist/schemas/index.d.ts +51 -48
- package/dist/schemas/index.js +50 -47
- package/dist/schemas/llamacpp-config.d.ts +222 -6
- package/dist/schemas/llamacpp-config.js +129 -7
- package/dist/schemas/load-model.d.ts +7960 -1492
- package/dist/schemas/load-model.js +122 -10
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-config-schemas.d.ts +428 -9
- package/dist/schemas/model-config-schemas.js +16 -11
- 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 +4 -3
- package/dist/schemas/model-resource-profile.d.ts +4 -4
- package/dist/schemas/model-resource-profile.js +2 -5
- package/dist/schemas/model-src-utils.d.ts +14 -2
- package/dist/schemas/model-src-utils.js +2 -2
- package/dist/schemas/model-types.d.ts +14 -1
- package/dist/schemas/model-types.js +4 -0
- package/dist/schemas/ocr.d.ts +76 -0
- package/dist/schemas/ocr.js +43 -1
- package/dist/schemas/plugin.d.ts +16 -4
- package/dist/schemas/plugin.js +12 -0
- package/dist/schemas/profiling.d.ts +4 -4
- package/dist/schemas/profiling.js +1 -1
- package/dist/schemas/rag.js +1 -1
- package/dist/schemas/registry.d.ts +34 -0
- package/dist/schemas/registry.js +5 -1
- package/dist/schemas/reload-config.d.ts +14 -2
- package/dist/schemas/reload-config.js +2 -2
- package/dist/schemas/rerank.d.ts +131 -0
- package/dist/schemas/rerank.js +102 -0
- package/dist/schemas/rpc-server.js +3 -3
- package/dist/schemas/sdcpp-config.d.ts +82 -0
- package/dist/schemas/sdcpp-config.js +41 -22
- package/dist/schemas/system-resources.d.ts +4 -4
- package/dist/schemas/text-to-speech.d.ts +463 -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 +20 -0
- package/dist/schemas/transcription-config.js +54 -4
- package/dist/schemas/transcription.d.ts +47 -5
- package/dist/schemas/transcription.js +52 -5
- package/dist/schemas/translate.d.ts +2 -2
- package/dist/schemas/translate.js +1 -1
- package/dist/schemas/translation-config.d.ts +40 -10
- package/dist/schemas/translation-config.js +1 -1
- package/dist/schemas/vla.d.ts +9 -2
- package/dist/schemas/vla.js +9 -5
- package/dist/surface.d.ts +3 -2
- package/dist/surface.js +3 -2
- package/dist/utils/addon-responses.d.ts +3 -0
- package/dist/utils/aggregate-events.d.ts +1 -1
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/archive.js +2 -2
- package/dist/utils/asr-events.d.ts +1 -0
- package/dist/utils/asr-events.js +2 -1
- package/dist/utils/audio/decoder.js +3 -1
- package/dist/utils/audio-input.js +1 -1
- package/dist/utils/cache/auto-history.d.ts +2 -1
- package/dist/utils/cache/auto-history.js +2 -2
- package/dist/utils/cache/paths.js +6 -6
- package/dist/utils/cache/types.d.ts +7 -0
- package/dist/utils/checksum.d.ts +2 -0
- package/dist/utils/checksum.js +41 -2
- package/dist/utils/completion-normalizer.js +1 -1
- package/dist/utils/gguf-architecture.d.ts +7 -0
- package/dist/utils/gguf-architecture.js +142 -0
- package/dist/utils/gguf-tensor-extractor.js +1 -1
- package/dist/utils/index.d.ts +13 -13
- package/dist/utils/index.js +13 -13
- package/dist/utils/mcp-adapter.d.ts +1 -1
- package/dist/utils/mcp-adapter.js +13 -9
- package/dist/utils/path-security.js +1 -1
- package/dist/utils/shard-utils.d.ts +5 -0
- package/dist/utils/shard-utils.js +19 -3
- package/dist/utils/tool-helpers.d.ts +1 -1
- package/dist/utils/tool-helpers.js +20 -52
- package/dist/utils/tool-integration.d.ts +1 -0
- package/dist/utils/tool-integration.js +3 -6
- package/dist/utils/tools/defer.d.ts +16 -26
- package/dist/utils/tools/defer.js +50 -41
- package/dist/utils/tools/dialect.d.ts +15 -4
- package/dist/utils/tools/dialect.js +34 -5
- package/dist/utils/tools/index.d.ts +3 -3
- package/dist/utils/tools/index.js +3 -3
- package/dist/utils/tools/parser.js +8 -8
- package/dist/utils/tools/parsers/dsml.d.ts +1 -1
- package/dist/utils/tools/parsers/dsml.js +8 -5
- package/dist/utils/tools/parsers/gemma4native.d.ts +1 -1
- package/dist/utils/tools/parsers/gemma4native.js +1 -1
- package/dist/utils/tools/parsers/harmony.d.ts +1 -1
- package/dist/utils/tools/parsers/harmony.js +1 -1
- package/dist/utils/tools/parsers/hermes.d.ts +1 -1
- package/dist/utils/tools/parsers/hermes.js +1 -1
- package/dist/utils/tools/parsers/json.d.ts +1 -1
- package/dist/utils/tools/parsers/json.js +1 -1
- package/dist/utils/tools/parsers/pythonic.d.ts +1 -1
- package/dist/utils/tools/parsers/pythonic.js +1 -1
- package/dist/utils/tools/parsers/qwen35.d.ts +1 -1
- 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 +2 -1
- package/dist/utils/until-aborted.d.ts +7 -0
- package/dist/utils/until-aborted.js +34 -0
- package/package.json +68 -51
- 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
- package/dist/resources/model-fit/floor.d.ts +0 -31
- package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +0 -2
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +0 -41
- package/dist/resources/model-fit/native-probe/create-fit-request.js +0 -51
- package/dist/resources/model-fit/native-probe/engines/audiogen.js +0 -35
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +0 -55
- package/dist/resources/model-fit/native-probe/engines/llama.js +0 -145
- package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +0 -16
- package/dist/resources/model-fit/native-probe/fit-outcome.js +0 -1
- package/dist/resources/model-fit/native-probe/fit-process.d.ts +0 -27
- package/dist/resources/model-fit/native-probe/fit-process.js +0 -55
- package/dist/resources/model-fit/native-probe/fit-runner.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/fit-runner.js +0 -58
- package/dist/resources/model-fit/native-probe/run-fit.d.ts +0 -24
- package/dist/resources/model-fit/native-probe/run-fit.js +0 -20
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +0 -22
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +0 -108
- package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +0 -63
- package/dist/resources/model-fit/native-probe/run-isolated-fit.js +0 -377
- package/dist/resources/model-fit/platform.d.ts +0 -9
- package/dist/resources/model-fit/platform.js +0 -28
- package/dist/resources/model-fit/types.d.ts +0 -120
- package/dist/resources/model-fit/types.js +0 -1
- /package/dist/{resources/model-fit/native-probe/engines → model-fit/request}/gpu.d.ts +0 -0
- /package/dist/{resources/model-fit/native-probe/engines → model-fit/request}/gpu.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { inferenceBackendDiagnosticsSchema } from '
|
|
2
|
+
import { inferenceBackendDiagnosticsSchema } from '../schemas/system-resources.js';
|
|
3
3
|
export const audioInputSchema = z.discriminatedUnion('type', [
|
|
4
4
|
z.object({
|
|
5
5
|
type: z.literal('base64'),
|
|
@@ -13,15 +13,37 @@ export const audioInputSchema = z.discriminatedUnion('type', [
|
|
|
13
13
|
const transcribeBaseSchema = z.object({
|
|
14
14
|
modelId: z.string(),
|
|
15
15
|
/**
|
|
16
|
-
* Initial
|
|
17
|
-
*
|
|
18
|
-
* surface in `qvac-parakeet.cpp`.
|
|
16
|
+
* Initial Whisper context or replacement MOSS transcription instruction.
|
|
17
|
+
* MOSS prompts cannot be combined with hotwords. Ignored by Parakeet.
|
|
19
18
|
*/
|
|
20
19
|
prompt: z.string().optional(),
|
|
21
20
|
metadata: z.boolean().optional()
|
|
22
21
|
});
|
|
22
|
+
function utf8Length(value) {
|
|
23
|
+
let bytes = 0;
|
|
24
|
+
for (const character of value) {
|
|
25
|
+
const point = character.codePointAt(0) ?? 0;
|
|
26
|
+
bytes += point < 0x80 ? 1 : point < 0x800 ? 2 : point < 0x10000 ? 3 : 4;
|
|
27
|
+
}
|
|
28
|
+
return bytes;
|
|
29
|
+
}
|
|
23
30
|
export const transcribeParamsSchema = transcribeBaseSchema.extend({
|
|
24
|
-
audioChunk: audioInputSchema
|
|
31
|
+
audioChunk: audioInputSchema,
|
|
32
|
+
hotwords: z
|
|
33
|
+
.array(z
|
|
34
|
+
.string()
|
|
35
|
+
.min(1)
|
|
36
|
+
.refine((value) => utf8Length(value) <= 64, 'Hotword exceeds 64 UTF-8 bytes'))
|
|
37
|
+
.max(64)
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('MOSS names and domain terms; at most 64 entries of 64 UTF-8 bytes each.'),
|
|
40
|
+
maxNewTokens: z
|
|
41
|
+
.number()
|
|
42
|
+
.int()
|
|
43
|
+
.min(0)
|
|
44
|
+
.max(2147483647)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('MOSS generated-token limit; 0 uses the model default.')
|
|
25
47
|
});
|
|
26
48
|
export const transcribeStatsSchema = z.object({
|
|
27
49
|
audioDuration: z.number().optional(),
|
|
@@ -95,12 +117,28 @@ export const ASR_BACKEND_IDS = Object.freeze({
|
|
|
95
117
|
OpenCL: 4,
|
|
96
118
|
Other: 99
|
|
97
119
|
});
|
|
120
|
+
export const transcribeSpeakerSegmentSchema = z.object({
|
|
121
|
+
speakerId: z.number().int().nonnegative(),
|
|
122
|
+
startMs: z.number().nonnegative(),
|
|
123
|
+
endMs: z.number().nonnegative()
|
|
124
|
+
});
|
|
98
125
|
export const transcribeSegmentSchema = z.object({
|
|
99
126
|
text: z.string(),
|
|
100
127
|
startMs: z.number(),
|
|
101
128
|
endMs: z.number(),
|
|
102
129
|
append: z.boolean(),
|
|
103
130
|
id: z.number(),
|
|
131
|
+
speakerId: z
|
|
132
|
+
.number()
|
|
133
|
+
.int()
|
|
134
|
+
.nonnegative()
|
|
135
|
+
.optional()
|
|
136
|
+
.describe('Zero-based speaker id for diarized transcription.'),
|
|
137
|
+
speaker: z.string().optional().describe('MOSS speaker label, such as S01.'),
|
|
138
|
+
speakerSegments: z
|
|
139
|
+
.array(transcribeSpeakerSegmentSchema)
|
|
140
|
+
.optional()
|
|
141
|
+
.describe('Offline Sortformer/Nemotron diarization turns, with zero-based speaker ids and millisecond timestamps. Turns may overlap.'),
|
|
104
142
|
isEndOfTurn: z
|
|
105
143
|
.boolean()
|
|
106
144
|
.optional()
|
|
@@ -111,6 +149,12 @@ export const transcribeSegmentSchema = z.object({
|
|
|
111
149
|
.describe('Segment begins a new SentencePiece word, for joining partial segments without splitting words. Parakeet engine only; absent on whisper.')
|
|
112
150
|
});
|
|
113
151
|
export const vadStateEventSchema = z.object({
|
|
152
|
+
speakerId: z
|
|
153
|
+
.number()
|
|
154
|
+
.int()
|
|
155
|
+
.nonnegative()
|
|
156
|
+
.optional()
|
|
157
|
+
.describe('Dominant speaker for Parakeet diarization activity; omitted when unavailable.'),
|
|
114
158
|
speaking: z.boolean(),
|
|
115
159
|
probability: z.number(),
|
|
116
160
|
source: z
|
|
@@ -183,6 +227,9 @@ export const parakeetStreamingRunConfigSchema = z.object({
|
|
|
183
227
|
rightLookaheadMs: z.number().int().nonnegative().optional(),
|
|
184
228
|
emitPartials: z.boolean().optional(),
|
|
185
229
|
emitEnergyVad: z.boolean().optional(),
|
|
230
|
+
emitSpeakerVad: z.boolean().optional(),
|
|
231
|
+
diarizationThreshold: z.number().min(0).max(1).optional(),
|
|
232
|
+
diarizationMinSegmentMs: z.number().int().nonnegative().optional(),
|
|
186
233
|
spkCacheEnable: z.boolean().optional(),
|
|
187
234
|
spkCacheLen: z.number().int().positive().optional(),
|
|
188
235
|
fifoLen: z.number().int().positive().optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { NmtLanguage } from '
|
|
3
|
-
import { type NmtModelTypeInput, type LlmModelTypeInput } from '
|
|
2
|
+
import type { NmtLanguage } from '../schemas/translation-config.js';
|
|
3
|
+
import { type NmtModelTypeInput, type LlmModelTypeInput } from '../schemas/model-types.js';
|
|
4
4
|
declare const translateParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
5
|
modelId: z.ZodString;
|
|
6
6
|
text: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { nmtModelTypeSchema, llmModelTypeSchema, normalizeModelType } from '
|
|
2
|
+
import { nmtModelTypeSchema, llmModelTypeSchema, normalizeModelType } from '../schemas/model-types.js';
|
|
3
3
|
const translateParamsNmtSchema = z.object({
|
|
4
4
|
modelId: z.string().describe('The identifier of the NMT translation model to use.'),
|
|
5
5
|
text: z
|
|
@@ -154,10 +154,13 @@ 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";
|
|
158
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
157
159
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
158
160
|
"onnx-tts": "onnx-tts";
|
|
159
161
|
"tts-ggml": "tts-ggml";
|
|
160
162
|
"parakeet-transcription": "parakeet-transcription";
|
|
163
|
+
"moss-transcribe": "moss-transcribe";
|
|
161
164
|
"ggml-ocr": "ggml-ocr";
|
|
162
165
|
"sdcpp-generation": "sdcpp-generation";
|
|
163
166
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -193,10 +196,13 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
193
196
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
194
197
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
195
198
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
199
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
200
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
196
201
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
197
202
|
"onnx-tts": "onnx-tts";
|
|
198
203
|
"tts-ggml": "tts-ggml";
|
|
199
204
|
"parakeet-transcription": "parakeet-transcription";
|
|
205
|
+
"moss-transcribe": "moss-transcribe";
|
|
200
206
|
"ggml-ocr": "ggml-ocr";
|
|
201
207
|
"sdcpp-generation": "sdcpp-generation";
|
|
202
208
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -245,10 +251,13 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
245
251
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
246
252
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
247
253
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
254
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
255
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
248
256
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
249
257
|
"onnx-tts": "onnx-tts";
|
|
250
258
|
"tts-ggml": "tts-ggml";
|
|
251
259
|
"parakeet-transcription": "parakeet-transcription";
|
|
260
|
+
"moss-transcribe": "moss-transcribe";
|
|
252
261
|
"ggml-ocr": "ggml-ocr";
|
|
253
262
|
"sdcpp-generation": "sdcpp-generation";
|
|
254
263
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -284,10 +293,13 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
284
293
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
285
294
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
286
295
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
296
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
297
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
287
298
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
288
299
|
"onnx-tts": "onnx-tts";
|
|
289
300
|
"tts-ggml": "tts-ggml";
|
|
290
301
|
"parakeet-transcription": "parakeet-transcription";
|
|
302
|
+
"moss-transcribe": "moss-transcribe";
|
|
291
303
|
"ggml-ocr": "ggml-ocr";
|
|
292
304
|
"sdcpp-generation": "sdcpp-generation";
|
|
293
305
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -323,10 +335,13 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
323
335
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
324
336
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
325
337
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
338
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
339
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
326
340
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
327
341
|
"onnx-tts": "onnx-tts";
|
|
328
342
|
"tts-ggml": "tts-ggml";
|
|
329
343
|
"parakeet-transcription": "parakeet-transcription";
|
|
344
|
+
"moss-transcribe": "moss-transcribe";
|
|
330
345
|
"ggml-ocr": "ggml-ocr";
|
|
331
346
|
"sdcpp-generation": "sdcpp-generation";
|
|
332
347
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -559,10 +574,13 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
559
574
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
560
575
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
561
576
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
577
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
578
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
562
579
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
563
580
|
"onnx-tts": "onnx-tts";
|
|
564
581
|
"tts-ggml": "tts-ggml";
|
|
565
582
|
"parakeet-transcription": "parakeet-transcription";
|
|
583
|
+
"moss-transcribe": "moss-transcribe";
|
|
566
584
|
"ggml-ocr": "ggml-ocr";
|
|
567
585
|
"sdcpp-generation": "sdcpp-generation";
|
|
568
586
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -598,10 +616,13 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
598
616
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
599
617
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
600
618
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
619
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
620
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
601
621
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
602
622
|
"onnx-tts": "onnx-tts";
|
|
603
623
|
"tts-ggml": "tts-ggml";
|
|
604
624
|
"parakeet-transcription": "parakeet-transcription";
|
|
625
|
+
"moss-transcribe": "moss-transcribe";
|
|
605
626
|
"ggml-ocr": "ggml-ocr";
|
|
606
627
|
"sdcpp-generation": "sdcpp-generation";
|
|
607
628
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -650,10 +671,13 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
650
671
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
651
672
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
652
673
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
674
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
675
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
653
676
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
654
677
|
"onnx-tts": "onnx-tts";
|
|
655
678
|
"tts-ggml": "tts-ggml";
|
|
656
679
|
"parakeet-transcription": "parakeet-transcription";
|
|
680
|
+
"moss-transcribe": "moss-transcribe";
|
|
657
681
|
"ggml-ocr": "ggml-ocr";
|
|
658
682
|
"sdcpp-generation": "sdcpp-generation";
|
|
659
683
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -689,10 +713,13 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
689
713
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
690
714
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
691
715
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
716
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
717
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
692
718
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
693
719
|
"onnx-tts": "onnx-tts";
|
|
694
720
|
"tts-ggml": "tts-ggml";
|
|
695
721
|
"parakeet-transcription": "parakeet-transcription";
|
|
722
|
+
"moss-transcribe": "moss-transcribe";
|
|
696
723
|
"ggml-ocr": "ggml-ocr";
|
|
697
724
|
"sdcpp-generation": "sdcpp-generation";
|
|
698
725
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -728,10 +755,13 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
728
755
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
729
756
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
730
757
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
758
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
759
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
731
760
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
732
761
|
"onnx-tts": "onnx-tts";
|
|
733
762
|
"tts-ggml": "tts-ggml";
|
|
734
763
|
"parakeet-transcription": "parakeet-transcription";
|
|
764
|
+
"moss-transcribe": "moss-transcribe";
|
|
735
765
|
"ggml-ocr": "ggml-ocr";
|
|
736
766
|
"sdcpp-generation": "sdcpp-generation";
|
|
737
767
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -840,7 +870,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
840
870
|
engine?: string | undefined;
|
|
841
871
|
expectedSize?: number | undefined;
|
|
842
872
|
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;
|
|
873
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
874
|
} | undefined;
|
|
845
875
|
dstVocabSrc?: string | {
|
|
846
876
|
src: string;
|
|
@@ -853,7 +883,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
853
883
|
engine?: string | undefined;
|
|
854
884
|
expectedSize?: number | undefined;
|
|
855
885
|
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;
|
|
886
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
887
|
} | undefined;
|
|
858
888
|
normalize?: number | undefined;
|
|
859
889
|
pivotModel?: {
|
|
@@ -868,7 +898,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
868
898
|
engine?: string | undefined;
|
|
869
899
|
expectedSize?: number | undefined;
|
|
870
900
|
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;
|
|
901
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
902
|
};
|
|
873
903
|
mode?: "full" | undefined;
|
|
874
904
|
beamsize?: number | undefined;
|
|
@@ -890,7 +920,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
890
920
|
engine?: string | undefined;
|
|
891
921
|
expectedSize?: number | undefined;
|
|
892
922
|
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;
|
|
923
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
924
|
} | undefined;
|
|
895
925
|
dstVocabSrc?: string | {
|
|
896
926
|
src: string;
|
|
@@ -903,7 +933,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
903
933
|
engine?: string | undefined;
|
|
904
934
|
expectedSize?: number | undefined;
|
|
905
935
|
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;
|
|
936
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
937
|
} | undefined;
|
|
908
938
|
normalize?: number | undefined;
|
|
909
939
|
} | undefined;
|
|
@@ -944,7 +974,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
944
974
|
engine?: string | undefined;
|
|
945
975
|
expectedSize?: number | undefined;
|
|
946
976
|
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;
|
|
977
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
978
|
} | undefined;
|
|
949
979
|
dstVocabSrc?: string | {
|
|
950
980
|
src: string;
|
|
@@ -957,7 +987,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
957
987
|
engine?: string | undefined;
|
|
958
988
|
expectedSize?: number | undefined;
|
|
959
989
|
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;
|
|
990
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
991
|
} | undefined;
|
|
962
992
|
normalize?: number | undefined;
|
|
963
993
|
pivotModel?: {
|
|
@@ -972,7 +1002,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
972
1002
|
engine?: string | undefined;
|
|
973
1003
|
expectedSize?: number | undefined;
|
|
974
1004
|
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;
|
|
1005
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
1006
|
};
|
|
977
1007
|
mode?: "full" | undefined;
|
|
978
1008
|
beamsize?: number | undefined;
|
|
@@ -994,7 +1024,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
994
1024
|
engine?: string | undefined;
|
|
995
1025
|
expectedSize?: number | undefined;
|
|
996
1026
|
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;
|
|
1027
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
1028
|
} | undefined;
|
|
999
1029
|
dstVocabSrc?: string | {
|
|
1000
1030
|
src: string;
|
|
@@ -1007,7 +1037,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1007
1037
|
engine?: string | undefined;
|
|
1008
1038
|
expectedSize?: number | undefined;
|
|
1009
1039
|
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;
|
|
1040
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "llamacpp-rerank" | "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
1041
|
} | undefined;
|
|
1012
1042
|
normalize?: number | undefined;
|
|
1013
1043
|
} | 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
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
export { type LifecycleState, type ModelProgressUpdate, type LoadModelOptions, type LoadCustomPluginModelOptions, type DownloadAssetOptions, type Tool, type ToolCall, type ToolCallWithCall, type ToolCallError, type ToolCallEvent, type CompletionEvent, type CompletionFinal, type CompletionRun, type CompletionStats, type BatchCompletionEvent, type BatchCompletionResult, type BatchCompletionRun, type BatchPrompt, type EmbedStats, VERBOSITY, type Attachment, type TranscribeStreamSession, type TranscribeStreamMetadataSession, type TranscribeStreamConversationSession, type TranscribeStreamEvent, type VadStateEvent, type EndOfTurnEvent, type TranscribeSegment, type BciConfig, type BciTranscribeClientParams, type BciTranscribeStreamClientParams, type BciTranscribeStreamSession, type BciTranscribeStreamMetadataSession, type BciStreamOpts, type NeuralInput, type TextToSpeechStreamSession, type TextToSpeechStreamResponse, type TextToSpeechStreamClientParams, type CompletionParams, type ToolDialect, type RagSearchResult, type RagSaveEmbeddingsResult, type RagReindexResult, type RagEmbeddedDoc, type RagDoc, type RagWorkspaceInfo, type RagCloseWorkspaceParams, type RagDeleteWorkspaceParams, type RagIngestStage, type RagReindexStage, type RagSaveStage, ERROR_CODES, RAG_ERROR_CODES, type QvacConfig, type ModelInfo, type GetModelInfoParams, type GetLoadedModelInfoParams, type LoadedModelInfo, type GetSystemResourcesInput, type ResourceScope, type ResourceProvenance, type ResourceMetric, type GraphicsDriver, type GraphicsDriverCapabilities, type BackendProbeResult, type BackendDevice, type BackendDriver, type BackendFallback, type InferenceBackendDiagnostics, type CPUResourceCapabilities, type GPUResourceCapabilities, type SystemResourceCapabilities, type GPUResourceSample, type SystemResourceSample, type SystemResources, type LoadedInstance, type CacheFileInfo, toolSchema, type McpClient, type McpClientInput, type OCRClientParams, type OCRTextBlock, type OCROptions, type ClassifyClientParams, type ClassificationResult, type DiffusionClientParams, type DiffusionStreamResponse, type DiffusionStats, type VideoClientParams, type VideoStreamResponse, type VideoStats, type UpscaleClientParams, type UpscaleStreamResponse, type UpscaleStats, type VlaConfig, type VlaClientRunParams, type VlaClientRunResult, type VlaHparams, type VlaStats, definePlugin, defineHandler, defineDuplexHandler, type QvacPlugin, type CreateModelParams, type PluginModelResult, type ModelRegistryEntry, type ModelRegistryEntryAddon, PLUGIN_LLM, PLUGIN_EMBEDDING, PLUGIN_WHISPER, PLUGIN_BCI, PLUGIN_NMT, PLUGIN_TTS, PLUGIN_OCR, PLUGIN_DIFFUSION, PLUGIN_VLA, PLUGIN_CLASSIFICATION, BUILTIN_PLUGINS, type BuiltinPlugin, type ProfilerMode, type FinetuneValidation, type FinetuneRunParams, type FinetuneGetStateParams, type FinetuneStopParams, type FinetuneParams, type FinetuneStatus, type FinetuneProgress, type FinetuneStats, type FinetuneResult, MODEL_TYPES, ModelType } from './schemas/index.js';
|
|
2
2
|
export { type ToolInput, type ToolHandler } from './utils/tool-helpers.js';
|
|
3
3
|
export { TOOL_SEARCH_NAME, buildToolSearchTool, executeToolSearch, loadedToolNames, searchDeferredTools } from './utils/tools/defer.js';
|
|
4
|
+
export { untilAborted } from './utils/until-aborted.js';
|
|
4
5
|
export * from './schemas/index.js';
|
|
5
6
|
export * from './profiling/index.js';
|
|
6
7
|
export * from './constants/index.js';
|
|
7
|
-
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL } from './schemas/engine-addon-map.js';
|
|
8
|
+
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL, LEGACY_REGISTRY_ENGINE_RULES } from './schemas/engine-addon-map.js';
|
|
8
9
|
export { generateProfileId } from './profiling/clock.js';
|
|
9
10
|
export { readModelExecutionMs } from './profiling/model-execution.js';
|
|
10
11
|
export { readBackendDiagnostics } from './profiling/backend-diagnostics.js';
|
|
11
12
|
export { PUBLIC_MODEL_TYPES, ModelTypeAliases, modelTypeInputSchema, modelTypeSchema } from './schemas/model-types.js';
|
|
12
13
|
export * from './models/registry/index.js';
|
|
13
14
|
export { SUPPORTED_AUDIO_FORMATS } from './constants/audio.js';
|
|
14
|
-
export { RpcServerOperationError, InferenceCancelledError, ContextOverflowError, type ContextOverflowErrorSizes, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError, RequestValidationFailedError, ModelNotLoadedError, TranslationFailedError, PluginDefinitionInvalidError, PluginModelTypeReservedError, PluginAlreadyRegisteredError, PluginLoggingInvalidError } from './errors/index.js';
|
|
15
|
+
export { RpcServerOperationError, InferenceCancelledError, ContextOverflowError, type ContextOverflowErrorSizes, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError, RequestValidationFailedError, ModelNotLoadedError, ModelRegistryModelNotFoundError, TranslationFailedError, PluginDefinitionInvalidError, PluginModelTypeReservedError, PluginAlreadyRegisteredError, PluginLoggingInvalidError } from './errors/index.js';
|
|
15
16
|
export type { InferenceCancelledPartial } from './errors/index.js';
|
|
16
17
|
export { getLogger, LOG_ID, ALL_LOG_ID } from './logging/index.js';
|
|
17
18
|
export type { Logger, LogTransport, LoggerOptions } from './logging/index.js';
|
package/dist/surface.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// it alongside the engine.
|
|
5
5
|
export { VERBOSITY, ERROR_CODES, RAG_ERROR_CODES, toolSchema, definePlugin, defineHandler, defineDuplexHandler, PLUGIN_LLM, PLUGIN_EMBEDDING, PLUGIN_WHISPER, PLUGIN_BCI, PLUGIN_NMT, PLUGIN_TTS, PLUGIN_OCR, PLUGIN_DIFFUSION, PLUGIN_VLA, PLUGIN_CLASSIFICATION, BUILTIN_PLUGINS, MODEL_TYPES, ModelType } from './schemas/index.js';
|
|
6
6
|
export { TOOL_SEARCH_NAME, buildToolSearchTool, executeToolSearch, loadedToolNames, searchDeferredTools } from './utils/tools/defer.js';
|
|
7
|
+
export { untilAborted } from './utils/until-aborted.js';
|
|
7
8
|
// The full value-clean schema, profiling, and constant barrels: the @qvac/sdk client
|
|
8
9
|
// and worker source every internal schema/const/profiling name from here, so it
|
|
9
10
|
// carries no duplicate copies. All value-clean (only erased `import type` touches
|
|
@@ -13,7 +14,7 @@ export * from './profiling/index.js';
|
|
|
13
14
|
export * from './constants/index.js';
|
|
14
15
|
// Value-clean helpers @qvac/sdk's registry codegen and server-side profiler reach
|
|
15
16
|
// 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';
|
|
17
|
+
export { getAddonFromEngine, resolveCanonicalEngine, ENGINE_TO_ADDON, LEGACY_ENGINE_TO_CANONICAL, LEGACY_REGISTRY_ENGINE_RULES } from './schemas/engine-addon-map.js';
|
|
17
18
|
export { generateProfileId } from './profiling/clock.js';
|
|
18
19
|
export { readModelExecutionMs } from './profiling/model-execution.js';
|
|
19
20
|
export { readBackendDiagnostics } from './profiling/backend-diagnostics.js';
|
|
@@ -24,7 +25,7 @@ export { SUPPORTED_AUDIO_FORMATS } from './constants/audio.js';
|
|
|
24
25
|
// Error classes consumers need for `instanceof` checks: on rejected promises,
|
|
25
26
|
// and on the synchronous throws of `plugins()` / `registerPlugin` (the plugin
|
|
26
27
|
// group below).
|
|
27
|
-
export { RpcServerOperationError, InferenceCancelledError, ContextOverflowError, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError, RequestValidationFailedError, ModelNotLoadedError, TranslationFailedError, PluginDefinitionInvalidError, PluginModelTypeReservedError, PluginAlreadyRegisteredError, PluginLoggingInvalidError } from './errors/index.js';
|
|
28
|
+
export { RpcServerOperationError, InferenceCancelledError, ContextOverflowError, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError, RequestValidationFailedError, ModelNotLoadedError, ModelRegistryModelNotFoundError, TranslationFailedError, PluginDefinitionInvalidError, PluginModelTypeReservedError, PluginAlreadyRegisteredError, PluginLoggingInvalidError } from './errors/index.js';
|
|
28
29
|
// Logging
|
|
29
30
|
export { getLogger, LOG_ID, ALL_LOG_ID } from './logging/index.js';
|
|
30
31
|
// Profiler
|
|
@@ -9,6 +9,8 @@ export interface LlmStats {
|
|
|
9
9
|
generatedTokens?: number;
|
|
10
10
|
avgConcurrentSeq?: number;
|
|
11
11
|
toolDefinitionsDropped?: number;
|
|
12
|
+
draftTokens?: number;
|
|
13
|
+
draftAcceptedTokens?: number;
|
|
12
14
|
backendDevice?: 'cpu' | 'gpu';
|
|
13
15
|
stopReason?: 'none' | 'eos' | 'antiprompt' | 'predictionLimit' | 'sequenceLimit' | 'contextOverflow';
|
|
14
16
|
}
|
|
@@ -47,6 +49,7 @@ export interface TtsStats {
|
|
|
47
49
|
* fields are populated on both paths.
|
|
48
50
|
*/
|
|
49
51
|
export interface TtsOutputChunk {
|
|
52
|
+
text?: string;
|
|
50
53
|
outputArray: ArrayLike<number>;
|
|
51
54
|
/** Rate of `outputArray`; moves with `outputSampleRate` and the enhancer. */
|
|
52
55
|
sampleRate?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CompletionError, CompletionEvent, CompletionFinal, CompletionStats, StopReason, ToolCall, ToolCallError } from '../schemas/index.js';
|
|
2
|
-
import { type ToolHandlerMap } from '
|
|
2
|
+
import { type ToolHandlerMap } from '../utils/tool-helpers.js';
|
|
3
3
|
export type AggregatedEvents = {
|
|
4
4
|
contentText: string;
|
|
5
5
|
thinkingText: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeAssistantCacheContent } from '
|
|
2
|
-
import { attachHandlersToToolCalls } from '
|
|
1
|
+
import { normalizeAssistantCacheContent } from '../utils/cache-normalize.js';
|
|
2
|
+
import { attachHandlersToToolCalls } from '../utils/tool-helpers.js';
|
|
3
3
|
export function aggregateEvents(events) {
|
|
4
4
|
let contentText = '';
|
|
5
5
|
let thinkingText = '';
|
package/dist/utils/archive.js
CHANGED
|
@@ -3,9 +3,9 @@ import path from 'bare-path';
|
|
|
3
3
|
import { createGunzip } from 'bare-zlib';
|
|
4
4
|
import tarStream from 'tar-stream';
|
|
5
5
|
import Buffer from 'bare-buffer';
|
|
6
|
-
import { detectShardedModel, generateShardFilenames, extractTensorsFromShards, validateShardedModelCache } from '
|
|
6
|
+
import { detectShardedModel, generateShardFilenames, extractTensorsFromShards, validateShardedModelCache } from '../utils/shard-utils.js';
|
|
7
7
|
import { ModelLoadFailedError, ArchiveExtractionFailedError, ArchiveUnsupportedTypeError, ArchiveMissingShardsError, DownloadCancelledError } from '../errors/index.js';
|
|
8
|
-
import { isPathWithinBase } from '
|
|
8
|
+
import { isPathWithinBase } from '../utils/path-security.js';
|
|
9
9
|
import { getEngineLogger } from '../logging/index.js';
|
|
10
10
|
import { SUPPORTED_ARCHIVE_EXTENSIONS, filenameToArchiveTypeSchema } from '../schemas/model-file.js';
|
|
11
11
|
const logger = getEngineLogger();
|
|
@@ -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) {
|
|
@@ -30,7 +30,9 @@ export async function decodeAudioToStream(inputPath, audioFormat = 's16le', opti
|
|
|
30
30
|
const audioStream = fs.createReadStream(inputPath);
|
|
31
31
|
// bare-fs read streams are async-iterable over Buffer at runtime; the
|
|
32
32
|
// decoder types its input as AsyncIterable<Buffer>.
|
|
33
|
-
const response = decoder.run(audioStream
|
|
33
|
+
const response = decoder.run(audioStream, {
|
|
34
|
+
retainOutput: false
|
|
35
|
+
});
|
|
34
36
|
return decoderResponseToStream(response, {
|
|
35
37
|
inputPath,
|
|
36
38
|
inactivityTimeoutMs,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Readable } from 'bare-stream';
|
|
2
2
|
import fs from 'bare-fs';
|
|
3
3
|
import Buffer from 'bare-buffer';
|
|
4
|
-
import { needsDecoding, decodeAudioToStream } from '
|
|
4
|
+
import { needsDecoding, decodeAudioToStream } from '../utils/audio/decoder.js';
|
|
5
5
|
import { AudioFileNotFoundError, InvalidAudioChunkError } from '../errors/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Converts an AudioInput (base64 or filePath) into a Readable stream,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { CacheMessage } from '
|
|
1
|
+
import type { CacheMessage } from '../../utils/cache/types.js';
|
|
2
|
+
export declare function normalizeCacheMessage(message: CacheMessage): CacheMessage;
|
|
2
3
|
export declare function getAutoCacheLookupHistory(currentHistory: CacheMessage[]): CacheMessage[];
|
|
3
4
|
export declare function buildAutoCacheSaveHistory(currentHistory: CacheMessage[], assistantResponse: string): CacheMessage[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeAssistantCacheContent } from '
|
|
2
|
-
function normalizeCacheMessage(message) {
|
|
1
|
+
import { normalizeAssistantCacheContent } from '../../utils/cache-normalize.js';
|
|
2
|
+
export function normalizeCacheMessage(message) {
|
|
3
3
|
const { attachments, ...normalized } = message;
|
|
4
4
|
if (message.role === 'assistant') {
|
|
5
5
|
normalized.content = normalizeAssistantCacheContent(message.content);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import fs, { promises as fsPromises } from 'bare-fs';
|
|
2
2
|
import path from 'bare-path';
|
|
3
3
|
import { getConfiguredCacheDir } from '../../runtime/state.js';
|
|
4
|
-
import { getQvacPath } from '
|
|
5
|
-
import {
|
|
6
|
-
import { validateAndJoinPath, joinWithinBase } from '
|
|
7
|
-
import { generateShortHash } from '
|
|
4
|
+
import { getQvacPath } from '../../utils/qvac-paths.js';
|
|
5
|
+
import { calculateCachedFileChecksum } from '../../utils/checksum.js';
|
|
6
|
+
import { validateAndJoinPath, joinWithinBase } from '../../utils/path-security.js';
|
|
7
|
+
import { generateShortHash } from '../../utils/formatting.js';
|
|
8
8
|
import { getEngineLogger } from '../../logging/index.js';
|
|
9
9
|
import { nowMs } from '../../profiling/index.js';
|
|
10
|
-
import { resolveClearStorageTarget } from '
|
|
10
|
+
import { resolveClearStorageTarget } from '../../utils/clear-storage.js';
|
|
11
11
|
const logger = getEngineLogger();
|
|
12
12
|
export function getCacheDir(subDir) {
|
|
13
13
|
const cacheDir = getQvacPath(subDir);
|
|
@@ -117,7 +117,7 @@ export async function checkShardCompleteness(hyperdriveKey, shardFilenames, shar
|
|
|
117
117
|
}
|
|
118
118
|
if (fileMeta.sha256Checksum) {
|
|
119
119
|
const start = nowMs();
|
|
120
|
-
const actualChecksum = await
|
|
120
|
+
const actualChecksum = await calculateCachedFileChecksum(shardPath);
|
|
121
121
|
onChecksumTimeMs?.(nowMs() - start);
|
|
122
122
|
if (actualChecksum !== fileMeta.sha256Checksum) {
|
|
123
123
|
logger.warn(`File ${i + 1} checksum mismatch for ${fileMeta.filename}. Expected: ${fileMeta.sha256Checksum}. Actual: ${actualChecksum}. Will re-download.`);
|