@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/ocr.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ocrStreamResponseSchema
|
|
2
|
-
import { stream as streamRpc } from
|
|
1
|
+
import { ocrStreamResponseSchema } from '../../schemas/index.js';
|
|
2
|
+
import { stream as streamRpc } from '../rpc/rpc-client.js';
|
|
3
3
|
/**
|
|
4
4
|
* Performs Optical Character Recognition (OCR) on an image to extract text.
|
|
5
5
|
*
|
|
@@ -11,6 +11,15 @@ import { stream as streamRpc } from "../rpc/rpc-client.js";
|
|
|
11
11
|
* @returns Object with blockStream generator, blocks promise, and stats promise
|
|
12
12
|
* @example
|
|
13
13
|
* ```typescript
|
|
14
|
+
* // Load an OCR model first. Registry GGUF models resolve their pipeline
|
|
15
|
+
* // and detector automatically:
|
|
16
|
+
* // EasyOCR (default): OCR_LATIN (CRAFT detector auto-derived)
|
|
17
|
+
* // DocTR: OCR_DOCTR (DBNet detector auto-derived)
|
|
18
|
+
* const modelId = await loadModel({
|
|
19
|
+
* modelSrc: OCR_LATIN.src,
|
|
20
|
+
* modelType: MODEL_TYPES.ggmlOcr,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
14
23
|
* // Non-streaming mode (default) - get all blocks at once
|
|
15
24
|
* const { blocks } = ocr({ modelId, image: "/path/to/image.png" });
|
|
16
25
|
* for (const block of await blocks) {
|
|
@@ -26,12 +35,12 @@ import { stream as streamRpc } from "../rpc/rpc-client.js";
|
|
|
26
35
|
*/
|
|
27
36
|
export function ocr(params) {
|
|
28
37
|
const request = {
|
|
29
|
-
type:
|
|
38
|
+
type: 'ocrStream',
|
|
30
39
|
modelId: params.modelId,
|
|
31
|
-
image: typeof params.image ===
|
|
32
|
-
? { type:
|
|
33
|
-
: { type:
|
|
34
|
-
...(params.options && { options: params.options })
|
|
40
|
+
image: typeof params.image === 'string'
|
|
41
|
+
? { type: 'filePath', value: params.image }
|
|
42
|
+
: { type: 'base64', value: params.image.toString('base64') },
|
|
43
|
+
...(params.options && { options: params.options })
|
|
35
44
|
};
|
|
36
45
|
let ocrStats;
|
|
37
46
|
let statsResolver = () => { };
|
|
@@ -41,7 +50,7 @@ export function ocr(params) {
|
|
|
41
50
|
if (params.stream) {
|
|
42
51
|
const blockStream = (async function* () {
|
|
43
52
|
for await (const response of streamRpc(request)) {
|
|
44
|
-
if (response.type ===
|
|
53
|
+
if (response.type === 'ocrStream') {
|
|
45
54
|
const streamResponse = ocrStreamResponseSchema.parse(response);
|
|
46
55
|
if (streamResponse.blocks && streamResponse.blocks.length > 0) {
|
|
47
56
|
yield streamResponse.blocks;
|
|
@@ -56,7 +65,7 @@ export function ocr(params) {
|
|
|
56
65
|
return {
|
|
57
66
|
blockStream,
|
|
58
67
|
blocks: Promise.resolve([]),
|
|
59
|
-
stats: statsPromise
|
|
68
|
+
stats: statsPromise
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
else {
|
|
@@ -66,7 +75,7 @@ export function ocr(params) {
|
|
|
66
75
|
const blocksPromise = (async () => {
|
|
67
76
|
let allBlocks = [];
|
|
68
77
|
for await (const response of streamRpc(request)) {
|
|
69
|
-
if (response.type ===
|
|
78
|
+
if (response.type === 'ocrStream') {
|
|
70
79
|
const streamResponse = ocrStreamResponseSchema.parse(response);
|
|
71
80
|
if (streamResponse.blocks) {
|
|
72
81
|
allBlocks = allBlocks.concat(streamResponse.blocks);
|
|
@@ -82,7 +91,7 @@ export function ocr(params) {
|
|
|
82
91
|
return {
|
|
83
92
|
blockStream,
|
|
84
93
|
blocks: blocksPromise,
|
|
85
|
-
stats: statsPromise
|
|
94
|
+
stats: statsPromise
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
97
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {} from
|
|
2
|
-
import { send } from
|
|
3
|
-
import { InvalidResponseError, ProviderStartFailedError
|
|
1
|
+
import {} from '../../schemas/index.js';
|
|
2
|
+
import { send } from '../rpc/rpc-client.js';
|
|
3
|
+
import { InvalidResponseError, ProviderStartFailedError } from '../../utils/errors-client.js';
|
|
4
4
|
/**
|
|
5
5
|
* Starts a provider service that offers QVAC capabilities to remote peers.
|
|
6
6
|
*
|
|
@@ -19,12 +19,12 @@ import { InvalidResponseError, ProviderStartFailedError, } from "../../utils/err
|
|
|
19
19
|
*/
|
|
20
20
|
export async function startQVACProvider(params = {}) {
|
|
21
21
|
const request = {
|
|
22
|
-
type:
|
|
23
|
-
firewall: params.firewall
|
|
22
|
+
type: 'provide',
|
|
23
|
+
firewall: params.firewall
|
|
24
24
|
};
|
|
25
25
|
const response = await send(request);
|
|
26
|
-
if (response.type !==
|
|
27
|
-
throw new InvalidResponseError(
|
|
26
|
+
if (response.type !== 'provide') {
|
|
27
|
+
throw new InvalidResponseError('provide');
|
|
28
28
|
}
|
|
29
29
|
if (response.error) {
|
|
30
30
|
throw new ProviderStartFailedError(response.error);
|
package/dist/client/api/rag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RagChunkParams, RagDoc, RagIngestParams, RagSaveEmbeddingsParams, RagSaveEmbeddingsResult, RagSearchParams, RagSearchResult, RagDeleteEmbeddingsParams, RagReindexParams, RagReindexResult, RagWorkspaceInfo, RagCloseWorkspaceParams, RagDeleteWorkspaceParams, RPCOptions } from
|
|
1
|
+
import type { RagChunkParams, RagDoc, RagIngestParams, RagSaveEmbeddingsParams, RagSaveEmbeddingsResult, RagSearchParams, RagSearchResult, RagDeleteEmbeddingsParams, RagReindexParams, RagReindexResult, RagWorkspaceInfo, RagCloseWorkspaceParams, RagDeleteWorkspaceParams, RPCOptions } from '../../schemas/index';
|
|
2
2
|
/**
|
|
3
3
|
* Chunks documents into smaller pieces for embedding.
|
|
4
4
|
* Part of the segregated flow: ragChunk() → embed() → ragSaveEmbeddings()
|
package/dist/client/api/rag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { send, stream } from
|
|
2
|
-
import { InvalidResponseError, InvalidOperationError, StreamEndedError, RAGChunkFailedError, RAGSaveFailedError, RAGSearchFailedError, RAGDeleteFailedError, RAGCloseWorkspaceFailedError, RAGListWorkspacesFailedError
|
|
3
|
-
import { generateClientRequestId } from
|
|
4
|
-
import { decoratePromise } from
|
|
1
|
+
import { send, stream } from '../rpc/rpc-client.js';
|
|
2
|
+
import { InvalidResponseError, InvalidOperationError, StreamEndedError, RAGChunkFailedError, RAGSaveFailedError, RAGSearchFailedError, RAGDeleteFailedError, RAGCloseWorkspaceFailedError, RAGListWorkspacesFailedError } from '../../utils/errors-client.js';
|
|
3
|
+
import { generateClientRequestId } from './client-request-id.js';
|
|
4
|
+
import { decoratePromise } from '../../utils/decorate-promise.js';
|
|
5
5
|
// ============== Chunk ==============
|
|
6
6
|
/**
|
|
7
7
|
* Chunks documents into smaller pieces for embedding.
|
|
@@ -28,18 +28,18 @@ import { decoratePromise } from "../../utils/decorate-promise.js";
|
|
|
28
28
|
*/
|
|
29
29
|
export async function ragChunk(params, options) {
|
|
30
30
|
const request = {
|
|
31
|
-
type:
|
|
32
|
-
operation:
|
|
33
|
-
...params
|
|
31
|
+
type: 'rag',
|
|
32
|
+
operation: 'chunk',
|
|
33
|
+
...params
|
|
34
34
|
};
|
|
35
35
|
const response = await send(request, options);
|
|
36
|
-
if (response.type !==
|
|
37
|
-
throw new InvalidResponseError(
|
|
36
|
+
if (response.type !== 'rag') {
|
|
37
|
+
throw new InvalidResponseError('rag');
|
|
38
38
|
}
|
|
39
39
|
if (!response.success) {
|
|
40
40
|
throw new RAGChunkFailedError(response.error);
|
|
41
41
|
}
|
|
42
|
-
if (response.operation !==
|
|
42
|
+
if (response.operation !== 'chunk') {
|
|
43
43
|
throw new InvalidOperationError();
|
|
44
44
|
}
|
|
45
45
|
return response.chunks;
|
|
@@ -92,46 +92,46 @@ export function ragIngest(params, options) {
|
|
|
92
92
|
async function runRagIngest(params, requestId, options) {
|
|
93
93
|
const { onProgress, ...requestParams } = params;
|
|
94
94
|
const request = {
|
|
95
|
-
type:
|
|
96
|
-
operation:
|
|
95
|
+
type: 'rag',
|
|
96
|
+
operation: 'ingest',
|
|
97
97
|
...requestParams,
|
|
98
98
|
chunk: requestParams.chunk ?? true,
|
|
99
99
|
withProgress: onProgress ? true : undefined,
|
|
100
|
-
requestId
|
|
100
|
+
requestId
|
|
101
101
|
};
|
|
102
102
|
if (onProgress) {
|
|
103
103
|
// Use streaming for progress updates
|
|
104
104
|
for await (const event of stream(request, options)) {
|
|
105
|
-
if (event.type ===
|
|
105
|
+
if (event.type === 'rag:progress' && event.operation === 'ingest') {
|
|
106
106
|
const progress = event;
|
|
107
107
|
onProgress(progress.stage, progress.current, progress.total);
|
|
108
108
|
continue;
|
|
109
109
|
}
|
|
110
|
-
if (event.type ===
|
|
110
|
+
if (event.type === 'rag' && event.operation === 'ingest') {
|
|
111
111
|
if (!event.success) {
|
|
112
112
|
throw new RAGSaveFailedError(event.error);
|
|
113
113
|
}
|
|
114
114
|
return {
|
|
115
115
|
processed: event.processed,
|
|
116
|
-
droppedIndices: event.droppedIndices
|
|
116
|
+
droppedIndices: event.droppedIndices
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
throw new StreamEndedError();
|
|
121
121
|
}
|
|
122
122
|
const response = await send(request, options);
|
|
123
|
-
if (response.type !==
|
|
124
|
-
throw new InvalidResponseError(
|
|
123
|
+
if (response.type !== 'rag') {
|
|
124
|
+
throw new InvalidResponseError('rag');
|
|
125
125
|
}
|
|
126
126
|
if (!response.success) {
|
|
127
127
|
throw new RAGSaveFailedError(response.error);
|
|
128
128
|
}
|
|
129
|
-
if (response.operation !==
|
|
129
|
+
if (response.operation !== 'ingest') {
|
|
130
130
|
throw new InvalidOperationError();
|
|
131
131
|
}
|
|
132
132
|
return {
|
|
133
133
|
processed: response.processed,
|
|
134
|
-
droppedIndices: response.droppedIndices
|
|
134
|
+
droppedIndices: response.droppedIndices
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
// ============== SaveEmbeddings ==============
|
|
@@ -176,21 +176,20 @@ export function ragSaveEmbeddings(params, options) {
|
|
|
176
176
|
async function runRagSaveEmbeddings(params, requestId, options) {
|
|
177
177
|
const { onProgress, ...requestParams } = params;
|
|
178
178
|
const request = {
|
|
179
|
-
type:
|
|
180
|
-
operation:
|
|
179
|
+
type: 'rag',
|
|
180
|
+
operation: 'saveEmbeddings',
|
|
181
181
|
...requestParams,
|
|
182
182
|
withProgress: onProgress ? true : undefined,
|
|
183
|
-
requestId
|
|
183
|
+
requestId
|
|
184
184
|
};
|
|
185
185
|
if (onProgress) {
|
|
186
186
|
for await (const event of stream(request, options)) {
|
|
187
|
-
if (event.type ===
|
|
188
|
-
event.operation === "saveEmbeddings") {
|
|
187
|
+
if (event.type === 'rag:progress' && event.operation === 'saveEmbeddings') {
|
|
189
188
|
const progress = event;
|
|
190
189
|
onProgress(progress.stage, progress.current, progress.total);
|
|
191
190
|
continue;
|
|
192
191
|
}
|
|
193
|
-
if (event.type ===
|
|
192
|
+
if (event.type === 'rag' && event.operation === 'saveEmbeddings') {
|
|
194
193
|
if (!event.success) {
|
|
195
194
|
throw new RAGSaveFailedError(event.error);
|
|
196
195
|
}
|
|
@@ -200,13 +199,13 @@ async function runRagSaveEmbeddings(params, requestId, options) {
|
|
|
200
199
|
throw new StreamEndedError();
|
|
201
200
|
}
|
|
202
201
|
const response = await send(request, options);
|
|
203
|
-
if (response.type !==
|
|
204
|
-
throw new InvalidResponseError(
|
|
202
|
+
if (response.type !== 'rag') {
|
|
203
|
+
throw new InvalidResponseError('rag');
|
|
205
204
|
}
|
|
206
205
|
if (!response.success) {
|
|
207
206
|
throw new RAGSaveFailedError(response.error);
|
|
208
207
|
}
|
|
209
|
-
if (response.operation !==
|
|
208
|
+
if (response.operation !== 'saveEmbeddings') {
|
|
210
209
|
throw new InvalidOperationError();
|
|
211
210
|
}
|
|
212
211
|
return response.processed;
|
|
@@ -240,20 +239,20 @@ async function runRagSaveEmbeddings(params, requestId, options) {
|
|
|
240
239
|
*/
|
|
241
240
|
export async function ragSearch(params, options) {
|
|
242
241
|
const request = {
|
|
243
|
-
type:
|
|
244
|
-
operation:
|
|
242
|
+
type: 'rag',
|
|
243
|
+
operation: 'search',
|
|
245
244
|
...params,
|
|
246
245
|
topK: params.topK ?? 5,
|
|
247
|
-
n: params.n ?? 3
|
|
246
|
+
n: params.n ?? 3
|
|
248
247
|
};
|
|
249
248
|
const response = await send(request, options);
|
|
250
|
-
if (response.type !==
|
|
251
|
-
throw new InvalidResponseError(
|
|
249
|
+
if (response.type !== 'rag') {
|
|
250
|
+
throw new InvalidResponseError('rag');
|
|
252
251
|
}
|
|
253
252
|
if (!response.success) {
|
|
254
253
|
throw new RAGSearchFailedError(response.error);
|
|
255
254
|
}
|
|
256
|
-
if (response.operation !==
|
|
255
|
+
if (response.operation !== 'search') {
|
|
257
256
|
throw new InvalidOperationError();
|
|
258
257
|
}
|
|
259
258
|
return response.results;
|
|
@@ -280,18 +279,18 @@ export async function ragSearch(params, options) {
|
|
|
280
279
|
*/
|
|
281
280
|
export async function ragDeleteEmbeddings(params, options) {
|
|
282
281
|
const request = {
|
|
283
|
-
type:
|
|
284
|
-
operation:
|
|
285
|
-
...params
|
|
282
|
+
type: 'rag',
|
|
283
|
+
operation: 'deleteEmbeddings',
|
|
284
|
+
...params
|
|
286
285
|
};
|
|
287
286
|
const response = await send(request, options);
|
|
288
|
-
if (response.type !==
|
|
289
|
-
throw new InvalidResponseError(
|
|
287
|
+
if (response.type !== 'rag') {
|
|
288
|
+
throw new InvalidResponseError('rag');
|
|
290
289
|
}
|
|
291
290
|
if (!response.success) {
|
|
292
291
|
throw new RAGDeleteFailedError(response.error);
|
|
293
292
|
}
|
|
294
|
-
if (response.operation !==
|
|
293
|
+
if (response.operation !== 'deleteEmbeddings') {
|
|
295
294
|
throw new InvalidOperationError();
|
|
296
295
|
}
|
|
297
296
|
}
|
|
@@ -343,20 +342,20 @@ export function ragReindex(params, options) {
|
|
|
343
342
|
async function runRagReindex(params, requestId, options) {
|
|
344
343
|
const { onProgress, ...requestParams } = params;
|
|
345
344
|
const request = {
|
|
346
|
-
type:
|
|
347
|
-
operation:
|
|
345
|
+
type: 'rag',
|
|
346
|
+
operation: 'reindex',
|
|
348
347
|
...requestParams,
|
|
349
348
|
withProgress: onProgress ? true : undefined,
|
|
350
|
-
requestId
|
|
349
|
+
requestId
|
|
351
350
|
};
|
|
352
351
|
if (onProgress) {
|
|
353
352
|
for await (const event of stream(request, options)) {
|
|
354
|
-
if (event.type ===
|
|
353
|
+
if (event.type === 'rag:progress' && event.operation === 'reindex') {
|
|
355
354
|
const progress = event;
|
|
356
355
|
onProgress(progress.stage, progress.current, progress.total);
|
|
357
356
|
continue;
|
|
358
357
|
}
|
|
359
|
-
if (event.type ===
|
|
358
|
+
if (event.type === 'rag' && event.operation === 'reindex') {
|
|
360
359
|
if (!event.success) {
|
|
361
360
|
throw new RAGSaveFailedError(event.error);
|
|
362
361
|
}
|
|
@@ -366,13 +365,13 @@ async function runRagReindex(params, requestId, options) {
|
|
|
366
365
|
throw new StreamEndedError();
|
|
367
366
|
}
|
|
368
367
|
const response = await send(request, options);
|
|
369
|
-
if (response.type !==
|
|
370
|
-
throw new InvalidResponseError(
|
|
368
|
+
if (response.type !== 'rag') {
|
|
369
|
+
throw new InvalidResponseError('rag');
|
|
371
370
|
}
|
|
372
371
|
if (!response.success) {
|
|
373
372
|
throw new RAGSaveFailedError(response.error);
|
|
374
373
|
}
|
|
375
|
-
if (response.operation !==
|
|
374
|
+
if (response.operation !== 'reindex') {
|
|
376
375
|
throw new InvalidOperationError();
|
|
377
376
|
}
|
|
378
377
|
return response.result;
|
|
@@ -397,17 +396,17 @@ async function runRagReindex(params, requestId, options) {
|
|
|
397
396
|
*/
|
|
398
397
|
export async function ragListWorkspaces(options) {
|
|
399
398
|
const request = {
|
|
400
|
-
type:
|
|
401
|
-
operation:
|
|
399
|
+
type: 'rag',
|
|
400
|
+
operation: 'listWorkspaces'
|
|
402
401
|
};
|
|
403
402
|
const response = await send(request, options);
|
|
404
|
-
if (response.type !==
|
|
405
|
-
throw new InvalidResponseError(
|
|
403
|
+
if (response.type !== 'rag') {
|
|
404
|
+
throw new InvalidResponseError('rag');
|
|
406
405
|
}
|
|
407
406
|
if (!response.success) {
|
|
408
407
|
throw new RAGListWorkspacesFailedError(response.error);
|
|
409
408
|
}
|
|
410
|
-
if (response.operation !==
|
|
409
|
+
if (response.operation !== 'listWorkspaces') {
|
|
411
410
|
throw new InvalidOperationError();
|
|
412
411
|
}
|
|
413
412
|
return response.workspaces;
|
|
@@ -437,18 +436,18 @@ export async function ragListWorkspaces(options) {
|
|
|
437
436
|
*/
|
|
438
437
|
export async function ragCloseWorkspace(params, options) {
|
|
439
438
|
const request = {
|
|
440
|
-
type:
|
|
441
|
-
operation:
|
|
442
|
-
...params
|
|
439
|
+
type: 'rag',
|
|
440
|
+
operation: 'closeWorkspace',
|
|
441
|
+
...params
|
|
443
442
|
};
|
|
444
443
|
const response = await send(request, options);
|
|
445
|
-
if (response.type !==
|
|
446
|
-
throw new InvalidResponseError(
|
|
444
|
+
if (response.type !== 'rag') {
|
|
445
|
+
throw new InvalidResponseError('rag');
|
|
447
446
|
}
|
|
448
447
|
if (!response.success) {
|
|
449
448
|
throw new RAGCloseWorkspaceFailedError(response.error);
|
|
450
449
|
}
|
|
451
|
-
if (response.operation !==
|
|
450
|
+
if (response.operation !== 'closeWorkspace') {
|
|
452
451
|
throw new InvalidOperationError();
|
|
453
452
|
}
|
|
454
453
|
}
|
|
@@ -469,18 +468,18 @@ export async function ragCloseWorkspace(params, options) {
|
|
|
469
468
|
*/
|
|
470
469
|
export async function ragDeleteWorkspace(params, options) {
|
|
471
470
|
const request = {
|
|
472
|
-
type:
|
|
473
|
-
operation:
|
|
474
|
-
...params
|
|
471
|
+
type: 'rag',
|
|
472
|
+
operation: 'deleteWorkspace',
|
|
473
|
+
...params
|
|
475
474
|
};
|
|
476
475
|
const response = await send(request, options);
|
|
477
|
-
if (response.type !==
|
|
478
|
-
throw new InvalidResponseError(
|
|
476
|
+
if (response.type !== 'rag') {
|
|
477
|
+
throw new InvalidResponseError('rag');
|
|
479
478
|
}
|
|
480
479
|
if (!response.success) {
|
|
481
480
|
throw new RAGDeleteFailedError(response.error);
|
|
482
481
|
}
|
|
483
|
-
if (response.operation !==
|
|
482
|
+
if (response.operation !== 'deleteWorkspace') {
|
|
484
483
|
throw new InvalidOperationError();
|
|
485
484
|
}
|
|
486
485
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModelRegistryEntry, ModelRegistryEntryAddon } from
|
|
1
|
+
import type { ModelRegistryEntry, ModelRegistryEntryAddon } from '../../schemas/index';
|
|
2
2
|
export type { ModelRegistryEntry, ModelRegistryEntryAddon };
|
|
3
3
|
export interface ModelRegistrySearchParams {
|
|
4
4
|
filter?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { send } from
|
|
2
|
-
import { ModelRegistryQueryFailedError } from
|
|
1
|
+
import { send } from '../rpc/rpc-client.js';
|
|
2
|
+
import { ModelRegistryQueryFailedError } from '../../utils/errors-client.js';
|
|
3
3
|
function validateRegistryResponse(response, fallbackError) {
|
|
4
4
|
if (!response.success) {
|
|
5
|
-
throw new ModelRegistryQueryFailedError(response.error ?? fallbackError ??
|
|
5
|
+
throw new ModelRegistryQueryFailedError(response.error ?? fallbackError ?? 'Unknown registry error');
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
@@ -13,7 +13,7 @@ function validateRegistryResponse(response, fallbackError) {
|
|
|
13
13
|
*/
|
|
14
14
|
async function modelRegistryList() {
|
|
15
15
|
const request = {
|
|
16
|
-
type:
|
|
16
|
+
type: 'modelRegistryList'
|
|
17
17
|
};
|
|
18
18
|
const response = (await send(request));
|
|
19
19
|
validateRegistryResponse(response);
|
|
@@ -34,9 +34,9 @@ async function modelRegistryList() {
|
|
|
34
34
|
async function modelRegistrySearch(params = {}) {
|
|
35
35
|
const { modelType, ...rest } = params;
|
|
36
36
|
const request = {
|
|
37
|
-
type:
|
|
37
|
+
type: 'modelRegistrySearch',
|
|
38
38
|
...rest,
|
|
39
|
-
addon: modelType ?? rest.addon
|
|
39
|
+
addon: modelType ?? rest.addon
|
|
40
40
|
};
|
|
41
41
|
const response = (await send(request));
|
|
42
42
|
validateRegistryResponse(response);
|
|
@@ -52,9 +52,9 @@ async function modelRegistrySearch(params = {}) {
|
|
|
52
52
|
*/
|
|
53
53
|
async function modelRegistryGetModel(registryPath, registrySource) {
|
|
54
54
|
const request = {
|
|
55
|
-
type:
|
|
55
|
+
type: 'modelRegistryGetModel',
|
|
56
56
|
registryPath,
|
|
57
|
-
registrySource
|
|
57
|
+
registrySource
|
|
58
58
|
};
|
|
59
59
|
const response = (await send(request));
|
|
60
60
|
validateRegistryResponse(response, `Model not found: ${registrySource}/${registryPath}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { send } from
|
|
2
|
-
import { InvalidResponseError } from
|
|
1
|
+
import { send } from '../rpc/rpc-client.js';
|
|
2
|
+
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
3
3
|
/**
|
|
4
4
|
* Resumes the SDK runtime: restores all suspended Hyperswarm and Corestore
|
|
5
5
|
* resources and releases the lifecycle gate so all SDK operations are allowed
|
|
@@ -29,8 +29,8 @@ import { InvalidResponseError } from "../../utils/errors-client.js";
|
|
|
29
29
|
* console.log(await state()); // "active"
|
|
30
30
|
*/
|
|
31
31
|
export async function resume() {
|
|
32
|
-
const response = await send({ type:
|
|
33
|
-
if (response.type !==
|
|
34
|
-
throw new InvalidResponseError(
|
|
32
|
+
const response = await send({ type: 'resume' });
|
|
33
|
+
if (response.type !== 'resume') {
|
|
34
|
+
throw new InvalidResponseError('resume');
|
|
35
35
|
}
|
|
36
36
|
}
|
package/dist/client/api/state.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { send } from
|
|
2
|
-
import { InvalidResponseError } from
|
|
1
|
+
import { send } from '../rpc/rpc-client.js';
|
|
2
|
+
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the current runtime lifecycle state.
|
|
5
5
|
*
|
|
@@ -21,9 +21,9 @@ import { InvalidResponseError } from "../../utils/errors-client.js";
|
|
|
21
21
|
* }
|
|
22
22
|
*/
|
|
23
23
|
export async function state() {
|
|
24
|
-
const response = await send({ type:
|
|
25
|
-
if (response.type !==
|
|
26
|
-
throw new InvalidResponseError(
|
|
24
|
+
const response = await send({ type: 'state' });
|
|
25
|
+
if (response.type !== 'state') {
|
|
26
|
+
throw new InvalidResponseError('state');
|
|
27
27
|
}
|
|
28
28
|
return response.state;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {} from
|
|
2
|
-
import { send } from
|
|
3
|
-
import { InvalidResponseError, ProviderStopFailedError
|
|
1
|
+
import {} from '../../schemas/index.js';
|
|
2
|
+
import { send } from '../rpc/rpc-client.js';
|
|
3
|
+
import { InvalidResponseError, ProviderStopFailedError } from '../../utils/errors-client.js';
|
|
4
4
|
/**
|
|
5
5
|
* Stops the running provider service.
|
|
6
6
|
*
|
|
@@ -18,11 +18,11 @@ import { InvalidResponseError, ProviderStopFailedError, } from "../../utils/erro
|
|
|
18
18
|
*/
|
|
19
19
|
export async function stopQVACProvider() {
|
|
20
20
|
const request = {
|
|
21
|
-
type:
|
|
21
|
+
type: 'stopProvide'
|
|
22
22
|
};
|
|
23
23
|
const response = await send(request);
|
|
24
|
-
if (response.type !==
|
|
25
|
-
throw new InvalidResponseError(
|
|
24
|
+
if (response.type !== 'stopProvide') {
|
|
25
|
+
throw new InvalidResponseError('stopProvide');
|
|
26
26
|
}
|
|
27
27
|
if (response.error) {
|
|
28
28
|
throw new ProviderStopFailedError(response.error);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LoggingStreamResponse } from
|
|
1
|
+
import type { LoggingStreamResponse } from '../../schemas/logging-stream';
|
|
2
2
|
export type ServerLogHandler = (log: LoggingStreamResponse) => void;
|
|
3
3
|
/**
|
|
4
4
|
* Subscribes to every server-side log through a single stream: SDK server logs,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getClientLogger, SDK_ALL_LOG_ID } from
|
|
2
|
-
import { loggingStream } from
|
|
1
|
+
import { getClientLogger, SDK_ALL_LOG_ID } from '../../logging/index.js';
|
|
2
|
+
import { loggingStream } from './logging-stream.js';
|
|
3
3
|
const logger = getClientLogger();
|
|
4
4
|
/**
|
|
5
5
|
* Subscribes to every server-side log through a single stream: SDK server logs,
|
|
@@ -34,7 +34,7 @@ export function subscribeServerLogs(handler) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
|
-
logger.error(
|
|
37
|
+
logger.error('Server log stream error:', error);
|
|
38
38
|
}
|
|
39
39
|
})();
|
|
40
40
|
return () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { send } from
|
|
2
|
-
import { InvalidResponseError } from
|
|
1
|
+
import { send } from '../rpc/rpc-client.js';
|
|
2
|
+
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
3
3
|
/**
|
|
4
4
|
* Suspends the SDK runtime: pauses all registered Hyperswarm and Corestore
|
|
5
5
|
* resources and engages the lifecycle gate so non-lifecycle operations are
|
|
@@ -30,8 +30,8 @@ import { InvalidResponseError } from "../../utils/errors-client.js";
|
|
|
30
30
|
* console.log(await state()); // "suspended"
|
|
31
31
|
*/
|
|
32
32
|
export async function suspend() {
|
|
33
|
-
const response = await send({ type:
|
|
34
|
-
if (response.type !==
|
|
35
|
-
throw new InvalidResponseError(
|
|
33
|
+
const response = await send({ type: 'suspend' });
|
|
34
|
+
if (response.type !== 'suspend') {
|
|
35
|
+
throw new InvalidResponseError('suspend');
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TtsClientParamsInput, type RPCOptions, type TtsResponse, type TextToSpeechStreamClientParams, type TextToSpeechStreamSession, type TextToSpeechStreamResult } from
|
|
1
|
+
import { type TtsClientParamsInput, type RPCOptions, type TtsResponse, type TextToSpeechStreamClientParams, type TextToSpeechStreamSession, type TextToSpeechStreamResult } from '../../schemas/index';
|
|
2
2
|
/**
|
|
3
3
|
* Fan-out queue that lets multiple consumers iterate the same TTS response
|
|
4
4
|
* stream independently. Items are retained only until every active subscriber
|