@qvac/sdk 0.15.0 → 0.17.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 +87 -84
- package/README.md +65 -0
- package/dist/client/api/audio-gen-result.d.ts +4 -0
- package/dist/client/api/audio-gen-result.js +132 -0
- package/dist/client/api/audio-gen.d.ts +29 -0
- package/dist/client/api/audio-gen.js +31 -0
- package/dist/client/api/batch-completion.d.ts +2 -2
- package/dist/client/api/batch-completion.js +2 -2
- package/dist/client/api/bci-transcribe.d.ts +1 -1
- package/dist/client/api/bci-transcribe.js +3 -3
- package/dist/client/api/cancel.d.ts +1 -1
- package/dist/client/api/cancel.js +1 -1
- package/dist/client/api/classify.d.ts +1 -1
- package/dist/client/api/classify.js +1 -1
- package/dist/client/api/completion-stream.d.ts +3 -3
- package/dist/client/api/completion-stream.js +3 -3
- package/dist/client/api/delete-cache.js +1 -1
- package/dist/client/api/diffusion.d.ts +1 -1
- package/dist/client/api/diffusion.js +1 -1
- package/dist/client/api/download-asset.d.ts +1 -1
- package/dist/client/api/download-asset.js +3 -3
- package/dist/client/api/embed.d.ts +1 -1
- package/dist/client/api/embed.js +2 -2
- package/dist/client/api/finetune.d.ts +1 -1
- package/dist/client/api/finetune.js +2 -2
- package/dist/client/api/get-loaded-model-info.d.ts +2 -2
- package/dist/client/api/get-loaded-model-info.js +1 -1
- package/dist/client/api/get-model-info.d.ts +2 -2
- package/dist/client/api/get-model-info.js +1 -1
- package/dist/client/api/get-system-resources.d.ts +3 -0
- package/dist/client/api/get-system-resources.js +16 -0
- package/dist/client/api/heartbeat.d.ts +2 -2
- package/dist/client/api/heartbeat.js +1 -1
- package/dist/client/api/index.d.ts +35 -33
- package/dist/client/api/index.js +2 -0
- package/dist/client/api/invoke-plugin.d.ts +1 -1
- package/dist/client/api/invoke-plugin.js +1 -1
- package/dist/client/api/load-model.d.ts +2 -2
- package/dist/client/api/load-model.js +4 -4
- package/dist/client/api/logging-stream.d.ts +1 -1
- package/dist/client/api/logging-stream.js +1 -1
- package/dist/client/api/ocr.d.ts +10 -1
- package/dist/client/api/ocr.js +10 -1
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +1 -1
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +2 -2
- package/dist/client/api/registry.d.ts +1 -1
- package/dist/client/api/registry.js +1 -1
- package/dist/client/api/resume.js +1 -1
- package/dist/client/api/state.d.ts +1 -1
- package/dist/client/api/state.js +1 -1
- package/dist/client/api/stop-provider.js +1 -1
- package/dist/client/api/subscribe-logs.d.ts +1 -1
- package/dist/client/api/suspend.js +1 -1
- package/dist/client/api/text-to-speech.d.ts +3 -2
- package/dist/client/api/text-to-speech.js +31 -9
- package/dist/client/api/transcribe.d.ts +1 -1
- package/dist/client/api/transcribe.js +2 -2
- package/dist/client/api/translate.d.ts +1 -1
- package/dist/client/api/translate.js +7 -18
- package/dist/client/api/unload-model.d.ts +1 -1
- package/dist/client/api/unload-model.js +2 -2
- package/dist/client/api/upscale.d.ts +1 -1
- package/dist/client/api/upscale.js +1 -1
- package/dist/client/api/video.d.ts +8 -5
- package/dist/client/api/video.js +9 -6
- package/dist/client/api/vla.d.ts +15 -11
- package/dist/client/api/vla.js +14 -10
- package/dist/client/config-loader/config-utils.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.bare.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.expo.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.node.d.ts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/init-hooks.d.ts +1 -1
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/plugins-factory.d.ts +2 -2
- package/dist/client/plugins-factory.js +1 -1
- package/dist/client/rpc/bare-client.d.ts +1 -1
- package/dist/client/rpc/bare-client.js +3 -3
- package/dist/client/rpc/expo-rpc-client.js +3 -3
- package/dist/client/rpc/node-rpc-client.js +2 -2
- package/dist/client/rpc/profiling/index.d.ts +1 -1
- package/dist/client/rpc/profiling/profiler.d.ts +2 -2
- package/dist/client/rpc/profiling/profiler.js +4 -0
- package/dist/client/rpc/rpc-client.d.ts +1 -1
- package/dist/client/rpc/rpc-client.js +7 -4
- package/dist/client/rpc/rpc-error.d.ts +1 -1
- package/dist/client/rpc/rpc-error.js +7 -1
- package/dist/commands/bundle/bare-pack.d.ts +1 -1
- package/dist/commands/bundle/constants.js +1 -0
- package/dist/commands/bundle/entry-gen.js +1 -1
- package/dist/commands/bundle/index.js +6 -6
- package/dist/commands/bundle/manifest.d.ts +1 -1
- package/dist/commands/bundle/plugins.d.ts +2 -2
- package/dist/commands/bundle/plugins.js +1 -1
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +2 -2
- package/dist/commands/verify/abi.d.ts +1 -1
- package/dist/commands/verify/abi.js +1 -1
- package/dist/commands/verify/bundle-source.d.ts +1 -1
- package/dist/commands/verify/bundle-source.js +2 -2
- package/dist/commands/verify/index.d.ts +3 -3
- package/dist/commands/verify/index.js +5 -5
- package/dist/commands/verify/node-modules-source.d.ts +1 -1
- package/dist/commands/verify/node-modules-source.js +1 -1
- package/dist/commands/verify/prebuilds.d.ts +2 -1
- package/dist/commands/verify/prebuilds.js +8 -11
- package/dist/commands/verify/resource-collectors.d.ts +88 -0
- package/dist/commands/verify/resource-collectors.js +261 -0
- package/dist/constants/audio.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/examples/{transcription → asr}/parakeet-ctc-filesystem.js +2 -3
- package/dist/examples/{transcription → asr}/parakeet-microphone-record.js +2 -2
- package/dist/examples/{transcription → asr}/parakeet-microphone-stream.js +2 -2
- package/dist/examples/{transcription → asr}/parakeet-sortformer-streaming.js +2 -2
- package/dist/examples/{transcription → asr}/parakeet-sortformer.js +1 -1
- package/dist/examples/asr/parakeet-tdt-filesystem-chunked.d.ts +2 -0
- package/dist/examples/asr/parakeet-tdt-filesystem-chunked.js +203 -0
- package/dist/examples/{transcription → asr}/parakeet-tdt-filesystem.js +2 -2
- package/dist/examples/{transcription → asr}/whispercpp-filesystem-streaming.js +1 -1
- package/dist/examples/{transcription → asr}/whispercpp-filesystem.js +1 -1
- package/dist/examples/{transcription → asr}/whispercpp-microphone-conversation.js +1 -1
- package/dist/examples/{transcription → asr}/whispercpp-microphone-record.js +2 -2
- package/dist/examples/{transcription → asr}/whispercpp-prompt.js +1 -1
- package/dist/examples/audiogen/generate-music.d.ts +2 -0
- package/dist/examples/audiogen/generate-music.js +112 -0
- package/dist/examples/cache-management.js +1 -1
- package/dist/examples/config-reload.js +1 -1
- package/dist/examples/diffusion-ideogram.d.ts +2 -0
- package/dist/examples/diffusion-ideogram.js +108 -0
- package/dist/examples/diffusion-img2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-img2vid-ltx.js +98 -0
- package/dist/examples/diffusion-txt2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-txt2vid-ltx.js +92 -0
- package/dist/examples/diffusion-txt2vid-wan22.d.ts +2 -0
- package/dist/examples/diffusion-txt2vid-wan22.js +96 -0
- package/dist/examples/logging-streaming.js +5 -1
- package/dist/examples/quickstart.bare.js +1 -1
- package/dist/examples/rag/rag-mongodb.d.ts +2 -0
- package/dist/examples/rag/rag-mongodb.js +180 -0
- package/dist/examples/tools/llamacpp-tools-auto-dialect.d.ts +2 -0
- package/dist/examples/tools/llamacpp-tools-auto-dialect.js +77 -0
- package/dist/examples/tts/parler.d.ts +2 -0
- package/dist/examples/tts/parler.js +51 -0
- package/dist/examples/vla-groot.d.ts +2 -0
- package/dist/examples/vla-groot.js +120 -0
- package/dist/examples/voice-assistant/voice-assistant.js +2 -2
- package/dist/expo/plugins/index.d.ts +11 -11
- package/dist/expo/plugins/withDeviceInfo.js +2 -2
- package/dist/expo/plugins/withMobileBundle.js +3 -3
- package/dist/index.d.ts +16 -16
- package/dist/index.js +4 -4
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/base-logger.d.ts +1 -1
- package/dist/logging/base-logger.js +1 -1
- package/dist/logging/client-logger.d.ts +1 -1
- package/dist/logging/index.d.ts +9 -9
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/namespaces.d.ts +1 -1
- package/dist/logging/registry.d.ts +1 -1
- package/dist/logging/server-logger.d.ts +1 -1
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/transport.d.ts +1 -1
- package/dist/logging/utils.d.ts +1 -1
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/models.d.ts +6443 -9832
- package/dist/models/registry/models.js +4076 -7658
- package/dist/models/update-models/codegen.d.ts +1 -1
- package/dist/models/update-models/companions.d.ts +1 -1
- package/dist/models/update-models/history.d.ts +1 -1
- package/dist/models/update-models/history.js +4 -4
- package/dist/models/update-models/naming.d.ts +1 -1
- package/dist/models/update-models/naming.js +12 -2
- package/dist/models/update-models/processing.d.ts +1 -1
- package/dist/models/update-models/processing.js +1 -1
- package/dist/models/update-models/registry.d.ts +2 -2
- package/dist/models/update-models/shards.d.ts +1 -1
- package/dist/models/update-models/types.d.ts +1 -1
- package/dist/pear/pre.js +2 -0
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/backend-diagnostics.d.ts +8 -0
- package/dist/profiling/backend-diagnostics.js +21 -0
- package/dist/profiling/controller.d.ts +4 -2
- package/dist/profiling/controller.js +8 -0
- package/dist/profiling/envelope.d.ts +3 -2
- package/dist/profiling/envelope.js +13 -2
- package/dist/profiling/events.d.ts +2 -2
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/index.d.ts +9 -8
- package/dist/profiling/index.js +3 -2
- package/dist/profiling/types.d.ts +6 -0
- package/dist/schemas/audio-gen.d.ts +253 -0
- package/dist/schemas/audio-gen.js +69 -0
- package/dist/schemas/batch-completion-stream.d.ts +11 -6
- package/dist/schemas/bci-config.d.ts +2 -0
- package/dist/schemas/bci.d.ts +1 -1
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/common.d.ts +1938 -58
- package/dist/schemas/common.js +9 -1
- package/dist/schemas/completion-event.d.ts +5 -2
- package/dist/schemas/completion-event.js +3 -0
- package/dist/schemas/completion-stream.d.ts +195 -3
- package/dist/schemas/completion-stream.js +72 -2
- package/dist/schemas/constants-registry.d.ts +69 -0
- package/dist/schemas/constants-registry.js +52 -0
- package/dist/schemas/delete-cache.js +7 -3
- package/dist/schemas/download-asset.d.ts +8 -4
- package/dist/schemas/engine-addon-map.d.ts +3 -1
- package/dist/schemas/engine-addon-map.js +6 -2
- package/dist/schemas/finetune.js +6 -3
- package/dist/schemas/get-loaded-model-info.d.ts +18 -0
- package/dist/schemas/get-loaded-model-info.js +14 -6
- package/dist/schemas/get-model-info.d.ts +2 -0
- package/dist/schemas/get-model-info.js +1 -0
- package/dist/schemas/index.d.ts +53 -51
- package/dist/schemas/index.js +4 -2
- package/dist/schemas/llamacpp-config.d.ts +30 -6
- package/dist/schemas/llamacpp-config.js +1 -6
- package/dist/schemas/load-model.d.ts +7654 -2919
- package/dist/schemas/load-model.js +45 -6
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +19 -1
- package/dist/schemas/model-types.js +11 -0
- package/dist/schemas/ocr.d.ts +2 -0
- package/dist/schemas/plugin.d.ts +17 -8
- package/dist/schemas/plugin.js +16 -6
- package/dist/schemas/profiling.d.ts +587 -0
- package/dist/schemas/profiling.js +22 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +10 -2
- package/dist/schemas/reload-config.js +3 -1
- package/dist/schemas/sdcpp-config.d.ts +296 -0
- package/dist/schemas/sdcpp-config.js +165 -17
- package/dist/schemas/sdk-config.d.ts +958 -40
- package/dist/schemas/sdk-errors-server.js +3 -1
- package/dist/schemas/system-resources.d.ts +3967 -0
- package/dist/schemas/system-resources.js +149 -0
- package/dist/schemas/text-to-speech.d.ts +340 -6
- package/dist/schemas/text-to-speech.js +136 -17
- package/dist/schemas/tools.d.ts +1 -1
- package/dist/schemas/tools.js +2 -1
- package/dist/schemas/transcription-config.d.ts +2 -0
- package/dist/schemas/translate.d.ts +2 -2
- package/dist/schemas/translate.js +12 -6
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/schemas/vla.d.ts +10 -0
- package/dist/schemas/vla.js +31 -11
- package/dist/scripts/check-resource-collectors-packaging.d.ts +33 -0
- package/dist/scripts/check-resource-collectors-packaging.js +136 -0
- package/dist/scripts/contract/build-contract.d.ts +38 -0
- package/dist/scripts/contract/build-contract.js +620 -0
- package/dist/scripts/contract/build-error-codes.d.ts +17 -0
- package/dist/scripts/contract/build-error-codes.js +17 -0
- package/dist/scripts/contract/build-model-type-maps.d.ts +22 -0
- package/dist/scripts/contract/build-model-type-maps.js +16 -0
- package/dist/scripts/contract/build-models-registry.d.ts +17 -0
- package/dist/scripts/contract/build-models-registry.js +31 -0
- package/dist/scripts/contract/plugin-contract.d.ts +23 -0
- package/dist/scripts/contract/plugin-contract.js +28 -0
- package/dist/scripts/export-contract.d.ts +2 -0
- package/dist/scripts/export-contract.js +27 -0
- package/dist/scripts/export-plugin-contract.d.ts +2 -0
- package/dist/scripts/export-plugin-contract.js +18 -0
- package/dist/server/bare/delegate-rpc-client.d.ts +1 -1
- package/dist/server/bare/delegate-rpc-client.js +3 -3
- package/dist/server/bare/hyperswarm.d.ts +1 -1
- package/dist/server/bare/hyperswarm.js +2 -2
- package/dist/server/bare/ops/bci-transcribe.d.ts +1 -1
- package/dist/server/bare/ops/bci-transcribe.js +4 -4
- package/dist/server/bare/ops/cancel.d.ts +2 -2
- package/dist/server/bare/ops/cancel.js +2 -2
- package/dist/server/bare/ops/embed.d.ts +1 -1
- package/dist/server/bare/ops/embed.js +3 -3
- package/dist/server/bare/ops/kv-cache-retention.d.ts +12 -0
- package/dist/server/bare/ops/kv-cache-retention.js +121 -0
- package/dist/server/bare/ops/kv-cache-utils.d.ts +2 -1
- package/dist/server/bare/ops/kv-cache-utils.js +26 -5
- package/dist/server/bare/ops/load-model.d.ts +2 -2
- package/dist/server/bare/ops/load-model.js +7 -5
- package/dist/server/bare/ops/transcribe.d.ts +2 -2
- package/dist/server/bare/ops/transcribe.js +20 -40
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +21 -12
- package/dist/server/bare/ops/unload-model.d.ts +1 -1
- package/dist/server/bare/ops/unload-model.js +5 -5
- package/dist/server/bare/plugins/asr-ggml/config.d.ts +32 -0
- package/dist/server/bare/plugins/asr-ggml/config.js +46 -0
- package/dist/server/bare/plugins/asr-ggml/logging.d.ts +11 -0
- package/dist/server/bare/plugins/asr-ggml/logging.js +12 -0
- package/dist/server/bare/plugins/audiogen-ggml/config.d.ts +18 -0
- package/dist/server/bare/plugins/audiogen-ggml/config.js +23 -0
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-stream.d.ts +3 -0
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-stream.js +162 -0
- package/dist/server/bare/plugins/audiogen-ggml/plugin.d.ts +213 -0
- package/dist/server/bare/plugins/audiogen-ggml/plugin.js +58 -0
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +8 -5
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +4 -4
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +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 +1 -1
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +2 -2
- package/dist/server/bare/plugins/ggml-classification/plugin.js +1 -1
- 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 +2 -2
- package/dist/server/bare/plugins/ggml-ocr/plugin.d.ts +4 -2
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +4 -25
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.d.ts +6 -0
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.js +73 -0
- 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 +1 -1
- 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 +1 -1
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +8 -3
- package/dist/server/bare/plugins/ggml-vla/plugin.js +1 -1
- package/dist/server/bare/plugins/index.d.ts +12 -11
- package/dist/server/bare/plugins/index.js +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.d.ts +3 -3
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +5 -5
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +11 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +16 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +3 -3
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +26 -35
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +3 -3
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +20 -10
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +217 -80
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +8 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +8 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +20 -8
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +16 -16
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +8 -3
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +5 -5
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +12 -2
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +3 -3
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.d.ts +1 -1
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +6 -6
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +13 -20
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +4 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +40 -5
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +155 -5
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +109 -23
- package/dist/server/bare/plugins/tts-ggml/ops/parler-options.d.ts +7 -0
- package/dist/server/bare/plugins/tts-ggml/ops/parler-options.js +30 -0
- 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 +8 -5
- 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 +16 -22
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +120 -5
- package/dist/server/bare/plugins/tts-ggml/plugin.js +63 -5
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +8 -6
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +17 -25
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +2 -2
- 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 +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +2 -2
- 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 +1 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +4 -4
- package/dist/server/bare/registry/config-registry.d.ts +1 -1
- package/dist/server/bare/registry/config-registry.js +1 -1
- package/dist/server/bare/registry/model-config-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-config-registry.js +4 -4
- package/dist/server/bare/registry/model-config-utils.d.ts +1 -1
- package/dist/server/bare/registry/model-config-utils.js +3 -0
- package/dist/server/bare/registry/model-registry.d.ts +15 -4
- package/dist/server/bare/registry/registry-client.js +2 -2
- package/dist/server/bare/registry/runtime-context-registry.d.ts +1 -1
- package/dist/server/bare/resources/collector.d.ts +644 -0
- package/dist/server/bare/resources/collector.js +226 -0
- package/dist/server/bare/resources/native.d.ts +3 -0
- package/dist/server/bare/resources/native.js +35 -0
- package/dist/server/bare/resources/normalize.d.ts +13 -0
- package/dist/server/bare/resources/normalize.js +73 -0
- package/dist/server/bare/resources/types.d.ts +66 -0
- package/dist/server/bare/resources/types.js +1 -0
- package/dist/server/bare/resources/worker-collector.d.ts +5 -0
- package/dist/server/bare/resources/worker-collector.js +15 -0
- 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 +2 -2
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.js +11 -1
- package/dist/server/bare/runtime/request-registry.d.ts +2 -2
- package/dist/server/bare/runtime/request-registry.js +1 -1
- package/dist/server/bare/runtime/with-request-context.d.ts +1 -1
- package/dist/server/bare/runtime-lifecycle.d.ts +1 -1
- package/dist/server/bare/types/addon-responses.d.ts +8 -34
- package/dist/server/bare/utils/asr-events.d.ts +15 -0
- package/dist/server/bare/utils/asr-events.js +30 -0
- package/dist/server/bare/utils/audio-input.d.ts +1 -1
- package/dist/server/bare/utils/audio-input.js +1 -1
- package/dist/server/bare/utils/transcribe-metadata.d.ts +1 -1
- package/dist/server/bare/utils/tts-stats.d.ts +9 -5
- package/dist/server/bare/utils/tts-stats.js +6 -0
- package/dist/server/error-handlers.d.ts +1 -1
- package/dist/server/plugins/index.d.ts +1 -1
- package/dist/server/plugins/registry.d.ts +1 -1
- package/dist/server/plugins/registry.js +35 -8
- package/dist/server/rpc/create-server.js +23 -1
- package/dist/server/rpc/delegate-transport.d.ts +2 -2
- package/dist/server/rpc/delegate-transport.js +5 -10
- package/dist/server/rpc/handle-request.js +3 -3
- package/dist/server/rpc/handler-registry.d.ts +1 -1
- package/dist/server/rpc/handler-registry.js +45 -36
- package/dist/server/rpc/handler-selection.d.ts +2 -2
- package/dist/server/rpc/handler-utils.d.ts +2 -2
- package/dist/server/rpc/handler-utils.js +5 -5
- package/dist/server/rpc/handlers/audio-gen-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/audio-gen-stream.js +4 -0
- package/dist/server/rpc/handlers/batch-completion-stream.d.ts +3 -1
- package/dist/server/rpc/handlers/batch-completion-stream.js +1 -1
- package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe-stream.js +1 -1
- package/dist/server/rpc/handlers/bci-transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe.js +1 -1
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.js +3 -3
- package/dist/server/rpc/handlers/cancelHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/cancelHandler.js +3 -3
- package/dist/server/rpc/handlers/classify.d.ts +1 -1
- package/dist/server/rpc/handlers/classify.js +1 -1
- package/dist/server/rpc/handlers/completion-orchestrate.d.ts +42 -0
- package/dist/server/rpc/handlers/completion-orchestrate.js +190 -0
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/completion-stream-delegated.js +3 -3
- package/dist/server/rpc/handlers/completion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/completion-stream.js +1 -1
- package/dist/server/rpc/handlers/delete-cache.d.ts +1 -1
- package/dist/server/rpc/handlers/delete-cache.js +1 -1
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/diffusion-stream.js +1 -1
- package/dist/server/rpc/handlers/download-asset.d.ts +1 -1
- package/dist/server/rpc/handlers/download-asset.js +4 -4
- package/dist/server/rpc/handlers/embed.d.ts +1 -1
- package/dist/server/rpc/handlers/embed.js +1 -1
- package/dist/server/rpc/handlers/finetune.d.ts +1 -1
- package/dist/server/rpc/handlers/finetune.js +2 -2
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-loaded-model-info.js +10 -4
- package/dist/server/rpc/handlers/get-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-model-info.js +4 -4
- package/dist/server/rpc/handlers/get-system-resources.d.ts +3 -0
- package/dist/server/rpc/handlers/get-system-resources.js +53 -0
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/heartbeat-delegated.js +2 -2
- package/dist/server/rpc/handlers/heartbeat.d.ts +1 -1
- package/dist/server/rpc/handlers/index.d.ts +38 -32
- package/dist/server/rpc/handlers/index.js +6 -0
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/download-manager.js +1 -1
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/handler.js +12 -8
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/http.js +4 -4
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +5 -5
- package/dist/server/rpc/handlers/load-model/index.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +3 -3
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +4 -4
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +3 -3
- package/dist/server/rpc/handlers/load-model/registry-metadata.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/registry.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/registry.js +6 -6
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/resolve-session.js +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/resolve.js +2 -2
- package/dist/server/rpc/handlers/load-model/types.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model-delegated.js +3 -3
- package/dist/server/rpc/handlers/logging-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/logging-stream.js +1 -1
- package/dist/server/rpc/handlers/ocr-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/ocr-stream.js +1 -1
- package/dist/server/rpc/handlers/plugin-dispatch.js +3 -3
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +1 -1
- package/dist/server/rpc/handlers/plugin-invoke.js +3 -3
- package/dist/server/rpc/handlers/provideHandler/connection.js +1 -1
- package/dist/server/rpc/handlers/provideHandler/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/handler.js +1 -1
- package/dist/server/rpc/handlers/provideHandler/proxy.js +1 -1
- package/dist/server/rpc/handlers/provideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/rag.d.ts +1 -1
- package/dist/server/rpc/handlers/rag.js +4 -4
- package/dist/server/rpc/handlers/registry.d.ts +1 -1
- package/dist/server/rpc/handlers/registry.js +1 -1
- package/dist/server/rpc/handlers/resume.d.ts +1 -1
- package/dist/server/rpc/handlers/resume.js +1 -1
- package/dist/server/rpc/handlers/state.d.ts +1 -1
- package/dist/server/rpc/handlers/state.js +1 -1
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/stopProvideHandler.js +1 -1
- package/dist/server/rpc/handlers/suspend.d.ts +1 -1
- package/dist/server/rpc/handlers/suspend.js +1 -1
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech-stream.js +1 -1
- package/dist/server/rpc/handlers/text-to-speech.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech.js +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +1 -1
- package/dist/server/rpc/handlers/transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe.js +1 -1
- package/dist/server/rpc/handlers/translate.d.ts +1 -1
- package/dist/server/rpc/handlers/translate.js +1 -1
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model-delegated.js +5 -5
- package/dist/server/rpc/handlers/unload-model.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model.js +3 -3
- package/dist/server/rpc/handlers/upscale-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/upscale-stream.js +1 -1
- package/dist/server/rpc/handlers/video-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/video-stream.js +1 -1
- package/dist/server/rpc/index.d.ts +2 -2
- package/dist/server/rpc/method-shapes.d.ts +53 -0
- package/dist/server/rpc/method-shapes.js +50 -0
- package/dist/server/rpc/profiling/backend-diagnostics.d.ts +3 -0
- package/dist/server/rpc/profiling/backend-diagnostics.js +16 -0
- package/dist/server/rpc/profiling/context.d.ts +1 -1
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/index.d.ts +4 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +2 -2
- package/dist/server/rpc/profiling/operation-metrics.js +29 -1
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +51 -13
- package/dist/server/rpc/profiling/profiler.d.ts +2 -2
- package/dist/server/rpc/transport-selector.d.ts +1 -1
- package/dist/server/utils/archive.js +1 -1
- package/dist/server/utils/audio/decoder.d.ts +1 -1
- package/dist/server/utils/audio/decoder.js +1 -1
- package/dist/server/utils/cache/auto-history.d.ts +1 -1
- package/dist/server/utils/cache/auto-history.js +13 -9
- package/dist/server/utils/cache/paths.d.ts +1 -1
- package/dist/server/utils/cache/paths.js +6 -6
- package/dist/server/utils/checksum.d.ts +1 -1
- package/dist/server/utils/completion-normalizer.d.ts +2 -1
- package/dist/server/utils/completion-normalizer.js +31 -1
- package/dist/server/utils/config-transform.d.ts +1 -1
- package/dist/server/utils/config-transform.js +5 -7
- package/dist/server/utils/index.d.ts +11 -11
- package/dist/server/utils/path-security.d.ts +1 -1
- package/dist/server/utils/qvac-paths.js +1 -1
- package/dist/server/utils/response-format.d.ts +1 -1
- package/dist/server/utils/shard-utils.d.ts +1 -1
- package/dist/server/utils/tool-integration.d.ts +1 -1
- package/dist/server/utils/tool-integration.js +2 -2
- package/dist/server/utils/tools/dialect.d.ts +1 -1
- package/dist/server/utils/tools/dialect.js +2 -0
- package/dist/server/utils/tools/index.d.ts +2 -2
- package/dist/server/utils/tools/parser.d.ts +1 -1
- package/dist/server/utils/tools/parser.js +16 -8
- package/dist/server/utils/tools/parsers/dsml.d.ts +4 -0
- package/dist/server/utils/tools/parsers/dsml.js +176 -0
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +2 -2
- package/dist/server/utils/tools/parsers/gemma4native.js +1 -1
- package/dist/server/utils/tools/parsers/harmony.d.ts +2 -2
- package/dist/server/utils/tools/parsers/harmony.js +1 -1
- package/dist/server/utils/tools/parsers/hermes.d.ts +2 -2
- package/dist/server/utils/tools/parsers/hermes.js +1 -1
- package/dist/server/utils/tools/parsers/json.d.ts +2 -2
- package/dist/server/utils/tools/parsers/json.js +1 -1
- package/dist/server/utils/tools/parsers/pythonic.d.ts +2 -2
- package/dist/server/utils/tools/parsers/pythonic.js +1 -1
- package/dist/server/utils/tools/parsers/qwen35.d.ts +2 -2
- package/dist/server/utils/tools/parsers/qwen35.js +1 -1
- package/dist/server/utils/tools/shared.d.ts +1 -1
- package/dist/server/utils/worker-lock.js +1 -1
- package/dist/server/worker-core.js +14 -10
- package/dist/server/worker.js +4 -3
- package/dist/utils/aggregate-events.d.ts +2 -2
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/errors-client.d.ts +0 -3
- package/dist/utils/errors-client.js +0 -5
- package/dist/utils/errors-server.d.ts +1 -1
- package/dist/utils/mcp-adapter.d.ts +4 -4
- package/dist/utils/mcp-adapter.js +1 -1
- package/dist/utils/tool-helpers.d.ts +1 -1
- package/dist/utils/tool-helpers.js +1 -1
- package/docs/system-resources-support-matrix.md +103 -0
- package/package.json +37 -19
- /package/dist/examples/{transcription → asr}/parakeet-ctc-filesystem.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/parakeet-microphone-record.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/parakeet-microphone-stream.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/parakeet-sortformer-streaming.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/parakeet-sortformer.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/parakeet-tdt-filesystem.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/whispercpp-filesystem-streaming.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/whispercpp-filesystem.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/whispercpp-microphone-conversation.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/whispercpp-microphone-record.d.ts +0 -0
- /package/dist/examples/{transcription → asr}/whispercpp-prompt.d.ts +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import fs, { promises as fsp } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
|
-
import { DEFAULT_HOSTS, DEFAULT_SDK_NAME } from '
|
|
4
|
+
import { DEFAULT_HOSTS, DEFAULT_SDK_NAME } from '../../commands/bundle/constants.js';
|
|
5
5
|
import { CONFIG_CANDIDATES, resolveConfigForProject } from '../../client/config-loader/resolve-config.node.js';
|
|
6
6
|
import { getClientLogger } from '../../logging/index.js';
|
|
7
7
|
import { BareImportsMapNotFoundError } from '../../utils/errors-client.js';
|
|
8
|
-
import { resolvePluginSpecifiers, parseBuiltinSpecifier } from '
|
|
9
|
-
import { generateWorkerEntry } from '
|
|
10
|
-
import { runBarePack } from '
|
|
11
|
-
import { generateAddonsManifest } from '
|
|
12
|
-
import { createSdkImportResolver } from '
|
|
8
|
+
import { resolvePluginSpecifiers, parseBuiltinSpecifier } from '../../commands/bundle/plugins.js';
|
|
9
|
+
import { generateWorkerEntry } from '../../commands/bundle/entry-gen.js';
|
|
10
|
+
import { runBarePack } from '../../commands/bundle/bare-pack.js';
|
|
11
|
+
import { generateAddonsManifest } from '../../commands/bundle/manifest.js';
|
|
12
|
+
import { createSdkImportResolver } from '../../commands/bundle/resolve-sdk-import.js';
|
|
13
13
|
const require = createRequire(import.meta.url);
|
|
14
14
|
function resolveSdkPath(projectRoot, explicitSdkPath) {
|
|
15
15
|
if (explicitSdkPath) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Logger } from '../../logging/types';
|
|
2
|
-
import type { QvacConfig } from '../../schemas/sdk-config';
|
|
1
|
+
import type { Logger } from '../../logging/types.js';
|
|
2
|
+
import type { QvacConfig } from '../../schemas/sdk-config.js';
|
|
3
3
|
export declare function buildBuiltinSpecifier(sdkName: string, suffix: string): string;
|
|
4
4
|
export declare function parseBuiltinSpecifier(specifier: string, sdkName: string): {
|
|
5
5
|
suffix: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BUILTIN_PLUGINS, BUILTIN_SUFFIXES } from '
|
|
1
|
+
import { BUILTIN_PLUGINS, BUILTIN_SUFFIXES } from '../../commands/bundle/constants.js';
|
|
2
2
|
import { InvalidPluginSpecifierError } from '../../utils/errors-client.js';
|
|
3
3
|
export function buildBuiltinSpecifier(sdkName, suffix) {
|
|
4
4
|
return `${sdkName}/${suffix}/plugin`;
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { bundleSdk } from '
|
|
2
|
-
export type { BundleSdkOptions, BundleSdkResult } from '
|
|
3
|
-
export { verifyBundle, hasErrors, hasWarnings, formatVerifyBundleResult } from '
|
|
4
|
-
export type { VerifyBundleOptions, VerifyBundleResult, VerifyBundleIssue } from '
|
|
1
|
+
export { bundleSdk } from '../commands/bundle/index.js';
|
|
2
|
+
export type { BundleSdkOptions, BundleSdkResult } from '../commands/bundle/index.js';
|
|
3
|
+
export { verifyBundle, hasErrors, hasWarnings, formatVerifyBundleResult } from '../commands/verify/index.js';
|
|
4
|
+
export type { VerifyBundleOptions, VerifyBundleResult, VerifyBundleIssue } from '../commands/verify/index.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/commands/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { bundleSdk } from '
|
|
2
|
-
export { verifyBundle, hasErrors, hasWarnings, formatVerifyBundleResult } from '
|
|
1
|
+
export { bundleSdk } from '../commands/bundle/index.js';
|
|
2
|
+
export { verifyBundle, hasErrors, hasWarnings, formatVerifyBundleResult } from '../commands/verify/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { promises as fsp } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import semver from 'semver';
|
|
4
|
-
import { formatAddonId } from '
|
|
4
|
+
import { formatAddonId } from '../../commands/verify/addon-source.js';
|
|
5
5
|
const RUNTIME_PACKAGES = [
|
|
6
6
|
{ source: 'bare-runtime', packageName: 'bare-runtime' },
|
|
7
7
|
{ source: 'bare', packageName: 'bare' }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CollectDiagnostics, type NativeAddon } from '
|
|
1
|
+
import { type CollectDiagnostics, type NativeAddon } from '../../commands/verify/addon-source.js';
|
|
2
2
|
export declare class InvalidBundleSourceError extends Error {
|
|
3
3
|
bundlePath: string;
|
|
4
4
|
constructor(bundlePath: string, cause: unknown);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { promises as fsp } from 'node:fs';
|
|
2
|
-
import { buildNestedPathIndex, extractBarePackHeader, extractPackedString } from '
|
|
3
|
-
import { deduplicateAddons, readAddonPackageJson } from '
|
|
2
|
+
import { buildNestedPathIndex, extractBarePackHeader, extractPackedString } from '../../commands/bundle/manifest.js';
|
|
3
|
+
import { deduplicateAddons, readAddonPackageJson } from '../../commands/verify/addon-source.js';
|
|
4
4
|
export class InvalidBundleSourceError extends Error {
|
|
5
5
|
bundlePath;
|
|
6
6
|
constructor(bundlePath, cause) {
|
|
@@ -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 '../../commands/verify/addon-source.js';
|
|
2
|
+
import { type MissingPrebuildIssue } from '../../commands/verify/prebuilds.js';
|
|
3
|
+
import { type AbiIssue, type BareRuntimeResolution } from '../../commands/verify/abi.js';
|
|
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
3
|
import { resolveConfigFileInProject, loadConfigFromPath } from '../../client/config-loader/resolve-config.node.js';
|
|
4
|
-
import { createCollectDiagnostics, formatAddonId } from '
|
|
5
|
-
import { collectAddonsFromBundle, InvalidBundleSourceError } from '
|
|
6
|
-
import { collectAddonsFromNodeModules, InvalidNodeModulesSourceError } from '
|
|
7
|
-
import { checkPrebuilds } from '
|
|
8
|
-
import { checkAbi, formatConfigLabel, normalizeVersion, resolveBareRuntime } from '
|
|
4
|
+
import { createCollectDiagnostics, formatAddonId } from '../../commands/verify/addon-source.js';
|
|
5
|
+
import { collectAddonsFromBundle, InvalidBundleSourceError } from '../../commands/verify/bundle-source.js';
|
|
6
|
+
import { collectAddonsFromNodeModules, InvalidNodeModulesSourceError } from '../../commands/verify/node-modules-source.js';
|
|
7
|
+
import { checkPrebuilds } from '../../commands/verify/prebuilds.js';
|
|
8
|
+
import { checkAbi, formatConfigLabel, normalizeVersion, resolveBareRuntime } from '../../commands/verify/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)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CollectDiagnostics, type NativeAddon } from '
|
|
1
|
+
import { type CollectDiagnostics, type NativeAddon } from '../../commands/verify/addon-source.js';
|
|
2
2
|
export declare class InvalidNodeModulesSourceError extends Error {
|
|
3
3
|
nodeModulesPath: string;
|
|
4
4
|
constructor(nodeModulesPath: string, cause: unknown);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { promises as fsp } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { deduplicateAddons, readAddonPackageJson } from '
|
|
3
|
+
import { deduplicateAddons, readAddonPackageJson } from '../../commands/verify/addon-source.js';
|
|
4
4
|
export class InvalidNodeModulesSourceError extends Error {
|
|
5
5
|
nodeModulesPath;
|
|
6
6
|
constructor(nodeModulesPath, cause) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NativeAddon } from '
|
|
1
|
+
import { type NativeAddon } from '../../commands/verify/addon-source.js';
|
|
2
2
|
export interface MissingPrebuildIssue {
|
|
3
3
|
code: 'missing-prebuild';
|
|
4
4
|
level: 'error';
|
|
@@ -12,4 +12,5 @@ export interface CheckPrebuildsOptions {
|
|
|
12
12
|
hosts: string[];
|
|
13
13
|
}
|
|
14
14
|
export declare function checkPrebuilds(options: CheckPrebuildsOptions): Promise<MissingPrebuildIssue[]>;
|
|
15
|
+
export declare function listBarePrebuildFiles(hostDir: string): Promise<string[]>;
|
|
15
16
|
//# sourceMappingURL=prebuilds.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { promises as fsp } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { formatAddonId } from '
|
|
3
|
+
import { formatAddonId } from '../../commands/verify/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
8
|
const hostDir = path.join(addon.packageRoot, 'prebuilds', host);
|
|
9
|
-
const present = await
|
|
9
|
+
const present = (await listBarePrebuildFiles(hostDir)).length > 0;
|
|
10
10
|
if (!present) {
|
|
11
11
|
issues.push({
|
|
12
12
|
code: 'missing-prebuild',
|
|
@@ -21,19 +21,16 @@ export async function checkPrebuilds(options) {
|
|
|
21
21
|
}
|
|
22
22
|
return issues;
|
|
23
23
|
}
|
|
24
|
-
async function
|
|
24
|
+
export async function listBarePrebuildFiles(hostDir) {
|
|
25
25
|
let entries;
|
|
26
26
|
try {
|
|
27
27
|
entries = await fsp.readdir(hostDir, { withFileTypes: true });
|
|
28
28
|
}
|
|
29
29
|
catch {
|
|
30
|
-
return
|
|
30
|
+
return [];
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
32
|
+
return entries
|
|
33
|
+
.filter((entry) => (entry.isFile() || entry.isSymbolicLink()) && entry.name.endsWith('.bare'))
|
|
34
|
+
.map((entry) => path.resolve(hostDir, entry.name))
|
|
35
|
+
.sort();
|
|
39
36
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type Pack } from 'tar-stream';
|
|
2
|
+
export declare const RESOURCE_COLLECTOR_PACKAGES: readonly ["bare-cpu-info", "bare-gpu-info"];
|
|
3
|
+
export declare const RESOURCE_COLLECTOR_SIZE_BUDGETS: {
|
|
4
|
+
readonly compressedBytes: number;
|
|
5
|
+
readonly uncompressedBytes: number;
|
|
6
|
+
};
|
|
7
|
+
export interface ResourceCollectorAcceptanceOptions {
|
|
8
|
+
projectRoot: string;
|
|
9
|
+
bundlePath: string;
|
|
10
|
+
manifestPath: string;
|
|
11
|
+
hosts: string[];
|
|
12
|
+
budgets?: ResourceCollectorSizeBudgets;
|
|
13
|
+
}
|
|
14
|
+
export interface ResourceCollectorSizeBudgets {
|
|
15
|
+
compressedBytes: number;
|
|
16
|
+
uncompressedBytes: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ResourceCollectorTargetMeasurement {
|
|
19
|
+
host: string;
|
|
20
|
+
files: Array<{
|
|
21
|
+
package: string;
|
|
22
|
+
relativePath: string;
|
|
23
|
+
bytes: number;
|
|
24
|
+
}>;
|
|
25
|
+
compressedBytes: number;
|
|
26
|
+
uncompressedBytes: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ResourceCollectorAcceptanceReport {
|
|
29
|
+
ok: boolean;
|
|
30
|
+
collectors: string[];
|
|
31
|
+
hosts: string[];
|
|
32
|
+
budgets: ResourceCollectorSizeBudgets;
|
|
33
|
+
targets: ResourceCollectorTargetMeasurement[];
|
|
34
|
+
issues: ResourceCollectorAcceptanceIssue[];
|
|
35
|
+
}
|
|
36
|
+
export type ResourceCollectorAcceptanceIssue = {
|
|
37
|
+
code: 'missing-collector';
|
|
38
|
+
level: 'error';
|
|
39
|
+
package: string;
|
|
40
|
+
location: 'bundle' | 'manifest';
|
|
41
|
+
message: string;
|
|
42
|
+
} | {
|
|
43
|
+
code: 'missing-prebuild';
|
|
44
|
+
level: 'error';
|
|
45
|
+
package: string;
|
|
46
|
+
host: string;
|
|
47
|
+
message: string;
|
|
48
|
+
} | {
|
|
49
|
+
code: 'invalid-manifest';
|
|
50
|
+
level: 'error';
|
|
51
|
+
message: string;
|
|
52
|
+
} | {
|
|
53
|
+
code: 'measurement-failed';
|
|
54
|
+
level: 'error';
|
|
55
|
+
package: string;
|
|
56
|
+
host: string;
|
|
57
|
+
message: string;
|
|
58
|
+
} | {
|
|
59
|
+
code: 'compressed-budget-exceeded' | 'uncompressed-budget-exceeded';
|
|
60
|
+
level: 'error';
|
|
61
|
+
host: string;
|
|
62
|
+
actualBytes: number;
|
|
63
|
+
budgetBytes: number;
|
|
64
|
+
message: string;
|
|
65
|
+
};
|
|
66
|
+
interface MeasurementEntry {
|
|
67
|
+
package: string;
|
|
68
|
+
relativePath: string;
|
|
69
|
+
bytes: number;
|
|
70
|
+
contents: Buffer;
|
|
71
|
+
}
|
|
72
|
+
interface ResourceCollectorMeasurementDependencies {
|
|
73
|
+
writeArchiveEntry: (pack: Pack, entry: MeasurementEntry) => Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
export declare function acceptResourceCollectorPackaging(options: ResourceCollectorAcceptanceOptions): Promise<ResourceCollectorAcceptanceReport>;
|
|
76
|
+
export declare function formatResourceCollectorAcceptanceReport(report: ResourceCollectorAcceptanceReport): string;
|
|
77
|
+
export declare function measureTarget(host: string, entries: MeasurementEntry[], dependencies?: ResourceCollectorMeasurementDependencies): Promise<{
|
|
78
|
+
host: string;
|
|
79
|
+
files: {
|
|
80
|
+
package: string;
|
|
81
|
+
relativePath: string;
|
|
82
|
+
bytes: number;
|
|
83
|
+
}[];
|
|
84
|
+
compressedBytes: number;
|
|
85
|
+
uncompressedBytes: number;
|
|
86
|
+
}>;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=resource-collectors.d.ts.map
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { promises as fsp } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { createGzip } from 'node:zlib';
|
|
4
|
+
import tarStream, {} from 'tar-stream';
|
|
5
|
+
import { collectAddonsFromBundle } from '../../commands/verify/bundle-source.js';
|
|
6
|
+
import { listBarePrebuildFiles } from '../../commands/verify/prebuilds.js';
|
|
7
|
+
export const RESOURCE_COLLECTOR_PACKAGES = ['bare-cpu-info', 'bare-gpu-info'];
|
|
8
|
+
export const RESOURCE_COLLECTOR_SIZE_BUDGETS = {
|
|
9
|
+
compressedBytes: 2 * 1024 * 1024,
|
|
10
|
+
uncompressedBytes: 5 * 1024 * 1024
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_MEASUREMENT_DEPENDENCIES = {
|
|
13
|
+
writeArchiveEntry
|
|
14
|
+
};
|
|
15
|
+
export async function acceptResourceCollectorPackaging(options) {
|
|
16
|
+
const addons = await collectAddonsFromBundle({
|
|
17
|
+
bundlePath: options.bundlePath,
|
|
18
|
+
projectRoot: options.projectRoot
|
|
19
|
+
});
|
|
20
|
+
const collectors = new Map(addons
|
|
21
|
+
.filter((addon) => isResourceCollectorPackage(addon.name))
|
|
22
|
+
.map((addon) => [addon.name, addon]));
|
|
23
|
+
const manifestResult = await readAddonsManifest(options.manifestPath);
|
|
24
|
+
const manifestAddons = new Set(manifestResult.manifest?.addons);
|
|
25
|
+
const issues = [];
|
|
26
|
+
const entriesByHost = new Map(options.hosts.map((host) => [host, []]));
|
|
27
|
+
const budgets = options.budgets ?? RESOURCE_COLLECTOR_SIZE_BUDGETS;
|
|
28
|
+
if (manifestResult.issue !== undefined)
|
|
29
|
+
issues.push(manifestResult.issue);
|
|
30
|
+
for (const packageName of RESOURCE_COLLECTOR_PACKAGES) {
|
|
31
|
+
const collector = collectors.get(packageName);
|
|
32
|
+
if (collector === undefined) {
|
|
33
|
+
issues.push({
|
|
34
|
+
code: 'missing-collector',
|
|
35
|
+
level: 'error',
|
|
36
|
+
package: packageName,
|
|
37
|
+
location: 'bundle',
|
|
38
|
+
message: `${packageName} is missing from the linked worker bundle graph.`
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (manifestResult.manifest !== undefined && !manifestAddons.has(packageName)) {
|
|
42
|
+
issues.push({
|
|
43
|
+
code: 'missing-collector',
|
|
44
|
+
level: 'error',
|
|
45
|
+
package: packageName,
|
|
46
|
+
location: 'manifest',
|
|
47
|
+
message: `${packageName} is missing from ${options.manifestPath}.`
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (collector === undefined)
|
|
51
|
+
continue;
|
|
52
|
+
for (const host of options.hosts) {
|
|
53
|
+
const hostDir = path.join(collector.packageRoot, 'prebuilds', host);
|
|
54
|
+
const files = await listBarePrebuildFiles(hostDir);
|
|
55
|
+
if (files.length === 0) {
|
|
56
|
+
issues.push({
|
|
57
|
+
code: 'missing-prebuild',
|
|
58
|
+
level: 'error',
|
|
59
|
+
package: packageName,
|
|
60
|
+
host,
|
|
61
|
+
message: `${packageName} is missing a prebuild for ${host} ` +
|
|
62
|
+
`(expected ${path.join(hostDir, '*.bare')}).`
|
|
63
|
+
});
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
try {
|
|
68
|
+
const contents = await fsp.readFile(file);
|
|
69
|
+
entriesByHost.get(host)?.push({
|
|
70
|
+
package: packageName,
|
|
71
|
+
relativePath: normalizeArchivePath(path.relative(collector.packageRoot, file)),
|
|
72
|
+
bytes: contents.byteLength,
|
|
73
|
+
contents
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
issues.push(measurementFailedIssue(packageName, host, error));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const targets = [];
|
|
83
|
+
for (const host of options.hosts) {
|
|
84
|
+
const entries = entriesByHost.get(host) ?? [];
|
|
85
|
+
entries.sort(compareMeasurementEntries);
|
|
86
|
+
try {
|
|
87
|
+
const target = await measureTarget(host, entries);
|
|
88
|
+
targets.push(target);
|
|
89
|
+
applyBudgets(target, budgets, issues);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
issues.push(measurementFailedIssue(entries[0]?.package ?? RESOURCE_COLLECTOR_PACKAGES[0], host, error));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
ok: issues.length === 0,
|
|
97
|
+
collectors: [...RESOURCE_COLLECTOR_PACKAGES],
|
|
98
|
+
hosts: [...options.hosts],
|
|
99
|
+
budgets,
|
|
100
|
+
targets,
|
|
101
|
+
issues
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export function formatResourceCollectorAcceptanceReport(report) {
|
|
105
|
+
const lines = [
|
|
106
|
+
`Resource collector packaging: ${report.ok ? 'PASS' : 'FAIL'}`,
|
|
107
|
+
...report.targets.map((target) => `${target.host}: ${target.compressedBytes} compressed / ` +
|
|
108
|
+
`${target.uncompressedBytes} uncompressed`),
|
|
109
|
+
`Budgets: ${formatMebibytes(report.budgets.compressedBytes)} compressed / ` +
|
|
110
|
+
`${formatMebibytes(report.budgets.uncompressedBytes)} uncompressed`
|
|
111
|
+
];
|
|
112
|
+
for (const issue of report.issues) {
|
|
113
|
+
const details = [issue.code];
|
|
114
|
+
if ('host' in issue)
|
|
115
|
+
details.push(`host: ${issue.host}`);
|
|
116
|
+
if ('package' in issue)
|
|
117
|
+
details.push(`package: ${issue.package}`);
|
|
118
|
+
if ('actualBytes' in issue)
|
|
119
|
+
details.push(`actual: ${issue.actualBytes} bytes`);
|
|
120
|
+
if ('budgetBytes' in issue)
|
|
121
|
+
details.push(`limit: ${issue.budgetBytes} bytes`);
|
|
122
|
+
details.push(issue.message);
|
|
123
|
+
lines.push(`- ${details.join(' | ')}`);
|
|
124
|
+
}
|
|
125
|
+
return lines.join('\n');
|
|
126
|
+
}
|
|
127
|
+
function formatMebibytes(bytes) {
|
|
128
|
+
return `${(bytes / (1024 * 1024)).toFixed(2)} MiB`;
|
|
129
|
+
}
|
|
130
|
+
function normalizeArchivePath(filePath) {
|
|
131
|
+
return filePath.replaceAll(path.sep, path.posix.sep);
|
|
132
|
+
}
|
|
133
|
+
function compareMeasurementEntries(left, right) {
|
|
134
|
+
const leftPath = `${left.package}/${left.relativePath}`;
|
|
135
|
+
const rightPath = `${right.package}/${right.relativePath}`;
|
|
136
|
+
if (leftPath < rightPath)
|
|
137
|
+
return -1;
|
|
138
|
+
if (leftPath > rightPath)
|
|
139
|
+
return 1;
|
|
140
|
+
return 0;
|
|
141
|
+
}
|
|
142
|
+
export async function measureTarget(host, entries, dependencies = DEFAULT_MEASUREMENT_DEPENDENCIES) {
|
|
143
|
+
const pack = tarStream.pack();
|
|
144
|
+
const gzip = createGzip({ level: 9 });
|
|
145
|
+
const compressedBytesPromise = countStreamBytes(gzip);
|
|
146
|
+
pack.pipe(gzip);
|
|
147
|
+
try {
|
|
148
|
+
for (const entry of entries) {
|
|
149
|
+
await dependencies.writeArchiveEntry(pack, entry);
|
|
150
|
+
}
|
|
151
|
+
pack.finalize();
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
pack.destroy();
|
|
155
|
+
gzip.destroy();
|
|
156
|
+
await compressedBytesPromise.catch(() => { });
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
host,
|
|
161
|
+
files: entries.map(({ package: packageName, relativePath, bytes }) => ({
|
|
162
|
+
package: packageName,
|
|
163
|
+
relativePath,
|
|
164
|
+
bytes
|
|
165
|
+
})),
|
|
166
|
+
compressedBytes: await compressedBytesPromise,
|
|
167
|
+
uncompressedBytes: entries.reduce((total, entry) => total + entry.bytes, 0)
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
async function writeArchiveEntry(pack, entry) {
|
|
171
|
+
await new Promise((resolve, reject) => {
|
|
172
|
+
pack.entry({
|
|
173
|
+
name: `${entry.package}/${entry.relativePath}`,
|
|
174
|
+
mode: 0o644,
|
|
175
|
+
size: entry.bytes,
|
|
176
|
+
mtime: new Date(0)
|
|
177
|
+
}, entry.contents, (error) => {
|
|
178
|
+
if (error === null || error === undefined)
|
|
179
|
+
resolve();
|
|
180
|
+
else
|
|
181
|
+
reject(error);
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
async function countStreamBytes(stream) {
|
|
186
|
+
let bytes = 0;
|
|
187
|
+
for await (const chunk of stream)
|
|
188
|
+
bytes += Buffer.byteLength(chunk);
|
|
189
|
+
return bytes;
|
|
190
|
+
}
|
|
191
|
+
function applyBudgets(target, budgets, issues) {
|
|
192
|
+
if (target.compressedBytes > budgets.compressedBytes) {
|
|
193
|
+
issues.push({
|
|
194
|
+
code: 'compressed-budget-exceeded',
|
|
195
|
+
level: 'error',
|
|
196
|
+
host: target.host,
|
|
197
|
+
actualBytes: target.compressedBytes,
|
|
198
|
+
budgetBytes: budgets.compressedBytes,
|
|
199
|
+
message: `${target.host} resource collectors use ${target.compressedBytes} compressed bytes ` +
|
|
200
|
+
`(limit: ${budgets.compressedBytes}).`
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if (target.uncompressedBytes > budgets.uncompressedBytes) {
|
|
204
|
+
issues.push({
|
|
205
|
+
code: 'uncompressed-budget-exceeded',
|
|
206
|
+
level: 'error',
|
|
207
|
+
host: target.host,
|
|
208
|
+
actualBytes: target.uncompressedBytes,
|
|
209
|
+
budgetBytes: budgets.uncompressedBytes,
|
|
210
|
+
message: `${target.host} resource collectors use ${target.uncompressedBytes} uncompressed bytes ` +
|
|
211
|
+
`(limit: ${budgets.uncompressedBytes}).`
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function measurementFailedIssue(packageName, host, cause) {
|
|
216
|
+
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
217
|
+
return {
|
|
218
|
+
code: 'measurement-failed',
|
|
219
|
+
level: 'error',
|
|
220
|
+
package: packageName,
|
|
221
|
+
host,
|
|
222
|
+
message: `Could not measure ${packageName} for ${host}: ${reason}.`
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function isResourceCollectorPackage(packageName) {
|
|
226
|
+
return RESOURCE_COLLECTOR_PACKAGES.some((collector) => collector === packageName);
|
|
227
|
+
}
|
|
228
|
+
async function readAddonsManifest(manifestPath) {
|
|
229
|
+
let parsed;
|
|
230
|
+
try {
|
|
231
|
+
parsed = JSON.parse(await fsp.readFile(manifestPath, 'utf8'));
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
return {
|
|
235
|
+
issue: invalidManifestIssue(manifestPath, error)
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
if (!isAddonsManifest(parsed)) {
|
|
239
|
+
return {
|
|
240
|
+
issue: invalidManifestIssue(manifestPath, 'manifest does not match the expected shape')
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return { manifest: parsed };
|
|
244
|
+
}
|
|
245
|
+
function isAddonsManifest(value) {
|
|
246
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
247
|
+
return false;
|
|
248
|
+
const manifest = value;
|
|
249
|
+
return (manifest['version'] === 1 &&
|
|
250
|
+
typeof manifest['bundleId'] === 'string' &&
|
|
251
|
+
Array.isArray(manifest['addons']) &&
|
|
252
|
+
manifest['addons'].every((addon) => typeof addon === 'string'));
|
|
253
|
+
}
|
|
254
|
+
function invalidManifestIssue(manifestPath, cause) {
|
|
255
|
+
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
256
|
+
return {
|
|
257
|
+
code: 'invalid-manifest',
|
|
258
|
+
level: 'error',
|
|
259
|
+
message: `Could not read a valid addon manifest at ${manifestPath}: ${reason}.`
|
|
260
|
+
};
|
|
261
|
+
}
|
package/dist/constants/audio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS } from '@qvac/decoder-audio/constants
|
|
1
|
+
export { FORMATS_NEEDING_DECODE, SUPPORTED_AUDIO_FORMATS } from '@qvac/decoder-audio/constants';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './audio';
|
|
2
|
-
export * from './registry';
|
|
1
|
+
export * from './audio.js';
|
|
2
|
+
export * from './registry.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Parakeet CTC transcription from a WAV file.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* bun run examples/
|
|
5
|
+
* bun run examples/asr/parakeet-ctc-filesystem.ts <wav-file> [parakeet-ctc-gguf]
|
|
6
6
|
*
|
|
7
7
|
* Loads a single GGUF checkpoint (`PARAKEET_CTC_0_6B_Q8_0` by default) and
|
|
8
8
|
* transcribes the file with the batch `transcribe` API. Omit the model
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
import { loadModel, unloadModel, transcribe, PARAKEET_CTC_0_6B_Q8_0 } from '@qvac/sdk';
|
|
14
14
|
const args = process.argv.slice(2);
|
|
15
15
|
if (!args[0]) {
|
|
16
|
-
console.error('Usage: bun run examples/
|
|
17
|
-
'[parakeet-ctc-gguf]');
|
|
16
|
+
console.error('Usage: bun run examples/asr/parakeet-ctc-filesystem.ts <wav-file> ' + '[parakeet-ctc-gguf]');
|
|
18
17
|
console.error('\nIf the model path is omitted, defaults to the registry model.');
|
|
19
18
|
process.exit(1);
|
|
20
19
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Microphone → Parakeet batch transcription (chunked `transcribe`).
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* bun run examples/
|
|
5
|
+
* bun run examples/asr/parakeet-microphone-record.ts
|
|
6
6
|
*
|
|
7
7
|
* Captures 3 s s16le chunks from the microphone and sends each to `transcribe`
|
|
8
8
|
* with the TDT model. Press Ctrl+C to stop.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { loadModel, unloadModel, transcribe, PARAKEET_TDT_0_6B_V3_Q8_0 } from '@qvac/sdk';
|
|
13
13
|
import { spawnSync } from 'child_process';
|
|
14
|
-
import { startMicrophone } from '../audio/mic-input';
|
|
14
|
+
import { startMicrophone } from '../audio/mic-input.js';
|
|
15
15
|
const SAMPLE_RATE = 16000;
|
|
16
16
|
const BYTES_PER_SAMPLE = 2; // s16le
|
|
17
17
|
const CHUNK_DURATION_S = 3;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Microphone → Parakeet duplex streaming (`transcribeStream`).
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* bun run examples/
|
|
5
|
+
* bun run examples/asr/parakeet-microphone-stream.ts
|
|
6
6
|
*
|
|
7
7
|
* Streams microphone audio through `transcribeStream` with
|
|
8
8
|
* `parakeetStreamingConfig`. Uses the EOU checkpoint so you may see
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { loadModel, unloadModel, transcribeStream, PARAKEET_EOU_120M_V1_Q8_0 } from '@qvac/sdk';
|
|
15
15
|
import { spawnSync } from 'child_process';
|
|
16
|
-
import { startMicrophone } from '../audio/mic-input';
|
|
16
|
+
import { startMicrophone } from '../audio/mic-input.js';
|
|
17
17
|
const SAMPLE_RATE = 16000;
|
|
18
18
|
try {
|
|
19
19
|
const r = spawnSync('ffmpeg', ['-version'], { stdio: 'ignore' });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Sortformer v2.1 streaming diarization via duplex `transcribeStream` + AOSC.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* bun run examples/
|
|
5
|
+
* bun run examples/asr/parakeet-sortformer-streaming.ts <wav-file> [sortformer-gguf]
|
|
6
6
|
*
|
|
7
7
|
* Streams 16 kHz mono s16le audio in real-time-paced chunks (required for parakeet
|
|
8
8
|
* duplex streaming). Loads v2.1 with AOSC knobs in `modelConfig`. Omit the model
|
|
@@ -28,7 +28,7 @@ const SORTFORMER_V21_AOSC_LOAD_CONFIG = {
|
|
|
28
28
|
};
|
|
29
29
|
const args = process.argv.slice(2);
|
|
30
30
|
if (!args[0]) {
|
|
31
|
-
console.error('Usage: bun run examples/
|
|
31
|
+
console.error('Usage: bun run examples/asr/parakeet-sortformer-streaming.ts <wav-file-path> [sortformer-gguf]');
|
|
32
32
|
console.error('\nDefaults to the v2.1 q8_0 registry model (PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0).');
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Parakeet Sortformer diarization + TDT transcription pipeline.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* bun run examples/
|
|
5
|
+
* bun run examples/asr/parakeet-sortformer.ts [sortformer-gguf] [wav-file]
|
|
6
6
|
*
|
|
7
7
|
* Two-step flow: Sortformer v2.1 diarizes the audio, then TDT transcribes each
|
|
8
8
|
* speaker segment. Defaults to registry GGUFs and
|