@qvac/sdk 0.14.1 → 0.15.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 +27 -11
- package/README.md +34 -35
- package/dist/client/api/batch-completion.d.ts +15 -0
- package/dist/client/api/batch-completion.js +332 -0
- package/dist/client/api/bci-transcribe.d.ts +1 -1
- package/dist/client/api/bci-transcribe.js +31 -31
- package/dist/client/api/cancel.d.ts +1 -1
- package/dist/client/api/cancel.js +18 -18
- package/dist/client/api/classify.d.ts +1 -1
- package/dist/client/api/classify.js +9 -6
- package/dist/client/api/client-request-id.js +1 -1
- package/dist/client/api/completion-stream.d.ts +3 -3
- package/dist/client/api/completion-stream.js +18 -18
- package/dist/client/api/delete-cache.js +9 -9
- package/dist/client/api/diffusion.d.ts +1 -1
- package/dist/client/api/diffusion.js +17 -11
- package/dist/client/api/download-asset.d.ts +1 -1
- package/dist/client/api/download-asset.js +11 -11
- package/dist/client/api/embed.d.ts +1 -1
- package/dist/client/api/embed.js +10 -10
- package/dist/client/api/finetune.d.ts +1 -1
- package/dist/client/api/finetune.js +25 -27
- package/dist/client/api/get-loaded-model-info.d.ts +2 -2
- package/dist/client/api/get-loaded-model-info.js +8 -8
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/get-model-info.js +7 -7
- package/dist/client/api/heartbeat.d.ts +2 -2
- package/dist/client/api/heartbeat.js +7 -7
- package/dist/client/api/index.d.ts +33 -32
- package/dist/client/api/index.js +33 -32
- package/dist/client/api/invoke-plugin.d.ts +1 -1
- package/dist/client/api/invoke-plugin.js +10 -10
- package/dist/client/api/load-model.d.ts +1 -1
- package/dist/client/api/load-model.js +32 -32
- package/dist/client/api/logging-stream.d.ts +1 -1
- package/dist/client/api/logging-stream.js +6 -6
- package/dist/client/api/ocr.d.ts +1 -1
- package/dist/client/api/ocr.js +11 -11
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +7 -7
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +65 -66
- package/dist/client/api/registry.d.ts +1 -1
- package/dist/client/api/registry.js +8 -8
- package/dist/client/api/resume.js +5 -5
- package/dist/client/api/state.d.ts +1 -1
- package/dist/client/api/state.js +5 -5
- package/dist/client/api/stop-provider.js +6 -6
- package/dist/client/api/subscribe-logs.d.ts +1 -1
- package/dist/client/api/subscribe-logs.js +3 -3
- package/dist/client/api/suspend.js +5 -5
- package/dist/client/api/text-to-speech.d.ts +1 -1
- package/dist/client/api/text-to-speech.js +37 -39
- package/dist/client/api/transcribe.d.ts +2 -2
- package/dist/client/api/transcribe.js +44 -45
- package/dist/client/api/translate.d.ts +1 -1
- package/dist/client/api/translate.js +14 -14
- package/dist/client/api/unload-model.d.ts +1 -1
- package/dist/client/api/unload-model.js +11 -11
- package/dist/client/api/upscale.d.ts +1 -1
- package/dist/client/api/upscale.js +9 -9
- package/dist/client/api/video.d.ts +1 -1
- package/dist/client/api/video.js +16 -14
- package/dist/client/api/vla-helpers.d.ts +2 -2
- package/dist/client/api/vla-helpers.js +6 -11
- package/dist/client/api/vla.d.ts +1 -1
- package/dist/client/api/vla.js +13 -13
- package/dist/client/config-loader/config-utils.d.ts +1 -1
- package/dist/client/config-loader/config-utils.js +3 -3
- package/dist/client/config-loader/resolve-config.bare.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.bare.js +11 -11
- package/dist/client/config-loader/resolve-config.expo.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.expo.js +6 -6
- package/dist/client/config-loader/resolve-config.node.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.node.js +27 -27
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/init-hooks.d.ts +1 -1
- package/dist/client/init-hooks.js +12 -12
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/logging-stream-registry.js +6 -6
- package/dist/client/parse-input.d.ts +1 -1
- package/dist/client/parse-input.js +3 -3
- package/dist/client/plugins-factory.d.ts +2 -2
- package/dist/client/plugins-factory.js +2 -2
- package/dist/client/rpc/bare-client.d.ts +2 -1
- package/dist/client/rpc/bare-client.js +37 -39
- package/dist/client/rpc/ensure-worker-ready.js +4 -4
- package/dist/client/rpc/expo-device-info.d.ts +1 -1
- package/dist/client/rpc/expo-device-info.js +11 -11
- package/dist/client/rpc/expo-rpc-client.d.ts +2 -1
- package/dist/client/rpc/expo-rpc-client.js +38 -47
- package/dist/client/rpc/node-rpc-client.d.ts +2 -1
- package/dist/client/rpc/node-rpc-client.js +103 -75
- package/dist/client/rpc/profiling/index.d.ts +1 -1
- package/dist/client/rpc/profiling/index.js +1 -1
- package/dist/client/rpc/profiling/profiler.d.ts +2 -2
- package/dist/client/rpc/profiling/profiler.js +31 -34
- package/dist/client/rpc/rpc-client.d.ts +2 -2
- package/dist/client/rpc/rpc-client.js +113 -72
- package/dist/client/rpc/rpc-error.d.ts +1 -1
- package/dist/client/rpc/rpc-error.js +14 -14
- package/dist/commands/bundle/bare-pack.d.ts +1 -1
- package/dist/commands/bundle/bare-pack.js +20 -20
- package/dist/commands/bundle/constants.js +21 -21
- package/dist/commands/bundle/entry-gen.js +4 -4
- package/dist/commands/bundle/index.js +45 -47
- package/dist/commands/bundle/manifest.d.ts +1 -1
- package/dist/commands/bundle/manifest.js +44 -46
- package/dist/commands/bundle/plugins.d.ts +2 -2
- package/dist/commands/bundle/plugins.js +7 -7
- package/dist/commands/bundle/resolve-sdk-import.js +6 -13
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +2 -2
- package/dist/commands/verify/abi.d.ts +9 -9
- package/dist/commands/verify/abi.js +31 -31
- package/dist/commands/verify/addon-source.d.ts +1 -1
- package/dist/commands/verify/addon-source.js +13 -14
- package/dist/commands/verify/bundle-source.d.ts +1 -1
- package/dist/commands/verify/bundle-source.js +7 -7
- package/dist/commands/verify/index.d.ts +3 -3
- package/dist/commands/verify/index.js +18 -17
- package/dist/commands/verify/node-modules-source.d.ts +1 -1
- package/dist/commands/verify/node-modules-source.js +11 -11
- package/dist/commands/verify/prebuilds.d.ts +3 -3
- package/dist/commands/verify/prebuilds.js +8 -8
- package/dist/constants/audio.d.ts +1 -1
- package/dist/constants/audio.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/constants/registry.js +1 -1
- package/dist/examples/audio/mic-input.d.ts +1 -1
- package/dist/examples/audio/mic-input.js +31 -31
- package/dist/examples/batch-completion.d.ts +38 -0
- package/dist/examples/batch-completion.js +100 -0
- package/dist/examples/bci/bci-filesystem-streaming.js +20 -20
- package/dist/examples/bci/bci-filesystem.js +17 -17
- package/dist/examples/cache-management.js +32 -32
- package/dist/examples/cancel-by-request-id.js +11 -11
- package/dist/examples/classification/classify-image.js +5 -5
- package/dist/examples/completion-events.js +16 -18
- package/dist/examples/completion-stop-reason.js +13 -13
- package/dist/examples/concurrent-completion-collision.js +20 -20
- package/dist/examples/config/blind-relay/blind-relay.config.js +4 -4
- package/dist/examples/config/default/default.config.js +2 -2
- package/dist/examples/config/plugins/plugins.config.js +2 -2
- package/dist/examples/config-reload.js +14 -14
- package/dist/examples/default-config-usage.js +10 -13
- package/dist/examples/delegated-inference/composite.js +23 -23
- package/dist/examples/delegated-inference/consumer-profiled.js +19 -19
- package/dist/examples/delegated-inference/consumer.js +11 -11
- package/dist/examples/delegated-inference/provider.js +24 -24
- package/dist/examples/diffusion-esrgan-upscale.js +19 -19
- package/dist/examples/diffusion-flux2-klein-img2img.js +17 -17
- package/dist/examples/diffusion-flux2-klein.js +14 -14
- package/dist/examples/diffusion-img2img.js +13 -13
- package/dist/examples/diffusion-img2vid.js +22 -23
- package/dist/examples/diffusion-simple.js +7 -7
- package/dist/examples/diffusion-txt2img.js +13 -14
- package/dist/examples/diffusion-txt2vid.js +18 -18
- package/dist/examples/download-with-blind-relays.js +7 -8
- package/dist/examples/download-with-cancel.js +9 -9
- package/dist/examples/embed-multi-gpu.js +9 -9
- package/dist/examples/embed-p2p.js +24 -24
- package/dist/examples/finetune/llamacpp-finetune.js +21 -21
- package/dist/examples/kv-cache-cleanup.js +34 -34
- package/dist/examples/kv-cache-custom-key.js +30 -30
- package/dist/examples/kv-cache-example.js +18 -20
- package/dist/examples/llamacpp-cache.js +33 -33
- package/dist/examples/llamacpp-dynamic-tools.js +38 -38
- package/dist/examples/llamacpp-filesystem.js +13 -15
- package/dist/examples/llamacpp-http.js +12 -14
- package/dist/examples/llamacpp-multi-gpu.js +12 -12
- package/dist/examples/llamacpp-multimodal.js +16 -16
- package/dist/examples/llamacpp-p2p.js +11 -11
- package/dist/examples/llamacpp-sharded.js +12 -12
- package/dist/examples/llamacpp-structured-output.js +37 -37
- package/dist/examples/logging-file-transport.js +19 -21
- package/dist/examples/logging-global.js +8 -8
- package/dist/examples/logging-streaming.js +16 -18
- package/dist/examples/mcp-websearch.js +44 -44
- package/dist/examples/multi-model-demo.js +33 -33
- package/dist/examples/ocr-fasttext.js +17 -17
- package/dist/examples/parallel-download.js +11 -13
- package/dist/examples/plugins.js +43 -43
- package/dist/examples/profiling/basic.js +34 -36
- package/dist/examples/profiling/per-call.js +16 -16
- package/dist/examples/quickstart.bare.js +4 -6
- package/dist/examples/quickstart.js +7 -7
- package/dist/examples/rag/rag-chromadb.js +26 -26
- package/dist/examples/rag/rag-hyperdb/cancellation.js +19 -20
- package/dist/examples/rag/rag-hyperdb/ingest.js +19 -19
- package/dist/examples/rag/rag-hyperdb/pipeline.js +26 -26
- package/dist/examples/rag/rag-hyperdb/workspaces.js +46 -46
- package/dist/examples/rag/rag-lancedb.js +29 -32
- package/dist/examples/rag/rag-sqlite.js +25 -25
- package/dist/examples/registry-query.js +15 -15
- package/dist/examples/seed-p2p.js +8 -8
- package/dist/examples/suspend-resume.js +20 -20
- package/dist/examples/tools/llamacpp-native-tools.js +25 -25
- package/dist/examples/tools/llamacpp-tools-gemma4.js +14 -14
- package/dist/examples/tools/llamacpp-tools-harmony-multiturn.js +15 -15
- package/dist/examples/tools/llamacpp-tools-pythonic.js +15 -15
- package/dist/examples/tools/llamacpp-tools-qwen35.js +14 -14
- package/dist/examples/tools/shared.d.ts +2 -2
- package/dist/examples/tools/shared.js +17 -17
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +12 -12
- package/dist/examples/transcription/parakeet-microphone-record.js +19 -19
- package/dist/examples/transcription/parakeet-microphone-stream.js +23 -23
- package/dist/examples/transcription/parakeet-sortformer-streaming.js +18 -28
- package/dist/examples/transcription/parakeet-sortformer.js +21 -21
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +13 -13
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +34 -34
- package/dist/examples/transcription/whispercpp-filesystem.js +19 -19
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +27 -27
- package/dist/examples/transcription/whispercpp-microphone-record.js +21 -21
- package/dist/examples/transcription/whispercpp-prompt.js +18 -18
- package/dist/examples/translation/translation-bergamot-batch.js +17 -17
- package/dist/examples/translation/translation-bergamot-pivot.js +16 -16
- package/dist/examples/translation/translation-bergamot.js +11 -11
- package/dist/examples/translation/translation-indic.js +10 -10
- package/dist/examples/translation/translation-llm-afriquegemma.js +10 -10
- package/dist/examples/translation/translation-llm-context.js +10 -10
- package/dist/examples/translation/translation-llm.js +13 -13
- package/dist/examples/translation/translation-stream.js +11 -11
- package/dist/examples/tts/chatterbox-enhanced.d.ts +2 -0
- package/dist/examples/tts/chatterbox-enhanced.js +55 -0
- package/dist/examples/tts/chatterbox-multilingual.d.ts +2 -0
- package/dist/examples/tts/chatterbox-multilingual.js +54 -0
- package/dist/examples/tts/chatterbox.js +18 -18
- package/dist/examples/tts/llm-to-tts-streaming.js +30 -30
- package/dist/examples/tts/supertonic-enhanced.d.ts +2 -0
- package/dist/examples/tts/supertonic-enhanced.js +57 -0
- package/dist/examples/tts/supertonic-multilingual.js +19 -19
- package/dist/examples/tts/supertonic.js +18 -18
- package/dist/examples/tts/utils.js +24 -32
- package/dist/examples/vla-pi05.js +14 -14
- package/dist/examples/vla-smolvla.js +14 -14
- package/dist/examples/voice-assistant/voice-assistant.js +46 -46
- package/dist/expo/plugins/find-in-ancestor-node-modules.js +3 -3
- package/dist/expo/plugins/get-project-root.d.ts +2 -2
- package/dist/expo/plugins/get-project-root.js +1 -1
- package/dist/expo/plugins/index.d.ts +11 -11
- package/dist/expo/plugins/index.js +10 -10
- package/dist/expo/plugins/resolve-sdk-package-dir.js +7 -11
- package/dist/expo/plugins/withAndroidArchitecture.d.ts +1 -1
- package/dist/expo/plugins/withAndroidArchitecture.js +12 -12
- package/dist/expo/plugins/withAndroidNdkVersion.d.ts +1 -1
- package/dist/expo/plugins/withAndroidNdkVersion.js +9 -9
- package/dist/expo/plugins/withDeviceInfo.d.ts +1 -1
- package/dist/expo/plugins/withDeviceInfo.js +13 -13
- package/dist/expo/plugins/withMobileBundle.d.ts +1 -1
- package/dist/expo/plugins/withMobileBundle.js +34 -42
- package/dist/expo/plugins/withOpenCL.d.ts +1 -1
- package/dist/expo/plugins/withOpenCL.js +14 -16
- package/dist/expo/plugins/withQvacSDK.d.ts +1 -1
- package/dist/expo/plugins/withQvacSDK.js +12 -12
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -17
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +13 -13
- package/dist/logging/base-logger.d.ts +2 -2
- package/dist/logging/base-logger.js +6 -6
- package/dist/logging/client-logger.d.ts +1 -1
- package/dist/logging/client-logger.js +3 -3
- package/dist/logging/index.d.ts +9 -9
- package/dist/logging/index.js +8 -8
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +4 -4
- package/dist/logging/namespaces.d.ts +1 -1
- package/dist/logging/namespaces.js +5 -5
- package/dist/logging/registry.d.ts +2 -2
- package/dist/logging/registry.js +3 -3
- package/dist/logging/server-logger.d.ts +1 -1
- package/dist/logging/server-logger.js +2 -2
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/stream-logger.js +4 -4
- package/dist/logging/transport.d.ts +1 -1
- package/dist/logging/types.d.ts +1 -1
- package/dist/logging/utils.d.ts +2 -2
- package/dist/logging/utils.js +40 -41
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +5 -5
- package/dist/models/registry/models.d.ts +429 -122
- package/dist/models/registry/models.js +13693 -13369
- package/dist/models/update-models/codegen.d.ts +1 -1
- package/dist/models/update-models/codegen.js +8 -8
- package/dist/models/update-models/companions.d.ts +6 -1
- package/dist/models/update-models/companions.js +104 -39
- package/dist/models/update-models/history.d.ts +1 -1
- package/dist/models/update-models/history.js +11 -11
- package/dist/models/update-models/index.js +32 -34
- package/dist/models/update-models/naming.d.ts +2 -2
- package/dist/models/update-models/naming.js +177 -186
- package/dist/models/update-models/processing.d.ts +2 -2
- package/dist/models/update-models/processing.js +17 -19
- package/dist/models/update-models/registry.d.ts +2 -2
- package/dist/models/update-models/registry.js +9 -9
- package/dist/models/update-models/shards.d.ts +1 -1
- package/dist/models/update-models/shards.js +3 -3
- package/dist/models/update-models/types.d.ts +1 -1
- package/dist/models/update-models/utils.js +5 -5
- package/dist/pear/pre.js +84 -84
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +6 -6
- package/dist/profiling/clock.d.ts +1 -1
- package/dist/profiling/clock.js +10 -10
- package/dist/profiling/controller.d.ts +2 -2
- package/dist/profiling/controller.js +11 -12
- package/dist/profiling/envelope.d.ts +1 -1
- package/dist/profiling/envelope.js +4 -6
- package/dist/profiling/events.d.ts +2 -2
- package/dist/profiling/events.js +8 -10
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +81 -79
- package/dist/profiling/index.d.ts +8 -8
- package/dist/profiling/index.js +7 -7
- package/dist/profiling/model-execution.js +2 -1
- package/dist/profiling/ring-buffer.js +2 -2
- package/dist/profiling/types.d.ts +3 -3
- package/dist/schemas/archive.d.ts +1 -1
- package/dist/schemas/archive.js +8 -14
- package/dist/schemas/batch-completion-stream.d.ts +463 -0
- package/dist/schemas/batch-completion-stream.js +124 -0
- package/dist/schemas/bci-config.d.ts +1 -1
- package/dist/schemas/bci-config.js +7 -7
- package/dist/schemas/bci.d.ts +3 -3
- package/dist/schemas/bci.js +25 -31
- package/dist/schemas/cancel.d.ts +6 -1
- package/dist/schemas/cancel.js +33 -34
- package/dist/schemas/classification.d.ts +1 -1
- package/dist/schemas/classification.js +7 -7
- package/dist/schemas/common.d.ts +194 -25
- package/dist/schemas/common.js +40 -37
- package/dist/schemas/completion-event.d.ts +11 -8
- package/dist/schemas/completion-event.js +27 -26
- package/dist/schemas/completion-stream.d.ts +4 -3
- package/dist/schemas/completion-stream.js +51 -67
- package/dist/schemas/delegate.d.ts +1 -1
- package/dist/schemas/delegate.js +7 -7
- package/dist/schemas/delete-cache.d.ts +1 -1
- package/dist/schemas/delete-cache.js +8 -8
- package/dist/schemas/download-asset.d.ts +2 -2
- package/dist/schemas/download-asset.js +21 -21
- package/dist/schemas/embed.d.ts +3 -3
- package/dist/schemas/embed.js +16 -27
- package/dist/schemas/engine-addon-map.d.ts +2 -2
- package/dist/schemas/engine-addon-map.js +24 -24
- package/dist/schemas/error.d.ts +1 -1
- package/dist/schemas/error.js +12 -13
- package/dist/schemas/finetune.d.ts +1 -1
- package/dist/schemas/finetune.js +35 -41
- package/dist/schemas/get-loaded-model-info.d.ts +1 -1
- package/dist/schemas/get-loaded-model-info.js +10 -10
- package/dist/schemas/get-model-info.d.ts +1 -1
- package/dist/schemas/get-model-info.js +48 -91
- package/dist/schemas/heartbeat.d.ts +1 -1
- package/dist/schemas/heartbeat.js +6 -6
- package/dist/schemas/index.d.ts +52 -51
- package/dist/schemas/index.js +52 -51
- package/dist/schemas/json-schema.d.ts +1 -1
- package/dist/schemas/llamacpp-config.d.ts +33 -25
- package/dist/schemas/llamacpp-config.js +43 -30
- package/dist/schemas/load-model.d.ts +160 -128
- package/dist/schemas/load-model.js +120 -126
- package/dist/schemas/logging-stream.d.ts +1 -1
- package/dist/schemas/logging-stream.js +6 -12
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-src-utils.d.ts +1 -1
- package/dist/schemas/model-src-utils.js +13 -13
- package/dist/schemas/model-types.d.ts +1 -1
- package/dist/schemas/model-types.js +27 -27
- package/dist/schemas/ocr.d.ts +1 -1
- package/dist/schemas/ocr.js +18 -18
- package/dist/schemas/path-validation.d.ts +1 -1
- package/dist/schemas/path-validation.js +4 -4
- package/dist/schemas/plugin.d.ts +9 -10
- package/dist/schemas/plugin.js +47 -47
- package/dist/schemas/profiling.d.ts +1 -1
- package/dist/schemas/profiling.js +16 -16
- package/dist/schemas/provide.d.ts +1 -1
- package/dist/schemas/provide.js +8 -8
- package/dist/schemas/rag.d.ts +3 -3
- package/dist/schemas/rag.js +65 -70
- package/dist/schemas/registry.d.ts +1 -1
- package/dist/schemas/registry.js +44 -66
- package/dist/schemas/reload-config.d.ts +1 -1
- package/dist/schemas/reload-config.js +14 -18
- package/dist/schemas/resume.d.ts +1 -1
- package/dist/schemas/resume.js +3 -3
- package/dist/schemas/runtime-context.d.ts +1 -1
- package/dist/schemas/runtime-context.js +4 -4
- package/dist/schemas/sdcpp-config.d.ts +9 -9
- package/dist/schemas/sdcpp-config.js +298 -300
- package/dist/schemas/sdk-config.d.ts +55 -43
- package/dist/schemas/sdk-config.js +25 -29
- package/dist/schemas/sdk-errors-client.d.ts +1 -1
- package/dist/schemas/sdk-errors-client.js +80 -80
- package/dist/schemas/sdk-errors-registry.js +1 -1
- package/dist/schemas/sdk-errors-server.d.ts +1 -1
- package/dist/schemas/sdk-errors-server.js +200 -199
- package/dist/schemas/shard.d.ts +1 -1
- package/dist/schemas/shard.js +4 -4
- package/dist/schemas/state.d.ts +1 -1
- package/dist/schemas/state.js +5 -10
- package/dist/schemas/stop-provide.d.ts +1 -1
- package/dist/schemas/stop-provide.js +4 -4
- package/dist/schemas/suspend.d.ts +1 -1
- package/dist/schemas/suspend.js +3 -3
- package/dist/schemas/text-to-speech.d.ts +455 -3
- package/dist/schemas/text-to-speech.js +146 -110
- package/dist/schemas/tools.d.ts +1 -1
- package/dist/schemas/tools.js +17 -24
- package/dist/schemas/transcription-config.d.ts +1 -1
- package/dist/schemas/transcription-config.js +18 -18
- package/dist/schemas/transcription.d.ts +5 -5
- package/dist/schemas/transcription.js +31 -33
- package/dist/schemas/translate.d.ts +3 -3
- package/dist/schemas/translate.js +38 -67
- package/dist/schemas/translation-config.d.ts +1 -1
- package/dist/schemas/translation-config.js +116 -123
- package/dist/schemas/unload-model.d.ts +1 -1
- package/dist/schemas/unload-model.js +6 -6
- package/dist/schemas/vla.d.ts +1 -1
- package/dist/schemas/vla.js +30 -30
- package/dist/scripts/run-security-tests.js +9 -10
- package/dist/scripts/run-unit-tests.js +11 -12
- package/dist/server/bare/delegate-connect-diagnostics.js +13 -19
- package/dist/server/bare/delegate-rpc-client.d.ts +2 -2
- package/dist/server/bare/delegate-rpc-client.js +32 -34
- package/dist/server/bare/hyperswarm.d.ts +3 -3
- package/dist/server/bare/hyperswarm.js +14 -14
- package/dist/server/bare/ops/bci-transcribe.d.ts +1 -1
- package/dist/server/bare/ops/bci-transcribe.js +44 -44
- package/dist/server/bare/ops/cancel.d.ts +2 -2
- package/dist/server/bare/ops/cancel.js +6 -6
- package/dist/server/bare/ops/embed.d.ts +1 -1
- package/dist/server/bare/ops/embed.js +26 -16
- package/dist/server/bare/ops/kv-cache-utils.d.ts +1 -1
- package/dist/server/bare/ops/kv-cache-utils.js +17 -19
- package/dist/server/bare/ops/load-model.d.ts +2 -2
- package/dist/server/bare/ops/load-model.js +14 -18
- package/dist/server/bare/ops/transcribe.d.ts +3 -3
- package/dist/server/bare/ops/transcribe.js +62 -62
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +39 -30
- package/dist/server/bare/ops/unload-model.d.ts +1 -1
- package/dist/server/bare/ops/unload-model.js +12 -12
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +2 -2
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +3 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +2 -2
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +33 -33
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +1 -1
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.js +8 -8
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/plugin.js +14 -14
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.js +27 -26
- package/dist/server/bare/plugins/ggml-ocr/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +38 -38
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.js +3 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +23 -23
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/plugin.js +15 -15
- package/dist/server/bare/plugins/index.d.ts +11 -11
- package/dist/server/bare/plugins/index.js +11 -11
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.d.ts +23 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.js +30 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.d.ts +32 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +99 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +8 -8
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +3 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +4 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +22 -4
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +55 -59
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +5 -5
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +2 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +34 -34
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +7 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +19 -23
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +4 -6
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +186 -17
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +235 -70
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +15 -15
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +3 -3
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +27 -29
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +38 -39
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.js +19 -22
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +36 -36
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +15 -17
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +11 -11
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +42 -44
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +4 -4
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +69 -63
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.js +19 -21
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.js +22 -24
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +3 -2
- package/dist/server/bare/plugins/tts-ggml/plugin.js +95 -49
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +52 -52
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +5 -5
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/search.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +3 -3
- package/dist/server/bare/rag-hyperdb/index.d.ts +11 -11
- package/dist/server/bare/rag-hyperdb/index.js +11 -11
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +3 -3
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +20 -20
- package/dist/server/bare/registry/config-registry.d.ts +1 -1
- package/dist/server/bare/registry/config-registry.js +13 -16
- package/dist/server/bare/registry/logging-stream-registry.d.ts +1 -1
- package/dist/server/bare/registry/logging-stream-registry.js +2 -2
- package/dist/server/bare/registry/model-config-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-config-registry.js +6 -6
- package/dist/server/bare/registry/model-config-utils.d.ts +2 -2
- package/dist/server/bare/registry/model-config-utils.js +35 -35
- package/dist/server/bare/registry/model-registry.d.ts +3 -3
- package/dist/server/bare/registry/model-registry.js +11 -11
- package/dist/server/bare/registry/registry-client.d.ts +1 -1
- package/dist/server/bare/registry/registry-client.js +18 -18
- package/dist/server/bare/registry/runtime-context-registry.d.ts +1 -1
- package/dist/server/bare/registry/runtime-context-registry.js +3 -3
- package/dist/server/bare/runtime/disposable-scope.js +3 -3
- package/dist/server/bare/runtime/index.d.ts +7 -7
- package/dist/server/bare/runtime/index.js +3 -3
- package/dist/server/bare/runtime/request-context.d.ts +4 -4
- package/dist/server/bare/runtime/request-id.js +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.js +23 -4
- package/dist/server/bare/runtime/request-registry.d.ts +27 -12
- package/dist/server/bare/runtime/request-registry.js +39 -34
- package/dist/server/bare/runtime/with-request-context.d.ts +1 -1
- package/dist/server/bare/runtime/with-request-context.js +11 -11
- package/dist/server/bare/runtime-lifecycle.d.ts +1 -1
- package/dist/server/bare/runtime-lifecycle.js +27 -31
- package/dist/server/bare/types/addon-responses.d.ts +5 -4
- package/dist/server/bare/utils/audio-input.d.ts +2 -2
- package/dist/server/bare/utils/audio-input.js +7 -7
- package/dist/server/bare/utils/transcribe-metadata.d.ts +1 -1
- package/dist/server/bare/utils/transcribe-metadata.js +4 -4
- package/dist/server/bare/utils/tts-stats.d.ts +1 -1
- package/dist/server/bare/utils/tts-stats.js +3 -3
- package/dist/server/env.js +8 -8
- package/dist/server/error-handlers.d.ts +3 -3
- package/dist/server/error-handlers.js +11 -11
- package/dist/server/plugins/index.d.ts +1 -1
- package/dist/server/plugins/index.js +1 -1
- package/dist/server/plugins/registry.d.ts +1 -1
- package/dist/server/plugins/registry.js +12 -14
- package/dist/server/rpc/create-server.d.ts +1 -1
- package/dist/server/rpc/create-server.js +11 -12
- package/dist/server/rpc/delegate-transport.d.ts +3 -3
- package/dist/server/rpc/delegate-transport.js +43 -44
- package/dist/server/rpc/handle-request.d.ts +1 -1
- package/dist/server/rpc/handle-request.js +28 -30
- package/dist/server/rpc/handler-registry.d.ts +1 -1
- package/dist/server/rpc/handler-registry.js +97 -92
- package/dist/server/rpc/handler-selection.d.ts +3 -3
- package/dist/server/rpc/handler-selection.js +3 -3
- package/dist/server/rpc/handler-utils.d.ts +7 -7
- package/dist/server/rpc/handler-utils.js +32 -35
- package/dist/server/rpc/handlers/batch-completion-stream.d.ts +78 -0
- package/dist/server/rpc/handlers/batch-completion-stream.js +4 -0
- package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/bci-transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe.js +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.js +13 -13
- package/dist/server/rpc/handlers/cancelHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/cancelHandler.js +11 -11
- package/dist/server/rpc/handlers/classify.d.ts +1 -1
- package/dist/server/rpc/handlers/classify.js +2 -2
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/completion-stream-delegated.js +14 -14
- package/dist/server/rpc/handlers/completion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/completion-stream.js +2 -2
- package/dist/server/rpc/handlers/delete-cache.d.ts +1 -1
- package/dist/server/rpc/handlers/delete-cache.js +10 -10
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/diffusion-stream.js +2 -2
- package/dist/server/rpc/handlers/download-asset.d.ts +1 -1
- package/dist/server/rpc/handlers/download-asset.js +20 -20
- package/dist/server/rpc/handlers/embed.d.ts +1 -1
- package/dist/server/rpc/handlers/embed.js +2 -2
- package/dist/server/rpc/handlers/finetune.d.ts +1 -1
- package/dist/server/rpc/handlers/finetune.js +8 -6
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-loaded-model-info.js +9 -9
- package/dist/server/rpc/handlers/get-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-model-info.js +20 -20
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/heartbeat-delegated.js +7 -7
- package/dist/server/rpc/handlers/heartbeat.d.ts +1 -1
- package/dist/server/rpc/handlers/heartbeat.js +1 -1
- package/dist/server/rpc/handlers/index.d.ts +33 -31
- package/dist/server/rpc/handlers/index.js +34 -32
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +4 -4
- package/dist/server/rpc/handlers/load-model/download-manager.js +19 -17
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/download-stats.js +9 -11
- package/dist/server/rpc/handlers/load-model/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/handler.js +42 -43
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/http.js +100 -107
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +72 -74
- package/dist/server/rpc/handlers/load-model/index.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/index.js +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.js +2 -3
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +5 -5
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +19 -21
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +6 -6
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +16 -18
- package/dist/server/rpc/handlers/load-model/registry-metadata.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry-metadata.js +23 -0
- package/dist/server/rpc/handlers/load-model/registry.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/registry.js +50 -56
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve-session.js +7 -7
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +36 -35
- package/dist/server/rpc/handlers/load-model/types.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/types.js +7 -7
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model-delegated.js +31 -30
- package/dist/server/rpc/handlers/logging-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/logging-stream.js +3 -3
- package/dist/server/rpc/handlers/ocr-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/ocr-stream.js +2 -2
- package/dist/server/rpc/handlers/plugin-dispatch.js +9 -9
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +1 -1
- package/dist/server/rpc/handlers/plugin-invoke.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/connection.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/connection.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/handler.js +18 -18
- package/dist/server/rpc/handlers/provideHandler/proxy.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/proxy.js +11 -11
- package/dist/server/rpc/handlers/provideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler.js +1 -1
- package/dist/server/rpc/handlers/rag.d.ts +1 -1
- package/dist/server/rpc/handlers/rag.js +50 -50
- package/dist/server/rpc/handlers/registry.d.ts +1 -1
- package/dist/server/rpc/handlers/registry.js +34 -36
- package/dist/server/rpc/handlers/resume.d.ts +1 -1
- package/dist/server/rpc/handlers/resume.js +3 -3
- package/dist/server/rpc/handlers/state.d.ts +1 -1
- package/dist/server/rpc/handlers/state.js +3 -3
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/stopProvideHandler.js +7 -7
- package/dist/server/rpc/handlers/suspend.d.ts +1 -1
- package/dist/server/rpc/handlers/suspend.js +3 -3
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech-stream.js +2 -2
- package/dist/server/rpc/handlers/text-to-speech.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech.js +2 -2
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe.js +2 -2
- package/dist/server/rpc/handlers/translate.d.ts +1 -1
- package/dist/server/rpc/handlers/translate.js +2 -2
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model-delegated.js +10 -10
- package/dist/server/rpc/handlers/unload-model.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model.js +10 -10
- package/dist/server/rpc/handlers/upscale-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/upscale-stream.js +2 -2
- package/dist/server/rpc/handlers/video-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/video-stream.js +2 -2
- package/dist/server/rpc/index.d.ts +2 -2
- package/dist/server/rpc/index.js +2 -2
- package/dist/server/rpc/profiling/context.d.ts +1 -1
- package/dist/server/rpc/profiling/context.js +9 -10
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/delegation-profiler.js +23 -24
- package/dist/server/rpc/profiling/index.d.ts +4 -4
- package/dist/server/rpc/profiling/index.js +4 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +2 -2
- package/dist/server/rpc/profiling/operation-metrics.js +102 -102
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +16 -14
- package/dist/server/rpc/profiling/profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/profiler.js +9 -13
- package/dist/server/rpc/rpc-utils.js +1 -4
- package/dist/server/rpc/transport-selector.d.ts +1 -1
- package/dist/server/rpc/transport-selector.js +4 -4
- package/dist/server/utils/archive.js +27 -29
- package/dist/server/utils/audio/decoder.d.ts +2 -2
- package/dist/server/utils/audio/decoder.js +11 -11
- package/dist/server/utils/cache/auto-history.d.ts +1 -1
- package/dist/server/utils/cache/auto-history.js +5 -5
- package/dist/server/utils/cache/paths.d.ts +2 -2
- package/dist/server/utils/cache/paths.js +14 -14
- package/dist/server/utils/checksum.d.ts +1 -1
- package/dist/server/utils/checksum.js +10 -12
- package/dist/server/utils/clear-storage.d.ts +1 -1
- package/dist/server/utils/clear-storage.js +8 -11
- package/dist/server/utils/completion-normalizer.d.ts +1 -1
- package/dist/server/utils/completion-normalizer.js +106 -113
- package/dist/server/utils/config-transform.d.ts +1 -1
- package/dist/server/utils/config-transform.js +2 -2
- package/dist/server/utils/expand-gguf-shards.js +4 -4
- package/dist/server/utils/formatting.js +6 -12
- package/dist/server/utils/gguf-tensor-extractor.js +17 -21
- package/dist/server/utils/index.d.ts +11 -11
- package/dist/server/utils/index.js +11 -11
- package/dist/server/utils/multi-gpu-mobile.js +1 -1
- package/dist/server/utils/path-security.d.ts +1 -1
- package/dist/server/utils/path-security.js +6 -6
- package/dist/server/utils/qvac-paths.js +3 -3
- package/dist/server/utils/response-format.d.ts +1 -1
- package/dist/server/utils/response-format.js +4 -4
- package/dist/server/utils/shard-utils.d.ts +1 -1
- package/dist/server/utils/shard-utils.js +14 -16
- package/dist/server/utils/tool-integration.d.ts +1 -1
- package/dist/server/utils/tool-integration.js +5 -9
- package/dist/server/utils/tools/dialect.d.ts +1 -1
- package/dist/server/utils/tools/dialect.js +7 -7
- package/dist/server/utils/tools/index.d.ts +2 -2
- package/dist/server/utils/tools/index.js +2 -2
- package/dist/server/utils/tools/parser.d.ts +1 -1
- package/dist/server/utils/tools/parser.js +14 -14
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +2 -2
- package/dist/server/utils/tools/parsers/gemma4native.js +13 -8
- package/dist/server/utils/tools/parsers/harmony.d.ts +2 -2
- package/dist/server/utils/tools/parsers/harmony.js +9 -11
- package/dist/server/utils/tools/parsers/hermes.d.ts +2 -2
- package/dist/server/utils/tools/parsers/hermes.js +16 -16
- package/dist/server/utils/tools/parsers/json.d.ts +2 -2
- package/dist/server/utils/tools/parsers/json.js +14 -14
- package/dist/server/utils/tools/parsers/pythonic.d.ts +2 -2
- package/dist/server/utils/tools/parsers/pythonic.js +43 -43
- package/dist/server/utils/tools/parsers/qwen35.d.ts +2 -2
- package/dist/server/utils/tools/parsers/qwen35.js +20 -20
- package/dist/server/utils/tools/shared.d.ts +1 -1
- package/dist/server/utils/tools/shared.js +10 -12
- package/dist/server/utils/worker-lock.js +10 -10
- package/dist/server/worker-core.d.ts +1 -1
- package/dist/server/worker-core.js +44 -43
- package/dist/server/worker.js +9 -9
- package/dist/utils/aggregate-events.d.ts +2 -2
- package/dist/utils/aggregate-events.js +17 -19
- package/dist/utils/cache-normalize.js +1 -4
- package/dist/utils/encoding.js +1 -1
- package/dist/utils/errors-base.d.ts +1 -1
- package/dist/utils/errors-base.js +1 -1
- package/dist/utils/errors-client.d.ts +1 -1
- package/dist/utils/errors-client.js +5 -5
- package/dist/utils/errors-server.d.ts +3 -3
- package/dist/utils/errors-server.js +19 -18
- package/dist/utils/load-model-validation.js +3 -3
- package/dist/utils/mcp-adapter.d.ts +4 -4
- package/dist/utils/mcp-adapter.js +31 -38
- package/dist/utils/path-sanitize.js +14 -17
- package/dist/utils/tool-helpers.d.ts +2 -2
- package/dist/utils/tool-helpers.js +25 -26
- package/dist/utils/withTimeout.d.ts +7 -0
- package/dist/utils/withTimeout.js +11 -1
- package/dist/utils/zod-error.d.ts +1 -1
- package/dist/utils/zod-error.js +1 -1
- package/electron-forge/index.cjs +274 -317
- package/expo/plugins/patches/android-link.mjs +25 -30
- package/expo/plugins/patches/ios-link.mjs +25 -30
- package/package.json +17 -16
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { promises as fsp } from
|
|
2
|
-
import path from
|
|
3
|
-
import semver from
|
|
4
|
-
import { formatAddonId } from
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import semver from 'semver';
|
|
4
|
+
import { formatAddonId } from './addon-source.js';
|
|
5
5
|
const RUNTIME_PACKAGES = [
|
|
6
|
-
{ source:
|
|
7
|
-
{ source:
|
|
6
|
+
{ source: 'bare-runtime', packageName: 'bare-runtime' },
|
|
7
|
+
{ source: 'bare', packageName: 'bare' }
|
|
8
8
|
];
|
|
9
9
|
export async function resolveBareRuntime(options) {
|
|
10
10
|
if (options.explicitVersion) {
|
|
@@ -13,34 +13,34 @@ export async function resolveBareRuntime(options) {
|
|
|
13
13
|
resolved: true,
|
|
14
14
|
runtime: {
|
|
15
15
|
version: normalizeVersion(options.explicitVersion),
|
|
16
|
-
source: options.explicitSource ??
|
|
17
|
-
}
|
|
16
|
+
source: options.explicitSource ?? 'flag'
|
|
17
|
+
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const tried = [];
|
|
21
21
|
for (const candidate of RUNTIME_PACKAGES) {
|
|
22
|
-
const pkgJsonPath = path.join(options.projectRoot,
|
|
22
|
+
const pkgJsonPath = path.join(options.projectRoot, 'node_modules', candidate.packageName, 'package.json');
|
|
23
23
|
tried.push(pkgJsonPath);
|
|
24
24
|
const version = await tryReadRuntimeVersion(pkgJsonPath);
|
|
25
25
|
if (version) {
|
|
26
26
|
return {
|
|
27
27
|
resolved: true,
|
|
28
|
-
runtime: { version, source: candidate.source }
|
|
28
|
+
runtime: { version, source: candidate.source }
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
33
|
resolved: false,
|
|
34
34
|
error: {
|
|
35
|
-
reason:
|
|
36
|
-
triedPaths: tried
|
|
37
|
-
}
|
|
35
|
+
reason: 'Unable to detect installed Bare runtime version',
|
|
36
|
+
triedPaths: tried
|
|
37
|
+
}
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
async function tryReadRuntimeVersion(pkgJsonPath) {
|
|
41
41
|
let raw;
|
|
42
42
|
try {
|
|
43
|
-
raw = await fsp.readFile(pkgJsonPath,
|
|
43
|
+
raw = await fsp.readFile(pkgJsonPath, 'utf8');
|
|
44
44
|
}
|
|
45
45
|
catch {
|
|
46
46
|
return null;
|
|
@@ -52,11 +52,11 @@ async function tryReadRuntimeVersion(pkgJsonPath) {
|
|
|
52
52
|
catch {
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
-
if (typeof parsed !==
|
|
55
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
const version = parsed[
|
|
59
|
-
return typeof version ===
|
|
58
|
+
const version = parsed['version'];
|
|
59
|
+
return typeof version === 'string' ? normalizeVersion(version) : null;
|
|
60
60
|
}
|
|
61
61
|
export function normalizeVersion(value) {
|
|
62
62
|
const coerced = semver.coerce(value, { includePrerelease: true });
|
|
@@ -64,9 +64,9 @@ export function normalizeVersion(value) {
|
|
|
64
64
|
}
|
|
65
65
|
export function formatConfigLabel(projectRoot, configPath) {
|
|
66
66
|
if (!configPath)
|
|
67
|
-
return
|
|
67
|
+
return 'qvac.config';
|
|
68
68
|
const rel = path.relative(projectRoot, configPath);
|
|
69
|
-
if (!rel || rel.startsWith(
|
|
69
|
+
if (!rel || rel.startsWith('..') || path.isAbsolute(rel))
|
|
70
70
|
return configPath;
|
|
71
71
|
return rel;
|
|
72
72
|
}
|
|
@@ -83,13 +83,13 @@ export function checkAbi(options) {
|
|
|
83
83
|
continue;
|
|
84
84
|
if (!semver.validRange(range)) {
|
|
85
85
|
issues.push({
|
|
86
|
-
code:
|
|
87
|
-
level:
|
|
86
|
+
code: 'malformed-engines-bare',
|
|
87
|
+
level: 'warning',
|
|
88
88
|
addon: formatAddonId(addon),
|
|
89
89
|
enginesBare: range,
|
|
90
90
|
message: `${formatAddonId(addon)} declares engines.bare "${range}", which is ` +
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
'not a valid semver range. ABI check skipped for this addon. ' +
|
|
92
|
+
'Report this to the addon maintainer.'
|
|
93
93
|
});
|
|
94
94
|
continue;
|
|
95
95
|
}
|
|
@@ -99,12 +99,12 @@ export function checkAbi(options) {
|
|
|
99
99
|
return issues;
|
|
100
100
|
if (!runtime.resolved) {
|
|
101
101
|
issues.push({
|
|
102
|
-
code:
|
|
103
|
-
level:
|
|
102
|
+
code: 'unknown-runtime-version',
|
|
103
|
+
level: 'warning',
|
|
104
104
|
message: `${runtime.error.reason}. ABI checks skipped for ${checkable.length} ` +
|
|
105
|
-
`addon${checkable.length === 1 ?
|
|
106
|
-
|
|
107
|
-
triedPaths: runtime.error.triedPaths
|
|
105
|
+
`addon${checkable.length === 1 ? '' : 's'}. ` +
|
|
106
|
+
'Pass bareRuntimeVersion to enable strict ABI verification.',
|
|
107
|
+
triedPaths: runtime.error.triedPaths
|
|
108
108
|
});
|
|
109
109
|
return issues;
|
|
110
110
|
}
|
|
@@ -112,13 +112,13 @@ export function checkAbi(options) {
|
|
|
112
112
|
if (semver.satisfies(runtime.runtime.version, range))
|
|
113
113
|
continue;
|
|
114
114
|
issues.push({
|
|
115
|
-
code:
|
|
116
|
-
level:
|
|
115
|
+
code: 'abi-mismatch',
|
|
116
|
+
level: 'error',
|
|
117
117
|
addon: formatAddonId(addon),
|
|
118
118
|
enginesBare: range,
|
|
119
119
|
runtimeVersion: runtime.runtime.version,
|
|
120
120
|
message: `${formatAddonId(addon)} requires bare ${range}, ` +
|
|
121
|
-
`runtime is ${runtime.runtime.version} (from ${runtime.runtime.source})
|
|
121
|
+
`runtime is ${runtime.runtime.version} (from ${runtime.runtime.source}).`
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
return issues;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { promises as fsp } from
|
|
2
|
-
import path from
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
export async function readAddonPackageJson(options) {
|
|
4
4
|
const { packageJsonPath, expectedName } = options;
|
|
5
5
|
let raw;
|
|
6
6
|
try {
|
|
7
|
-
raw = await fsp.readFile(packageJsonPath,
|
|
7
|
+
raw = await fsp.readFile(packageJsonPath, 'utf8');
|
|
8
8
|
}
|
|
9
9
|
catch {
|
|
10
10
|
return { found: false, isAddon: false };
|
|
@@ -18,14 +18,14 @@ export async function readAddonPackageJson(options) {
|
|
|
18
18
|
return {
|
|
19
19
|
found: true,
|
|
20
20
|
isAddon: false,
|
|
21
|
-
invalid: buildInvalid(packageJsonPath, expectedName, `malformed JSON: ${reason}`)
|
|
21
|
+
invalid: buildInvalid(packageJsonPath, expectedName, `malformed JSON: ${reason}`)
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
if (typeof parsed !==
|
|
24
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
25
25
|
return {
|
|
26
26
|
found: true,
|
|
27
27
|
isAddon: false,
|
|
28
|
-
invalid: buildInvalid(packageJsonPath, expectedName,
|
|
28
|
+
invalid: buildInvalid(packageJsonPath, expectedName, 'package.json is not a JSON object')
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
const pkg = parsed;
|
|
@@ -37,17 +37,17 @@ export async function readAddonPackageJson(options) {
|
|
|
37
37
|
return {
|
|
38
38
|
found: true,
|
|
39
39
|
isAddon: false,
|
|
40
|
-
invalid: buildInvalid(packageJsonPath, expectedName,
|
|
40
|
+
invalid: buildInvalid(packageJsonPath, expectedName, 'addon package.json is missing a `name` field')
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
const addon = {
|
|
44
44
|
name,
|
|
45
45
|
packageJsonPath,
|
|
46
|
-
packageRoot: path.dirname(packageJsonPath)
|
|
46
|
+
packageRoot: path.dirname(packageJsonPath)
|
|
47
47
|
};
|
|
48
|
-
if (typeof pkg.version ===
|
|
48
|
+
if (typeof pkg.version === 'string')
|
|
49
49
|
addon.version = pkg.version;
|
|
50
|
-
if (typeof pkg.engines?.bare ===
|
|
50
|
+
if (typeof pkg.engines?.bare === 'string')
|
|
51
51
|
addon.enginesBare = pkg.engines.bare;
|
|
52
52
|
return { found: true, isAddon: true, addon };
|
|
53
53
|
}
|
|
@@ -61,15 +61,14 @@ export function createCollectDiagnostics() {
|
|
|
61
61
|
return { invalidPackageJsons: [], emptyResolutions: false };
|
|
62
62
|
}
|
|
63
63
|
export function formatAddonId(addon) {
|
|
64
|
-
return `${addon.name}@${addon.version ??
|
|
64
|
+
return `${addon.name}@${addon.version ?? 'unknown'}`;
|
|
65
65
|
}
|
|
66
66
|
export function deduplicateAddons(addons) {
|
|
67
67
|
const byKey = new Map();
|
|
68
68
|
for (const addon of addons) {
|
|
69
|
-
const key = `${addon.name}@${addon.version ??
|
|
69
|
+
const key = `${addon.name}@${addon.version ?? 'unknown'}::${addon.packageRoot}`;
|
|
70
70
|
if (!byKey.has(key))
|
|
71
71
|
byKey.set(key, addon);
|
|
72
72
|
}
|
|
73
|
-
return [...byKey.values()].sort((a, b) => formatAddonId(a).localeCompare(formatAddonId(b)) ||
|
|
74
|
-
a.packageRoot.localeCompare(b.packageRoot));
|
|
73
|
+
return [...byKey.values()].sort((a, b) => formatAddonId(a).localeCompare(formatAddonId(b)) || a.packageRoot.localeCompare(b.packageRoot));
|
|
75
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CollectDiagnostics, type NativeAddon } from
|
|
1
|
+
import { type CollectDiagnostics, type NativeAddon } from './addon-source';
|
|
2
2
|
export declare class InvalidBundleSourceError extends Error {
|
|
3
3
|
bundlePath: string;
|
|
4
4
|
constructor(bundlePath: string, cause: unknown);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { promises as fsp } from
|
|
2
|
-
import { buildNestedPathIndex, extractBarePackHeader, extractPackedString
|
|
3
|
-
import { deduplicateAddons, readAddonPackageJson
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import { buildNestedPathIndex, extractBarePackHeader, extractPackedString } from '../bundle/manifest.js';
|
|
3
|
+
import { deduplicateAddons, readAddonPackageJson } from './addon-source.js';
|
|
4
4
|
export class InvalidBundleSourceError extends Error {
|
|
5
5
|
bundlePath;
|
|
6
6
|
constructor(bundlePath, cause) {
|
|
7
7
|
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
8
8
|
super(`Bundle at ${bundlePath} could not be parsed as a bare-pack bundle.\n\n` +
|
|
9
9
|
` Reason: ${reason}\n\n` +
|
|
10
|
-
|
|
11
|
-
this.name =
|
|
10
|
+
' Make sure the path points to a worker.bundle.js generated by bundleSdk.');
|
|
11
|
+
this.name = 'InvalidBundleSourceError';
|
|
12
12
|
this.bundlePath = bundlePath;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -16,7 +16,7 @@ export async function collectAddonsFromBundle(options) {
|
|
|
16
16
|
const { bundlePath, projectRoot, diagnostics } = options;
|
|
17
17
|
let bundleText;
|
|
18
18
|
try {
|
|
19
|
-
bundleText = await fsp.readFile(bundlePath,
|
|
19
|
+
bundleText = await fsp.readFile(bundlePath, 'utf8');
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
throw new InvalidBundleSourceError(bundlePath, error);
|
|
@@ -39,7 +39,7 @@ export async function collectAddonsFromBundle(options) {
|
|
|
39
39
|
for (const candidate of candidates) {
|
|
40
40
|
const result = await readAddonPackageJson({
|
|
41
41
|
packageJsonPath: candidate,
|
|
42
|
-
expectedName: pkgName
|
|
42
|
+
expectedName: pkgName
|
|
43
43
|
});
|
|
44
44
|
if (result.isAddon && result.addon) {
|
|
45
45
|
addons.push(result.addon);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AddonSourceKind, type NativeAddon } from
|
|
2
|
-
import { type MissingPrebuildIssue } from
|
|
3
|
-
import { type AbiIssue, type BareRuntimeResolution } from
|
|
1
|
+
import { type AddonSourceKind, type NativeAddon } from './addon-source';
|
|
2
|
+
import { type MissingPrebuildIssue } from './prebuilds';
|
|
3
|
+
import { type AbiIssue, type BareRuntimeResolution } from './abi';
|
|
4
4
|
export interface VerifyBundleOptions {
|
|
5
5
|
projectRoot: string;
|
|
6
6
|
addonsSource: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { promises as fsp } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { resolveConfigFileInProject, loadConfigFromPath
|
|
4
|
-
import { createCollectDiagnostics, formatAddonId
|
|
5
|
-
import { collectAddonsFromBundle, InvalidBundleSourceError
|
|
6
|
-
import { collectAddonsFromNodeModules, InvalidNodeModulesSourceError
|
|
7
|
-
import { checkPrebuilds
|
|
8
|
-
import { checkAbi, formatConfigLabel, normalizeVersion, resolveBareRuntime
|
|
3
|
+
import { resolveConfigFileInProject, loadConfigFromPath } from '../../client/config-loader/resolve-config.node.js';
|
|
4
|
+
import { createCollectDiagnostics, formatAddonId } from './addon-source.js';
|
|
5
|
+
import { collectAddonsFromBundle, InvalidBundleSourceError } from './bundle-source.js';
|
|
6
|
+
import { collectAddonsFromNodeModules, InvalidNodeModulesSourceError } from './node-modules-source.js';
|
|
7
|
+
import { checkPrebuilds } from './prebuilds.js';
|
|
8
|
+
import { checkAbi, formatConfigLabel, normalizeVersion, resolveBareRuntime } from './abi.js';
|
|
9
9
|
export async function verifyBundle(options) {
|
|
10
10
|
const { projectRoot, addonsSource, hosts, bareRuntimeVersion, configPath } = options;
|
|
11
11
|
const resolvedAddonsSource = path.isAbsolute(addonsSource)
|
|
@@ -47,7 +47,7 @@ export async function verifyBundle(options) {
|
|
|
47
47
|
resolvedConfigPath = await resolveConfigFileInProject(projectRoot, configPath ?? undefined);
|
|
48
48
|
if (resolvedConfigPath !== null) {
|
|
49
49
|
const config = await loadConfigFromPath(resolvedConfigPath);
|
|
50
|
-
if (typeof config.bareRuntimeVersion ===
|
|
50
|
+
if (typeof config.bareRuntimeVersion === 'string') {
|
|
51
51
|
configRuntimeVersion = config.bareRuntimeVersion;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -121,16 +121,17 @@ export async function verifyBundle(options) {
|
|
|
121
121
|
const diagnostics = createCollectDiagnostics();
|
|
122
122
|
let addons;
|
|
123
123
|
try {
|
|
124
|
-
addons =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
addons =
|
|
125
|
+
sourceKind === 'bare-pack-bundle'
|
|
126
|
+
? await collectAddonsFromBundle({
|
|
127
|
+
bundlePath: resolvedAddonsSource,
|
|
128
|
+
projectRoot,
|
|
129
|
+
diagnostics
|
|
130
|
+
})
|
|
131
|
+
: await collectAddonsFromNodeModules({
|
|
132
|
+
nodeModulesRoot: resolvedAddonsSource,
|
|
133
|
+
diagnostics
|
|
134
|
+
});
|
|
134
135
|
}
|
|
135
136
|
catch (error) {
|
|
136
137
|
if (error instanceof InvalidBundleSourceError ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CollectDiagnostics, type NativeAddon } from
|
|
1
|
+
import { type CollectDiagnostics, type NativeAddon } from './addon-source';
|
|
2
2
|
export declare class InvalidNodeModulesSourceError extends Error {
|
|
3
3
|
nodeModulesPath: string;
|
|
4
4
|
constructor(nodeModulesPath: string, cause: unknown);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { promises as fsp } from
|
|
2
|
-
import path from
|
|
3
|
-
import { deduplicateAddons, readAddonPackageJson
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { deduplicateAddons, readAddonPackageJson } from './addon-source.js';
|
|
4
4
|
export class InvalidNodeModulesSourceError extends Error {
|
|
5
5
|
nodeModulesPath;
|
|
6
6
|
constructor(nodeModulesPath, cause) {
|
|
7
7
|
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
8
8
|
super(`node_modules at ${nodeModulesPath} could not be read.\n\n` +
|
|
9
9
|
` Reason: ${reason}\n\n` +
|
|
10
|
-
|
|
11
|
-
this.name =
|
|
10
|
+
' Run `npm install` before invoking verifyBundle against a node_modules tree.');
|
|
11
|
+
this.name = 'InvalidNodeModulesSourceError';
|
|
12
12
|
this.nodeModulesPath = nodeModulesPath;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -29,11 +29,11 @@ async function walkNodeModules(nodeModulesDir, addons, diagnostics, isRoot) {
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
for (const entry of entries) {
|
|
32
|
-
if (entry.name.startsWith(
|
|
32
|
+
if (entry.name.startsWith('.'))
|
|
33
33
|
continue;
|
|
34
34
|
if (!isPackageEntry(entry))
|
|
35
35
|
continue;
|
|
36
|
-
if (entry.name.startsWith(
|
|
36
|
+
if (entry.name.startsWith('@')) {
|
|
37
37
|
await walkScopeDirectory(path.join(nodeModulesDir, entry.name), addons, diagnostics);
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ async function walkScopeDirectory(scopeDir, addons, diagnostics) {
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
for (const entry of entries) {
|
|
53
|
-
if (entry.name.startsWith(
|
|
53
|
+
if (entry.name.startsWith('.'))
|
|
54
54
|
continue;
|
|
55
55
|
if (!isPackageEntry(entry))
|
|
56
56
|
continue;
|
|
@@ -62,8 +62,8 @@ function isPackageEntry(entry) {
|
|
|
62
62
|
}
|
|
63
63
|
async function visitPackageDirectory(packageDir, packageName, addons, diagnostics) {
|
|
64
64
|
const result = await readAddonPackageJson({
|
|
65
|
-
packageJsonPath: path.join(packageDir,
|
|
66
|
-
expectedName: packageName
|
|
65
|
+
packageJsonPath: path.join(packageDir, 'package.json'),
|
|
66
|
+
expectedName: packageName
|
|
67
67
|
});
|
|
68
68
|
if (result.isAddon && result.addon) {
|
|
69
69
|
addons.push(result.addon);
|
|
@@ -71,6 +71,6 @@ async function visitPackageDirectory(packageDir, packageName, addons, diagnostic
|
|
|
71
71
|
else if (result.invalid !== undefined && diagnostics !== undefined) {
|
|
72
72
|
diagnostics.invalidPackageJsons.push(result.invalid);
|
|
73
73
|
}
|
|
74
|
-
const nestedNodeModules = path.join(packageDir,
|
|
74
|
+
const nestedNodeModules = path.join(packageDir, 'node_modules');
|
|
75
75
|
await walkNodeModules(nestedNodeModules, addons, diagnostics, false);
|
|
76
76
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type NativeAddon } from
|
|
1
|
+
import { type NativeAddon } from './addon-source';
|
|
2
2
|
export interface MissingPrebuildIssue {
|
|
3
|
-
code:
|
|
4
|
-
level:
|
|
3
|
+
code: 'missing-prebuild';
|
|
4
|
+
level: 'error';
|
|
5
5
|
addon: string;
|
|
6
6
|
host: string;
|
|
7
7
|
message: string;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { promises as fsp } from
|
|
2
|
-
import path from
|
|
3
|
-
import { formatAddonId } from
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { formatAddonId } from './addon-source.js';
|
|
4
4
|
export async function checkPrebuilds(options) {
|
|
5
5
|
const { addon, hosts } = options;
|
|
6
6
|
const issues = [];
|
|
7
7
|
for (const host of hosts) {
|
|
8
|
-
const hostDir = path.join(addon.packageRoot,
|
|
8
|
+
const hostDir = path.join(addon.packageRoot, 'prebuilds', host);
|
|
9
9
|
const present = await hasBarePrebuild(hostDir);
|
|
10
10
|
if (!present) {
|
|
11
11
|
issues.push({
|
|
12
|
-
code:
|
|
13
|
-
level:
|
|
12
|
+
code: 'missing-prebuild',
|
|
13
|
+
level: 'error',
|
|
14
14
|
addon: formatAddonId(addon),
|
|
15
15
|
host,
|
|
16
16
|
packageRoot: addon.packageRoot,
|
|
17
17
|
message: `${formatAddonId(addon)} is missing a prebuild for ${host} ` +
|
|
18
|
-
`(expected ${path.join(hostDir,
|
|
18
|
+
`(expected ${path.join(hostDir, '*.bare')}).`
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -32,7 +32,7 @@ async function hasBarePrebuild(hostDir) {
|
|
|
32
32
|
for (const entry of entries) {
|
|
33
33
|
if (!entry.isFile() && !entry.isSymbolicLink())
|
|
34
34
|
continue;
|
|
35
|
-
if (entry.name.endsWith(
|
|
35
|
+
if (entry.name.endsWith('.bare'))
|
|
36
36
|
return true;
|
|
37
37
|
}
|
|
38
38
|
return false;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS
|
|
1
|
+
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS } from '@qvac/decoder-audio/constants';
|
|
2
2
|
//# sourceMappingURL=audio.d.ts.map
|
package/dist/constants/audio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS
|
|
1
|
+
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS } from '@qvac/decoder-audio/constants.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './audio';
|
|
2
|
+
export * from './registry';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/constants/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './audio.js';
|
|
2
|
+
export * from './registry.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEFAULT_REGISTRY_CORE_KEY =
|
|
1
|
+
export const DEFAULT_REGISTRY_CORE_KEY = 'uf1fm44uzockp6azhcdiqt1esjgm65fwtimsh946e8kwysdes9ko';
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* with the MIC_DEVICE environment variable. On Windows, if no override
|
|
8
8
|
* is set, the first DirectShow audio device reported by ffmpeg is used.
|
|
9
9
|
*/
|
|
10
|
-
import { spawn, spawnSync } from
|
|
11
|
-
import { platform } from
|
|
10
|
+
import { spawn, spawnSync } from 'child_process';
|
|
11
|
+
import { platform } from 'os';
|
|
12
12
|
// Parses the DirectShow audio device list printed by:
|
|
13
13
|
// ffmpeg -hide_banner -f dshow -list_devices true -i dummy
|
|
14
14
|
// Output goes to stderr; ffmpeg always exits non-zero because `-i dummy`
|
|
@@ -30,25 +30,25 @@ import { platform } from "os";
|
|
|
30
30
|
// The newer format dropped the "DirectShow audio devices" header and tags
|
|
31
31
|
// each device line with `(audio)` or `(video)` instead.
|
|
32
32
|
export function listWindowsAudioDevices() {
|
|
33
|
-
const result = spawnSync(
|
|
34
|
-
const stderr = result.stderr ??
|
|
33
|
+
const result = spawnSync('ffmpeg', ['-hide_banner', '-f', 'dshow', '-list_devices', 'true', '-i', 'dummy'], { encoding: 'utf8' });
|
|
34
|
+
const stderr = result.stderr ?? '';
|
|
35
35
|
const devices = [];
|
|
36
36
|
let section = null;
|
|
37
37
|
for (const line of stderr.split(/\r?\n/)) {
|
|
38
38
|
// Old-format section headers.
|
|
39
|
-
if (line.includes(
|
|
40
|
-
section =
|
|
39
|
+
if (line.includes('DirectShow audio devices')) {
|
|
40
|
+
section = 'audio';
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
-
if (line.includes(
|
|
44
|
-
section =
|
|
43
|
+
if (line.includes('DirectShow video devices')) {
|
|
44
|
+
section = 'video';
|
|
45
45
|
continue;
|
|
46
46
|
}
|
|
47
47
|
// New-format per-line tag wins over the section state.
|
|
48
48
|
const hasAudioTag = /\(audio\)/.test(line);
|
|
49
49
|
const hasVideoTag = /\(video\)/.test(line);
|
|
50
|
-
const lineSection = hasAudioTag ?
|
|
51
|
-
if (lineSection !==
|
|
50
|
+
const lineSection = hasAudioTag ? 'audio' : hasVideoTag ? 'video' : section;
|
|
51
|
+
if (lineSection !== 'audio')
|
|
52
52
|
continue;
|
|
53
53
|
// First quoted token is the device name. Alternative-name lines start
|
|
54
54
|
// with `@device_...` and are filtered out.
|
|
@@ -56,7 +56,7 @@ export function listWindowsAudioDevices() {
|
|
|
56
56
|
if (!match)
|
|
57
57
|
continue;
|
|
58
58
|
const name = match[1];
|
|
59
|
-
if (!name || name.startsWith(
|
|
59
|
+
if (!name || name.startsWith('@device'))
|
|
60
60
|
continue;
|
|
61
61
|
devices.push(name);
|
|
62
62
|
}
|
|
@@ -64,48 +64,48 @@ export function listWindowsAudioDevices() {
|
|
|
64
64
|
}
|
|
65
65
|
export function getAudioInputArgs() {
|
|
66
66
|
const env = process.env;
|
|
67
|
-
const override = env[
|
|
67
|
+
const override = env['MIC_DEVICE'];
|
|
68
68
|
switch (platform()) {
|
|
69
|
-
case
|
|
69
|
+
case 'darwin':
|
|
70
70
|
// AVFoundation device spec is `<video>:<audio>`. `:0` = default audio.
|
|
71
71
|
// Override with e.g. MIC_DEVICE=":1" to pick another device, or run
|
|
72
72
|
// `ffmpeg -f avfoundation -list_devices true -i ""` to enumerate.
|
|
73
|
-
return [
|
|
74
|
-
case
|
|
73
|
+
return ['-f', 'avfoundation', '-i', override ?? ':0'];
|
|
74
|
+
case 'linux':
|
|
75
75
|
// PulseAudio source name. `default` follows the system default mic.
|
|
76
76
|
// Override with MIC_DEVICE="alsa_input.pci-..." etc.; list with
|
|
77
77
|
// `pactl list short sources`.
|
|
78
|
-
return [
|
|
79
|
-
case
|
|
78
|
+
return ['-f', 'pulse', '-i', override ?? 'default'];
|
|
79
|
+
case 'win32': {
|
|
80
80
|
if (override)
|
|
81
|
-
return [
|
|
81
|
+
return ['-f', 'dshow', '-i', `audio=${override}`];
|
|
82
82
|
const devices = listWindowsAudioDevices();
|
|
83
83
|
const deviceName = devices[0];
|
|
84
84
|
if (!deviceName) {
|
|
85
|
-
throw new Error(
|
|
86
|
-
|
|
85
|
+
throw new Error('No Windows audio input device found. List devices with:\n' +
|
|
86
|
+
' ffmpeg -hide_banner -f dshow -list_devices true -i dummy\n' +
|
|
87
87
|
'Then set MIC_DEVICE="Your Device Name" and retry.');
|
|
88
88
|
}
|
|
89
|
-
return [
|
|
89
|
+
return ['-f', 'dshow', '-i', `audio=${deviceName}`];
|
|
90
90
|
}
|
|
91
91
|
default:
|
|
92
92
|
throw new Error(`Unsupported platform: ${platform()}`);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
export function startMicrophone(options) {
|
|
96
|
-
const formatArgs = options.format ===
|
|
97
|
-
? [
|
|
98
|
-
: [
|
|
99
|
-
const ffmpeg = spawn(
|
|
96
|
+
const formatArgs = options.format === 'f32le'
|
|
97
|
+
? ['-sample_fmt', 'flt', '-f', 'f32le']
|
|
98
|
+
: ['-sample_fmt', 's16', '-f', 's16le'];
|
|
99
|
+
const ffmpeg = spawn('ffmpeg', [
|
|
100
100
|
...getAudioInputArgs(),
|
|
101
|
-
|
|
101
|
+
'-ar',
|
|
102
102
|
String(options.sampleRate),
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
'-ac',
|
|
104
|
+
'1',
|
|
105
105
|
...formatArgs,
|
|
106
|
-
|
|
107
|
-
], { stdio: [
|
|
106
|
+
'pipe:1'
|
|
107
|
+
], { stdio: ['ignore', 'pipe', 'ignore'] });
|
|
108
108
|
if (!ffmpeg.stdout)
|
|
109
|
-
throw new Error(
|
|
109
|
+
throw new Error('Failed to open microphone');
|
|
110
110
|
return ffmpeg;
|
|
111
111
|
}
|