@qvac/sdk 0.18.2 → 0.19.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 +12 -1
- package/README.md +46 -10
- package/bare-imports.json +2 -3
- package/dist/examples/abot-world.d.ts +2 -0
- package/dist/examples/abot-world.js +124 -0
- package/dist/examples/asr/parakeet-unified-filesystem.d.ts +2 -0
- package/dist/examples/asr/parakeet-unified-filesystem.js +50 -0
- package/dist/examples/assess-model-fit.d.ts +14 -0
- package/dist/examples/assess-model-fit.js +71 -0
- package/dist/examples/audiogen/generate-cover.js +2 -1
- package/dist/examples/audiogen/generate-music-minimax.d.ts +2 -0
- package/dist/examples/audiogen/generate-music-minimax.js +117 -0
- package/dist/examples/audiogen/generate-music.js +2 -1
- package/dist/examples/cache-management.js +1 -2
- package/dist/examples/classification/classify-image.js +1 -3
- package/dist/examples/config-reload.js +1 -1
- package/dist/examples/diffusion-ic-lora-ltx.d.ts +2 -0
- package/dist/examples/diffusion-ic-lora-ltx.js +76 -0
- package/dist/examples/mcp-websearch.js +1 -3
- package/dist/examples/model-fit-ui/server.d.ts +24 -0
- package/dist/examples/model-fit-ui/server.js +192 -0
- package/dist/examples/multi-job-completion.d.ts +2 -3
- package/dist/examples/multi-job-completion.js +2 -3
- package/dist/examples/parallel-download.js +4 -4
- package/dist/examples/plugins.js +1 -1
- package/dist/examples/profiling/basic.js +0 -1
- package/dist/examples/system-resources.js +2 -0
- package/dist/examples/translation/translation-bergamot-batch-stream.d.ts +2 -0
- package/dist/examples/translation/translation-bergamot-batch-stream.js +43 -0
- package/dist/examples/translation/translation-bergamot-batch.js +2 -5
- package/dist/examples/vla-groot.js +1 -1
- package/dist/scripts/check-resource-collectors-packaging.d.ts +2 -2
- package/dist/scripts/check-resource-collectors-packaging.js +3 -3
- package/dist/scripts/contract/build-contract.d.ts +1 -1
- package/dist/scripts/contract/build-contract.js +5 -5
- package/dist/scripts/contract/build-error-codes.js +3 -3
- package/dist/scripts/contract/build-model-type-maps.js +1 -2
- package/dist/scripts/contract/build-models-registry.d.ts +2 -2
- package/dist/scripts/contract/build-models-registry.js +2 -2
- package/dist/scripts/contract/constants-registry.d.ts +86 -0
- package/dist/scripts/contract/constants-registry.js +62 -0
- package/dist/scripts/contract/method-shapes.d.ts +53 -0
- package/dist/scripts/contract/method-shapes.js +50 -0
- package/dist/scripts/contract/plugin-contract.d.ts +1 -1
- package/dist/scripts/contract/plugin-contract.js +1 -1
- package/dist/scripts/enforce-inference-peer-dependencies.d.ts +2 -0
- package/dist/scripts/enforce-inference-peer-dependencies.js +39 -0
- package/dist/scripts/export-contract.js +1 -1
- package/dist/scripts/export-plugin-contract.js +1 -1
- package/dist/scripts/run-unit-tests.js +6 -1
- package/dist/src/client/api/assess-model-fit.d.ts +17 -0
- package/dist/src/client/api/assess-model-fit.js +38 -0
- package/dist/src/client/api/audio-gen-result.d.ts +4 -0
- package/dist/src/client/api/audio-gen-result.js +143 -0
- package/dist/src/client/api/audio-gen.d.ts +66 -0
- package/dist/src/client/api/audio-gen.js +68 -0
- package/dist/src/client/api/batch-completion.d.ts +28 -0
- package/dist/src/client/api/batch-completion.js +345 -0
- package/dist/src/client/api/bci-transcribe.d.ts +57 -0
- package/dist/src/client/api/bci-transcribe.js +173 -0
- package/dist/src/client/api/cancel.d.ts +35 -0
- package/dist/src/client/api/cancel.js +83 -0
- package/dist/src/client/api/classify.d.ts +25 -0
- package/dist/src/client/api/classify.js +48 -0
- package/dist/src/client/api/completion-stream.d.ts +107 -0
- package/dist/src/client/api/completion-stream.js +351 -0
- package/dist/src/client/api/delete-cache.js +49 -0
- package/dist/src/client/api/diffusion.d.ts +93 -0
- package/dist/src/client/api/diffusion.js +177 -0
- package/dist/src/client/api/download-asset.d.ts +52 -0
- package/dist/src/client/api/download-asset.js +89 -0
- package/dist/src/client/api/embed.d.ts +42 -0
- package/dist/src/client/api/embed.js +30 -0
- package/dist/src/client/api/finetune.d.ts +92 -0
- package/dist/src/client/api/finetune.js +144 -0
- package/dist/src/client/api/get-loaded-model-info.d.ts +26 -0
- package/dist/src/client/api/get-loaded-model-info.js +37 -0
- package/dist/src/client/api/get-model-info.d.ts +11 -0
- package/dist/src/client/api/get-model-info.js +22 -0
- package/dist/src/client/api/get-system-resources.d.ts +3 -0
- package/dist/src/client/api/get-system-resources.js +17 -0
- package/dist/src/client/api/heartbeat.d.ts +13 -0
- package/dist/src/client/api/heartbeat.js +21 -0
- package/dist/src/client/api/index.d.ts +37 -0
- package/dist/src/client/api/index.js +36 -0
- package/dist/src/client/api/invoke-plugin.d.ts +31 -0
- package/dist/src/client/api/invoke-plugin.js +54 -0
- package/dist/src/client/api/load-model.d.ts +184 -0
- package/dist/src/client/api/load-model.js +128 -0
- package/dist/src/client/api/logging-stream.d.ts +24 -0
- package/dist/src/client/api/logging-stream.js +36 -0
- package/dist/src/client/api/ocr.d.ts +40 -0
- package/dist/src/client/api/ocr.js +97 -0
- package/dist/src/client/api/rag.d.ts +257 -0
- package/dist/src/client/api/rag.js +490 -0
- package/dist/src/client/api/registry.d.ts +40 -0
- package/dist/src/client/api/registry.js +63 -0
- package/dist/src/client/api/resume.d.ts +27 -0
- package/dist/src/client/api/resume.js +33 -0
- package/dist/src/client/api/state.d.ts +23 -0
- package/dist/src/client/api/state.js +29 -0
- package/dist/src/client/api/subscribe-logs.d.ts +28 -0
- package/dist/src/client/api/suspend.d.ts +27 -0
- package/dist/src/client/api/suspend.js +33 -0
- package/dist/src/client/api/text-to-speech.d.ts +74 -0
- package/dist/src/client/api/text-to-speech.js +463 -0
- package/dist/src/client/api/transcribe.d.ts +93 -0
- package/dist/src/client/api/transcribe.js +295 -0
- package/dist/src/client/api/translate.d.ts +51 -0
- package/dist/src/client/api/translate.js +133 -0
- package/dist/src/client/api/unload-model.d.ts +18 -0
- package/dist/src/client/api/unload-model.js +42 -0
- package/dist/src/client/api/upscale.d.ts +45 -0
- package/dist/src/client/api/upscale.js +99 -0
- package/dist/src/client/api/video-request.d.ts +208 -0
- package/dist/src/client/api/video-request.js +18 -0
- package/dist/src/client/api/video.d.ts +107 -0
- package/dist/src/client/api/video.js +187 -0
- package/dist/src/client/api/vla-helpers.d.ts +59 -0
- package/dist/src/client/api/vla-helpers.js +139 -0
- package/dist/src/client/api/vla.d.ts +114 -0
- package/dist/src/client/api/vla.js +166 -0
- package/dist/src/client/api/world-result.d.ts +72 -0
- package/dist/src/client/api/world-result.js +296 -0
- package/dist/src/client/api/world.d.ts +144 -0
- package/dist/src/client/api/world.js +71 -0
- package/dist/src/client/config-loader/config-utils.d.ts +5 -0
- package/dist/src/client/config-loader/config-utils.js +18 -0
- package/dist/src/client/config-loader/resolve-config.expo.js +60 -0
- package/dist/src/client/config-loader/resolve-config.node.js +198 -0
- package/dist/src/client/init-hooks.d.ts +21 -0
- package/dist/src/client/init-hooks.js +62 -0
- package/dist/src/client/plugins-factory.d.ts +7 -0
- package/dist/src/client/plugins-factory.js +9 -0
- package/dist/src/client/rpc/bare-client.d.ts +6 -0
- package/dist/src/client/rpc/bare-client.js +21 -0
- package/dist/src/client/rpc/expo-rpc-client.js +195 -0
- package/dist/src/client/rpc/init-timeout.d.ts +26 -0
- package/dist/src/client/rpc/init-timeout.js +25 -0
- package/dist/src/client/rpc/node-rpc-client.js +525 -0
- package/dist/src/client/rpc/profiling/profiler.d.ts +27 -0
- package/dist/src/client/rpc/profiling/profiler.js +134 -0
- package/dist/src/client/rpc/rpc-client.d.ts +19 -0
- package/dist/src/client/rpc/rpc-client.js +550 -0
- package/dist/src/client/rpc/rpc-error.d.ts +28 -0
- package/dist/src/client/rpc/rpc-error.js +159 -0
- package/dist/src/client/rpc/worker-startup-error.d.ts +12 -0
- package/dist/src/client/rpc/worker-startup-error.js +13 -0
- package/dist/src/commands/bundle/entry-gen.js +54 -0
- package/dist/src/commands/bundle/index.js +148 -0
- package/dist/src/commands/bundle/plugins.d.ts +9 -0
- package/dist/src/commands/bundle/plugins.js +51 -0
- package/dist/src/commands/bundle/resolve-sdk-import.js +58 -0
- package/dist/src/commands/index.d.ts +5 -0
- package/dist/src/commands/index.js +2 -0
- package/dist/src/commands/verify/abi.d.ts +52 -0
- package/dist/src/commands/verify/abi.js +125 -0
- package/dist/src/commands/verify/bundle-source.d.ts +12 -0
- package/dist/src/commands/verify/bundle-source.js +53 -0
- package/dist/src/commands/verify/index.d.ts +59 -0
- package/dist/src/commands/verify/index.js +372 -0
- package/dist/src/commands/verify/node-modules-source.d.ts +11 -0
- package/dist/src/commands/verify/node-modules-source.js +76 -0
- package/dist/src/commands/verify/prebuilds.d.ts +16 -0
- package/dist/src/commands/verify/prebuilds.js +36 -0
- package/dist/src/commands/verify/resource-collectors.js +261 -0
- package/dist/src/deprecate.d.ts +2 -0
- package/dist/src/deprecate.js +9 -0
- package/dist/src/expo/plugins/withAndroidNdkVersion.js +31 -0
- package/dist/src/expo/plugins/withDeviceInfo.js +49 -0
- package/dist/src/expo/plugins/withMobileBundle.d.ts +24 -0
- package/dist/src/expo/plugins/withMobileBundle.js +152 -0
- package/dist/src/index.d.ts +20 -0
- package/dist/src/index.js +59 -0
- package/dist/src/logging/addon.d.ts +6 -0
- package/dist/src/logging/logging-stream-registry.js +137 -0
- package/dist/src/logging/namespaces.d.ts +7 -0
- package/dist/src/logging/namespaces.js +8 -0
- package/dist/src/logging/registry.d.ts +31 -0
- package/dist/src/logging/registry.js +62 -0
- package/dist/src/logging/stream-logger.js +12 -0
- package/dist/src/logging/utils.d.ts +6 -0
- package/dist/src/models/registry/index.d.ts +2 -0
- package/dist/src/models/registry/index.js +4 -0
- package/dist/src/pear/pre.js +446 -0
- package/dist/src/plugin-ids.d.ts +14 -0
- package/dist/src/plugin-ids.js +27 -0
- package/dist/src/plugin-utils.d.ts +2 -0
- package/dist/src/plugin-utils.js +4 -0
- package/dist/src/schemas/public.d.ts +3 -0
- package/dist/src/schemas/public.js +11 -0
- package/dist/src/schemas/sdk-errors-client.d.ts +41 -0
- package/dist/src/schemas/sdk-errors-client.js +192 -0
- package/dist/src/schemas/sdk-errors-server.d.ts +101 -0
- package/dist/src/schemas/sdk-errors-server.js +540 -0
- package/dist/src/server/error-handlers.js +32 -0
- package/dist/src/server/plugins/index.d.ts +2 -0
- package/dist/src/server/plugins/index.js +1 -0
- package/dist/src/server/rpc/profiling/context.d.ts +17 -0
- package/dist/src/server/rpc/profiling/context.js +31 -0
- package/dist/src/server/rpc/profiling/index.d.ts +2 -0
- package/dist/src/server/rpc/profiling/index.js +1 -0
- package/dist/src/server/rpc/profiling/profiler.d.ts +13 -0
- package/dist/src/server/rpc/profiling/profiler.js +78 -0
- package/dist/src/server/rpc/rpc-utils.d.ts +5 -0
- package/dist/src/server/utils/qvac-paths.js +5 -0
- package/dist/src/server/utils/worker-lock.js +67 -0
- package/dist/src/utils/aggregate-events.d.ts +26 -0
- package/dist/src/utils/aggregate-events.js +73 -0
- package/dist/src/utils/errors-client.d.ts +181 -0
- package/dist/src/utils/errors-client.js +305 -0
- package/dist/src/utils/errors-server.d.ts +380 -0
- package/dist/src/utils/errors-server.js +621 -0
- package/dist/src/utils/load-model-validation.js +17 -0
- package/dist/src/utils/mcp-adapter.d.ts +12 -0
- package/dist/src/utils/mcp-adapter.js +96 -0
- package/dist/src/utils/tool-helpers.d.ts +25 -0
- package/dist/src/utils/tool-helpers.js +111 -0
- package/dist/src/worker/create-server.js +46 -0
- package/dist/src/worker/handle-request.js +180 -0
- package/dist/src/worker/handler-utils.d.ts +16 -0
- package/dist/src/worker/handler-utils.js +41 -0
- package/dist/src/worker/index.d.ts +5 -0
- package/dist/src/worker/index.js +45 -0
- package/dist/src/worker/legacy-worker-entry.d.ts +2 -0
- package/dist/src/worker/legacy-worker-entry.js +3 -0
- package/dist/src/worker/lifecycle.d.ts +23 -0
- package/dist/src/worker/lifecycle.js +141 -0
- package/dist/src/worker/plugins/audiogen-ggml.d.ts +2 -0
- package/dist/src/worker/plugins/audiogen-ggml.js +1 -0
- package/dist/src/worker/plugins/bci-whispercpp-transcription.d.ts +2 -0
- package/dist/src/worker/plugins/bci-whispercpp-transcription.js +1 -0
- package/dist/src/worker/plugins/ggml-classification.d.ts +2 -0
- package/dist/src/worker/plugins/ggml-classification.js +1 -0
- package/dist/src/worker/plugins/ggml-ocr.d.ts +2 -0
- package/dist/src/worker/plugins/ggml-ocr.js +1 -0
- package/dist/src/worker/plugins/ggml-vla.d.ts +2 -0
- package/dist/src/worker/plugins/ggml-vla.js +1 -0
- package/dist/src/worker/plugins/llamacpp-completion.d.ts +2 -0
- package/dist/src/worker/plugins/llamacpp-completion.js +1 -0
- package/dist/src/worker/plugins/llamacpp-embedding.d.ts +2 -0
- package/dist/src/worker/plugins/llamacpp-embedding.js +1 -0
- package/dist/src/worker/plugins/nmtcpp-translation.d.ts +2 -0
- package/dist/src/worker/plugins/nmtcpp-translation.js +1 -0
- package/dist/src/worker/plugins/parakeet-transcription.d.ts +2 -0
- package/dist/src/worker/plugins/parakeet-transcription.js +1 -0
- package/dist/src/worker/plugins/sdcpp-generation.d.ts +2 -0
- package/dist/src/worker/plugins/sdcpp-generation.js +1 -0
- package/dist/src/worker/plugins/tts-ggml.d.ts +2 -0
- package/dist/src/worker/plugins/tts-ggml.js +1 -0
- package/dist/src/worker/plugins/whispercpp-transcription.d.ts +2 -0
- package/dist/src/worker/plugins/whispercpp-transcription.js +1 -0
- package/dist/src/worker/worker-core.d.ts +7 -0
- package/dist/src/worker/worker-core.js +8 -0
- package/docs/system-resources-support-matrix.md +46 -27
- package/package.json +82 -87
- package/dist/client/api/audio-gen-result.d.ts +0 -4
- package/dist/client/api/audio-gen-result.js +0 -132
- package/dist/client/api/audio-gen.d.ts +0 -46
- package/dist/client/api/audio-gen.js +0 -48
- package/dist/client/api/batch-completion.d.ts +0 -15
- package/dist/client/api/batch-completion.js +0 -332
- package/dist/client/api/bci-transcribe.d.ts +0 -57
- package/dist/client/api/bci-transcribe.js +0 -173
- package/dist/client/api/cancel.d.ts +0 -35
- package/dist/client/api/cancel.js +0 -83
- package/dist/client/api/classify.d.ts +0 -23
- package/dist/client/api/classify.js +0 -46
- package/dist/client/api/completion-stream.d.ts +0 -107
- package/dist/client/api/completion-stream.js +0 -351
- package/dist/client/api/delete-cache.js +0 -49
- package/dist/client/api/diffusion.d.ts +0 -93
- package/dist/client/api/diffusion.js +0 -175
- package/dist/client/api/download-asset.d.ts +0 -50
- package/dist/client/api/download-asset.js +0 -87
- package/dist/client/api/embed.d.ts +0 -42
- package/dist/client/api/embed.js +0 -30
- package/dist/client/api/finetune.d.ts +0 -92
- package/dist/client/api/finetune.js +0 -144
- package/dist/client/api/get-loaded-model-info.d.ts +0 -25
- package/dist/client/api/get-loaded-model-info.js +0 -36
- package/dist/client/api/get-model-info.d.ts +0 -44
- package/dist/client/api/get-model-info.js +0 -22
- package/dist/client/api/get-system-resources.d.ts +0 -3
- package/dist/client/api/get-system-resources.js +0 -16
- package/dist/client/api/heartbeat.d.ts +0 -30
- package/dist/client/api/heartbeat.js +0 -38
- package/dist/client/api/index.d.ts +0 -36
- package/dist/client/api/index.js +0 -35
- package/dist/client/api/invoke-plugin.d.ts +0 -31
- package/dist/client/api/invoke-plugin.js +0 -54
- package/dist/client/api/load-model.d.ts +0 -178
- package/dist/client/api/load-model.js +0 -130
- package/dist/client/api/logging-stream.d.ts +0 -24
- package/dist/client/api/logging-stream.js +0 -36
- package/dist/client/api/ocr.d.ts +0 -40
- package/dist/client/api/ocr.js +0 -97
- package/dist/client/api/provide.d.ts +0 -24
- package/dist/client/api/provide.js +0 -33
- package/dist/client/api/rag.d.ts +0 -252
- package/dist/client/api/rag.js +0 -485
- package/dist/client/api/registry.d.ts +0 -40
- package/dist/client/api/registry.js +0 -63
- package/dist/client/api/resume.d.ts +0 -30
- package/dist/client/api/resume.js +0 -36
- package/dist/client/api/state.d.ts +0 -23
- package/dist/client/api/state.js +0 -29
- package/dist/client/api/stop-provider.d.ts +0 -21
- package/dist/client/api/stop-provider.js +0 -31
- package/dist/client/api/subscribe-logs.d.ts +0 -28
- package/dist/client/api/suspend.d.ts +0 -31
- package/dist/client/api/suspend.js +0 -37
- package/dist/client/api/text-to-speech.d.ts +0 -66
- package/dist/client/api/text-to-speech.js +0 -455
- package/dist/client/api/transcribe.d.ts +0 -93
- package/dist/client/api/transcribe.js +0 -295
- package/dist/client/api/translate.d.ts +0 -49
- package/dist/client/api/translate.js +0 -125
- package/dist/client/api/unload-model.d.ts +0 -18
- package/dist/client/api/unload-model.js +0 -44
- package/dist/client/api/upscale.d.ts +0 -45
- package/dist/client/api/upscale.js +0 -99
- package/dist/client/api/video.d.ts +0 -87
- package/dist/client/api/video.js +0 -175
- package/dist/client/api/vla-helpers.d.ts +0 -45
- package/dist/client/api/vla-helpers.js +0 -125
- package/dist/client/api/vla.d.ts +0 -114
- package/dist/client/api/vla.js +0 -166
- package/dist/client/config-loader/config-utils.d.ts +0 -5
- package/dist/client/config-loader/config-utils.js +0 -18
- package/dist/client/config-loader/resolve-config.bare.d.ts +0 -9
- package/dist/client/config-loader/resolve-config.bare.js +0 -74
- package/dist/client/config-loader/resolve-config.expo.js +0 -62
- package/dist/client/config-loader/resolve-config.node.js +0 -199
- package/dist/client/init-hooks.d.ts +0 -21
- package/dist/client/init-hooks.js +0 -66
- package/dist/client/plugins-factory.d.ts +0 -8
- package/dist/client/plugins-factory.js +0 -10
- package/dist/client/rpc/bare-client.d.ts +0 -17
- package/dist/client/rpc/bare-client.js +0 -251
- package/dist/client/rpc/expo-rpc-client.js +0 -196
- package/dist/client/rpc/node-rpc-client.js +0 -505
- package/dist/client/rpc/profiling/profiler.d.ts +0 -27
- package/dist/client/rpc/profiling/profiler.js +0 -140
- package/dist/client/rpc/rpc-client.d.ts +0 -19
- package/dist/client/rpc/rpc-client.js +0 -551
- package/dist/client/rpc/rpc-error.d.ts +0 -28
- package/dist/client/rpc/rpc-error.js +0 -150
- package/dist/commands/bundle/entry-gen.js +0 -54
- package/dist/commands/bundle/index.js +0 -148
- package/dist/commands/bundle/plugins.d.ts +0 -9
- package/dist/commands/bundle/plugins.js +0 -51
- package/dist/commands/bundle/resolve-sdk-import.js +0 -53
- package/dist/commands/index.d.ts +0 -5
- package/dist/commands/index.js +0 -2
- package/dist/commands/verify/abi.d.ts +0 -52
- package/dist/commands/verify/abi.js +0 -125
- package/dist/commands/verify/bundle-source.d.ts +0 -12
- package/dist/commands/verify/bundle-source.js +0 -53
- package/dist/commands/verify/index.d.ts +0 -59
- package/dist/commands/verify/index.js +0 -372
- package/dist/commands/verify/node-modules-source.d.ts +0 -11
- package/dist/commands/verify/node-modules-source.js +0 -76
- package/dist/commands/verify/prebuilds.d.ts +0 -16
- package/dist/commands/verify/prebuilds.js +0 -36
- package/dist/commands/verify/resource-collectors.js +0 -261
- package/dist/constants/audio.d.ts +0 -2
- package/dist/constants/audio.js +0 -1
- package/dist/constants/index.d.ts +0 -3
- package/dist/constants/index.js +0 -2
- package/dist/constants/registry.d.ts +0 -2
- package/dist/constants/registry.js +0 -1
- package/dist/examples/delegated-inference/composite.d.ts +0 -2
- package/dist/examples/delegated-inference/composite.js +0 -96
- package/dist/examples/delegated-inference/consumer-profiled.d.ts +0 -2
- package/dist/examples/delegated-inference/consumer-profiled.js +0 -59
- package/dist/examples/delegated-inference/consumer.d.ts +0 -2
- package/dist/examples/delegated-inference/consumer.js +0 -55
- package/dist/examples/delegated-inference/provider.d.ts +0 -2
- package/dist/examples/delegated-inference/provider.js +0 -52
- package/dist/examples/quickstart.bare.d.ts +0 -2
- package/dist/examples/quickstart.bare.js +0 -16
- package/dist/expo/plugins/withAndroidNdkVersion.js +0 -31
- package/dist/expo/plugins/withDeviceInfo.js +0 -49
- package/dist/expo/plugins/withMobileBundle.d.ts +0 -12
- package/dist/expo/plugins/withMobileBundle.js +0 -117
- package/dist/index.d.ts +0 -17
- package/dist/index.js +0 -44
- package/dist/logging/addon.d.ts +0 -6
- package/dist/logging/namespaces.d.ts +0 -7
- package/dist/logging/namespaces.js +0 -8
- package/dist/logging/registry.d.ts +0 -31
- package/dist/logging/registry.js +0 -62
- package/dist/logging/stream-logger.js +0 -12
- package/dist/logging/utils.d.ts +0 -6
- package/dist/models/registry/index.d.ts +0 -19
- package/dist/models/registry/index.js +0 -21
- package/dist/models/registry/models.d.ts +0 -23457
- package/dist/models/registry/models.js +0 -24713
- package/dist/pear/pre.js +0 -446
- package/dist/profiling/aggregator.d.ts +0 -15
- package/dist/profiling/aggregator.js +0 -100
- package/dist/profiling/backend-diagnostics.d.ts +0 -8
- package/dist/profiling/backend-diagnostics.js +0 -21
- package/dist/profiling/clock.d.ts +0 -12
- package/dist/profiling/clock.js +0 -51
- package/dist/profiling/controller.d.ts +0 -35
- package/dist/profiling/controller.js +0 -130
- package/dist/profiling/envelope.d.ts +0 -11
- package/dist/profiling/envelope.js +0 -45
- package/dist/profiling/events.d.ts +0 -20
- package/dist/profiling/events.js +0 -35
- package/dist/profiling/exporters.d.ts +0 -10
- package/dist/profiling/exporters.js +0 -243
- package/dist/profiling/index.d.ts +0 -86
- package/dist/profiling/index.js +0 -81
- package/dist/profiling/model-execution.d.ts +0 -16
- package/dist/profiling/model-execution.js +0 -34
- package/dist/profiling/ring-buffer.d.ts +0 -19
- package/dist/profiling/ring-buffer.js +0 -83
- package/dist/profiling/types.d.ts +0 -53
- package/dist/profiling/types.js +0 -1
- package/dist/schemas/archive.d.ts +0 -9
- package/dist/schemas/archive.js +0 -11
- package/dist/schemas/audio-gen.d.ts +0 -356
- package/dist/schemas/audio-gen.js +0 -200
- package/dist/schemas/batch-completion-stream.d.ts +0 -468
- package/dist/schemas/batch-completion-stream.js +0 -124
- package/dist/schemas/bci-config.d.ts +0 -75
- package/dist/schemas/bci-config.js +0 -58
- package/dist/schemas/bci.d.ts +0 -179
- package/dist/schemas/bci.js +0 -89
- package/dist/schemas/cancel.d.ts +0 -209
- package/dist/schemas/cancel.js +0 -140
- package/dist/schemas/classification.d.ts +0 -53
- package/dist/schemas/classification.js +0 -33
- package/dist/schemas/common.d.ts +0 -6960
- package/dist/schemas/common.js +0 -138
- package/dist/schemas/completion-event.d.ts +0 -249
- package/dist/schemas/completion-event.js +0 -94
- package/dist/schemas/completion-stream.d.ts +0 -476
- package/dist/schemas/completion-stream.js +0 -236
- package/dist/schemas/constants-registry.d.ts +0 -83
- package/dist/schemas/constants-registry.js +0 -65
- package/dist/schemas/delegate.d.ts +0 -16
- package/dist/schemas/delegate.js +0 -32
- package/dist/schemas/delete-cache.d.ts +0 -17
- package/dist/schemas/delete-cache.js +0 -21
- package/dist/schemas/download-asset.d.ts +0 -225
- package/dist/schemas/download-asset.js +0 -71
- package/dist/schemas/embed.d.ts +0 -42
- package/dist/schemas/embed.js +0 -35
- package/dist/schemas/engine-addon-map.d.ts +0 -21
- package/dist/schemas/engine-addon-map.js +0 -78
- package/dist/schemas/error.d.ts +0 -44
- package/dist/schemas/error.js +0 -67
- package/dist/schemas/finetune.d.ts +0 -622
- package/dist/schemas/finetune.js +0 -163
- package/dist/schemas/get-loaded-model-info.d.ts +0 -70
- package/dist/schemas/get-loaded-model-info.js +0 -52
- package/dist/schemas/get-model-info.d.ts +0 -130
- package/dist/schemas/get-model-info.js +0 -91
- package/dist/schemas/heartbeat.d.ts +0 -16
- package/dist/schemas/heartbeat.js +0 -10
- package/dist/schemas/index.d.ts +0 -55
- package/dist/schemas/index.js +0 -55
- package/dist/schemas/json-schema.d.ts +0 -16
- package/dist/schemas/json-schema.js +0 -2
- package/dist/schemas/llamacpp-config.d.ts +0 -404
- package/dist/schemas/llamacpp-config.js +0 -219
- package/dist/schemas/load-model.d.ts +0 -28991
- package/dist/schemas/load-model.js +0 -647
- package/dist/schemas/logging-stream.d.ts +0 -34
- package/dist/schemas/logging-stream.js +0 -17
- package/dist/schemas/mcp-adapter.d.ts +0 -47
- package/dist/schemas/mcp-adapter.js +0 -1
- package/dist/schemas/model-src-utils.d.ts +0 -193
- package/dist/schemas/model-src-utils.js +0 -61
- package/dist/schemas/model-types.d.ts +0 -276
- package/dist/schemas/model-types.js +0 -223
- package/dist/schemas/ocr.d.ts +0 -138
- package/dist/schemas/ocr.js +0 -59
- package/dist/schemas/path-validation.d.ts +0 -10
- package/dist/schemas/path-validation.js +0 -22
- package/dist/schemas/plugin.d.ts +0 -342
- package/dist/schemas/plugin.js +0 -242
- package/dist/schemas/profiling.d.ts +0 -696
- package/dist/schemas/profiling.js +0 -100
- package/dist/schemas/provide.d.ts +0 -41
- package/dist/schemas/provide.js +0 -22
- package/dist/schemas/public.d.ts +0 -3
- package/dist/schemas/public.js +0 -6
- package/dist/schemas/rag.d.ts +0 -302
- package/dist/schemas/rag.js +0 -212
- package/dist/schemas/registry.d.ts +0 -454
- package/dist/schemas/registry.js +0 -104
- package/dist/schemas/reload-config.d.ts +0 -586
- package/dist/schemas/reload-config.js +0 -42
- package/dist/schemas/resume.d.ts +0 -10
- package/dist/schemas/resume.js +0 -7
- package/dist/schemas/runtime-context.d.ts +0 -19
- package/dist/schemas/runtime-context.js +0 -7
- package/dist/schemas/sdcpp-config.d.ts +0 -1127
- package/dist/schemas/sdcpp-config.js +0 -748
- package/dist/schemas/sdk-config.d.ts +0 -5059
- package/dist/schemas/sdk-config.js +0 -167
- package/dist/schemas/sdk-errors-client.d.ts +0 -44
- package/dist/schemas/sdk-errors-client.js +0 -208
- package/dist/schemas/sdk-errors-registry.d.ts +0 -6
- package/dist/schemas/sdk-errors-registry.js +0 -8
- package/dist/schemas/sdk-errors-server.d.ts +0 -102
- package/dist/schemas/sdk-errors-server.js +0 -534
- package/dist/schemas/shard.d.ts +0 -21
- package/dist/schemas/shard.js +0 -17
- package/dist/schemas/state.d.ts +0 -23
- package/dist/schemas/state.js +0 -9
- package/dist/schemas/stop-provide.d.ts +0 -12
- package/dist/schemas/stop-provide.js +0 -11
- package/dist/schemas/suspend.d.ts +0 -10
- package/dist/schemas/suspend.js +0 -7
- package/dist/schemas/system-resources.d.ts +0 -3967
- package/dist/schemas/system-resources.js +0 -149
- package/dist/schemas/text-to-speech.d.ts +0 -2329
- package/dist/schemas/text-to-speech.js +0 -554
- package/dist/schemas/tools.d.ts +0 -65
- package/dist/schemas/tools.js +0 -37
- package/dist/schemas/transcription-config.d.ts +0 -164
- package/dist/schemas/transcription-config.js +0 -162
- package/dist/schemas/transcription.d.ts +0 -264
- package/dist/schemas/transcription.js +0 -145
- package/dist/schemas/translate.d.ts +0 -139
- package/dist/schemas/translate.js +0 -103
- package/dist/schemas/translation-config.d.ts +0 -1032
- package/dist/schemas/translation-config.js +0 -170
- package/dist/schemas/unload-model.d.ts +0 -22
- package/dist/schemas/unload-model.js +0 -18
- package/dist/schemas/vla.d.ts +0 -194
- package/dist/schemas/vla.js +0 -254
- package/dist/scripts/run-security-tests.d.ts +0 -2
- package/dist/scripts/run-security-tests.js +0 -21
- package/dist/server/bare/delegate-connect-diagnostics.d.ts +0 -9
- package/dist/server/bare/delegate-connect-diagnostics.js +0 -38
- package/dist/server/bare/delegate-rpc-client.d.ts +0 -10
- package/dist/server/bare/delegate-rpc-client.js +0 -219
- package/dist/server/bare/hyperswarm.d.ts +0 -10
- package/dist/server/bare/hyperswarm.js +0 -103
- package/dist/server/bare/ops/bci-transcribe.d.ts +0 -13
- package/dist/server/bare/ops/bci-transcribe.js +0 -248
- package/dist/server/bare/ops/cancel.d.ts +0 -29
- package/dist/server/bare/ops/cancel.js +0 -46
- package/dist/server/bare/ops/embed.d.ts +0 -16
- package/dist/server/bare/ops/embed.js +0 -193
- package/dist/server/bare/ops/kv-cache-retention.d.ts +0 -12
- package/dist/server/bare/ops/kv-cache-retention.js +0 -132
- package/dist/server/bare/ops/kv-cache-utils.d.ts +0 -22
- package/dist/server/bare/ops/kv-cache-utils.js +0 -148
- package/dist/server/bare/ops/load-model.d.ts +0 -9
- package/dist/server/bare/ops/load-model.js +0 -82
- package/dist/server/bare/ops/transcribe.d.ts +0 -20
- package/dist/server/bare/ops/transcribe.js +0 -349
- package/dist/server/bare/ops/translate-stats.d.ts +0 -5
- package/dist/server/bare/ops/translate-stats.js +0 -11
- package/dist/server/bare/ops/translate.d.ts +0 -8
- package/dist/server/bare/ops/translate.js +0 -284
- package/dist/server/bare/ops/unload-model.d.ts +0 -3
- package/dist/server/bare/ops/unload-model.js +0 -51
- package/dist/server/bare/plugins/asr-ggml/config.d.ts +0 -32
- package/dist/server/bare/plugins/asr-ggml/config.js +0 -46
- package/dist/server/bare/plugins/asr-ggml/logging.d.ts +0 -11
- package/dist/server/bare/plugins/asr-ggml/logging.js +0 -12
- package/dist/server/bare/plugins/audiogen-ggml/config.d.ts +0 -18
- package/dist/server/bare/plugins/audiogen-ggml/config.js +0 -23
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-input.d.ts +0 -20
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-input.js +0 -153
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-stream.d.ts +0 -3
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-stream.js +0 -213
- package/dist/server/bare/plugins/audiogen-ggml/plugin.d.ts +0 -241
- package/dist/server/bare/plugins/audiogen-ggml/plugin.js +0 -58
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +0 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +0 -13
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +0 -174
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +0 -111
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +0 -75
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +0 -11
- package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +0 -6
- package/dist/server/bare/plugins/ggml-classification/ops/classify.js +0 -30
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +0 -32
- package/dist/server/bare/plugins/ggml-classification/plugin.js +0 -55
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.d.ts +0 -8
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.js +0 -119
- package/dist/server/bare/plugins/ggml-ocr/plugin.d.ts +0 -103
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +0 -112
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.d.ts +0 -6
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.js +0 -73
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.d.ts +0 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.js +0 -12
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +0 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +0 -79
- package/dist/server/bare/plugins/ggml-vla/ops/vla-set-embodiment.d.ts +0 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-set-embodiment.js +0 -9
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +0 -103
- package/dist/server/bare/plugins/ggml-vla/plugin.js +0 -74
- package/dist/server/bare/plugins/index.d.ts +0 -13
- package/dist/server/bare/plugins/index.js +0 -12
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.d.ts +0 -32
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +0 -100
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +0 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +0 -36
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +0 -27
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +0 -58
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +0 -47
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +0 -382
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.d.ts +0 -29
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +0 -65
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +0 -11
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +0 -299
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +0 -190
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +0 -746
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +0 -58
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +0 -58
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +0 -672
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +0 -503
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +0 -10
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +0 -28
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +0 -77
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +0 -100
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +0 -458
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +0 -144
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.d.ts +0 -32
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.js +0 -114
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +0 -134
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +0 -141
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +0 -3
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +0 -63
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +0 -3
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +0 -40
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +0 -6
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +0 -238
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +0 -758
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +0 -310
- package/dist/server/bare/plugins/tts-ggml/ops/parler-options.d.ts +0 -7
- package/dist/server/bare/plugins/tts-ggml/ops/parler-options.js +0 -50
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.d.ts +0 -7
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.js +0 -104
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.d.ts +0 -7
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.js +0 -89
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +0 -495
- package/dist/server/bare/plugins/tts-ggml/plugin.js +0 -436
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +0 -347
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +0 -178
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +0 -7
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +0 -11
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +0 -14
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +0 -19
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +0 -4
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +0 -16
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +0 -15
- package/dist/server/bare/rag-hyperdb/handlers/search.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/search.js +0 -16
- package/dist/server/bare/rag-hyperdb/index.d.ts +0 -12
- package/dist/server/bare/rag-hyperdb/index.js +0 -11
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.d.ts +0 -29
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +0 -76
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +0 -15
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +0 -143
- package/dist/server/bare/registry/config-registry.d.ts +0 -14
- package/dist/server/bare/registry/config-registry.js +0 -90
- package/dist/server/bare/registry/logging-stream-registry.js +0 -137
- package/dist/server/bare/registry/model-config-registry.d.ts +0 -4
- package/dist/server/bare/registry/model-config-registry.js +0 -15
- package/dist/server/bare/registry/model-config-utils.d.ts +0 -15
- package/dist/server/bare/registry/model-config-utils.js +0 -128
- package/dist/server/bare/registry/model-registry.d.ts +0 -76
- package/dist/server/bare/registry/model-registry.js +0 -130
- package/dist/server/bare/registry/registry-client.d.ts +0 -5
- package/dist/server/bare/registry/registry-client.js +0 -118
- package/dist/server/bare/registry/runtime-context-registry.d.ts +0 -7
- package/dist/server/bare/registry/runtime-context-registry.js +0 -26
- package/dist/server/bare/resources/collector.d.ts +0 -644
- package/dist/server/bare/resources/collector.js +0 -226
- package/dist/server/bare/resources/native.d.ts +0 -3
- package/dist/server/bare/resources/native.js +0 -35
- package/dist/server/bare/resources/normalize.d.ts +0 -13
- package/dist/server/bare/resources/normalize.js +0 -73
- package/dist/server/bare/resources/types.d.ts +0 -66
- package/dist/server/bare/resources/types.js +0 -1
- package/dist/server/bare/resources/worker-collector.d.ts +0 -5
- package/dist/server/bare/resources/worker-collector.js +0 -15
- package/dist/server/bare/runtime/disposable-scope.d.ts +0 -36
- package/dist/server/bare/runtime/disposable-scope.js +0 -69
- package/dist/server/bare/runtime/index.d.ts +0 -8
- package/dist/server/bare/runtime/index.js +0 -3
- package/dist/server/bare/runtime/request-context.d.ts +0 -49
- package/dist/server/bare/runtime/request-context.js +0 -1
- package/dist/server/bare/runtime/request-id.d.ts +0 -12
- package/dist/server/bare/runtime/request-id.js +0 -14
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +0 -4
- package/dist/server/bare/runtime/request-registry-singleton.js +0 -77
- package/dist/server/bare/runtime/request-registry.d.ts +0 -222
- package/dist/server/bare/runtime/request-registry.js +0 -715
- package/dist/server/bare/runtime/with-request-context.d.ts +0 -22
- package/dist/server/bare/runtime/with-request-context.js +0 -53
- package/dist/server/bare/runtime-lifecycle.d.ts +0 -38
- package/dist/server/bare/runtime-lifecycle.js +0 -163
- package/dist/server/bare/types/addon-responses.d.ts +0 -51
- package/dist/server/bare/types/addon-responses.js +0 -1
- package/dist/server/bare/utils/asr-events.d.ts +0 -15
- package/dist/server/bare/utils/asr-events.js +0 -30
- package/dist/server/bare/utils/audio-input.d.ts +0 -10
- package/dist/server/bare/utils/audio-input.js +0 -33
- package/dist/server/bare/utils/transcribe-metadata.d.ts +0 -21
- package/dist/server/bare/utils/transcribe-metadata.js +0 -28
- package/dist/server/bare/utils/tts-stats.d.ts +0 -26
- package/dist/server/bare/utils/tts-stats.js +0 -16
- package/dist/server/error-handlers.js +0 -32
- package/dist/server/plugins/index.d.ts +0 -2
- package/dist/server/plugins/index.js +0 -1
- package/dist/server/plugins/registry.d.ts +0 -10
- package/dist/server/plugins/registry.js +0 -107
- package/dist/server/rpc/create-server.js +0 -46
- package/dist/server/rpc/delegate-transport.d.ts +0 -19
- package/dist/server/rpc/delegate-transport.js +0 -237
- package/dist/server/rpc/handle-request.js +0 -172
- package/dist/server/rpc/handler-registry.d.ts +0 -3
- package/dist/server/rpc/handler-registry.js +0 -179
- package/dist/server/rpc/handler-selection.d.ts +0 -9
- package/dist/server/rpc/handler-selection.js +0 -14
- package/dist/server/rpc/handler-utils.d.ts +0 -30
- package/dist/server/rpc/handler-utils.js +0 -183
- package/dist/server/rpc/handlers/audio-gen-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/audio-gen-stream.js +0 -4
- package/dist/server/rpc/handlers/batch-completion-stream.d.ts +0 -80
- package/dist/server/rpc/handlers/batch-completion-stream.js +0 -4
- package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/bci-transcribe-stream.js +0 -4
- package/dist/server/rpc/handlers/bci-transcribe.d.ts +0 -3
- package/dist/server/rpc/handlers/bci-transcribe.js +0 -4
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/cancel-delegated.js +0 -66
- package/dist/server/rpc/handlers/cancelHandler.d.ts +0 -32
- package/dist/server/rpc/handlers/cancelHandler.js +0 -69
- package/dist/server/rpc/handlers/classify.d.ts +0 -3
- package/dist/server/rpc/handlers/classify.js +0 -4
- package/dist/server/rpc/handlers/completion-orchestrate.d.ts +0 -42
- package/dist/server/rpc/handlers/completion-orchestrate.js +0 -190
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +0 -5
- package/dist/server/rpc/handlers/completion-stream-delegated.js +0 -51
- package/dist/server/rpc/handlers/completion-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/completion-stream.js +0 -4
- package/dist/server/rpc/handlers/delete-cache.d.ts +0 -12
- package/dist/server/rpc/handlers/delete-cache.js +0 -37
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/diffusion-stream.js +0 -4
- package/dist/server/rpc/handlers/download-asset.d.ts +0 -3
- package/dist/server/rpc/handlers/download-asset.js +0 -146
- package/dist/server/rpc/handlers/embed.d.ts +0 -3
- package/dist/server/rpc/handlers/embed.js +0 -4
- package/dist/server/rpc/handlers/finetune.d.ts +0 -3
- package/dist/server/rpc/handlers/finetune.js +0 -18
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +0 -3
- package/dist/server/rpc/handlers/get-loaded-model-info.js +0 -45
- package/dist/server/rpc/handlers/get-model-info.d.ts +0 -3
- package/dist/server/rpc/handlers/get-model-info.js +0 -173
- package/dist/server/rpc/handlers/get-system-resources.d.ts +0 -3
- package/dist/server/rpc/handlers/get-system-resources.js +0 -53
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/heartbeat-delegated.js +0 -32
- package/dist/server/rpc/handlers/heartbeat.d.ts +0 -3
- package/dist/server/rpc/handlers/heartbeat.js +0 -3
- package/dist/server/rpc/handlers/index.d.ts +0 -76
- package/dist/server/rpc/handlers/index.js +0 -75
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +0 -98
- package/dist/server/rpc/handlers/load-model/download-manager.js +0 -308
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +0 -8
- package/dist/server/rpc/handlers/load-model/download-stats.js +0 -126
- package/dist/server/rpc/handlers/load-model/handler.d.ts +0 -3
- package/dist/server/rpc/handlers/load-model/handler.js +0 -287
- package/dist/server/rpc/handlers/load-model/http.d.ts +0 -4
- package/dist/server/rpc/handlers/load-model/http.js +0 -856
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +0 -5
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +0 -561
- package/dist/server/rpc/handlers/load-model/index.d.ts +0 -3
- package/dist/server/rpc/handlers/load-model/index.js +0 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +0 -27
- package/dist/server/rpc/handlers/load-model/registry-client-options.js +0 -18
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +0 -23
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +0 -206
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +0 -24
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +0 -112
- package/dist/server/rpc/handlers/load-model/registry-metadata.d.ts +0 -11
- package/dist/server/rpc/handlers/load-model/registry-metadata.js +0 -23
- package/dist/server/rpc/handlers/load-model/registry.d.ts +0 -5
- package/dist/server/rpc/handlers/load-model/registry.js +0 -298
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +0 -34
- package/dist/server/rpc/handlers/load-model/resolve-session.js +0 -62
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +0 -16
- package/dist/server/rpc/handlers/load-model/resolve.js +0 -237
- package/dist/server/rpc/handlers/load-model/types.d.ts +0 -60
- package/dist/server/rpc/handlers/load-model/types.js +0 -28
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +0 -7
- package/dist/server/rpc/handlers/load-model-delegated.js +0 -132
- package/dist/server/rpc/handlers/logging-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/logging-stream.js +0 -39
- package/dist/server/rpc/handlers/ocr-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/ocr-stream.js +0 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +0 -3
- package/dist/server/rpc/handlers/plugin-dispatch.js +0 -63
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +0 -4
- package/dist/server/rpc/handlers/plugin-invoke.js +0 -81
- package/dist/server/rpc/handlers/provideHandler/connection.d.ts +0 -3
- package/dist/server/rpc/handlers/provideHandler/connection.js +0 -38
- package/dist/server/rpc/handlers/provideHandler/handler.d.ts +0 -3
- package/dist/server/rpc/handlers/provideHandler/handler.js +0 -66
- package/dist/server/rpc/handlers/provideHandler/proxy.d.ts +0 -3
- package/dist/server/rpc/handlers/provideHandler/proxy.js +0 -24
- package/dist/server/rpc/handlers/provideHandler.d.ts +0 -2
- package/dist/server/rpc/handlers/provideHandler.js +0 -2
- package/dist/server/rpc/handlers/rag.d.ts +0 -3
- package/dist/server/rpc/handlers/rag.js +0 -272
- package/dist/server/rpc/handlers/registry.d.ts +0 -5
- package/dist/server/rpc/handlers/registry.js +0 -155
- package/dist/server/rpc/handlers/resume.d.ts +0 -3
- package/dist/server/rpc/handlers/resume.js +0 -11
- package/dist/server/rpc/handlers/state.d.ts +0 -3
- package/dist/server/rpc/handlers/state.js +0 -7
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +0 -3
- package/dist/server/rpc/handlers/stopProvideHandler.js +0 -29
- package/dist/server/rpc/handlers/suspend.d.ts +0 -3
- package/dist/server/rpc/handlers/suspend.js +0 -11
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/text-to-speech-stream.js +0 -4
- package/dist/server/rpc/handlers/text-to-speech.d.ts +0 -3
- package/dist/server/rpc/handlers/text-to-speech.js +0 -4
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/transcribe-stream.js +0 -4
- package/dist/server/rpc/handlers/transcribe.d.ts +0 -3
- package/dist/server/rpc/handlers/transcribe.js +0 -4
- package/dist/server/rpc/handlers/translate.d.ts +0 -3
- package/dist/server/rpc/handlers/translate.js +0 -4
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +0 -3
- package/dist/server/rpc/handlers/unload-model-delegated.js +0 -32
- package/dist/server/rpc/handlers/unload-model.d.ts +0 -3
- package/dist/server/rpc/handlers/unload-model.js +0 -29
- package/dist/server/rpc/handlers/upscale-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/upscale-stream.js +0 -4
- package/dist/server/rpc/handlers/video-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/video-stream.js +0 -4
- package/dist/server/rpc/index.d.ts +0 -3
- package/dist/server/rpc/index.js +0 -2
- package/dist/server/rpc/method-shapes.d.ts +0 -53
- package/dist/server/rpc/method-shapes.js +0 -50
- package/dist/server/rpc/profiling/backend-diagnostics.d.ts +0 -3
- package/dist/server/rpc/profiling/backend-diagnostics.js +0 -16
- package/dist/server/rpc/profiling/context.d.ts +0 -18
- package/dist/server/rpc/profiling/context.js +0 -37
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +0 -32
- package/dist/server/rpc/profiling/delegation-profiler.js +0 -153
- package/dist/server/rpc/profiling/index.d.ts +0 -5
- package/dist/server/rpc/profiling/index.js +0 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +0 -25
- package/dist/server/rpc/profiling/operation-metrics.js +0 -361
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +0 -18
- package/dist/server/rpc/profiling/operation-wrappers.js +0 -196
- package/dist/server/rpc/profiling/profiler.d.ts +0 -13
- package/dist/server/rpc/profiling/profiler.js +0 -93
- package/dist/server/rpc/rpc-utils.d.ts +0 -5
- package/dist/server/rpc/transport-selector.d.ts +0 -3
- package/dist/server/rpc/transport-selector.js +0 -18
- package/dist/server/utils/archive.d.ts +0 -4
- package/dist/server/utils/archive.js +0 -177
- package/dist/server/utils/audio/decoder.d.ts +0 -41
- package/dist/server/utils/audio/decoder.js +0 -108
- package/dist/server/utils/cache/auto-history.d.ts +0 -4
- package/dist/server/utils/cache/auto-history.js +0 -26
- package/dist/server/utils/cache/paths.d.ts +0 -43
- package/dist/server/utils/cache/paths.js +0 -133
- package/dist/server/utils/cache/types.d.ts +0 -8
- package/dist/server/utils/cache/types.js +0 -1
- package/dist/server/utils/checksum.d.ts +0 -4
- package/dist/server/utils/checksum.js +0 -30
- package/dist/server/utils/clear-storage.d.ts +0 -5
- package/dist/server/utils/clear-storage.js +0 -14
- package/dist/server/utils/completion-normalizer.d.ts +0 -18
- package/dist/server/utils/completion-normalizer.js +0 -453
- package/dist/server/utils/config-transform.d.ts +0 -6
- package/dist/server/utils/config-transform.js +0 -27
- package/dist/server/utils/formatting.d.ts +0 -19
- package/dist/server/utils/formatting.js +0 -56
- package/dist/server/utils/gguf-tensor-extractor.d.ts +0 -15
- package/dist/server/utils/gguf-tensor-extractor.js +0 -310
- package/dist/server/utils/index.d.ts +0 -11
- package/dist/server/utils/index.js +0 -10
- package/dist/server/utils/multi-gpu-mobile.d.ts +0 -5
- package/dist/server/utils/multi-gpu-mobile.js +0 -10
- package/dist/server/utils/path-security.d.ts +0 -12
- package/dist/server/utils/path-security.js +0 -25
- package/dist/server/utils/qvac-paths.js +0 -5
- package/dist/server/utils/response-format.d.ts +0 -3
- package/dist/server/utils/response-format.js +0 -20
- package/dist/server/utils/shard-utils.d.ts +0 -49
- package/dist/server/utils/shard-utils.js +0 -137
- package/dist/server/utils/tool-integration.d.ts +0 -17
- package/dist/server/utils/tool-integration.js +0 -20
- package/dist/server/utils/tools/dialect.d.ts +0 -8
- package/dist/server/utils/tools/dialect.js +0 -20
- package/dist/server/utils/tools/index.d.ts +0 -3
- package/dist/server/utils/tools/index.js +0 -2
- package/dist/server/utils/tools/parser.d.ts +0 -6
- package/dist/server/utils/tools/parser.js +0 -69
- package/dist/server/utils/tools/parsers/dsml.d.ts +0 -4
- package/dist/server/utils/tools/parsers/dsml.js +0 -176
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +0 -4
- package/dist/server/utils/tools/parsers/gemma4native.js +0 -65
- package/dist/server/utils/tools/parsers/harmony.d.ts +0 -4
- package/dist/server/utils/tools/parsers/harmony.js +0 -57
- package/dist/server/utils/tools/parsers/hermes.d.ts +0 -4
- package/dist/server/utils/tools/parsers/hermes.js +0 -122
- package/dist/server/utils/tools/parsers/json.d.ts +0 -6
- package/dist/server/utils/tools/parsers/json.js +0 -115
- package/dist/server/utils/tools/parsers/pythonic.d.ts +0 -4
- package/dist/server/utils/tools/parsers/pythonic.js +0 -267
- package/dist/server/utils/tools/parsers/qwen35.d.ts +0 -4
- package/dist/server/utils/tools/parsers/qwen35.js +0 -124
- package/dist/server/utils/tools/shared.d.ts +0 -18
- package/dist/server/utils/tools/shared.js +0 -52
- package/dist/server/utils/worker-lock.js +0 -67
- package/dist/server/worker-core.d.ts +0 -23
- package/dist/server/worker-core.js +0 -206
- package/dist/server/worker.d.ts +0 -5
- package/dist/server/worker.js +0 -34
- package/dist/utils/aggregate-events.d.ts +0 -26
- package/dist/utils/aggregate-events.js +0 -73
- package/dist/utils/errors-client.d.ts +0 -178
- package/dist/utils/errors-client.js +0 -310
- package/dist/utils/errors-server.d.ts +0 -376
- package/dist/utils/errors-server.js +0 -610
- package/dist/utils/load-model-validation.js +0 -18
- package/dist/utils/mcp-adapter.d.ts +0 -12
- package/dist/utils/mcp-adapter.js +0 -96
- package/dist/utils/tool-helpers.d.ts +0 -25
- package/dist/utils/tool-helpers.js +0 -111
- /package/dist/{client → src/client}/api/client-request-id.d.ts +0 -0
- /package/dist/{client → src/client}/api/client-request-id.js +0 -0
- /package/dist/{client → src/client}/api/delete-cache.d.ts +0 -0
- /package/dist/{client → src/client}/api/subscribe-logs.js +0 -0
- /package/dist/{client → src/client}/config-loader/resolve-config.expo.d.ts +0 -0
- /package/dist/{client → src/client}/config-loader/resolve-config.node.d.ts +0 -0
- /package/dist/{client → src/client}/index.d.ts +0 -0
- /package/dist/{client → src/client}/index.js +0 -0
- /package/dist/{client → src/client}/logging-stream-registry.d.ts +0 -0
- /package/dist/{client → src/client}/logging-stream-registry.js +0 -0
- /package/dist/{client → src/client}/parse-input.d.ts +0 -0
- /package/dist/{client → src/client}/parse-input.js +0 -0
- /package/dist/{client → src/client}/rpc/ensure-worker-ready.d.ts +0 -0
- /package/dist/{client → src/client}/rpc/ensure-worker-ready.js +0 -0
- /package/dist/{client → src/client}/rpc/expo-device-info.d.ts +0 -0
- /package/dist/{client → src/client}/rpc/expo-device-info.js +0 -0
- /package/dist/{client → src/client}/rpc/expo-rpc-client.d.ts +0 -0
- /package/dist/{client → src/client}/rpc/node-rpc-client.d.ts +0 -0
- /package/dist/{client → src/client}/rpc/profiling/index.d.ts +0 -0
- /package/dist/{client → src/client}/rpc/profiling/index.js +0 -0
- /package/dist/{commands → src/commands}/bundle/bare-pack.d.ts +0 -0
- /package/dist/{commands → src/commands}/bundle/bare-pack.js +0 -0
- /package/dist/{commands → src/commands}/bundle/constants.d.ts +0 -0
- /package/dist/{commands → src/commands}/bundle/constants.js +0 -0
- /package/dist/{commands → src/commands}/bundle/entry-gen.d.ts +0 -0
- /package/dist/{commands → src/commands}/bundle/index.d.ts +0 -0
- /package/dist/{commands → src/commands}/bundle/manifest.d.ts +0 -0
- /package/dist/{commands → src/commands}/bundle/manifest.js +0 -0
- /package/dist/{commands → src/commands}/bundle/resolve-sdk-import.d.ts +0 -0
- /package/dist/{commands → src/commands}/verify/addon-source.d.ts +0 -0
- /package/dist/{commands → src/commands}/verify/addon-source.js +0 -0
- /package/dist/{commands → src/commands}/verify/resource-collectors.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/find-in-ancestor-node-modules.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/find-in-ancestor-node-modules.js +0 -0
- /package/dist/{expo → src/expo}/plugins/get-project-root.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/get-project-root.js +0 -0
- /package/dist/{expo → src/expo}/plugins/index.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/index.js +0 -0
- /package/dist/{expo → src/expo}/plugins/resolve-sdk-package-dir.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/resolve-sdk-package-dir.js +0 -0
- /package/dist/{expo → src/expo}/plugins/withAndroidArchitecture.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/withAndroidArchitecture.js +0 -0
- /package/dist/{expo → src/expo}/plugins/withAndroidNdkVersion.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/withDeviceInfo.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/withOpenCL.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/withOpenCL.js +0 -0
- /package/dist/{expo → src/expo}/plugins/withQvacSDK.d.ts +0 -0
- /package/dist/{expo → src/expo}/plugins/withQvacSDK.js +0 -0
- /package/dist/{logging → src/logging}/addon.js +0 -0
- /package/dist/{logging → src/logging}/base-logger.d.ts +0 -0
- /package/dist/{logging → src/logging}/base-logger.js +0 -0
- /package/dist/{logging → src/logging}/client-logger.d.ts +0 -0
- /package/dist/{logging → src/logging}/client-logger.js +0 -0
- /package/dist/{logging → src/logging}/index.d.ts +0 -0
- /package/dist/{logging → src/logging}/index.js +0 -0
- /package/dist/{logging → src/logging}/logger.d.ts +0 -0
- /package/dist/{logging → src/logging}/logger.js +0 -0
- /package/dist/{server/bare/registry → src/logging}/logging-stream-registry.d.ts +0 -0
- /package/dist/{logging → src/logging}/server-logger.d.ts +0 -0
- /package/dist/{logging → src/logging}/server-logger.js +0 -0
- /package/dist/{logging → src/logging}/stream-logger.d.ts +0 -0
- /package/dist/{logging → src/logging}/transport.d.ts +0 -0
- /package/dist/{logging → src/logging}/transport.js +0 -0
- /package/dist/{logging → src/logging}/types.d.ts +0 -0
- /package/dist/{logging → src/logging}/types.js +0 -0
- /package/dist/{logging → src/logging}/utils.js +0 -0
- /package/dist/{pear → src/pear}/pre.d.ts +0 -0
- /package/dist/{server → src/server}/env.d.ts +0 -0
- /package/dist/{server → src/server}/env.js +0 -0
- /package/dist/{server → src/server}/error-handlers.d.ts +0 -0
- /package/dist/{server → src/server}/rpc/progress-throttle.d.ts +0 -0
- /package/dist/{server → src/server}/rpc/progress-throttle.js +0 -0
- /package/dist/{server → src/server}/rpc/rpc-utils.js +0 -0
- /package/dist/{server → src/server}/utils/qvac-paths.d.ts +0 -0
- /package/dist/{server → src/server}/utils/worker-lock.d.ts +0 -0
- /package/dist/{utils → src/utils}/cache-normalize.d.ts +0 -0
- /package/dist/{utils → src/utils}/cache-normalize.js +0 -0
- /package/dist/{utils → src/utils}/decorate-promise.d.ts +0 -0
- /package/dist/{utils → src/utils}/decorate-promise.js +0 -0
- /package/dist/{utils → src/utils}/encoding.d.ts +0 -0
- /package/dist/{utils → src/utils}/encoding.js +0 -0
- /package/dist/{utils → src/utils}/errors-base.d.ts +0 -0
- /package/dist/{utils → src/utils}/errors-base.js +0 -0
- /package/dist/{utils → src/utils}/global-singleton.d.ts +0 -0
- /package/dist/{utils → src/utils}/global-singleton.js +0 -0
- /package/dist/{utils → src/utils}/load-model-validation.d.ts +0 -0
- /package/dist/{utils → src/utils}/object.d.ts +0 -0
- /package/dist/{utils → src/utils}/object.js +0 -0
- /package/dist/{utils → src/utils}/path-sanitize.d.ts +0 -0
- /package/dist/{utils → src/utils}/path-sanitize.js +0 -0
- /package/dist/{utils → src/utils}/withTimeout.d.ts +0 -0
- /package/dist/{utils → src/utils}/withTimeout.js +0 -0
- /package/dist/{utils → src/utils}/zod-error.d.ts +0 -0
- /package/dist/{utils → src/utils}/zod-error.js +0 -0
- /package/dist/{server/rpc → src/worker}/create-server.d.ts +0 -0
- /package/dist/{server/rpc → src/worker}/handle-request.d.ts +0 -0
- /package/{electron-forge → src/electron-forge}/index.cjs +0 -0
- /package/{expo → src/expo}/plugins/patches/android-link.mjs +0 -0
- /package/{expo → src/expo}/plugins/patches/ios-link.mjs +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {} from '../../schemas/index.js';
|
|
2
|
-
import {} from '../../schemas/common.js';
|
|
3
|
-
import { send } from '../../client/rpc/rpc-client.js';
|
|
4
|
-
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
5
|
-
/**
|
|
6
|
-
* Returns introspection info for a loaded `modelId` (local or delegated).
|
|
7
|
-
*
|
|
8
|
-
* For local models, `info.modelType` and `info.handlers` are authoritative.
|
|
9
|
-
* Use them to preflight an SDK call before sending the actual RPC, e.g.
|
|
10
|
-
* confirm that a model supports `transcribeStream` before calling `transcribe()`.
|
|
11
|
-
*
|
|
12
|
-
* For delegated models, only `modelId`, `isDelegated: true`, `providerInfo`,
|
|
13
|
-
* and `handlers: []` are populated. Preflight against a delegated model is
|
|
14
|
-
* best-effort and falls through to the provider's error response.
|
|
15
|
-
*
|
|
16
|
-
* Throws `ModelNotFoundError` if no entry exists for `modelId`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* const info = await getLoadedModelInfo({ modelId });
|
|
21
|
-
* if (info.isDelegated || info.handlers.includes("completionStream")) {
|
|
22
|
-
* // safe to call completion(); delegated path defers to provider
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export async function getLoadedModelInfo(params, rpcOptions) {
|
|
27
|
-
const request = {
|
|
28
|
-
type: 'getLoadedModelInfo',
|
|
29
|
-
modelId: params.modelId
|
|
30
|
-
};
|
|
31
|
-
const response = await send(request, rpcOptions);
|
|
32
|
-
if (response.type !== 'getLoadedModelInfo') {
|
|
33
|
-
throw new InvalidResponseError('getLoadedModelInfo');
|
|
34
|
-
}
|
|
35
|
-
return response.info;
|
|
36
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type GetModelInfoParams } from '../../schemas/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Returns status information for a catalog model, including cache state and loaded instances.
|
|
4
|
-
*
|
|
5
|
-
* @param params - Query parameters.
|
|
6
|
-
* @param params.name - The model's registry name (as found in the SDK's built-in catalog) to look up.
|
|
7
|
-
* @returns A promise resolving to the model's status information (cache presence, loaded instances, size on disk, etc.).
|
|
8
|
-
* @throws {QvacErrorBase} When the response type is invalid (`InvalidResponseError`) or the RPC layer fails.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getModelInfo(params: GetModelInfoParams): Promise<{
|
|
11
|
-
name: string;
|
|
12
|
-
modelId: string;
|
|
13
|
-
expectedSize: number;
|
|
14
|
-
sha256Checksum: string;
|
|
15
|
-
addon: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | "other";
|
|
16
|
-
isCached: boolean;
|
|
17
|
-
isLoaded: boolean;
|
|
18
|
-
cacheFiles: {
|
|
19
|
-
filename: string;
|
|
20
|
-
path: string;
|
|
21
|
-
expectedSize: number;
|
|
22
|
-
sha256Checksum: string;
|
|
23
|
-
isCached: boolean;
|
|
24
|
-
actualSize?: number | undefined;
|
|
25
|
-
cachedAt?: Date | undefined;
|
|
26
|
-
}[];
|
|
27
|
-
registryPath?: string | undefined;
|
|
28
|
-
registrySource?: string | undefined;
|
|
29
|
-
blobCoreKey?: string | undefined;
|
|
30
|
-
blobBlockOffset?: number | undefined;
|
|
31
|
-
blobBlockLength?: number | undefined;
|
|
32
|
-
blobByteOffset?: number | undefined;
|
|
33
|
-
engine?: string | undefined;
|
|
34
|
-
quantization?: string | undefined;
|
|
35
|
-
params?: string | undefined;
|
|
36
|
-
actualSize?: number | undefined;
|
|
37
|
-
cachedAt?: Date | undefined;
|
|
38
|
-
loadedInstances?: {
|
|
39
|
-
registryId: string;
|
|
40
|
-
loadedAt: Date;
|
|
41
|
-
config?: unknown;
|
|
42
|
-
}[] | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
//# sourceMappingURL=get-model-info.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {} from '../../schemas/index.js';
|
|
2
|
-
import { send } from '../../client/rpc/rpc-client.js';
|
|
3
|
-
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
4
|
-
/**
|
|
5
|
-
* Returns status information for a catalog model, including cache state and loaded instances.
|
|
6
|
-
*
|
|
7
|
-
* @param params - Query parameters.
|
|
8
|
-
* @param params.name - The model's registry name (as found in the SDK's built-in catalog) to look up.
|
|
9
|
-
* @returns A promise resolving to the model's status information (cache presence, loaded instances, size on disk, etc.).
|
|
10
|
-
* @throws {QvacErrorBase} When the response type is invalid (`InvalidResponseError`) or the RPC layer fails.
|
|
11
|
-
*/
|
|
12
|
-
export async function getModelInfo(params) {
|
|
13
|
-
const request = {
|
|
14
|
-
type: 'getModelInfo',
|
|
15
|
-
name: params.name
|
|
16
|
-
};
|
|
17
|
-
const response = await send(request);
|
|
18
|
-
if (response.type !== 'getModelInfo') {
|
|
19
|
-
throw new InvalidResponseError('getModelInfo');
|
|
20
|
-
}
|
|
21
|
-
return response.modelInfo;
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { send } from '../../client/rpc/rpc-client.js';
|
|
2
|
-
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
3
|
-
export async function getSystemResources(input) {
|
|
4
|
-
const request = {
|
|
5
|
-
type: 'getSystemResources',
|
|
6
|
-
...(input?.sample !== undefined && { sample: input.sample })
|
|
7
|
-
};
|
|
8
|
-
const response = await send(request);
|
|
9
|
-
if (response.type !== 'getSystemResources') {
|
|
10
|
-
throw new InvalidResponseError('getSystemResources');
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
capabilities: response.capabilities,
|
|
14
|
-
...(response.sample && { sample: response.sample })
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type HeartbeatResponse } from '../../schemas/index.js';
|
|
2
|
-
import type { DelegateBase } from '../../schemas/delegate.js';
|
|
3
|
-
/**
|
|
4
|
-
* Checks if a delegated provider is online by sending a heartbeat round-trip.
|
|
5
|
-
* Can also be used to check if the local SDK worker is responsive.
|
|
6
|
-
*
|
|
7
|
-
* @param params - Delegation target to check
|
|
8
|
-
* @param params.delegate - The provider to check (providerPublicKey + optional timeout)
|
|
9
|
-
* @returns A promise that resolves to a heartbeat response if the provider is reachable.
|
|
10
|
-
* @throws {QvacErrorBase} When the provider is unreachable or the response is invalid.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* // Check if a delegated provider is online
|
|
14
|
-
* try {
|
|
15
|
-
* await heartbeat({
|
|
16
|
-
* delegate: { providerPublicKey: "peerHex", timeout: 3000 },
|
|
17
|
-
* });
|
|
18
|
-
* console.log("Provider is online");
|
|
19
|
-
* } catch {
|
|
20
|
-
* console.log("Provider is offline");
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // Check if the local SDK worker is responsive
|
|
25
|
-
* await heartbeat();
|
|
26
|
-
*/
|
|
27
|
-
export declare function heartbeat(params?: {
|
|
28
|
-
delegate?: DelegateBase;
|
|
29
|
-
}): Promise<HeartbeatResponse>;
|
|
30
|
-
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {} from '../../schemas/index.js';
|
|
2
|
-
import { send } from '../../client/rpc/rpc-client.js';
|
|
3
|
-
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
4
|
-
/**
|
|
5
|
-
* Checks if a delegated provider is online by sending a heartbeat round-trip.
|
|
6
|
-
* Can also be used to check if the local SDK worker is responsive.
|
|
7
|
-
*
|
|
8
|
-
* @param params - Delegation target to check
|
|
9
|
-
* @param params.delegate - The provider to check (providerPublicKey + optional timeout)
|
|
10
|
-
* @returns A promise that resolves to a heartbeat response if the provider is reachable.
|
|
11
|
-
* @throws {QvacErrorBase} When the provider is unreachable or the response is invalid.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* // Check if a delegated provider is online
|
|
15
|
-
* try {
|
|
16
|
-
* await heartbeat({
|
|
17
|
-
* delegate: { providerPublicKey: "peerHex", timeout: 3000 },
|
|
18
|
-
* });
|
|
19
|
-
* console.log("Provider is online");
|
|
20
|
-
* } catch {
|
|
21
|
-
* console.log("Provider is offline");
|
|
22
|
-
* }
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* // Check if the local SDK worker is responsive
|
|
26
|
-
* await heartbeat();
|
|
27
|
-
*/
|
|
28
|
-
export async function heartbeat(params) {
|
|
29
|
-
const request = {
|
|
30
|
-
type: 'heartbeat',
|
|
31
|
-
...(params?.delegate && { delegate: params.delegate })
|
|
32
|
-
};
|
|
33
|
-
const response = await send(request);
|
|
34
|
-
if (response.type !== 'heartbeat') {
|
|
35
|
-
throw new InvalidResponseError('heartbeat');
|
|
36
|
-
}
|
|
37
|
-
return response;
|
|
38
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export { loadModel } from './load-model.js';
|
|
2
|
-
export { downloadAsset } from './download-asset.js';
|
|
3
|
-
export { batchCompletion } from './batch-completion.js';
|
|
4
|
-
export { completion } from './completion-stream.js';
|
|
5
|
-
export { deleteCache } from './delete-cache.js';
|
|
6
|
-
export { unloadModel } from './unload-model.js';
|
|
7
|
-
export { loggingStream } from './logging-stream.js';
|
|
8
|
-
export { subscribeServerLogs, type ServerLogHandler } from './subscribe-logs.js';
|
|
9
|
-
export { heartbeat } from './heartbeat.js';
|
|
10
|
-
export { transcribe, transcribeStream } from './transcribe.js';
|
|
11
|
-
export { bciTranscribe, bciTranscribeStream } from './bci-transcribe.js';
|
|
12
|
-
export { embed } from './embed.js';
|
|
13
|
-
export { finetune, type FinetuneHandle } from './finetune.js';
|
|
14
|
-
export { translate } from './translate.js';
|
|
15
|
-
export { cancel } from './cancel.js';
|
|
16
|
-
export { startQVACProvider } from './provide.js';
|
|
17
|
-
export { stopQVACProvider } from './stop-provider.js';
|
|
18
|
-
export { ragChunk, ragIngest, ragSaveEmbeddings, ragSearch, ragDeleteEmbeddings, ragReindex, ragListWorkspaces, ragCloseWorkspace, ragDeleteWorkspace } from './rag.js';
|
|
19
|
-
export { textToSpeech, textToSpeechStream } from './text-to-speech.js';
|
|
20
|
-
export { getModelInfo } from './get-model-info.js';
|
|
21
|
-
export { getLoadedModelInfo } from './get-loaded-model-info.js';
|
|
22
|
-
export { getSystemResources } from './get-system-resources.js';
|
|
23
|
-
export { ocr } from './ocr.js';
|
|
24
|
-
export { invokePlugin, invokePluginStream } from './invoke-plugin.js';
|
|
25
|
-
export { diffusion, type DiffusionProgressTick } from './diffusion.js';
|
|
26
|
-
export { classify } from './classify.js';
|
|
27
|
-
export { video, type VideoProgressTick } from './video.js';
|
|
28
|
-
export { upscale } from './upscale.js';
|
|
29
|
-
export { modelRegistryList, modelRegistrySearch, modelRegistryGetModel, type ModelRegistrySearchParams } from './registry.js';
|
|
30
|
-
export { suspend } from './suspend.js';
|
|
31
|
-
export { resume } from './resume.js';
|
|
32
|
-
export { state } from './state.js';
|
|
33
|
-
export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
|
|
34
|
-
export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
|
|
35
|
-
export { audioGen } from '../../client/api/audio-gen.js';
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/client/api/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export { loadModel } from './load-model.js';
|
|
2
|
-
export { downloadAsset } from './download-asset.js';
|
|
3
|
-
export { batchCompletion } from './batch-completion.js';
|
|
4
|
-
export { completion } from './completion-stream.js';
|
|
5
|
-
export { deleteCache } from './delete-cache.js';
|
|
6
|
-
export { unloadModel } from './unload-model.js';
|
|
7
|
-
export { loggingStream } from './logging-stream.js';
|
|
8
|
-
export { subscribeServerLogs } from './subscribe-logs.js';
|
|
9
|
-
export { heartbeat } from './heartbeat.js';
|
|
10
|
-
export { transcribe, transcribeStream } from './transcribe.js';
|
|
11
|
-
export { bciTranscribe, bciTranscribeStream } from './bci-transcribe.js';
|
|
12
|
-
export { embed } from './embed.js';
|
|
13
|
-
export { finetune } from './finetune.js';
|
|
14
|
-
export { translate } from './translate.js';
|
|
15
|
-
export { cancel } from './cancel.js';
|
|
16
|
-
export { startQVACProvider } from './provide.js';
|
|
17
|
-
export { stopQVACProvider } from './stop-provider.js';
|
|
18
|
-
export { ragChunk, ragIngest, ragSaveEmbeddings, ragSearch, ragDeleteEmbeddings, ragReindex, ragListWorkspaces, ragCloseWorkspace, ragDeleteWorkspace } from './rag.js';
|
|
19
|
-
export { textToSpeech, textToSpeechStream } from './text-to-speech.js';
|
|
20
|
-
export { getModelInfo } from './get-model-info.js';
|
|
21
|
-
export { getLoadedModelInfo } from './get-loaded-model-info.js';
|
|
22
|
-
export { getSystemResources } from './get-system-resources.js';
|
|
23
|
-
export { ocr } from './ocr.js';
|
|
24
|
-
export { invokePlugin, invokePluginStream } from './invoke-plugin.js';
|
|
25
|
-
export { diffusion } from './diffusion.js';
|
|
26
|
-
export { classify } from './classify.js';
|
|
27
|
-
export { video } from './video.js';
|
|
28
|
-
export { upscale } from './upscale.js';
|
|
29
|
-
export { modelRegistryList, modelRegistrySearch, modelRegistryGetModel } from './registry.js';
|
|
30
|
-
export { suspend } from './suspend.js';
|
|
31
|
-
export { resume } from './resume.js';
|
|
32
|
-
export { state } from './state.js';
|
|
33
|
-
export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
|
|
34
|
-
export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
|
|
35
|
-
export { audioGen } from '../../client/api/audio-gen.js';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { RPCOptions } from '../../schemas/index.js';
|
|
2
|
-
export interface InvokePluginOptions<TParams = unknown> {
|
|
3
|
-
modelId: string;
|
|
4
|
-
handler: string;
|
|
5
|
-
params: TParams;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Invoke a non-streaming plugin handler.
|
|
9
|
-
*
|
|
10
|
-
* @param options - Invocation payload.
|
|
11
|
-
* @param options.modelId - The identifier of the model instance that owns the plugin.
|
|
12
|
-
* @param options.handler - Name of the plugin handler to invoke.
|
|
13
|
-
* @param options.params - Handler-specific parameters, passed through to the plugin.
|
|
14
|
-
* @param rpcOptions - Optional RPC options (timeout, profiling, force new connection, etc.).
|
|
15
|
-
* @returns A promise resolving to the handler's result payload (typed via the `TResponse` generic).
|
|
16
|
-
* @throws {QvacErrorBase} When the response type is invalid (`InvalidResponseError`) or the RPC layer fails.
|
|
17
|
-
*/
|
|
18
|
-
export declare function invokePlugin<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>, rpcOptions?: RPCOptions): Promise<TResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Invoke a streaming plugin handler.
|
|
21
|
-
*
|
|
22
|
-
* @param options - Invocation payload.
|
|
23
|
-
* @param options.modelId - The identifier of the model instance that owns the plugin.
|
|
24
|
-
* @param options.handler - Name of the plugin stream handler to invoke.
|
|
25
|
-
* @param options.params - Handler-specific parameters, passed through to the plugin.
|
|
26
|
-
* @param rpcOptions - Optional RPC options (timeout, profiling, force new connection, etc.).
|
|
27
|
-
* @returns An async generator yielding chunk payloads (typed via the `TResponse` generic) until the stream completes.
|
|
28
|
-
* @throws {QvacErrorBase} When an intermediate response has the wrong type (`InvalidResponseError`) or the RPC layer fails.
|
|
29
|
-
*/
|
|
30
|
-
export declare function invokePluginStream<TResponse = unknown, TParams = unknown>(options: InvokePluginOptions<TParams>, rpcOptions?: RPCOptions): AsyncGenerator<TResponse>;
|
|
31
|
-
//# sourceMappingURL=invoke-plugin.d.ts.map
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { send, stream } from '../../client/rpc/rpc-client.js';
|
|
2
|
-
import { InvalidResponseError } from '../../utils/errors-client.js';
|
|
3
|
-
/**
|
|
4
|
-
* Invoke a non-streaming plugin handler.
|
|
5
|
-
*
|
|
6
|
-
* @param options - Invocation payload.
|
|
7
|
-
* @param options.modelId - The identifier of the model instance that owns the plugin.
|
|
8
|
-
* @param options.handler - Name of the plugin handler to invoke.
|
|
9
|
-
* @param options.params - Handler-specific parameters, passed through to the plugin.
|
|
10
|
-
* @param rpcOptions - Optional RPC options (timeout, profiling, force new connection, etc.).
|
|
11
|
-
* @returns A promise resolving to the handler's result payload (typed via the `TResponse` generic).
|
|
12
|
-
* @throws {QvacErrorBase} When the response type is invalid (`InvalidResponseError`) or the RPC layer fails.
|
|
13
|
-
*/
|
|
14
|
-
export async function invokePlugin(options, rpcOptions) {
|
|
15
|
-
const request = {
|
|
16
|
-
type: 'pluginInvoke',
|
|
17
|
-
modelId: options.modelId,
|
|
18
|
-
handler: options.handler,
|
|
19
|
-
params: options.params
|
|
20
|
-
};
|
|
21
|
-
const response = await send(request, rpcOptions);
|
|
22
|
-
if (response.type !== 'pluginInvoke') {
|
|
23
|
-
throw new InvalidResponseError('pluginInvoke');
|
|
24
|
-
}
|
|
25
|
-
return response.result;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Invoke a streaming plugin handler.
|
|
29
|
-
*
|
|
30
|
-
* @param options - Invocation payload.
|
|
31
|
-
* @param options.modelId - The identifier of the model instance that owns the plugin.
|
|
32
|
-
* @param options.handler - Name of the plugin stream handler to invoke.
|
|
33
|
-
* @param options.params - Handler-specific parameters, passed through to the plugin.
|
|
34
|
-
* @param rpcOptions - Optional RPC options (timeout, profiling, force new connection, etc.).
|
|
35
|
-
* @returns An async generator yielding chunk payloads (typed via the `TResponse` generic) until the stream completes.
|
|
36
|
-
* @throws {QvacErrorBase} When an intermediate response has the wrong type (`InvalidResponseError`) or the RPC layer fails.
|
|
37
|
-
*/
|
|
38
|
-
export async function* invokePluginStream(options, rpcOptions) {
|
|
39
|
-
const request = {
|
|
40
|
-
type: 'pluginInvokeStream',
|
|
41
|
-
modelId: options.modelId,
|
|
42
|
-
handler: options.handler,
|
|
43
|
-
params: options.params
|
|
44
|
-
};
|
|
45
|
-
for await (const chunk of stream(request, rpcOptions)) {
|
|
46
|
-
const response = chunk;
|
|
47
|
-
if (response.type !== 'pluginInvokeStream') {
|
|
48
|
-
throw new InvalidResponseError('pluginInvokeStream');
|
|
49
|
-
}
|
|
50
|
-
if (!response.done) {
|
|
51
|
-
yield response.result;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { type LoadModelOptions, type LoadCustomPluginModelOptions, type LoadModelDescriptorParam, type ReloadConfigOptions, type RPCOptions, type ModelDescriptor } from '../../schemas/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Loads a model from a descriptor; `modelType` is inferred from `modelSrc`.
|
|
4
|
-
* `modelConfig` narrows per-engine when `modelSrc.engine` is a literal,
|
|
5
|
-
* otherwise falls back to a permissive shape.
|
|
6
|
-
*
|
|
7
|
-
* @overloadLabel "From descriptor"
|
|
8
|
-
* @param options - Descriptor-based load options. `modelSrc` is a
|
|
9
|
-
* `ModelDescriptor` (e.g. one of the `LLAMA_3_2_1B_INST_Q4_0`-style
|
|
10
|
-
* constants); `modelType` is inferred from it.
|
|
11
|
-
* @param rpcOptions - Optional RPC options including per-call profiling.
|
|
12
|
-
* @returns Promise that resolves to the loaded model ID.
|
|
13
|
-
* @throws {ModelTypeRequiredError} When `modelType` cannot be inferred from `modelSrc` at runtime.
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* await loadModel({ modelSrc: LLAMA_3_2_1B_INST_Q4_0, modelConfig: { ctx_size: 2048 } });
|
|
17
|
-
* await loadModel({ modelSrc: WHISPER_TINY });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function loadModel<S extends ModelDescriptor>(options: LoadModelDescriptorParam<S>, rpcOptions?: RPCOptions): Promise<string> & {
|
|
21
|
-
requestId: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Loads a machine learning model from a local path, remote URL, or Hyperdrive key.
|
|
25
|
-
*
|
|
26
|
-
* This function supports multiple model types: LLM (Large Language Model), Whisper (speech recognition),
|
|
27
|
-
* embeddings, NMT (translation), and TTS. It can handle both local file paths and Hyperdrive URLs (pear://).
|
|
28
|
-
*
|
|
29
|
-
* When `onProgress` is provided, the function uses streaming to provide real-time download progress.
|
|
30
|
-
* Otherwise, it uses a simple request-response pattern for faster execution.
|
|
31
|
-
*
|
|
32
|
-
* @overloadLabel "Load new model"
|
|
33
|
-
* @param options - An object that defines all configuration parameters required for loading the model, including:
|
|
34
|
-
* - modelSrc: The location from which the model weights are fetched (local path, remote URL, or Hyperdrive URL)
|
|
35
|
-
* - modelType: The canonical type of model ("llamacpp-completion",
|
|
36
|
-
* "whispercpp-transcription", "llamacpp-embedding", "nmtcpp-translation",
|
|
37
|
-
* "tts-ggml", ...). May be omitted when `modelSrc` is a registry descriptor
|
|
38
|
-
* that already carries the engine.
|
|
39
|
-
* - modelConfig: Model-specific configuration options (companion sources, model parameters, etc.)
|
|
40
|
-
* - fallbackSrc: For a built-in catalog model, an HTTP URL or local file path to load from when the registry is unreachable (validated against the model checksum)
|
|
41
|
-
* - onProgress: Callback for download progress updates
|
|
42
|
-
* - logger: Logger instance for model operation logs
|
|
43
|
-
* @param rpcOptions - Optional RPC options including per-call profiling configuration
|
|
44
|
-
*
|
|
45
|
-
* @returns Promise that resolves to the model ID (either the provided modelSrc or a generated ID)
|
|
46
|
-
*
|
|
47
|
-
* @throws {QvacErrorBase} When model loading fails, with details in the error message
|
|
48
|
-
* @throws {QvacErrorBase} When streaming ends unexpectedly (only when using onProgress)
|
|
49
|
-
* @throws {QvacErrorBase} When receiving an invalid response type from the server
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* // Local file path - absolute path
|
|
54
|
-
* const localModelId = await loadModel({
|
|
55
|
-
* modelSrc: "/home/user/models/llama-7b.gguf",
|
|
56
|
-
* modelType: "llamacpp-completion",
|
|
57
|
-
* modelConfig: { ctx_size: 2048 }
|
|
58
|
-
* });
|
|
59
|
-
*
|
|
60
|
-
* // Local file path - relative path
|
|
61
|
-
* const relativeModelId = await loadModel({
|
|
62
|
-
* modelSrc: "./models/whisper-base.gguf",
|
|
63
|
-
* modelType: "whispercpp-transcription"
|
|
64
|
-
* });
|
|
65
|
-
*
|
|
66
|
-
* // Hyperdrive URL with key and path
|
|
67
|
-
* const hyperdriveId = await loadModel({
|
|
68
|
-
* modelSrc: "pear://<hyperdrive-key>/llama-7b.gguf",
|
|
69
|
-
* modelType: "llamacpp-completion",
|
|
70
|
-
* modelConfig: { ctx_size: 2048 }
|
|
71
|
-
* });
|
|
72
|
-
*
|
|
73
|
-
* // Remote HTTP/HTTPS URL with progress tracking
|
|
74
|
-
* const remoteId = await loadModel({
|
|
75
|
-
* modelSrc: "https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q4_K_M.gguf",
|
|
76
|
-
* modelType: "llamacpp-completion",
|
|
77
|
-
* onProgress: (progress) => {
|
|
78
|
-
* console.log(`Downloaded: ${progress.percentage}%`);
|
|
79
|
-
* }
|
|
80
|
-
* });
|
|
81
|
-
*
|
|
82
|
-
* // Multimodal model with projection
|
|
83
|
-
* const multimodalId = await loadModel({
|
|
84
|
-
* modelSrc: "https://huggingface.co/.../main-model.gguf",
|
|
85
|
-
* modelType: "llamacpp-completion",
|
|
86
|
-
* modelConfig: {
|
|
87
|
-
* ctx_size: 512,
|
|
88
|
-
* projectionModelSrc: "https://huggingface.co/.../projection-model.gguf"
|
|
89
|
-
* },
|
|
90
|
-
* onProgress: (progress) => {
|
|
91
|
-
* console.log(`Loading: ${progress.percentage}%`);
|
|
92
|
-
* }
|
|
93
|
-
* });
|
|
94
|
-
*
|
|
95
|
-
* // Whisper with VAD model
|
|
96
|
-
* const whisperId = await loadModel({
|
|
97
|
-
* modelSrc: "https://huggingface.co/.../whisper-model.gguf",
|
|
98
|
-
* modelType: "whispercpp-transcription",
|
|
99
|
-
* modelConfig: {
|
|
100
|
-
* mode: "caption",
|
|
101
|
-
* output_format: "plaintext",
|
|
102
|
-
* min_seconds: 2,
|
|
103
|
-
* max_seconds: 6,
|
|
104
|
-
* vadModelSrc: "https://huggingface.co/.../vad-model.bin"
|
|
105
|
-
* }
|
|
106
|
-
* });
|
|
107
|
-
*
|
|
108
|
-
* // Load with automatic logging - logs from the model will be forwarded to your logger
|
|
109
|
-
* import { getLogger } from "../../logging/index.js";
|
|
110
|
-
* const logger = getLogger("my-app");
|
|
111
|
-
*
|
|
112
|
-
* const modelId = await loadModel({
|
|
113
|
-
* modelSrc: "/path/to/model.gguf",
|
|
114
|
-
* modelType: "llamacpp-completion",
|
|
115
|
-
* logger // Pass logger in options
|
|
116
|
-
* });
|
|
117
|
-
*
|
|
118
|
-
* // Catalog model with an alternate source used when the registry is unreachable
|
|
119
|
-
* import { LLAMA_3_2_1B_INST_Q4_0 } from "@qvac/sdk";
|
|
120
|
-
* const resilientId = await loadModel({
|
|
121
|
-
* modelSrc: LLAMA_3_2_1B_INST_Q4_0,
|
|
122
|
-
* fallbackSrc: "https://mirror.example.com/llama-3.2-1b-instruct-q4_0.gguf"
|
|
123
|
-
* });
|
|
124
|
-
* ```
|
|
125
|
-
*/
|
|
126
|
-
export declare function loadModel(options: LoadModelOptions, rpcOptions?: RPCOptions): Promise<string> & {
|
|
127
|
-
requestId: string;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Loads a custom plugin model (any non-built-in `modelType` string).
|
|
131
|
-
* `modelConfig` is plugin-defined; the SDK does not narrow it.
|
|
132
|
-
*
|
|
133
|
-
* @overloadLabel "Custom plugin"
|
|
134
|
-
* @param options - Custom plugin load options. `modelType` can be any
|
|
135
|
-
* string registered by a plugin; `modelConfig` is forwarded to the
|
|
136
|
-
* plugin's `loadModel` handler unchanged.
|
|
137
|
-
* @param rpcOptions - Optional RPC options including per-call profiling.
|
|
138
|
-
* @returns Promise that resolves to the loaded model ID.
|
|
139
|
-
*/
|
|
140
|
-
export declare function loadModel<T extends string>(options: LoadCustomPluginModelOptions<T>, rpcOptions?: RPCOptions): Promise<string> & {
|
|
141
|
-
requestId: string;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Hot-reloads configuration on an already loaded model.
|
|
145
|
-
*
|
|
146
|
-
* @overloadLabel "Hot-reload config"
|
|
147
|
-
* @param options - Configuration for reloading config on an existing model:
|
|
148
|
-
* - modelId: The ID of an existing loaded model
|
|
149
|
-
* - modelType: The type of model (must match the loaded model)
|
|
150
|
-
* - modelConfig: New configuration to apply
|
|
151
|
-
* @param rpcOptions - Optional RPC options including per-call profiling configuration
|
|
152
|
-
*
|
|
153
|
-
* @returns Promise that resolves to the model ID
|
|
154
|
-
*
|
|
155
|
-
* @throws {QvacErrorBase} When model reload fails, with details in the error message
|
|
156
|
-
* @throws {QvacErrorBase} When receiving an invalid response type from the server
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```typescript
|
|
160
|
-
* // Load new model
|
|
161
|
-
* const modelId = await loadModel({
|
|
162
|
-
* modelSrc: "pear://<hyperdrive-key>/whisper-tiny.gguf",
|
|
163
|
-
* modelType: "whisper",
|
|
164
|
-
* modelConfig: { language: "en" },
|
|
165
|
-
* });
|
|
166
|
-
*
|
|
167
|
-
* // Later, update the config without reloading the model
|
|
168
|
-
* await loadModel({
|
|
169
|
-
* modelId,
|
|
170
|
-
* modelType: "whisper",
|
|
171
|
-
* modelConfig: { language: "es" },
|
|
172
|
-
* });
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
175
|
-
export declare function loadModel(options: ReloadConfigOptions, rpcOptions?: RPCOptions): Promise<string> & {
|
|
176
|
-
requestId: string;
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=load-model.d.ts.map
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { send, stream } from '../../client/rpc/rpc-client.js';
|
|
2
|
-
import { startLoggingStreamForModel } from '../../client/logging-stream-registry.js';
|
|
3
|
-
import { loadBuiltinToRequestSchema, loadCustomPluginToRequestSchema, reloadConfigOptionsToRequestSchema, isBuiltInModelType, isModelTypeAlias, normalizeModelType, inferModelTypeFromModelSrc, ModelType } from '../../schemas/index.js';
|
|
4
|
-
import { ModelLoadFailedError, ModelTypeRequiredError, StreamEndedError, InvalidResponseError } from '../../utils/errors-client.js';
|
|
5
|
-
import { assertModelSrcMatchesModelType } from '../../utils/load-model-validation.js';
|
|
6
|
-
import { parseClientInput } from '../../client/parse-input.js';
|
|
7
|
-
import { getClientLogger } from '../../logging/index.js';
|
|
8
|
-
import { decoratePromise } from '../../utils/decorate-promise.js';
|
|
9
|
-
import { generateClientRequestId } from '../../client/api/client-request-id.js';
|
|
10
|
-
const logger = getClientLogger();
|
|
11
|
-
function isReactNativeRuntime() {
|
|
12
|
-
const runtime = globalThis;
|
|
13
|
-
return runtime.navigator?.product === 'ReactNative';
|
|
14
|
-
}
|
|
15
|
-
let warnedLocalVideoModelLoad = false;
|
|
16
|
-
export function loadModel(options, rpcOptions) {
|
|
17
|
-
// Generate a stable `requestId` once, synchronously, before kicking
|
|
18
|
-
// off any async work. The same id is:
|
|
19
|
-
// - threaded onto the request envelope (`request.requestId`) so the
|
|
20
|
-
// server's `registry.begin(...)` records it on the registry
|
|
21
|
-
// entry; and
|
|
22
|
-
// - attached to the returned promise via `decoratePromise` so the
|
|
23
|
-
// caller can target this exact call with `cancel({ requestId })`
|
|
24
|
-
// before `await` resolves. Generating client-side and surfacing
|
|
25
|
-
// it synchronously is what closes the "stop-button race" gap for
|
|
26
|
-
// `loadModel` / `downloadAsset` callers — same shape as the
|
|
27
|
-
// `CompletionRun.requestId` contract.
|
|
28
|
-
const requestId = generateClientRequestId();
|
|
29
|
-
const inner = runLoadModel(options, requestId, rpcOptions);
|
|
30
|
-
return decoratePromise(inner, { requestId });
|
|
31
|
-
}
|
|
32
|
-
async function runLoadModel(options, requestId, rpcOptions) {
|
|
33
|
-
const isReloadConfig = 'modelId' in options && !('modelSrc' in options);
|
|
34
|
-
// Infer `modelType` from `modelSrc` when omitted; the schema still validates
|
|
35
|
-
// the resolved options below.
|
|
36
|
-
let resolvedOptions = options;
|
|
37
|
-
if (!isReloadConfig) {
|
|
38
|
-
let modelType = resolvedOptions['modelType'];
|
|
39
|
-
if (typeof modelType === 'string') {
|
|
40
|
-
assertModelSrcMatchesModelType(resolvedOptions['modelSrc'], modelType);
|
|
41
|
-
}
|
|
42
|
-
else if (modelType === undefined) {
|
|
43
|
-
const inferred = inferModelTypeFromModelSrc(resolvedOptions['modelSrc']);
|
|
44
|
-
if (!inferred) {
|
|
45
|
-
throw new ModelTypeRequiredError();
|
|
46
|
-
}
|
|
47
|
-
resolvedOptions = { ...resolvedOptions, modelType: inferred };
|
|
48
|
-
modelType = inferred;
|
|
49
|
-
}
|
|
50
|
-
if (typeof modelType === 'string' && isModelTypeAlias(modelType)) {
|
|
51
|
-
const canonical = normalizeModelType(modelType);
|
|
52
|
-
logger.warn(`Model type "${modelType}" is an alias and will be deprecated. Use "${canonical}" instead.`);
|
|
53
|
-
}
|
|
54
|
-
const canonicalModelType = typeof modelType === 'string' ? normalizeModelType(modelType) : modelType;
|
|
55
|
-
const modelConfig = resolvedOptions['modelConfig'];
|
|
56
|
-
if (isReactNativeRuntime() &&
|
|
57
|
-
canonicalModelType === ModelType.sdcppGeneration &&
|
|
58
|
-
modelConfig?.mode === 'video' &&
|
|
59
|
-
resolvedOptions['delegate'] === undefined &&
|
|
60
|
-
!warnedLocalVideoModelLoad) {
|
|
61
|
-
warnedLocalVideoModelLoad = true;
|
|
62
|
-
const message = 'QVAC video generation works on React Native, but loading the video ' +
|
|
63
|
-
'model on-device will usually fail or take several minutes — the video ' +
|
|
64
|
-
'diffusion models currently shipped by the SDK are too large to load ' +
|
|
65
|
-
'on typical mobile devices. Pass a `delegate` to `loadModel(...)` to ' +
|
|
66
|
-
'run generation on a desktop peer instead.';
|
|
67
|
-
logger.warn(message);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// Splice the client-generated `requestId` onto the resolved options so
|
|
71
|
-
// the wire envelope carries it. The server uses the same value as the
|
|
72
|
-
// registry-entry key — that match is what makes
|
|
73
|
-
// `cancel({ requestId: op.requestId })` a no-op when no match exists
|
|
74
|
-
// and a precise abort when it does.
|
|
75
|
-
resolvedOptions = { ...resolvedOptions, requestId };
|
|
76
|
-
const request = isReloadConfig
|
|
77
|
-
? parseClientInput(reloadConfigOptionsToRequestSchema, resolvedOptions)
|
|
78
|
-
: isBuiltInModelType(resolvedOptions['modelType'])
|
|
79
|
-
? parseClientInput(loadBuiltinToRequestSchema, resolvedOptions)
|
|
80
|
-
: parseClientInput(loadCustomPluginToRequestSchema, resolvedOptions);
|
|
81
|
-
const modelLogger = isReloadConfig
|
|
82
|
-
? undefined
|
|
83
|
-
: resolvedOptions['logger'];
|
|
84
|
-
const onProgress = isReloadConfig
|
|
85
|
-
? undefined
|
|
86
|
-
: resolvedOptions['onProgress'];
|
|
87
|
-
if (onProgress) {
|
|
88
|
-
// Use streaming for progress updates
|
|
89
|
-
for await (const response of stream(request, rpcOptions)) {
|
|
90
|
-
if (response.type === 'modelProgress') {
|
|
91
|
-
onProgress(response);
|
|
92
|
-
}
|
|
93
|
-
else if (response.type === 'loadModel') {
|
|
94
|
-
if (!response.success) {
|
|
95
|
-
throw new ModelLoadFailedError(response.error);
|
|
96
|
-
}
|
|
97
|
-
const modelId = response.modelId;
|
|
98
|
-
// Start logging stream in the background if logger is provided, catch to avoid failing the entire loadModel operation
|
|
99
|
-
if (modelLogger) {
|
|
100
|
-
try {
|
|
101
|
-
startLoggingStreamForModel(modelId, modelLogger);
|
|
102
|
-
}
|
|
103
|
-
catch (error) {
|
|
104
|
-
logger.warn(`Failed to start logging stream for model ${modelId}:`, error);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return modelId;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
throw new StreamEndedError();
|
|
111
|
-
}
|
|
112
|
-
// Use regular send for simple loading
|
|
113
|
-
const response = await send(request, rpcOptions);
|
|
114
|
-
if (response.type !== 'loadModel') {
|
|
115
|
-
throw new InvalidResponseError('loadModel');
|
|
116
|
-
}
|
|
117
|
-
if (!response.success) {
|
|
118
|
-
throw new ModelLoadFailedError(response.error);
|
|
119
|
-
}
|
|
120
|
-
const modelId = response.modelId;
|
|
121
|
-
if (modelLogger) {
|
|
122
|
-
try {
|
|
123
|
-
startLoggingStreamForModel(modelId, modelLogger);
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
logger.warn(`Failed to start logging stream for model ${modelId}:`, error);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return modelId;
|
|
130
|
-
}
|