@qvac/sdk 0.14.1 → 0.16.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 +47 -45
- package/README.md +34 -35
- package/dist/client/api/batch-completion.d.ts +15 -0
- package/dist/client/api/batch-completion.js +332 -0
- package/dist/client/api/bci-transcribe.d.ts +1 -1
- package/dist/client/api/bci-transcribe.js +31 -31
- package/dist/client/api/cancel.d.ts +1 -1
- package/dist/client/api/cancel.js +18 -18
- package/dist/client/api/classify.d.ts +1 -1
- package/dist/client/api/classify.js +9 -6
- package/dist/client/api/client-request-id.js +1 -1
- package/dist/client/api/completion-stream.d.ts +3 -3
- package/dist/client/api/completion-stream.js +18 -18
- package/dist/client/api/delete-cache.js +9 -9
- package/dist/client/api/diffusion.d.ts +1 -1
- package/dist/client/api/diffusion.js +17 -11
- package/dist/client/api/download-asset.d.ts +1 -1
- package/dist/client/api/download-asset.js +11 -11
- package/dist/client/api/embed.d.ts +1 -1
- package/dist/client/api/embed.js +10 -10
- package/dist/client/api/finetune.d.ts +1 -1
- package/dist/client/api/finetune.js +25 -27
- package/dist/client/api/get-loaded-model-info.d.ts +2 -2
- package/dist/client/api/get-loaded-model-info.js +8 -8
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/get-model-info.js +7 -7
- package/dist/client/api/heartbeat.d.ts +2 -2
- package/dist/client/api/heartbeat.js +7 -7
- package/dist/client/api/index.d.ts +33 -32
- package/dist/client/api/index.js +33 -32
- package/dist/client/api/invoke-plugin.d.ts +1 -1
- package/dist/client/api/invoke-plugin.js +10 -10
- package/dist/client/api/load-model.d.ts +1 -1
- package/dist/client/api/load-model.js +32 -32
- package/dist/client/api/logging-stream.d.ts +1 -1
- package/dist/client/api/logging-stream.js +6 -6
- package/dist/client/api/ocr.d.ts +10 -1
- package/dist/client/api/ocr.js +20 -11
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +7 -7
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +65 -66
- package/dist/client/api/registry.d.ts +1 -1
- package/dist/client/api/registry.js +8 -8
- package/dist/client/api/resume.js +5 -5
- package/dist/client/api/state.d.ts +1 -1
- package/dist/client/api/state.js +5 -5
- package/dist/client/api/stop-provider.js +6 -6
- package/dist/client/api/subscribe-logs.d.ts +1 -1
- package/dist/client/api/subscribe-logs.js +3 -3
- package/dist/client/api/suspend.js +5 -5
- package/dist/client/api/text-to-speech.d.ts +1 -1
- package/dist/client/api/text-to-speech.js +37 -39
- package/dist/client/api/transcribe.d.ts +2 -2
- package/dist/client/api/transcribe.js +44 -45
- package/dist/client/api/translate.d.ts +1 -1
- package/dist/client/api/translate.js +14 -25
- package/dist/client/api/unload-model.d.ts +1 -1
- package/dist/client/api/unload-model.js +11 -11
- package/dist/client/api/upscale.d.ts +1 -1
- package/dist/client/api/upscale.js +9 -9
- package/dist/client/api/video.d.ts +8 -5
- package/dist/client/api/video.js +23 -18
- package/dist/client/api/vla-helpers.d.ts +2 -2
- package/dist/client/api/vla-helpers.js +6 -11
- package/dist/client/api/vla.d.ts +15 -11
- package/dist/client/api/vla.js +27 -23
- package/dist/client/config-loader/config-utils.d.ts +1 -1
- package/dist/client/config-loader/config-utils.js +3 -3
- package/dist/client/config-loader/resolve-config.bare.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.bare.js +11 -11
- package/dist/client/config-loader/resolve-config.expo.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.expo.js +6 -6
- package/dist/client/config-loader/resolve-config.node.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.node.js +27 -27
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/init-hooks.d.ts +1 -1
- package/dist/client/init-hooks.js +12 -12
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/logging-stream-registry.js +6 -6
- package/dist/client/parse-input.d.ts +1 -1
- package/dist/client/parse-input.js +3 -3
- package/dist/client/plugins-factory.d.ts +2 -2
- package/dist/client/plugins-factory.js +2 -2
- package/dist/client/rpc/bare-client.d.ts +2 -1
- package/dist/client/rpc/bare-client.js +37 -39
- package/dist/client/rpc/ensure-worker-ready.js +4 -4
- package/dist/client/rpc/expo-device-info.d.ts +1 -1
- package/dist/client/rpc/expo-device-info.js +11 -11
- package/dist/client/rpc/expo-rpc-client.d.ts +2 -1
- package/dist/client/rpc/expo-rpc-client.js +38 -47
- package/dist/client/rpc/node-rpc-client.d.ts +2 -1
- package/dist/client/rpc/node-rpc-client.js +103 -75
- package/dist/client/rpc/profiling/index.d.ts +1 -1
- package/dist/client/rpc/profiling/index.js +1 -1
- package/dist/client/rpc/profiling/profiler.d.ts +2 -2
- package/dist/client/rpc/profiling/profiler.js +31 -34
- package/dist/client/rpc/rpc-client.d.ts +2 -2
- package/dist/client/rpc/rpc-client.js +113 -72
- package/dist/client/rpc/rpc-error.d.ts +1 -1
- package/dist/client/rpc/rpc-error.js +19 -13
- package/dist/commands/bundle/bare-pack.d.ts +1 -1
- package/dist/commands/bundle/bare-pack.js +20 -20
- package/dist/commands/bundle/constants.js +21 -21
- package/dist/commands/bundle/entry-gen.js +4 -4
- package/dist/commands/bundle/index.js +45 -47
- package/dist/commands/bundle/manifest.d.ts +1 -1
- package/dist/commands/bundle/manifest.js +44 -46
- package/dist/commands/bundle/plugins.d.ts +2 -2
- package/dist/commands/bundle/plugins.js +7 -7
- package/dist/commands/bundle/resolve-sdk-import.js +6 -13
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +2 -2
- package/dist/commands/verify/abi.d.ts +9 -9
- package/dist/commands/verify/abi.js +31 -31
- package/dist/commands/verify/addon-source.d.ts +1 -1
- package/dist/commands/verify/addon-source.js +13 -14
- package/dist/commands/verify/bundle-source.d.ts +1 -1
- package/dist/commands/verify/bundle-source.js +7 -7
- package/dist/commands/verify/index.d.ts +3 -3
- package/dist/commands/verify/index.js +18 -17
- package/dist/commands/verify/node-modules-source.d.ts +1 -1
- package/dist/commands/verify/node-modules-source.js +11 -11
- package/dist/commands/verify/prebuilds.d.ts +3 -3
- package/dist/commands/verify/prebuilds.js +8 -8
- package/dist/constants/audio.d.ts +1 -1
- package/dist/constants/audio.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/constants/registry.js +1 -1
- package/dist/examples/audio/mic-input.d.ts +1 -1
- package/dist/examples/audio/mic-input.js +31 -31
- package/dist/examples/batch-completion.d.ts +38 -0
- package/dist/examples/batch-completion.js +100 -0
- package/dist/examples/bci/bci-filesystem-streaming.js +20 -20
- package/dist/examples/bci/bci-filesystem.js +17 -17
- package/dist/examples/cache-management.js +32 -32
- package/dist/examples/cancel-by-request-id.js +11 -11
- package/dist/examples/classification/classify-image.js +5 -5
- package/dist/examples/completion-events.js +16 -18
- package/dist/examples/completion-stop-reason.js +13 -13
- package/dist/examples/concurrent-completion-collision.js +20 -20
- package/dist/examples/config/blind-relay/blind-relay.config.js +4 -4
- package/dist/examples/config/default/default.config.js +2 -2
- package/dist/examples/config/plugins/plugins.config.js +2 -2
- package/dist/examples/config-reload.js +14 -14
- package/dist/examples/default-config-usage.js +10 -13
- package/dist/examples/delegated-inference/composite.js +23 -23
- package/dist/examples/delegated-inference/consumer-profiled.js +19 -19
- package/dist/examples/delegated-inference/consumer.js +11 -11
- package/dist/examples/delegated-inference/provider.js +24 -24
- package/dist/examples/diffusion-esrgan-upscale.js +19 -19
- package/dist/examples/diffusion-flux2-klein-img2img.js +17 -17
- package/dist/examples/diffusion-flux2-klein.js +14 -14
- package/dist/examples/diffusion-ideogram.d.ts +2 -0
- package/dist/examples/diffusion-ideogram.js +108 -0
- package/dist/examples/diffusion-img2img.js +13 -13
- package/dist/examples/diffusion-img2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-img2vid-ltx.js +98 -0
- package/dist/examples/diffusion-img2vid.js +22 -23
- package/dist/examples/diffusion-simple.js +7 -7
- package/dist/examples/diffusion-txt2img.js +13 -14
- package/dist/examples/diffusion-txt2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-txt2vid-ltx.js +92 -0
- package/dist/examples/diffusion-txt2vid.js +18 -18
- package/dist/examples/download-with-blind-relays.js +7 -8
- package/dist/examples/download-with-cancel.js +9 -9
- package/dist/examples/embed-multi-gpu.js +9 -9
- package/dist/examples/embed-p2p.js +24 -24
- package/dist/examples/finetune/llamacpp-finetune.js +21 -21
- package/dist/examples/kv-cache-cleanup.js +34 -34
- package/dist/examples/kv-cache-custom-key.js +30 -30
- package/dist/examples/kv-cache-example.js +18 -20
- package/dist/examples/llamacpp-cache.js +33 -33
- package/dist/examples/llamacpp-dynamic-tools.js +38 -38
- package/dist/examples/llamacpp-filesystem.js +13 -15
- package/dist/examples/llamacpp-http.js +12 -14
- package/dist/examples/llamacpp-multi-gpu.js +12 -12
- package/dist/examples/llamacpp-multimodal.js +16 -16
- package/dist/examples/llamacpp-p2p.js +11 -11
- package/dist/examples/llamacpp-sharded.js +12 -12
- package/dist/examples/llamacpp-structured-output.js +37 -37
- package/dist/examples/logging-file-transport.js +19 -21
- package/dist/examples/logging-global.js +8 -8
- package/dist/examples/logging-streaming.js +19 -17
- package/dist/examples/mcp-websearch.js +44 -44
- package/dist/examples/multi-model-demo.js +33 -33
- package/dist/examples/ocr-fasttext.js +17 -17
- package/dist/examples/parallel-download.js +11 -13
- package/dist/examples/plugins.js +43 -43
- package/dist/examples/profiling/basic.js +34 -36
- package/dist/examples/profiling/per-call.js +16 -16
- package/dist/examples/quickstart.bare.js +4 -6
- package/dist/examples/quickstart.js +7 -7
- package/dist/examples/rag/rag-chromadb.js +26 -26
- package/dist/examples/rag/rag-hyperdb/cancellation.js +19 -20
- package/dist/examples/rag/rag-hyperdb/ingest.js +19 -19
- package/dist/examples/rag/rag-hyperdb/pipeline.js +26 -26
- package/dist/examples/rag/rag-hyperdb/workspaces.js +46 -46
- package/dist/examples/rag/rag-lancedb.js +29 -32
- package/dist/examples/rag/rag-sqlite.js +25 -25
- package/dist/examples/registry-query.js +15 -15
- package/dist/examples/seed-p2p.js +8 -8
- package/dist/examples/suspend-resume.js +20 -20
- package/dist/examples/tools/llamacpp-native-tools.js +25 -25
- package/dist/examples/tools/llamacpp-tools-gemma4.js +14 -14
- package/dist/examples/tools/llamacpp-tools-harmony-multiturn.js +15 -15
- package/dist/examples/tools/llamacpp-tools-pythonic.js +15 -15
- package/dist/examples/tools/llamacpp-tools-qwen35.js +14 -14
- package/dist/examples/tools/shared.d.ts +2 -2
- package/dist/examples/tools/shared.js +17 -17
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +12 -12
- package/dist/examples/transcription/parakeet-microphone-record.js +19 -19
- package/dist/examples/transcription/parakeet-microphone-stream.js +23 -23
- package/dist/examples/transcription/parakeet-sortformer-streaming.js +18 -28
- package/dist/examples/transcription/parakeet-sortformer.js +21 -21
- package/dist/examples/transcription/parakeet-tdt-filesystem-chunked.d.ts +2 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem-chunked.js +203 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +13 -13
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +34 -34
- package/dist/examples/transcription/whispercpp-filesystem.js +19 -19
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +27 -27
- package/dist/examples/transcription/whispercpp-microphone-record.js +21 -21
- package/dist/examples/transcription/whispercpp-prompt.js +18 -18
- package/dist/examples/translation/translation-bergamot-batch.js +17 -17
- package/dist/examples/translation/translation-bergamot-pivot.js +16 -16
- package/dist/examples/translation/translation-bergamot.js +11 -11
- package/dist/examples/translation/translation-indic.js +10 -10
- package/dist/examples/translation/translation-llm-afriquegemma.js +10 -10
- package/dist/examples/translation/translation-llm-context.js +10 -10
- package/dist/examples/translation/translation-llm.js +13 -13
- package/dist/examples/translation/translation-stream.js +11 -11
- package/dist/examples/tts/chatterbox-enhanced.d.ts +2 -0
- package/dist/examples/tts/chatterbox-enhanced.js +55 -0
- package/dist/examples/tts/chatterbox-multilingual.d.ts +2 -0
- package/dist/examples/tts/chatterbox-multilingual.js +54 -0
- package/dist/examples/tts/chatterbox.js +18 -18
- package/dist/examples/tts/llm-to-tts-streaming.js +30 -30
- package/dist/examples/tts/supertonic-enhanced.d.ts +2 -0
- package/dist/examples/tts/supertonic-enhanced.js +57 -0
- package/dist/examples/tts/supertonic-multilingual.js +19 -19
- package/dist/examples/tts/supertonic.js +18 -18
- package/dist/examples/tts/utils.js +24 -32
- package/dist/examples/vla-groot.d.ts +2 -0
- package/dist/examples/vla-groot.js +118 -0
- package/dist/examples/vla-pi05.js +14 -14
- package/dist/examples/vla-smolvla.js +14 -14
- package/dist/examples/voice-assistant/voice-assistant.js +46 -46
- package/dist/expo/plugins/find-in-ancestor-node-modules.js +3 -3
- package/dist/expo/plugins/get-project-root.d.ts +2 -2
- package/dist/expo/plugins/get-project-root.js +1 -1
- package/dist/expo/plugins/index.d.ts +11 -11
- package/dist/expo/plugins/index.js +10 -10
- package/dist/expo/plugins/resolve-sdk-package-dir.js +7 -11
- package/dist/expo/plugins/withAndroidArchitecture.d.ts +1 -1
- package/dist/expo/plugins/withAndroidArchitecture.js +12 -12
- package/dist/expo/plugins/withAndroidNdkVersion.d.ts +1 -1
- package/dist/expo/plugins/withAndroidNdkVersion.js +9 -9
- package/dist/expo/plugins/withDeviceInfo.d.ts +1 -1
- package/dist/expo/plugins/withDeviceInfo.js +13 -13
- package/dist/expo/plugins/withMobileBundle.d.ts +1 -1
- package/dist/expo/plugins/withMobileBundle.js +34 -42
- package/dist/expo/plugins/withOpenCL.d.ts +1 -1
- package/dist/expo/plugins/withOpenCL.js +14 -16
- package/dist/expo/plugins/withQvacSDK.d.ts +1 -1
- package/dist/expo/plugins/withQvacSDK.js +12 -12
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -17
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +13 -13
- package/dist/logging/base-logger.d.ts +2 -2
- package/dist/logging/base-logger.js +6 -6
- package/dist/logging/client-logger.d.ts +1 -1
- package/dist/logging/client-logger.js +3 -3
- package/dist/logging/index.d.ts +9 -9
- package/dist/logging/index.js +8 -8
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +4 -4
- package/dist/logging/namespaces.d.ts +1 -1
- package/dist/logging/namespaces.js +5 -5
- package/dist/logging/registry.d.ts +2 -2
- package/dist/logging/registry.js +3 -3
- package/dist/logging/server-logger.d.ts +1 -1
- package/dist/logging/server-logger.js +2 -2
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/stream-logger.js +4 -4
- package/dist/logging/transport.d.ts +1 -1
- package/dist/logging/types.d.ts +1 -1
- package/dist/logging/utils.d.ts +2 -2
- package/dist/logging/utils.js +40 -41
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +5 -5
- package/dist/models/registry/models.d.ts +5622 -9241
- package/dist/models/registry/models.js +13215 -17030
- package/dist/models/update-models/codegen.d.ts +1 -1
- package/dist/models/update-models/codegen.js +8 -8
- package/dist/models/update-models/companions.d.ts +6 -1
- package/dist/models/update-models/companions.js +104 -39
- package/dist/models/update-models/history.d.ts +1 -1
- package/dist/models/update-models/history.js +11 -11
- package/dist/models/update-models/index.js +32 -34
- package/dist/models/update-models/naming.d.ts +2 -2
- package/dist/models/update-models/naming.js +181 -186
- package/dist/models/update-models/processing.d.ts +2 -2
- package/dist/models/update-models/processing.js +17 -19
- package/dist/models/update-models/registry.d.ts +2 -2
- package/dist/models/update-models/registry.js +9 -9
- package/dist/models/update-models/shards.d.ts +1 -1
- package/dist/models/update-models/shards.js +3 -3
- package/dist/models/update-models/types.d.ts +1 -1
- package/dist/models/update-models/utils.js +5 -5
- package/dist/pear/pre.js +84 -84
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +6 -6
- package/dist/profiling/clock.d.ts +1 -1
- package/dist/profiling/clock.js +10 -10
- package/dist/profiling/controller.d.ts +2 -2
- package/dist/profiling/controller.js +11 -12
- package/dist/profiling/envelope.d.ts +1 -1
- package/dist/profiling/envelope.js +4 -6
- package/dist/profiling/events.d.ts +2 -2
- package/dist/profiling/events.js +8 -10
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +81 -79
- package/dist/profiling/index.d.ts +8 -8
- package/dist/profiling/index.js +7 -7
- package/dist/profiling/model-execution.js +2 -1
- package/dist/profiling/ring-buffer.js +2 -2
- package/dist/profiling/types.d.ts +3 -3
- package/dist/schemas/archive.d.ts +1 -1
- package/dist/schemas/archive.js +8 -14
- package/dist/schemas/batch-completion-stream.d.ts +463 -0
- package/dist/schemas/batch-completion-stream.js +124 -0
- package/dist/schemas/bci-config.d.ts +1 -1
- package/dist/schemas/bci-config.js +7 -7
- package/dist/schemas/bci.d.ts +3 -3
- package/dist/schemas/bci.js +25 -31
- package/dist/schemas/cancel.d.ts +6 -1
- package/dist/schemas/cancel.js +33 -34
- package/dist/schemas/classification.d.ts +1 -1
- package/dist/schemas/classification.js +7 -7
- package/dist/schemas/common.d.ts +578 -28
- package/dist/schemas/common.js +42 -37
- package/dist/schemas/completion-event.d.ts +11 -8
- package/dist/schemas/completion-event.js +27 -26
- package/dist/schemas/completion-stream.d.ts +190 -5
- package/dist/schemas/completion-stream.js +118 -67
- package/dist/schemas/constants-registry.d.ts +67 -0
- package/dist/schemas/constants-registry.js +51 -0
- package/dist/schemas/delegate.d.ts +1 -1
- package/dist/schemas/delegate.js +7 -7
- package/dist/schemas/delete-cache.d.ts +1 -1
- package/dist/schemas/delete-cache.js +15 -11
- package/dist/schemas/download-asset.d.ts +2 -2
- package/dist/schemas/download-asset.js +21 -21
- package/dist/schemas/embed.d.ts +3 -3
- package/dist/schemas/embed.js +16 -27
- package/dist/schemas/engine-addon-map.d.ts +3 -2
- package/dist/schemas/engine-addon-map.js +25 -25
- package/dist/schemas/error.d.ts +1 -1
- package/dist/schemas/error.js +12 -13
- package/dist/schemas/finetune.d.ts +1 -1
- package/dist/schemas/finetune.js +41 -44
- package/dist/schemas/get-loaded-model-info.d.ts +17 -1
- package/dist/schemas/get-loaded-model-info.js +22 -14
- package/dist/schemas/get-model-info.d.ts +1 -1
- package/dist/schemas/get-model-info.js +48 -91
- package/dist/schemas/heartbeat.d.ts +1 -1
- package/dist/schemas/heartbeat.js +6 -6
- package/dist/schemas/index.d.ts +52 -51
- package/dist/schemas/index.js +52 -51
- package/dist/schemas/json-schema.d.ts +1 -1
- package/dist/schemas/llamacpp-config.d.ts +57 -29
- package/dist/schemas/llamacpp-config.js +43 -35
- package/dist/schemas/load-model.d.ts +1537 -185
- package/dist/schemas/load-model.js +126 -129
- package/dist/schemas/logging-stream.d.ts +1 -1
- package/dist/schemas/logging-stream.js +6 -12
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-src-utils.d.ts +1 -1
- package/dist/schemas/model-src-utils.js +13 -13
- package/dist/schemas/model-types.d.ts +1 -1
- package/dist/schemas/model-types.js +27 -27
- package/dist/schemas/ocr.d.ts +1 -1
- package/dist/schemas/ocr.js +18 -18
- package/dist/schemas/path-validation.d.ts +1 -1
- package/dist/schemas/path-validation.js +4 -4
- package/dist/schemas/plugin.d.ts +13 -14
- package/dist/schemas/plugin.js +51 -51
- package/dist/schemas/profiling.d.ts +1 -1
- package/dist/schemas/profiling.js +16 -16
- package/dist/schemas/provide.d.ts +1 -1
- package/dist/schemas/provide.js +8 -8
- package/dist/schemas/rag.d.ts +3 -3
- package/dist/schemas/rag.js +65 -70
- package/dist/schemas/registry.d.ts +1 -1
- package/dist/schemas/registry.js +44 -66
- package/dist/schemas/reload-config.d.ts +1 -1
- package/dist/schemas/reload-config.js +16 -18
- package/dist/schemas/resume.d.ts +1 -1
- package/dist/schemas/resume.js +3 -3
- package/dist/schemas/runtime-context.d.ts +1 -1
- package/dist/schemas/runtime-context.js +4 -4
- package/dist/schemas/sdcpp-config.d.ts +248 -9
- package/dist/schemas/sdcpp-config.js +395 -291
- package/dist/schemas/sdk-config.d.ts +833 -71
- package/dist/schemas/sdk-config.js +25 -29
- package/dist/schemas/sdk-errors-client.d.ts +1 -1
- package/dist/schemas/sdk-errors-client.js +80 -80
- package/dist/schemas/sdk-errors-registry.js +1 -1
- package/dist/schemas/sdk-errors-server.d.ts +1 -1
- package/dist/schemas/sdk-errors-server.js +202 -199
- package/dist/schemas/shard.d.ts +1 -1
- package/dist/schemas/shard.js +4 -4
- package/dist/schemas/state.d.ts +1 -1
- package/dist/schemas/state.js +5 -10
- package/dist/schemas/stop-provide.d.ts +1 -1
- package/dist/schemas/stop-provide.js +4 -4
- package/dist/schemas/suspend.d.ts +1 -1
- package/dist/schemas/suspend.js +3 -3
- package/dist/schemas/text-to-speech.d.ts +469 -3
- package/dist/schemas/text-to-speech.js +151 -109
- package/dist/schemas/tools.d.ts +2 -2
- package/dist/schemas/tools.js +18 -24
- package/dist/schemas/transcription-config.d.ts +1 -1
- package/dist/schemas/transcription-config.js +18 -18
- package/dist/schemas/transcription.d.ts +5 -5
- package/dist/schemas/transcription.js +31 -33
- package/dist/schemas/translate.d.ts +3 -3
- package/dist/schemas/translate.js +49 -72
- package/dist/schemas/translation-config.d.ts +1 -1
- package/dist/schemas/translation-config.js +116 -123
- package/dist/schemas/unload-model.d.ts +1 -1
- package/dist/schemas/unload-model.js +6 -6
- package/dist/schemas/vla.d.ts +11 -1
- package/dist/schemas/vla.js +52 -32
- 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/scripts/run-security-tests.js +9 -10
- package/dist/scripts/run-unit-tests.js +11 -12
- package/dist/server/bare/delegate-connect-diagnostics.js +13 -19
- package/dist/server/bare/delegate-rpc-client.d.ts +2 -2
- package/dist/server/bare/delegate-rpc-client.js +32 -34
- package/dist/server/bare/hyperswarm.d.ts +3 -3
- package/dist/server/bare/hyperswarm.js +14 -14
- package/dist/server/bare/ops/bci-transcribe.d.ts +1 -1
- package/dist/server/bare/ops/bci-transcribe.js +44 -44
- package/dist/server/bare/ops/cancel.d.ts +2 -2
- package/dist/server/bare/ops/cancel.js +6 -6
- package/dist/server/bare/ops/embed.d.ts +1 -1
- package/dist/server/bare/ops/embed.js +26 -16
- package/dist/server/bare/ops/kv-cache-utils.d.ts +1 -1
- package/dist/server/bare/ops/kv-cache-utils.js +17 -19
- package/dist/server/bare/ops/load-model.d.ts +2 -2
- package/dist/server/bare/ops/load-model.js +14 -18
- package/dist/server/bare/ops/transcribe.d.ts +3 -3
- package/dist/server/bare/ops/transcribe.js +62 -62
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +53 -31
- package/dist/server/bare/ops/unload-model.d.ts +1 -1
- package/dist/server/bare/ops/unload-model.js +12 -12
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +2 -2
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +3 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +4 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +33 -33
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +1 -1
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.js +8 -8
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/plugin.js +14 -14
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.js +27 -26
- package/dist/server/bare/plugins/ggml-ocr/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +33 -54
- 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 +3 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +23 -23
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +6 -1
- package/dist/server/bare/plugins/ggml-vla/plugin.js +15 -15
- package/dist/server/bare/plugins/index.d.ts +11 -11
- package/dist/server/bare/plugins/index.js +11 -11
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.d.ts +23 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.js +30 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.d.ts +32 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +99 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +8 -8
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +3 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +4 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +22 -4
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +65 -80
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +5 -5
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +2 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +34 -34
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +7 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +19 -23
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +8 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +12 -6
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +193 -19
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +235 -70
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +15 -15
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +9 -4
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +27 -29
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +38 -39
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.js +19 -22
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +36 -36
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +15 -17
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +11 -11
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +3 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +71 -44
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +132 -4
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +148 -70
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.js +19 -21
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.js +18 -34
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +9 -2
- package/dist/server/bare/plugins/tts-ggml/plugin.js +97 -49
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +52 -52
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +5 -5
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/search.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +3 -3
- package/dist/server/bare/rag-hyperdb/index.d.ts +11 -11
- package/dist/server/bare/rag-hyperdb/index.js +11 -11
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +3 -3
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +20 -20
- package/dist/server/bare/registry/config-registry.d.ts +1 -1
- package/dist/server/bare/registry/config-registry.js +13 -16
- package/dist/server/bare/registry/logging-stream-registry.d.ts +1 -1
- package/dist/server/bare/registry/logging-stream-registry.js +2 -2
- package/dist/server/bare/registry/model-config-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-config-registry.js +6 -6
- package/dist/server/bare/registry/model-config-utils.d.ts +2 -2
- package/dist/server/bare/registry/model-config-utils.js +35 -35
- package/dist/server/bare/registry/model-registry.d.ts +3 -3
- package/dist/server/bare/registry/model-registry.js +11 -11
- package/dist/server/bare/registry/registry-client.d.ts +1 -1
- package/dist/server/bare/registry/registry-client.js +18 -18
- package/dist/server/bare/registry/runtime-context-registry.d.ts +1 -1
- package/dist/server/bare/registry/runtime-context-registry.js +3 -3
- package/dist/server/bare/runtime/disposable-scope.js +3 -3
- package/dist/server/bare/runtime/index.d.ts +7 -7
- package/dist/server/bare/runtime/index.js +3 -3
- package/dist/server/bare/runtime/request-context.d.ts +4 -4
- package/dist/server/bare/runtime/request-id.js +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.js +23 -4
- package/dist/server/bare/runtime/request-registry.d.ts +27 -12
- package/dist/server/bare/runtime/request-registry.js +39 -34
- package/dist/server/bare/runtime/with-request-context.d.ts +1 -1
- package/dist/server/bare/runtime/with-request-context.js +11 -11
- package/dist/server/bare/runtime-lifecycle.d.ts +1 -1
- package/dist/server/bare/runtime-lifecycle.js +27 -31
- package/dist/server/bare/types/addon-responses.d.ts +7 -4
- package/dist/server/bare/utils/audio-input.d.ts +2 -2
- package/dist/server/bare/utils/audio-input.js +7 -7
- package/dist/server/bare/utils/transcribe-metadata.d.ts +1 -1
- package/dist/server/bare/utils/transcribe-metadata.js +4 -4
- package/dist/server/bare/utils/tts-stats.d.ts +9 -5
- package/dist/server/bare/utils/tts-stats.js +8 -2
- package/dist/server/env.js +8 -8
- package/dist/server/error-handlers.d.ts +3 -3
- package/dist/server/error-handlers.js +11 -11
- package/dist/server/plugins/index.d.ts +1 -1
- package/dist/server/plugins/index.js +1 -1
- package/dist/server/plugins/registry.d.ts +1 -1
- package/dist/server/plugins/registry.js +12 -14
- package/dist/server/rpc/create-server.d.ts +1 -1
- package/dist/server/rpc/create-server.js +34 -13
- package/dist/server/rpc/delegate-transport.d.ts +3 -3
- package/dist/server/rpc/delegate-transport.js +43 -44
- package/dist/server/rpc/handle-request.d.ts +1 -1
- package/dist/server/rpc/handle-request.js +28 -30
- package/dist/server/rpc/handler-registry.d.ts +1 -1
- package/dist/server/rpc/handler-registry.js +102 -92
- package/dist/server/rpc/handler-selection.d.ts +3 -3
- package/dist/server/rpc/handler-selection.js +3 -3
- package/dist/server/rpc/handler-utils.d.ts +7 -7
- package/dist/server/rpc/handler-utils.js +32 -35
- package/dist/server/rpc/handlers/batch-completion-stream.d.ts +78 -0
- package/dist/server/rpc/handlers/batch-completion-stream.js +4 -0
- package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/bci-transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe.js +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.js +13 -13
- package/dist/server/rpc/handlers/cancelHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/cancelHandler.js +11 -11
- package/dist/server/rpc/handlers/classify.d.ts +1 -1
- package/dist/server/rpc/handlers/classify.js +2 -2
- package/dist/server/rpc/handlers/completion-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 +14 -14
- package/dist/server/rpc/handlers/completion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/completion-stream.js +2 -2
- package/dist/server/rpc/handlers/delete-cache.d.ts +1 -1
- package/dist/server/rpc/handlers/delete-cache.js +10 -10
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/diffusion-stream.js +2 -2
- package/dist/server/rpc/handlers/download-asset.d.ts +1 -1
- package/dist/server/rpc/handlers/download-asset.js +20 -20
- package/dist/server/rpc/handlers/embed.d.ts +1 -1
- package/dist/server/rpc/handlers/embed.js +2 -2
- package/dist/server/rpc/handlers/finetune.d.ts +1 -1
- package/dist/server/rpc/handlers/finetune.js +8 -6
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-loaded-model-info.js +15 -9
- package/dist/server/rpc/handlers/get-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-model-info.js +20 -20
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/heartbeat-delegated.js +7 -7
- package/dist/server/rpc/handlers/heartbeat.d.ts +1 -1
- package/dist/server/rpc/handlers/heartbeat.js +1 -1
- package/dist/server/rpc/handlers/index.d.ts +35 -31
- package/dist/server/rpc/handlers/index.js +36 -32
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +4 -4
- package/dist/server/rpc/handlers/load-model/download-manager.js +19 -17
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/download-stats.js +9 -11
- package/dist/server/rpc/handlers/load-model/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/handler.js +42 -43
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/http.js +100 -107
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +72 -74
- package/dist/server/rpc/handlers/load-model/index.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/index.js +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.js +2 -3
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +5 -5
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +19 -21
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +6 -6
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +16 -18
- package/dist/server/rpc/handlers/load-model/registry-metadata.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry-metadata.js +23 -0
- package/dist/server/rpc/handlers/load-model/registry.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/registry.js +50 -56
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve-session.js +7 -7
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +36 -35
- package/dist/server/rpc/handlers/load-model/types.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/types.js +7 -7
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model-delegated.js +31 -30
- package/dist/server/rpc/handlers/logging-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/logging-stream.js +3 -3
- package/dist/server/rpc/handlers/ocr-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/ocr-stream.js +2 -2
- package/dist/server/rpc/handlers/plugin-dispatch.js +9 -9
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +1 -1
- package/dist/server/rpc/handlers/plugin-invoke.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/connection.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/connection.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/handler.js +18 -18
- package/dist/server/rpc/handlers/provideHandler/proxy.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/proxy.js +11 -11
- package/dist/server/rpc/handlers/provideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler.js +1 -1
- package/dist/server/rpc/handlers/rag.d.ts +1 -1
- package/dist/server/rpc/handlers/rag.js +50 -50
- package/dist/server/rpc/handlers/registry.d.ts +1 -1
- package/dist/server/rpc/handlers/registry.js +34 -36
- package/dist/server/rpc/handlers/resume.d.ts +1 -1
- package/dist/server/rpc/handlers/resume.js +3 -3
- package/dist/server/rpc/handlers/state.d.ts +1 -1
- package/dist/server/rpc/handlers/state.js +3 -3
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/stopProvideHandler.js +7 -7
- package/dist/server/rpc/handlers/suspend.d.ts +1 -1
- package/dist/server/rpc/handlers/suspend.js +3 -3
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech-stream.js +2 -2
- package/dist/server/rpc/handlers/text-to-speech.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech.js +2 -2
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe.js +2 -2
- package/dist/server/rpc/handlers/translate.d.ts +1 -1
- package/dist/server/rpc/handlers/translate.js +2 -2
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model-delegated.js +10 -10
- package/dist/server/rpc/handlers/unload-model.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model.js +10 -10
- package/dist/server/rpc/handlers/upscale-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/upscale-stream.js +2 -2
- package/dist/server/rpc/handlers/video-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/video-stream.js +2 -2
- package/dist/server/rpc/index.d.ts +2 -2
- package/dist/server/rpc/index.js +2 -2
- package/dist/server/rpc/method-shapes.d.ts +51 -0
- package/dist/server/rpc/method-shapes.js +48 -0
- package/dist/server/rpc/profiling/context.d.ts +1 -1
- package/dist/server/rpc/profiling/context.js +9 -10
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/delegation-profiler.js +23 -24
- package/dist/server/rpc/profiling/index.d.ts +4 -4
- package/dist/server/rpc/profiling/index.js +4 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +2 -2
- package/dist/server/rpc/profiling/operation-metrics.js +122 -102
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +16 -14
- package/dist/server/rpc/profiling/profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/profiler.js +9 -13
- package/dist/server/rpc/rpc-utils.js +1 -4
- package/dist/server/rpc/transport-selector.d.ts +1 -1
- package/dist/server/rpc/transport-selector.js +4 -4
- package/dist/server/utils/archive.js +27 -29
- package/dist/server/utils/audio/decoder.d.ts +2 -2
- package/dist/server/utils/audio/decoder.js +11 -11
- package/dist/server/utils/cache/auto-history.d.ts +1 -1
- package/dist/server/utils/cache/auto-history.js +15 -11
- package/dist/server/utils/cache/paths.d.ts +2 -2
- package/dist/server/utils/cache/paths.js +14 -14
- package/dist/server/utils/checksum.d.ts +1 -1
- package/dist/server/utils/checksum.js +10 -12
- package/dist/server/utils/clear-storage.d.ts +1 -1
- package/dist/server/utils/clear-storage.js +8 -11
- package/dist/server/utils/completion-normalizer.d.ts +1 -1
- package/dist/server/utils/completion-normalizer.js +106 -113
- package/dist/server/utils/config-transform.d.ts +1 -1
- package/dist/server/utils/config-transform.js +2 -2
- package/dist/server/utils/expand-gguf-shards.js +4 -4
- package/dist/server/utils/formatting.js +6 -12
- package/dist/server/utils/gguf-tensor-extractor.js +17 -21
- package/dist/server/utils/index.d.ts +11 -11
- package/dist/server/utils/index.js +11 -11
- package/dist/server/utils/multi-gpu-mobile.js +1 -1
- package/dist/server/utils/path-security.d.ts +1 -1
- package/dist/server/utils/path-security.js +6 -6
- package/dist/server/utils/qvac-paths.js +3 -3
- package/dist/server/utils/response-format.d.ts +1 -1
- package/dist/server/utils/response-format.js +4 -4
- package/dist/server/utils/shard-utils.d.ts +1 -1
- package/dist/server/utils/shard-utils.js +14 -16
- package/dist/server/utils/tool-integration.d.ts +1 -1
- package/dist/server/utils/tool-integration.js +5 -9
- package/dist/server/utils/tools/dialect.d.ts +1 -1
- package/dist/server/utils/tools/dialect.js +7 -7
- package/dist/server/utils/tools/index.d.ts +2 -2
- package/dist/server/utils/tools/index.js +2 -2
- package/dist/server/utils/tools/parser.d.ts +1 -1
- package/dist/server/utils/tools/parser.js +14 -14
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +2 -2
- package/dist/server/utils/tools/parsers/gemma4native.js +13 -8
- package/dist/server/utils/tools/parsers/harmony.d.ts +2 -2
- package/dist/server/utils/tools/parsers/harmony.js +9 -11
- package/dist/server/utils/tools/parsers/hermes.d.ts +2 -2
- package/dist/server/utils/tools/parsers/hermes.js +16 -16
- package/dist/server/utils/tools/parsers/json.d.ts +2 -2
- package/dist/server/utils/tools/parsers/json.js +14 -14
- package/dist/server/utils/tools/parsers/pythonic.d.ts +2 -2
- package/dist/server/utils/tools/parsers/pythonic.js +43 -43
- package/dist/server/utils/tools/parsers/qwen35.d.ts +2 -2
- package/dist/server/utils/tools/parsers/qwen35.js +20 -20
- package/dist/server/utils/tools/shared.d.ts +1 -1
- package/dist/server/utils/tools/shared.js +10 -12
- package/dist/server/utils/worker-lock.js +10 -10
- package/dist/server/worker-core.d.ts +1 -1
- package/dist/server/worker-core.js +44 -43
- package/dist/server/worker.js +9 -9
- package/dist/utils/aggregate-events.d.ts +2 -2
- package/dist/utils/aggregate-events.js +17 -19
- package/dist/utils/cache-normalize.js +1 -4
- package/dist/utils/encoding.js +1 -1
- package/dist/utils/errors-base.d.ts +1 -1
- package/dist/utils/errors-base.js +1 -1
- package/dist/utils/errors-client.d.ts +1 -1
- package/dist/utils/errors-client.js +5 -5
- package/dist/utils/errors-server.d.ts +3 -3
- package/dist/utils/errors-server.js +19 -18
- package/dist/utils/load-model-validation.js +3 -3
- package/dist/utils/mcp-adapter.d.ts +4 -4
- package/dist/utils/mcp-adapter.js +31 -38
- package/dist/utils/path-sanitize.js +14 -17
- package/dist/utils/tool-helpers.d.ts +2 -2
- package/dist/utils/tool-helpers.js +25 -26
- package/dist/utils/withTimeout.d.ts +7 -0
- package/dist/utils/withTimeout.js +11 -1
- package/dist/utils/zod-error.d.ts +1 -1
- package/dist/utils/zod-error.js +1 -1
- package/electron-forge/index.cjs +274 -317
- package/expo/plugins/patches/android-link.mjs +25 -30
- package/expo/plugins/patches/ios-link.mjs +25 -30
- package/package.json +21 -17
package/dist/client/api/video.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { videoStreamResponseSchema
|
|
2
|
-
import { stream as streamRpc } from
|
|
3
|
-
import { generateClientRequestId } from
|
|
4
|
-
import { decodeBase64, encodeBase64 } from
|
|
1
|
+
import { videoStreamResponseSchema } from '../../schemas/index.js';
|
|
2
|
+
import { stream as streamRpc } from '../rpc/rpc-client.js';
|
|
3
|
+
import { generateClientRequestId } from './client-request-id.js';
|
|
4
|
+
import { decodeBase64, encodeBase64 } from '../../utils/encoding.js';
|
|
5
5
|
/**
|
|
6
6
|
* Generates a video using a loaded video diffusion model.
|
|
7
7
|
*
|
|
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
|
|
@@ -78,13 +81,13 @@ export function video(params) {
|
|
|
78
81
|
const request = {
|
|
79
82
|
...rest,
|
|
80
83
|
...(control_frames !== undefined && {
|
|
81
|
-
control_frames: control_frames.map(encodeBase64)
|
|
84
|
+
control_frames: control_frames.map(encodeBase64)
|
|
82
85
|
}),
|
|
83
86
|
...(init_image !== undefined && {
|
|
84
|
-
init_image: encodeBase64(init_image)
|
|
87
|
+
init_image: encodeBase64(init_image)
|
|
85
88
|
}),
|
|
86
|
-
type:
|
|
87
|
-
requestId
|
|
89
|
+
type: 'videoStream',
|
|
90
|
+
requestId
|
|
88
91
|
};
|
|
89
92
|
let statsResolver = () => { };
|
|
90
93
|
let statsRejecter = () => { };
|
|
@@ -109,15 +112,15 @@ export function video(params) {
|
|
|
109
112
|
try {
|
|
110
113
|
for await (const response of streamRpc(request)) {
|
|
111
114
|
if (response &&
|
|
112
|
-
typeof response ===
|
|
113
|
-
|
|
114
|
-
response.type ===
|
|
115
|
+
typeof response === 'object' &&
|
|
116
|
+
'type' in response &&
|
|
117
|
+
response.type === 'videoStream') {
|
|
115
118
|
const parsed = videoStreamResponseSchema.parse(response);
|
|
116
119
|
if (parsed.step != null && parsed.totalSteps != null && parsed.elapsedMs != null) {
|
|
117
120
|
progressQueue.push({
|
|
118
121
|
step: parsed.step,
|
|
119
122
|
totalSteps: parsed.totalSteps,
|
|
120
|
-
elapsedMs: parsed.elapsedMs
|
|
123
|
+
elapsedMs: parsed.elapsedMs
|
|
121
124
|
});
|
|
122
125
|
if (progressResolve) {
|
|
123
126
|
progressResolve();
|
|
@@ -157,7 +160,9 @@ export function video(params) {
|
|
|
157
160
|
return;
|
|
158
161
|
}
|
|
159
162
|
else {
|
|
160
|
-
await new Promise((resolve) => {
|
|
163
|
+
await new Promise((resolve) => {
|
|
164
|
+
progressResolve = resolve;
|
|
165
|
+
});
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
168
|
})();
|
|
@@ -165,6 +170,6 @@ export function video(params) {
|
|
|
165
170
|
requestId,
|
|
166
171
|
progressStream,
|
|
167
172
|
outputs: outputsPromise,
|
|
168
|
-
stats: statsPromise
|
|
173
|
+
stats: statsPromise
|
|
169
174
|
};
|
|
170
175
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/** Default vision tower image size used by SmolVLA-LIBERO. */
|
|
15
15
|
export declare const VLA_DEFAULT_IMAGE_SIZE = 512;
|
|
16
16
|
type PixelsInput = Float32Array | Uint8Array | number[];
|
|
17
|
-
type ImageLayout =
|
|
17
|
+
type ImageLayout = 'hwc' | 'chw';
|
|
18
18
|
export interface VlaPreprocessImageOptions {
|
|
19
19
|
size?: number;
|
|
20
20
|
layout?: ImageLayout;
|
|
@@ -24,7 +24,7 @@ export interface VlaPreprocessImageOptions {
|
|
|
24
24
|
* in [0,255] (rescale to [0,1]). Any other value (including the literal
|
|
25
25
|
* `'auto'`) falls back to the heuristic.
|
|
26
26
|
*/
|
|
27
|
-
scale?: number |
|
|
27
|
+
scale?: number | 'auto';
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Resize + letterbox + normalize a camera frame to `(3, size, size)` Float32
|
|
@@ -36,20 +36,15 @@ function detectScale(pixels) {
|
|
|
36
36
|
*/
|
|
37
37
|
export function vlaPreprocessImage(pixels, width, height, opts = {}) {
|
|
38
38
|
const size = opts.size ?? VLA_DEFAULT_IMAGE_SIZE;
|
|
39
|
-
const layout = opts.layout ??
|
|
40
|
-
if (!Number.isInteger(width) ||
|
|
41
|
-
|
|
42
|
-
width <= 0 ||
|
|
43
|
-
height <= 0) {
|
|
44
|
-
throw new TypeError("vlaPreprocessImage: width/height must be positive integers");
|
|
39
|
+
const layout = opts.layout ?? 'hwc';
|
|
40
|
+
if (!Number.isInteger(width) || !Number.isInteger(height) || width <= 0 || height <= 0) {
|
|
41
|
+
throw new TypeError('vlaPreprocessImage: width/height must be positive integers');
|
|
45
42
|
}
|
|
46
43
|
const expected = width * height * 3;
|
|
47
44
|
if (pixels.length !== expected) {
|
|
48
45
|
throw new RangeError(`vlaPreprocessImage: expected ${expected} pixel values, got ${pixels.length}`);
|
|
49
46
|
}
|
|
50
|
-
const normalize = opts.scale === 1 || opts.scale === 1 / 255
|
|
51
|
-
? opts.scale
|
|
52
|
-
: detectScale(pixels);
|
|
47
|
+
const normalize = opts.scale === 1 || opts.scale === 1 / 255 ? opts.scale : detectScale(pixels);
|
|
53
48
|
// Letterbox target size (aspect-ratio preserving).
|
|
54
49
|
const ratio = Math.max(width / size, height / size);
|
|
55
50
|
const newW = Math.max(1, Math.floor(width / ratio));
|
|
@@ -83,7 +78,7 @@ export function vlaPreprocessImage(pixels, width, height, opts = {}) {
|
|
|
83
78
|
const w01 = dxInv * dy;
|
|
84
79
|
const w11 = dx * dy;
|
|
85
80
|
const outIdx = outY * size + outX;
|
|
86
|
-
if (layout ===
|
|
81
|
+
if (layout === 'hwc') {
|
|
87
82
|
const i00 = (y0 * width + x0) * 3;
|
|
88
83
|
const i10 = (y0 * width + x1) * 3;
|
|
89
84
|
const i01 = (y1 * width + x0) * 3;
|
|
@@ -118,7 +113,7 @@ export function vlaPreprocessImage(pixels, width, height, opts = {}) {
|
|
|
118
113
|
*/
|
|
119
114
|
export function vlaPadState(state, targetDim = 32) {
|
|
120
115
|
if (!Number.isInteger(targetDim) || targetDim <= 0) {
|
|
121
|
-
throw new TypeError(
|
|
116
|
+
throw new TypeError('vlaPadState: targetDim must be a positive integer');
|
|
122
117
|
}
|
|
123
118
|
if (state.length > targetDim) {
|
|
124
119
|
throw new RangeError(`vlaPadState: input length ${state.length} exceeds targetDim ${targetDim}`);
|
package/dist/client/api/vla.d.ts
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { type VlaClientRunParams, type VlaClientRunResult, type VlaHparams } from
|
|
1
|
+
import { type VlaClientRunParams, type VlaClientRunResult, type VlaHparams } from '../../schemas/index';
|
|
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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { vlaHparamsResponseSchema, vlaRunResponseSchema
|
|
2
|
-
import { decodeBase64, encodeBase64 } from
|
|
3
|
-
import { invokePlugin } from
|
|
4
|
-
const VLA_RUN_HANDLER =
|
|
5
|
-
const VLA_HPARAMS_HANDLER =
|
|
1
|
+
import { vlaHparamsResponseSchema, vlaRunResponseSchema } from '../../schemas/index.js';
|
|
2
|
+
import { decodeBase64, encodeBase64 } from '../../utils/encoding.js';
|
|
3
|
+
import { invokePlugin } from './invoke-plugin.js';
|
|
4
|
+
const VLA_RUN_HANDLER = 'vlaRun';
|
|
5
|
+
const VLA_HPARAMS_HANDLER = 'vlaHparams';
|
|
6
6
|
function bytesOf(arr) {
|
|
7
7
|
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
8
8
|
}
|
|
@@ -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`.
|
|
@@ -65,7 +69,7 @@ function f32FromBase64(b64) {
|
|
|
65
69
|
*/
|
|
66
70
|
export async function vla(params) {
|
|
67
71
|
const wireRequest = {
|
|
68
|
-
type:
|
|
72
|
+
type: 'vlaRun',
|
|
69
73
|
modelId: params.modelId,
|
|
70
74
|
images: params.images.map((img) => encodeBase64(bytesOf(img))),
|
|
71
75
|
imgWidth: params.imgWidth,
|
|
@@ -74,20 +78,20 @@ export async function vla(params) {
|
|
|
74
78
|
tokens: encodeBase64(bytesOf(params.tokens)),
|
|
75
79
|
mask: encodeBase64(bytesOf(params.mask)),
|
|
76
80
|
...(params.noise !== undefined && {
|
|
77
|
-
noise: encodeBase64(bytesOf(params.noise))
|
|
78
|
-
})
|
|
81
|
+
noise: encodeBase64(bytesOf(params.noise))
|
|
82
|
+
})
|
|
79
83
|
};
|
|
80
84
|
const result = await invokePlugin({
|
|
81
85
|
modelId: params.modelId,
|
|
82
86
|
handler: VLA_RUN_HANDLER,
|
|
83
|
-
params: wireRequest
|
|
87
|
+
params: wireRequest
|
|
84
88
|
});
|
|
85
89
|
const parsed = vlaRunResponseSchema.parse(result);
|
|
86
90
|
return {
|
|
87
91
|
actions: f32FromBase64(parsed.actions),
|
|
88
92
|
actionDim: parsed.actionDim,
|
|
89
93
|
chunkSize: parsed.chunkSize,
|
|
90
|
-
...(parsed.stats && { stats: parsed.stats })
|
|
94
|
+
...(parsed.stats && { stats: parsed.stats })
|
|
91
95
|
};
|
|
92
96
|
}
|
|
93
97
|
/**
|
|
@@ -101,13 +105,13 @@ export async function vla(params) {
|
|
|
101
105
|
*/
|
|
102
106
|
export async function vlaHparams(params) {
|
|
103
107
|
const wireRequest = {
|
|
104
|
-
type:
|
|
105
|
-
modelId: params.modelId
|
|
108
|
+
type: 'vlaHparams',
|
|
109
|
+
modelId: params.modelId
|
|
106
110
|
};
|
|
107
111
|
const result = await invokePlugin({
|
|
108
112
|
modelId: params.modelId,
|
|
109
113
|
handler: VLA_HPARAMS_HANDLER,
|
|
110
|
-
params: wireRequest
|
|
114
|
+
params: wireRequest
|
|
111
115
|
});
|
|
112
116
|
return vlaHparamsResponseSchema.parse(result);
|
|
113
117
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QvacConfig } from
|
|
1
|
+
import { type QvacConfig } from '../../schemas/index';
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { qvacConfigSchema } from
|
|
2
|
-
import { ConfigValidationFailedError } from
|
|
3
|
-
import { formatZodError } from
|
|
1
|
+
import { qvacConfigSchema } from '../../schemas/index.js';
|
|
2
|
+
import { ConfigValidationFailedError } from '../../utils/errors-client.js';
|
|
3
|
+
import { formatZodError } from '../../utils/zod-error.js';
|
|
4
4
|
export function validateConfig(config) {
|
|
5
5
|
const result = qvacConfigSchema.safeParse(config);
|
|
6
6
|
if (!result.success) {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Config loader for Bare runtime
|
|
3
3
|
* Uses bare-fs and bare-path modules
|
|
4
4
|
*/
|
|
5
|
-
import fs from
|
|
6
|
-
import path from
|
|
7
|
-
import os from
|
|
8
|
-
import env from
|
|
9
|
-
import { validateConfig } from
|
|
10
|
-
import { ConfigFileInvalidError, ConfigFileParseFailedError
|
|
11
|
-
import { getClientLogger } from
|
|
12
|
-
const SUPPORTED_CONFIG_FILE_EXTS = [
|
|
5
|
+
import fs from 'bare-fs';
|
|
6
|
+
import path from 'bare-path';
|
|
7
|
+
import os from 'bare-os';
|
|
8
|
+
import env from 'bare-env';
|
|
9
|
+
import { validateConfig } from './config-utils.js';
|
|
10
|
+
import { ConfigFileInvalidError, ConfigFileParseFailedError } from '../../utils/errors-client.js';
|
|
11
|
+
import { getClientLogger } from '../../logging/index.js';
|
|
12
|
+
const SUPPORTED_CONFIG_FILE_EXTS = ['.js', '.json'];
|
|
13
13
|
const logger = getClientLogger();
|
|
14
14
|
function findProjectRoot() {
|
|
15
15
|
return os.cwd();
|
|
@@ -20,7 +20,7 @@ function fileExists(filePath) {
|
|
|
20
20
|
function assertBareConfigExtension(filePath) {
|
|
21
21
|
const ext = path.extname(filePath).toLowerCase();
|
|
22
22
|
if (!SUPPORTED_CONFIG_FILE_EXTS.includes(ext)) {
|
|
23
|
-
throw new ConfigFileInvalidError(filePath,
|
|
23
|
+
throw new ConfigFileInvalidError(filePath, 'Given config file format unsupported on this platform. Use qvac.config.js or qvac.config.json in the project root, or set QVAC_CONFIG_PATH to a .js or .json file.');
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function loadConfigFromPath(filePath) {
|
|
@@ -51,7 +51,7 @@ function findConfigFile(searchDir) {
|
|
|
51
51
|
*/
|
|
52
52
|
// eslint-disable-next-line @typescript-eslint/require-await -- matches Node/Expo resolver signature
|
|
53
53
|
export async function resolveConfig() {
|
|
54
|
-
const configPath = env[
|
|
54
|
+
const configPath = env['QVAC_CONFIG_PATH'];
|
|
55
55
|
if (configPath) {
|
|
56
56
|
const normalizedPath = path.resolve(configPath);
|
|
57
57
|
if (fileExists(normalizedPath)) {
|
|
@@ -69,6 +69,6 @@ export async function resolveConfig() {
|
|
|
69
69
|
return config;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
logger.info(
|
|
72
|
+
logger.info('ℹ️ No config file found, using SDK defaults');
|
|
73
73
|
return undefined;
|
|
74
74
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Config loader for Expo/React Native runtime
|
|
3
3
|
* Only uses expo-file-system - no Node.js or Bare imports
|
|
4
4
|
*/
|
|
5
|
-
import { File, Paths } from
|
|
6
|
-
import { validateConfig, parseJsonConfig
|
|
7
|
-
import { getClientLogger } from
|
|
5
|
+
import { File, Paths } from 'expo-file-system';
|
|
6
|
+
import { validateConfig, parseJsonConfig } from './config-utils.js';
|
|
7
|
+
import { getClientLogger } from '../../logging/index.js';
|
|
8
8
|
const logger = getClientLogger();
|
|
9
9
|
function fileExists(filePath) {
|
|
10
10
|
try {
|
|
@@ -34,8 +34,8 @@ async function loadJsonConfig(filePath) {
|
|
|
34
34
|
*/
|
|
35
35
|
export async function resolveConfig() {
|
|
36
36
|
// Check environment variable first
|
|
37
|
-
const configPath = typeof process !==
|
|
38
|
-
? process.env?.[
|
|
37
|
+
const configPath = typeof process !== 'undefined'
|
|
38
|
+
? process.env?.['QVAC_CONFIG_PATH']
|
|
39
39
|
: undefined;
|
|
40
40
|
if (configPath) {
|
|
41
41
|
if (fileExists(configPath)) {
|
|
@@ -57,6 +57,6 @@ export async function resolveConfig() {
|
|
|
57
57
|
catch {
|
|
58
58
|
// Paths not available
|
|
59
59
|
}
|
|
60
|
-
logger.info(
|
|
60
|
+
logger.info('ℹ️ No config file found, using SDK defaults');
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QvacConfig } from
|
|
1
|
+
import { type QvacConfig } from './config-utils';
|
|
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). */
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* Config loader for Node.js runtime
|
|
3
3
|
* Uses Node.js fs/promises and path modules
|
|
4
4
|
*/
|
|
5
|
-
import { promises as fs } from
|
|
6
|
-
import path from
|
|
7
|
-
import { pathToFileURL } from
|
|
8
|
-
import { validateConfig, parseJsonConfig
|
|
9
|
-
import { ConfigFileInvalidError, ConfigFileParseFailedError
|
|
10
|
-
import { getClientLogger } from
|
|
5
|
+
import { promises as fs } from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { pathToFileURL } from 'url';
|
|
8
|
+
import { validateConfig, parseJsonConfig } from './config-utils.js';
|
|
9
|
+
import { ConfigFileInvalidError, ConfigFileParseFailedError } from '../../utils/errors-client.js';
|
|
10
|
+
import { getClientLogger } from '../../logging/index.js';
|
|
11
11
|
const logger = getClientLogger();
|
|
12
12
|
/** Config filenames searched under a project root (bundle/verify/commands). */
|
|
13
13
|
export const CONFIG_CANDIDATES = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
'qvac.config.ts',
|
|
15
|
+
'qvac.config.mjs',
|
|
16
|
+
'qvac.config.js',
|
|
17
|
+
'qvac.config.json'
|
|
18
18
|
];
|
|
19
19
|
async function findProjectRoot() {
|
|
20
20
|
try {
|
|
@@ -22,7 +22,7 @@ async function findProjectRoot() {
|
|
|
22
22
|
const root = path.parse(currentDir).root;
|
|
23
23
|
while (currentDir !== root) {
|
|
24
24
|
try {
|
|
25
|
-
const packageJsonPath = path.join(currentDir,
|
|
25
|
+
const packageJsonPath = path.join(currentDir, 'package.json');
|
|
26
26
|
await fs.access(packageJsonPath);
|
|
27
27
|
return currentDir;
|
|
28
28
|
}
|
|
@@ -36,7 +36,7 @@ async function findProjectRoot() {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
catch (error) {
|
|
39
|
-
logger.debug(
|
|
39
|
+
logger.debug('Project root search failed, using cwd:', { error });
|
|
40
40
|
}
|
|
41
41
|
return process.cwd();
|
|
42
42
|
}
|
|
@@ -50,7 +50,7 @@ async function fileExists(filePath) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
async function readFile(filePath) {
|
|
53
|
-
return await fs.readFile(filePath, { encoding:
|
|
53
|
+
return await fs.readFile(filePath, { encoding: 'utf-8' });
|
|
54
54
|
}
|
|
55
55
|
async function loadJsonConfig(filePath) {
|
|
56
56
|
const content = await readFile(filePath);
|
|
@@ -61,7 +61,7 @@ async function loadJsConfig(filePath) {
|
|
|
61
61
|
try {
|
|
62
62
|
let importPath = filePath;
|
|
63
63
|
// Windows requires file:// URLs for dynamic imports
|
|
64
|
-
if (process.platform ===
|
|
64
|
+
if (process.platform === 'win32' && !process.env['JEST_WORKER_ID']) {
|
|
65
65
|
importPath = pathToFileURL(filePath).toString();
|
|
66
66
|
}
|
|
67
67
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -75,12 +75,12 @@ async function loadJsConfig(filePath) {
|
|
|
75
75
|
async function loadTsConfig(filePath) {
|
|
76
76
|
let tsxApiPath;
|
|
77
77
|
try {
|
|
78
|
-
const { createRequire } = await import(
|
|
78
|
+
const { createRequire } = await import('node:module');
|
|
79
79
|
const require = createRequire(import.meta.url);
|
|
80
|
-
tsxApiPath = require.resolve(
|
|
80
|
+
tsxApiPath = require.resolve('tsx/esm/api');
|
|
81
81
|
}
|
|
82
82
|
catch (error) {
|
|
83
|
-
throw new ConfigFileInvalidError(filePath,
|
|
83
|
+
throw new ConfigFileInvalidError(filePath, 'Loading a TypeScript qvac.config.ts requires the optional peer dependency `tsx`. Install it as a devDependency, or use qvac.config.mjs / qvac.config.js / qvac.config.json instead.', error);
|
|
84
84
|
}
|
|
85
85
|
try {
|
|
86
86
|
const tsxModule = (await import(tsxApiPath));
|
|
@@ -94,13 +94,13 @@ async function loadTsConfig(filePath) {
|
|
|
94
94
|
/** Load and validate a config file at an explicit path (used by RPC init and commands). */
|
|
95
95
|
export async function loadConfigFromPath(configPath) {
|
|
96
96
|
const ext = path.extname(configPath).toLowerCase();
|
|
97
|
-
if (ext ===
|
|
97
|
+
if (ext === '.json') {
|
|
98
98
|
return loadJsonConfig(configPath);
|
|
99
99
|
}
|
|
100
|
-
if (ext ===
|
|
100
|
+
if (ext === '.js' || ext === '.mjs') {
|
|
101
101
|
return loadJsConfig(configPath);
|
|
102
102
|
}
|
|
103
|
-
if (ext ===
|
|
103
|
+
if (ext === '.ts') {
|
|
104
104
|
return loadTsConfig(configPath);
|
|
105
105
|
}
|
|
106
106
|
throw new ConfigFileInvalidError(configPath, `Unsupported config format: ${ext}. Use .json, .js, .mjs, or .ts`);
|
|
@@ -126,7 +126,7 @@ export async function resolveConfigFileInProject(projectRoot, explicitPath) {
|
|
|
126
126
|
if (await fileExists(absPath)) {
|
|
127
127
|
return absPath;
|
|
128
128
|
}
|
|
129
|
-
throw new ConfigFileInvalidError(absPath,
|
|
129
|
+
throw new ConfigFileInvalidError(absPath, 'Config file not found at explicit path');
|
|
130
130
|
}
|
|
131
131
|
const found = await findConfigFileInDir(projectRoot);
|
|
132
132
|
return found ?? null;
|
|
@@ -144,16 +144,16 @@ export async function resolveConfigForProject(projectRoot, explicitPath) {
|
|
|
144
144
|
}
|
|
145
145
|
function getResourcesPath() {
|
|
146
146
|
const { resourcesPath } = process;
|
|
147
|
-
return typeof resourcesPath ===
|
|
147
|
+
return typeof resourcesPath === 'string' ? resourcesPath : undefined;
|
|
148
148
|
}
|
|
149
149
|
async function findPackagedConfig() {
|
|
150
150
|
const resourcesPath = getResourcesPath();
|
|
151
151
|
if (!resourcesPath)
|
|
152
152
|
return undefined;
|
|
153
153
|
const candidates = [
|
|
154
|
-
path.join(resourcesPath,
|
|
155
|
-
path.join(resourcesPath,
|
|
156
|
-
path.join(resourcesPath,
|
|
154
|
+
path.join(resourcesPath, 'app', 'qvac.config.json'),
|
|
155
|
+
path.join(resourcesPath, 'app.asar.unpacked', 'qvac.config.json'),
|
|
156
|
+
path.join(resourcesPath, 'qvac.config.json')
|
|
157
157
|
];
|
|
158
158
|
for (const candidate of candidates) {
|
|
159
159
|
if (await fileExists(candidate)) {
|
|
@@ -170,7 +170,7 @@ async function findPackagedConfig() {
|
|
|
170
170
|
* 4. SDK defaults
|
|
171
171
|
*/
|
|
172
172
|
export async function resolveConfig() {
|
|
173
|
-
const configPath = process.env[
|
|
173
|
+
const configPath = process.env['QVAC_CONFIG_PATH'];
|
|
174
174
|
if (configPath) {
|
|
175
175
|
const normalizedPath = path.resolve(configPath);
|
|
176
176
|
if (await fileExists(normalizedPath)) {
|
|
@@ -194,6 +194,6 @@ export async function resolveConfig() {
|
|
|
194
194
|
return config;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
logger.info(
|
|
197
|
+
logger.info('ℹ️ No config file found, using SDK defaults');
|
|
198
198
|
return undefined;
|
|
199
199
|
}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { send, stream, close } from
|
|
1
|
+
export { send, stream, close } from './rpc/rpc-client';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { send, stream, close } from
|
|
1
|
+
export { send, stream, close } from './rpc/rpc-client.js';
|