@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,8 +1,8 @@
|
|
|
1
|
-
import { textToSpeechStreamResponseSchema, ttsClientParamsSchema } from '../../schemas/index.js';
|
|
2
|
-
import { stream as streamRpc, duplex } from '
|
|
1
|
+
import { textToSpeechStreamResponseSchema, textToSpeechStreamRequestSchema, ttsClientParamsSchema } from '../../schemas/index.js';
|
|
2
|
+
import { stream as streamRpc, duplex } from '../../client/rpc/rpc-client.js';
|
|
3
3
|
import { getClientLogger } from '../../logging/index.js';
|
|
4
4
|
import { TextToSpeechStreamFailedError } from '../../utils/errors-client.js';
|
|
5
|
-
import { parseClientInput } from '
|
|
5
|
+
import { parseClientInput } from '../../client/parse-input.js';
|
|
6
6
|
const logger = getClientLogger();
|
|
7
7
|
/**
|
|
8
8
|
* Fan-out queue that lets multiple consumers iterate the same TTS response
|
|
@@ -142,7 +142,17 @@ function buildTtsRequest(params) {
|
|
|
142
142
|
}),
|
|
143
143
|
...(params.sentenceStreamMaxChunkScalars !== undefined && {
|
|
144
144
|
sentenceStreamMaxChunkScalars: params.sentenceStreamMaxChunkScalars
|
|
145
|
-
})
|
|
145
|
+
}),
|
|
146
|
+
...(params.description !== undefined && { description: params.description }),
|
|
147
|
+
...(params.voiceDescription !== undefined && { voiceDescription: params.voiceDescription }),
|
|
148
|
+
...(params.voice !== undefined && { voice: params.voice }),
|
|
149
|
+
...(params.emotion !== undefined && { emotion: params.emotion }),
|
|
150
|
+
...(params.pitch !== undefined && { pitch: params.pitch }),
|
|
151
|
+
...(params.pace !== undefined && { pace: params.pace }),
|
|
152
|
+
...(params.expressivity !== undefined && { expressivity: params.expressivity }),
|
|
153
|
+
...(params.noise !== undefined && { noise: params.noise }),
|
|
154
|
+
...(params.reverb !== undefined && { reverb: params.reverb }),
|
|
155
|
+
...(params.quality !== undefined && { quality: params.quality })
|
|
146
156
|
};
|
|
147
157
|
}
|
|
148
158
|
function buildTextToSpeechStreamRequest(params) {
|
|
@@ -161,7 +171,17 @@ function buildTextToSpeechStreamRequest(params) {
|
|
|
161
171
|
}),
|
|
162
172
|
...(params.flushAfterMs !== undefined && {
|
|
163
173
|
flushAfterMs: params.flushAfterMs
|
|
164
|
-
})
|
|
174
|
+
}),
|
|
175
|
+
...(params.description !== undefined && { description: params.description }),
|
|
176
|
+
...(params.voiceDescription !== undefined && { voiceDescription: params.voiceDescription }),
|
|
177
|
+
...(params.voice !== undefined && { voice: params.voice }),
|
|
178
|
+
...(params.emotion !== undefined && { emotion: params.emotion }),
|
|
179
|
+
...(params.pitch !== undefined && { pitch: params.pitch }),
|
|
180
|
+
...(params.pace !== undefined && { pace: params.pace }),
|
|
181
|
+
...(params.expressivity !== undefined && { expressivity: params.expressivity }),
|
|
182
|
+
...(params.noise !== undefined && { noise: params.noise }),
|
|
183
|
+
...(params.reverb !== undefined && { reverb: params.reverb }),
|
|
184
|
+
...(params.quality !== undefined && { quality: params.quality })
|
|
165
185
|
};
|
|
166
186
|
}
|
|
167
187
|
/**
|
|
@@ -337,14 +357,17 @@ async function collectTtsBuffer(request, options, resolveDone, rejectDone) {
|
|
|
337
357
|
throw e;
|
|
338
358
|
}
|
|
339
359
|
}
|
|
360
|
+
export function encodeTextToSpeechFragment(textFragment) {
|
|
361
|
+
return typeof textFragment === 'string' ? new TextEncoder().encode(textFragment) : textFragment;
|
|
362
|
+
}
|
|
340
363
|
/**
|
|
341
364
|
* Duplex session: write UTF-8 text fragments (e.g. LLM token deltas) via `write`. Each string or
|
|
342
|
-
*
|
|
365
|
+
* Uint8Array should be a complete UTF-8 fragment. The worker forwards them to ONNX TTS `runStreaming`
|
|
343
366
|
* (optional sentence accumulation via request fields). Iterate the session for `TextToSpeechStreamResponse`
|
|
344
367
|
* lines (PCM in `buffer`, optional `chunkIndex` / `sentenceChunk`) until `done`.
|
|
345
368
|
*/
|
|
346
369
|
export async function textToSpeechStream(params, options) {
|
|
347
|
-
const request = buildTextToSpeechStreamRequest(params);
|
|
370
|
+
const request = parseClientInput(textToSpeechStreamRequestSchema, buildTextToSpeechStreamRequest(params));
|
|
348
371
|
const { requestStream, responseStream } = await duplex(request, options);
|
|
349
372
|
const responses = parseTextToSpeechStreamLines(responseStream);
|
|
350
373
|
let consumed = false;
|
|
@@ -358,8 +381,7 @@ export async function textToSpeechStream(params, options) {
|
|
|
358
381
|
if (closed) {
|
|
359
382
|
throw new TextToSpeechStreamFailedError('TextToSpeechStreamSession.write() called after end()/destroy()');
|
|
360
383
|
}
|
|
361
|
-
|
|
362
|
-
requestStream.write(buf);
|
|
384
|
+
requestStream.write(encodeTextToSpeechFragment(textFragment));
|
|
363
385
|
},
|
|
364
386
|
end() {
|
|
365
387
|
if (closed)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TranscribeClientParams, type RPCOptions, type TranscribeSegment, type TranscribeStreamClientParams, type TranscribeStreamSession, type TranscribeStreamMetadataSession, type TranscribeStreamConversationSession } from '../../schemas/index';
|
|
1
|
+
import { type TranscribeClientParams, type RPCOptions, type TranscribeSegment, type TranscribeStreamClientParams, type TranscribeStreamSession, type TranscribeStreamMetadataSession, type TranscribeStreamConversationSession } from '../../schemas/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Transcribe audio and return the complete text. Accepts either a file
|
|
4
4
|
* path or an audio buffer.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { transcribeResponseSchema, transcribeStreamResponseSchema } from '../../schemas/index.js';
|
|
2
|
-
import { stream, duplex } from '
|
|
2
|
+
import { stream, duplex } from '../../client/rpc/rpc-client.js';
|
|
3
3
|
import { getClientLogger } from '../../logging/index.js';
|
|
4
4
|
import { TranscriptionFailedError } from '../../utils/errors-client.js';
|
|
5
5
|
import { decoratePromise } from '../../utils/decorate-promise.js';
|
|
6
|
-
import { generateClientRequestId } from '
|
|
6
|
+
import { generateClientRequestId } from '../../client/api/client-request-id.js';
|
|
7
7
|
const logger = getClientLogger();
|
|
8
8
|
function buildTranscribeRequest(params, requestId) {
|
|
9
9
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TranslateClientParams, type TranslationStats, type RPCOptions } from '../../schemas/index';
|
|
1
|
+
import { type TranslateClientParams, type TranslationStats, type RPCOptions } from '../../schemas/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Translates text from one language to another using a specified translation model.
|
|
4
4
|
* Supports both NMT (Neural Machine Translation) and LLM models.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { stream as streamRpc } from '
|
|
2
|
-
import { translateResponseSchema
|
|
3
|
-
import { detectOne } from '@qvac/langdetect-text';
|
|
4
|
-
import { TranslationFailedError } from '../../utils/errors-client.js';
|
|
1
|
+
import { stream as streamRpc } from '../../client/rpc/rpc-client.js';
|
|
2
|
+
import { translateResponseSchema } from '../../schemas/index.js';
|
|
5
3
|
/**
|
|
6
4
|
* Translates text from one language to another using a specified translation model.
|
|
7
5
|
* Supports both NMT (Neural Machine Translation) and LLM models.
|
|
@@ -44,22 +42,13 @@ import { TranslationFailedError } from '../../utils/errors-client.js';
|
|
|
44
42
|
* ```
|
|
45
43
|
*/
|
|
46
44
|
export function translate(params, options) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const detected = detectOne(params.text);
|
|
52
|
-
if (detected.code === 'und' || detected.language === 'Undetermined') {
|
|
53
|
-
throw new TranslationFailedError("Could not detect the source language. Please specify the 'from' parameter explicitly.");
|
|
54
|
-
}
|
|
55
|
-
sourceLanguage = detected.language;
|
|
56
|
-
}
|
|
45
|
+
// Source-language auto-detection lives in the worker now
|
|
46
|
+
// (server/bare/ops/translate.ts): `from` is passed through when present and
|
|
47
|
+
// resolved server-side when absent, so every language binding shares one
|
|
48
|
+
// detector instead of each shipping its own.
|
|
57
49
|
const request = {
|
|
58
50
|
type: 'translate',
|
|
59
|
-
...params
|
|
60
|
-
...(isLlm && {
|
|
61
|
-
from: sourceLanguage
|
|
62
|
-
})
|
|
51
|
+
...params
|
|
63
52
|
};
|
|
64
53
|
let stats;
|
|
65
54
|
let statsResolver = () => { };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isBare } from 'which-runtime';
|
|
2
2
|
import {} from '../../schemas/index.js';
|
|
3
|
-
import { send, close } from '
|
|
4
|
-
import { stopLoggingStreamForModel } from '
|
|
3
|
+
import { send, close } from '../../client/rpc/rpc-client.js';
|
|
4
|
+
import { stopLoggingStreamForModel } from '../../client/logging-stream-registry.js';
|
|
5
5
|
import { InvalidResponseError, ModelUnloadFailedError } from '../../utils/errors-client.js';
|
|
6
6
|
import { getClientLogger } from '../../logging/index.js';
|
|
7
7
|
const logger = getClientLogger();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type UpscaleClientParams, type UpscaleStats } from '../../schemas/sdcpp-config';
|
|
1
|
+
import { type UpscaleClientParams, type UpscaleStats } from '../../schemas/sdcpp-config.js';
|
|
2
2
|
interface UpscaleResult {
|
|
3
3
|
outputs: Promise<Uint8Array[]>;
|
|
4
4
|
stats: Promise<UpscaleStats | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { upscaleStreamResponseSchema } from '../../schemas/sdcpp-config.js';
|
|
2
|
-
import { stream as streamRpc } from '
|
|
2
|
+
import { stream as streamRpc } from '../../client/rpc/rpc-client.js';
|
|
3
3
|
import { decodeBase64, encodeBase64 } from '../../utils/encoding.js';
|
|
4
4
|
import { StreamEndedError } from '../../utils/errors-client.js';
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VideoClientParams, type VideoStats } from '../../schemas/index';
|
|
1
|
+
import { type VideoClientParams, type VideoStats } from '../../schemas/index.js';
|
|
2
2
|
export interface VideoProgressTick {
|
|
3
3
|
step: number;
|
|
4
4
|
totalSteps: number;
|
|
@@ -16,10 +16,13 @@ export interface VideoResult {
|
|
|
16
16
|
* @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
|
|
17
17
|
* @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
|
|
18
18
|
*
|
|
19
|
-
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video)
|
|
20
|
-
*
|
|
21
|
-
* `
|
|
22
|
-
* `
|
|
19
|
+
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for both the
|
|
20
|
+
* Wan and LTX-2 layouts. For Wan `img2vid`, load the pipeline with
|
|
21
|
+
* `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
|
|
22
|
+
* `img2vid` conditions on the first frame through its video VAE and needs no
|
|
23
|
+
* CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
|
|
24
|
+
* img2vid). On React Native, prefer a `modelId` loaded with a `delegate` since
|
|
25
|
+
* the bundled video diffusion models are too large for typical mobile devices.
|
|
23
26
|
*
|
|
24
27
|
* @example Basic txt2vid generation
|
|
25
28
|
* ```typescript
|
package/dist/client/api/video.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { videoStreamResponseSchema } from '../../schemas/index.js';
|
|
2
|
-
import { stream as streamRpc } from '
|
|
3
|
-
import { generateClientRequestId } from '
|
|
2
|
+
import { stream as streamRpc } from '../../client/rpc/rpc-client.js';
|
|
3
|
+
import { generateClientRequestId } from '../../client/api/client-request-id.js';
|
|
4
4
|
import { decodeBase64, encodeBase64 } from '../../utils/encoding.js';
|
|
5
5
|
/**
|
|
6
6
|
* Generates a video using a loaded video diffusion model.
|
|
@@ -8,10 +8,13 @@ import { decodeBase64, encodeBase64 } from '../../utils/encoding.js';
|
|
|
8
8
|
* @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
|
|
9
9
|
* @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
|
|
10
10
|
*
|
|
11
|
-
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video)
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
14
|
-
* `
|
|
11
|
+
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for both the
|
|
12
|
+
* Wan and LTX-2 layouts. For Wan `img2vid`, load the pipeline with
|
|
13
|
+
* `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
|
|
14
|
+
* `img2vid` conditions on the first frame through its video VAE and needs no
|
|
15
|
+
* CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
|
|
16
|
+
* img2vid). On React Native, prefer a `modelId` loaded with a `delegate` since
|
|
17
|
+
* the bundled video diffusion models are too large for typical mobile devices.
|
|
15
18
|
*
|
|
16
19
|
* @example Basic txt2vid generation
|
|
17
20
|
* ```typescript
|
package/dist/client/api/vla.d.ts
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { type VlaClientRunParams, type VlaClientRunResult, type VlaHparams } from '../../schemas/index';
|
|
1
|
+
import { type VlaClientRunParams, type VlaClientRunResult, type VlaHparams } from '../../schemas/index.js';
|
|
2
2
|
/**
|
|
3
|
-
* Run VLA inference on a loaded model (SmolVLA or
|
|
3
|
+
* Run VLA inference on a loaded model (SmolVLA, π₀.₅, or GR00T) and return the
|
|
4
4
|
* produced action chunk plus per-stage timings.
|
|
5
5
|
*
|
|
6
6
|
* @param params - Inference inputs.
|
|
7
7
|
* @param params.modelId - Identifier of the loaded VLA model (returned by
|
|
8
8
|
* `loadModel({ modelType: "vla", ... })`).
|
|
9
|
-
* @param params.images - The preprocessed camera frames
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* @param params.images - The preprocessed camera frames, one per camera. For
|
|
10
|
+
* pixel-input models (SmolVLA, π₀.₅) each is a `Float32Array` of length
|
|
11
|
+
* `3 * imgWidth * imgHeight` in CHW layout, range `[-1, 1]`, produced by the
|
|
12
|
+
* addon's `preprocessImage()` (re-exported as `vlaPreprocessImage`). For
|
|
13
|
+
* patch-input models (GR00T, `hparams.imageInputMode === 'patches'`) each is
|
|
14
|
+
* the pre-patchified buffer of length `hparams.imagePatchElems` instead. Pass
|
|
15
|
+
* exactly `hparams.numCameras` frames (2 for SmolVLA and GR00T, 3 for π₀.₅).
|
|
14
16
|
* @param params.imgWidth - Width of each preprocessed image; must equal
|
|
15
17
|
* `hparams.visionImageSize`.
|
|
16
18
|
* @param params.imgHeight - Height of each preprocessed image; must equal
|
|
17
19
|
* `hparams.visionImageSize`.
|
|
18
20
|
* @param params.state - Robot end-effector / gripper state. For
|
|
19
|
-
* continuous-state models (SmolVLA) pad to `hparams.maxStateDim` with
|
|
21
|
+
* continuous-state models (SmolVLA, GR00T) pad to `hparams.maxStateDim` with
|
|
20
22
|
* `vlaPadState`. For discrete-state models (π₀.₅,
|
|
21
23
|
* `hparams.stateInputMode === 'discrete'`) the state is tokenised into the
|
|
22
24
|
* prompt and this buffer is ignored — pass an empty `Float32Array(0)`.
|
|
23
25
|
* @param params.tokens - Tokenized instruction (`Int32Array` of length
|
|
24
26
|
* `hparams.tokenizerMaxLength`). Tokenize on the consumer side with the
|
|
25
|
-
* model's tokenizer (SmolVLM2 for SmolVLA, PaliGemma/Gemma for
|
|
27
|
+
* model's tokenizer (SmolVLM2 for SmolVLA, PaliGemma/Gemma for π₀.₅,
|
|
28
|
+
* Qwen3-VL for GR00T).
|
|
26
29
|
* @param params.mask - Token attention mask (`Uint8Array` matching `tokens`).
|
|
27
|
-
* @param params.noise -
|
|
30
|
+
* @param params.noise - Seeded noise prior
|
|
28
31
|
* (`Float32Array` of length `hparams.chunkSize * hparams.maxActionDim`).
|
|
29
|
-
*
|
|
32
|
+
* Optional for SmolVLA / π₀.₅ (addon samples its own prior when omitted).
|
|
33
|
+
* Required for GR00T (`hparams.imageInputMode === 'patches'`).
|
|
30
34
|
* @returns A `VlaClientRunResult` with the produced `actions` Float32Array
|
|
31
35
|
* (length `chunkSize * actionDim`), the corresponding `chunkSize` /
|
|
32
36
|
* `actionDim` returned by the addon, and optional per-stage `stats`.
|
package/dist/client/api/vla.js
CHANGED
|
@@ -13,33 +13,37 @@ function f32FromBase64(b64) {
|
|
|
13
13
|
return new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Run VLA inference on a loaded model (SmolVLA or
|
|
16
|
+
* Run VLA inference on a loaded model (SmolVLA, π₀.₅, or GR00T) and return the
|
|
17
17
|
* produced action chunk plus per-stage timings.
|
|
18
18
|
*
|
|
19
19
|
* @param params - Inference inputs.
|
|
20
20
|
* @param params.modelId - Identifier of the loaded VLA model (returned by
|
|
21
21
|
* `loadModel({ modelType: "vla", ... })`).
|
|
22
|
-
* @param params.images - The preprocessed camera frames
|
|
23
|
-
*
|
|
24
|
-
* `
|
|
25
|
-
*
|
|
26
|
-
* `
|
|
22
|
+
* @param params.images - The preprocessed camera frames, one per camera. For
|
|
23
|
+
* pixel-input models (SmolVLA, π₀.₅) each is a `Float32Array` of length
|
|
24
|
+
* `3 * imgWidth * imgHeight` in CHW layout, range `[-1, 1]`, produced by the
|
|
25
|
+
* addon's `preprocessImage()` (re-exported as `vlaPreprocessImage`). For
|
|
26
|
+
* patch-input models (GR00T, `hparams.imageInputMode === 'patches'`) each is
|
|
27
|
+
* the pre-patchified buffer of length `hparams.imagePatchElems` instead. Pass
|
|
28
|
+
* exactly `hparams.numCameras` frames (2 for SmolVLA and GR00T, 3 for π₀.₅).
|
|
27
29
|
* @param params.imgWidth - Width of each preprocessed image; must equal
|
|
28
30
|
* `hparams.visionImageSize`.
|
|
29
31
|
* @param params.imgHeight - Height of each preprocessed image; must equal
|
|
30
32
|
* `hparams.visionImageSize`.
|
|
31
33
|
* @param params.state - Robot end-effector / gripper state. For
|
|
32
|
-
* continuous-state models (SmolVLA) pad to `hparams.maxStateDim` with
|
|
34
|
+
* continuous-state models (SmolVLA, GR00T) pad to `hparams.maxStateDim` with
|
|
33
35
|
* `vlaPadState`. For discrete-state models (π₀.₅,
|
|
34
36
|
* `hparams.stateInputMode === 'discrete'`) the state is tokenised into the
|
|
35
37
|
* prompt and this buffer is ignored — pass an empty `Float32Array(0)`.
|
|
36
38
|
* @param params.tokens - Tokenized instruction (`Int32Array` of length
|
|
37
39
|
* `hparams.tokenizerMaxLength`). Tokenize on the consumer side with the
|
|
38
|
-
* model's tokenizer (SmolVLM2 for SmolVLA, PaliGemma/Gemma for
|
|
40
|
+
* model's tokenizer (SmolVLM2 for SmolVLA, PaliGemma/Gemma for π₀.₅,
|
|
41
|
+
* Qwen3-VL for GR00T).
|
|
39
42
|
* @param params.mask - Token attention mask (`Uint8Array` matching `tokens`).
|
|
40
|
-
* @param params.noise -
|
|
43
|
+
* @param params.noise - Seeded noise prior
|
|
41
44
|
* (`Float32Array` of length `hparams.chunkSize * hparams.maxActionDim`).
|
|
42
|
-
*
|
|
45
|
+
* Optional for SmolVLA / π₀.₅ (addon samples its own prior when omitted).
|
|
46
|
+
* Required for GR00T (`hparams.imageInputMode === 'patches'`).
|
|
43
47
|
* @returns A `VlaClientRunResult` with the produced `actions` Float32Array
|
|
44
48
|
* (length `chunkSize * actionDim`), the corresponding `chunkSize` /
|
|
45
49
|
* `actionDim` returned by the addon, and optional per-stage `stats`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QvacConfig } from '../../schemas/index';
|
|
1
|
+
import { type QvacConfig } from '../../schemas/index.js';
|
|
2
2
|
export type { QvacConfig };
|
|
3
3
|
export declare function validateConfig(config: unknown): QvacConfig;
|
|
4
4
|
export declare function parseJsonConfig(content: string, filePath: string): unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QvacConfig } from './config-utils';
|
|
1
|
+
import { type QvacConfig } from './config-utils.js';
|
|
2
2
|
/** Config filenames searched under a project root (bundle/verify/commands). */
|
|
3
3
|
export declare const CONFIG_CANDIDATES: readonly ["qvac.config.ts", "qvac.config.mjs", "qvac.config.js", "qvac.config.json"];
|
|
4
4
|
/** Load and validate a config file at an explicit path (used by RPC init and commands). */
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { send, stream, close } from './rpc/rpc-client';
|
|
1
|
+
export { send, stream, close } from './rpc/rpc-client.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Logger } from '../logging/index';
|
|
1
|
+
import { type Logger } from '../logging/index.js';
|
|
2
2
|
export declare function startLoggingStreamForModel(modelId: string, modelLogger: Logger): void;
|
|
3
3
|
export declare function stopLoggingStreamForModel(modelId: string): void;
|
|
4
4
|
export declare function hasActiveStreamForModel(modelId: string): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as hostApi from '
|
|
2
|
-
import type { QvacPlugin } from '../schemas/plugin';
|
|
1
|
+
import * as hostApi from '../client/api/index.js';
|
|
2
|
+
import type { QvacPlugin } from '../schemas/plugin.js';
|
|
3
3
|
/**
|
|
4
4
|
* Register plugins and return the client host API. Designed for
|
|
5
5
|
* @qvac/bare-sdk consumers assembling explicit plugin subsets.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerPlugins } from '../server/plugins/index.js';
|
|
2
|
-
import * as hostApi from '
|
|
2
|
+
import * as hostApi from '../client/api/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Register plugins and return the client host API. Designed for
|
|
5
5
|
* @qvac/bare-sdk consumers assembling explicit plugin subsets.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Request, Response } from '../../schemas/index';
|
|
1
|
+
import type { Request, Response } from '../../schemas/index.js';
|
|
2
2
|
export declare function send<T extends Request>(request: T): Promise<Response>;
|
|
3
3
|
export declare function getWorkerLifeSignal(): AbortSignal | null;
|
|
4
4
|
export declare function notifyChannelClosed(): void;
|
|
@@ -4,14 +4,14 @@ import { registry } from '../../server/rpc/handler-registry.js';
|
|
|
4
4
|
import { handlerSupportsProgress, selectHandler } from '../../server/rpc/handler-selection.js';
|
|
5
5
|
import { createErrorResponse } from '../../schemas/index.js';
|
|
6
6
|
import { RPCNoHandlerError, RPCRequestNotSentError } from '../../utils/errors-client.js';
|
|
7
|
-
import { initializeConfig } from '
|
|
7
|
+
import { initializeConfig } from '../../client/init-hooks.js';
|
|
8
8
|
import { setSDKConfig } from '../../server/bare/registry/config-registry.js';
|
|
9
9
|
import { setRuntimeContext } from '../../server/bare/registry/runtime-context-registry.js';
|
|
10
10
|
import { resolveModelConfig } from '../../server/bare/registry/model-config-registry.js';
|
|
11
|
-
import { resolveConfig } from '
|
|
11
|
+
import { resolveConfig } from '../../client/config-loader/resolve-config.bare.js';
|
|
12
12
|
import { initializeWorkerCore, cleanupForTerminate } from '../../server/worker-core.js';
|
|
13
13
|
import { assertLifecycleAllowed } from '../../server/bare/runtime-lifecycle.js';
|
|
14
|
-
import { ensurePluginsRegistered } from '
|
|
14
|
+
import { ensurePluginsRegistered } from '../../client/rpc/ensure-worker-ready.js';
|
|
15
15
|
async function ensureWorkerReady() {
|
|
16
16
|
initializeWorkerCore();
|
|
17
17
|
await ensurePluginsRegistered();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import RPC from 'bare-rpc';
|
|
2
2
|
import { RPCConnectionFailedError } from '../../utils/errors-client.js';
|
|
3
|
-
import { initializeConfig } from '
|
|
4
|
-
import { resolveConfig } from '
|
|
3
|
+
import { initializeConfig } from '../../client/init-hooks.js';
|
|
4
|
+
import { resolveConfig } from '../../client/config-loader/resolve-config.expo.js';
|
|
5
5
|
import { getClientLogger } from '../../logging/index.js';
|
|
6
|
-
import { getDeviceInfo } from '
|
|
6
|
+
import { getDeviceInfo } from '../../client/rpc/expo-device-info.js';
|
|
7
7
|
const logger = getClientLogger();
|
|
8
8
|
let rpcInstance = null;
|
|
9
9
|
let rpcPromise = null;
|
|
@@ -7,8 +7,8 @@ import fs from 'node:fs';
|
|
|
7
7
|
import os from 'node:os';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { initializeConfig } from '
|
|
11
|
-
import { resolveConfig } from '
|
|
10
|
+
import { initializeConfig } from '../../client/init-hooks.js';
|
|
11
|
+
import { resolveConfig } from '../../client/config-loader/resolve-config.node.js';
|
|
12
12
|
import { getClientLogger, getLogger, SDK_SERVER_NAMESPACE } from '../../logging/index.js';
|
|
13
13
|
import { BareRuntimeBinaryNotFoundError, RPCInitTimeoutError, WorkerCrashedError, WorkerShutdownError } from '../../utils/errors-client.js';
|
|
14
14
|
const RPC_INIT_TIMEOUT_MS = 30_000;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler';
|
|
1
|
+
export * from './profiler.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type BaseTimings } from '../../../profiling/index';
|
|
2
|
-
import type { ProfilingResponseMeta } from '../../../schemas/index';
|
|
1
|
+
import { type BaseTimings } from '../../../profiling/index.js';
|
|
2
|
+
import type { ProfilingResponseMeta } from '../../../schemas/index.js';
|
|
3
3
|
interface BaseClientTimings extends BaseTimings {
|
|
4
4
|
requestZodValidationMs?: number;
|
|
5
5
|
requestStringifyMs?: number;
|
|
@@ -94,6 +94,10 @@ function recordOperationEvent(op) {
|
|
|
94
94
|
event.profileId = op.profileId;
|
|
95
95
|
if (op.gauges !== undefined)
|
|
96
96
|
event.gauges = op.gauges;
|
|
97
|
+
if (op.resources !== undefined)
|
|
98
|
+
event.resources = op.resources;
|
|
99
|
+
if (op.backend !== undefined)
|
|
100
|
+
event.backend = op.backend;
|
|
97
101
|
if (op.tags !== undefined)
|
|
98
102
|
event.tags = op.tags;
|
|
99
103
|
if (op.count !== undefined)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type RPC from 'bare-rpc';
|
|
2
|
-
import { type Request, type Response, type RPCOptions } from '../../schemas/index';
|
|
2
|
+
import { type Request, type Response, type RPCOptions } from '../../schemas/index.js';
|
|
3
3
|
export declare function send<T extends Request>(request: T, options?: RPCOptions, rpc?: RPC): Promise<Response>;
|
|
4
4
|
export declare function stream<T extends Request>(request: T, options?: RPCOptions, rpc?: RPC): AsyncGenerator<Response>;
|
|
5
5
|
export interface DuplexWritable {
|
|
@@ -6,7 +6,7 @@ import { getRPC, close as closeRPC, createDuplexSession, getWorkerLifeSignal, no
|
|
|
6
6
|
import { WorkerCrashedError, RequestValidationFailedError } from '../../utils/errors-client.js';
|
|
7
7
|
import { formatZodError } from '../../utils/zod-error.js';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { nowMs, shouldProfile, shouldIncludeServerBreakdown, generateId as createProfileId, createProfilingMeta, createProfilingDisabledMeta, injectProfilingMetaIntoObject, extractProfilingMeta, stripProfilingMeta, recordFailure } from '../../profiling/index.js';
|
|
9
|
+
import { nowMs, shouldProfile, shouldIncludeServerBreakdown, shouldIncludeResourceGauges, generateId as createProfileId, createProfilingMeta, createProfilingDisabledMeta, injectProfilingMetaIntoObject, extractProfilingMeta, stripProfilingMeta, recordFailure } from '../../profiling/index.js';
|
|
10
10
|
import { createClientTimings, createClientStreamTimings, recordClientEvents, recordClientStreamEvents, cacheConnectionTime, flushConnectionTime, resetConnectionTracking } from './profiling/index.js';
|
|
11
11
|
const logger = getClientLogger();
|
|
12
12
|
let rpcInstance = null;
|
|
@@ -234,6 +234,7 @@ async function sendProfiled(request, rpc, options) {
|
|
|
234
234
|
const requestType = request.type;
|
|
235
235
|
const profileId = createProfileId();
|
|
236
236
|
const includeServer = shouldIncludeServerBreakdown(options?.profiling);
|
|
237
|
+
const includeResources = shouldIncludeResourceGauges(options?.profiling);
|
|
237
238
|
const timings = createClientTimings(profileId, requestType);
|
|
238
239
|
try {
|
|
239
240
|
const zodStart = nowMs();
|
|
@@ -241,7 +242,7 @@ async function sendProfiled(request, rpc, options) {
|
|
|
241
242
|
timings.requestZodValidationMs = nowMs() - zodStart;
|
|
242
243
|
const req = rpc.request(getNextCommandId());
|
|
243
244
|
logger.debug('RPC Client sending:', summarizeRequest(request));
|
|
244
|
-
const profilingMeta = createProfilingMeta(profileId, includeServer);
|
|
245
|
+
const profilingMeta = createProfilingMeta(profileId, includeServer, includeResources);
|
|
245
246
|
const requestWithMeta = injectProfilingMetaIntoObject(parsedRequest, profilingMeta);
|
|
246
247
|
const stringifyStart = nowMs();
|
|
247
248
|
const payload = JSON.stringify(requestWithMeta);
|
|
@@ -319,6 +320,7 @@ async function* streamProfiled(request, rpc, options = {}) {
|
|
|
319
320
|
const requestType = request.type;
|
|
320
321
|
const profileId = createProfileId();
|
|
321
322
|
const includeServer = shouldIncludeServerBreakdown(options?.profiling);
|
|
323
|
+
const includeResources = shouldIncludeResourceGauges(options?.profiling);
|
|
322
324
|
const timings = createClientStreamTimings(profileId, requestType);
|
|
323
325
|
let profilingMeta = undefined;
|
|
324
326
|
try {
|
|
@@ -327,7 +329,7 @@ async function* streamProfiled(request, rpc, options = {}) {
|
|
|
327
329
|
timings.requestZodValidationMs = nowMs() - zodStart;
|
|
328
330
|
const req = rpc.request(getNextCommandId());
|
|
329
331
|
logger.debug('RPC Client streaming:', summarizeRequest(request));
|
|
330
|
-
const requestMeta = createProfilingMeta(profileId, includeServer);
|
|
332
|
+
const requestMeta = createProfilingMeta(profileId, includeServer, includeResources);
|
|
331
333
|
const requestWithMeta = injectProfilingMetaIntoObject(parsedRequest, requestMeta);
|
|
332
334
|
const stringifyStart = nowMs();
|
|
333
335
|
const payload = JSON.stringify(requestWithMeta);
|
|
@@ -434,6 +436,7 @@ async function duplexProfiled(request, options = {}) {
|
|
|
434
436
|
const requestType = request.type;
|
|
435
437
|
const profileId = createProfileId();
|
|
436
438
|
const includeServer = shouldIncludeServerBreakdown(options?.profiling);
|
|
439
|
+
const includeResources = shouldIncludeResourceGauges(options?.profiling);
|
|
437
440
|
const timings = createClientStreamTimings(profileId, requestType);
|
|
438
441
|
let session;
|
|
439
442
|
try {
|
|
@@ -441,7 +444,7 @@ async function duplexProfiled(request, options = {}) {
|
|
|
441
444
|
const parsedRequest = parseRequest(request);
|
|
442
445
|
timings.requestZodValidationMs = nowMs() - zodStart;
|
|
443
446
|
logger.debug('RPC Client duplex:', summarizeRequest(request));
|
|
444
|
-
const requestMeta = createProfilingMeta(profileId, includeServer);
|
|
447
|
+
const requestMeta = createProfilingMeta(profileId, includeServer, includeResources);
|
|
445
448
|
const requestWithMeta = injectProfilingMetaIntoObject(parsedRequest, requestMeta);
|
|
446
449
|
const stringifyStart = nowMs();
|
|
447
450
|
const payload = JSON.stringify(requestWithMeta);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContextOverflowError, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError } from '../../utils/errors-server.js';
|
|
1
|
+
import { ContextOverflowError, RequestIdConflictError, RequestNotFoundError, RequestRejectedByPolicyError, TranslationFailedError } from '../../utils/errors-server.js';
|
|
2
2
|
export class RPCError extends Error {
|
|
3
3
|
timestamp;
|
|
4
4
|
remoteStack;
|
|
@@ -112,6 +112,12 @@ const RECONSTRUCTORS = {
|
|
|
112
112
|
},
|
|
113
113
|
CONTEXT_OVERFLOW: (response) => {
|
|
114
114
|
return new ContextOverflowError(readOptionalNumberField(response.typedFields, 'promptTokens'), readOptionalNumberField(response.typedFields, 'ctxSize'), readOptionalStringField(response.typedFields, 'modelId'), response.cause);
|
|
115
|
+
},
|
|
116
|
+
// Source-language autodetect now fails server-side (translate detection moved
|
|
117
|
+
// into the worker), so this crosses the RPC and reconstructs as the typed
|
|
118
|
+
// class -- matching the Python client's reconstructor.
|
|
119
|
+
TRANSLATION_FAILED: (response) => {
|
|
120
|
+
return new TranslationFailedError(response.message, response.cause);
|
|
115
121
|
}
|
|
116
122
|
};
|
|
117
123
|
/**
|
|
@@ -8,6 +8,7 @@ export const BUILTIN_PLUGINS = {
|
|
|
8
8
|
'tts-ggml': { exportName: 'ttsPlugin' },
|
|
9
9
|
'ggml-ocr': { exportName: 'ocrPlugin' },
|
|
10
10
|
'sdcpp-generation': { exportName: 'diffusionPlugin' },
|
|
11
|
+
'audiogen-ggml': { exportName: 'audioGenPlugin' },
|
|
11
12
|
'ggml-vla': { exportName: 'vlaPlugin' },
|
|
12
13
|
'ggml-classification': { exportName: 'classificationPlugin' }
|
|
13
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseBuiltinSpecifier } from '
|
|
1
|
+
import { parseBuiltinSpecifier } from '../../commands/bundle/plugins.js';
|
|
2
2
|
export function generateWorkerEntry(pluginSpecifiers, sdkName, resolveImport = (specifier) => specifier) {
|
|
3
3
|
const imports = [];
|
|
4
4
|
const registrations = [];
|