@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,748 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { modelSrcInputSchema } from './model-src-utils.js';
|
|
3
|
-
const BASE64_PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
4
|
-
const ABSOLUTE_PATH_PATTERN = /^(\/|[A-Za-z]:[\\/]|\\\\)/;
|
|
5
|
-
const base64StringSchema = z.string().min(1).regex(BASE64_PATTERN);
|
|
6
|
-
const samplingMethodSchema = z.enum([
|
|
7
|
-
'euler',
|
|
8
|
-
'euler_a',
|
|
9
|
-
'heun',
|
|
10
|
-
'dpm2',
|
|
11
|
-
'dpm++2m',
|
|
12
|
-
'dpm++2mv2',
|
|
13
|
-
'dpm++2s_a',
|
|
14
|
-
'lcm',
|
|
15
|
-
'ipndm',
|
|
16
|
-
'ipndm_v',
|
|
17
|
-
'ddim_trailing',
|
|
18
|
-
'tcd',
|
|
19
|
-
'res_multistep',
|
|
20
|
-
'res_2s'
|
|
21
|
-
]);
|
|
22
|
-
const scheduleTypeSchema = z.enum([
|
|
23
|
-
'discrete',
|
|
24
|
-
'karras',
|
|
25
|
-
'exponential',
|
|
26
|
-
'ays',
|
|
27
|
-
'gits',
|
|
28
|
-
'sgm_uniform',
|
|
29
|
-
'simple',
|
|
30
|
-
'lcm',
|
|
31
|
-
'smoothstep',
|
|
32
|
-
'kl_optimal',
|
|
33
|
-
'bong_tangent'
|
|
34
|
-
]);
|
|
35
|
-
const cacheModeSchema = z.enum([
|
|
36
|
-
'disabled',
|
|
37
|
-
'easycache',
|
|
38
|
-
'ucache',
|
|
39
|
-
'dbcache',
|
|
40
|
-
'taylorseer',
|
|
41
|
-
'cache-dit'
|
|
42
|
-
]);
|
|
43
|
-
export const sdcppConfigSchema = z.object({
|
|
44
|
-
mode: z
|
|
45
|
-
.enum(['diffusion', 'upscale', 'video'])
|
|
46
|
-
.default('diffusion')
|
|
47
|
-
.describe('Operation mode for the diffusion plugin. ' +
|
|
48
|
-
"`'diffusion'` (default) builds a full SD / SDXL / SD3 / FLUX pipeline from " +
|
|
49
|
-
'the primary model plus optional auxiliary text encoders, VAE, unconditional ' +
|
|
50
|
-
'diffusion model, and ESRGAN ' +
|
|
51
|
-
'upscaler, and exposes diffusion({ ... }). ' +
|
|
52
|
-
"`'upscale'` builds a standalone ESRGAN upscaler from the primary model " +
|
|
53
|
-
'file alone (auxiliary model sources are ignored) and exposes upscale({ ... }). ' +
|
|
54
|
-
"`'video'` builds a `VideoStableDiffusion` pipeline and exposes video({ ... }). " +
|
|
55
|
-
'The video layout is selected from the auxiliary sources: supplying ' +
|
|
56
|
-
'`embeddingsConnectorsModelSrc` loads the LTX-2 layout (Gemma text encoder ' +
|
|
57
|
-
'via `llmModelSrc` + video VAE + connectors, optional `audioVaeModelSrc` for ' +
|
|
58
|
-
'synchronized audio); otherwise the Wan layout is used (UMT5 text encoder ' +
|
|
59
|
-
'via `t5XxlModelSrc` + VAE). ' +
|
|
60
|
-
'On React Native, loading the video model on-device will likely fail ' +
|
|
61
|
-
'because the video diffusion models currently ' +
|
|
62
|
-
'shipped by the SDK are too large to load on typical mobile devices; ' +
|
|
63
|
-
'pass a `delegate` to `loadModel(...)` to run generation on a desktop peer instead.'),
|
|
64
|
-
threads: z.number().optional(),
|
|
65
|
-
device: z.enum(['gpu', 'cpu']).optional(),
|
|
66
|
-
'main-gpu': z
|
|
67
|
-
.union([z.number().int().min(0), z.enum(['integrated', 'dedicated'])])
|
|
68
|
-
.optional()
|
|
69
|
-
.describe('GPU to pin when `device` is "gpu": a GPU-device index, "integrated", or ' +
|
|
70
|
-
'"dedicated" (the discrete GPU with the most VRAM). Omit to let the ' +
|
|
71
|
-
'backend choose the first enumerated device. Resolved against the ' +
|
|
72
|
-
"addon's own ggml device enumeration, so it cannot desync from the " +
|
|
73
|
-
'device list the backend actually uses. If an explicit request cannot ' +
|
|
74
|
-
'be satisfied (e.g. "integrated" with no integrated GPU, "dedicated" ' +
|
|
75
|
-
'with no discrete GPU, or an out-of-range index) the addon falls back ' +
|
|
76
|
-
'to CPU rather than substituting a different GPU. Stripped on mobile ' +
|
|
77
|
-
'(single-GPU devices).'),
|
|
78
|
-
prediction: z
|
|
79
|
-
.enum(['auto', 'eps', 'v', 'edm_v', 'flow', 'flux2_flow'])
|
|
80
|
-
.optional()
|
|
81
|
-
.describe('Prediction type; auto-detected from model when omitted'),
|
|
82
|
-
type: z
|
|
83
|
-
.enum([
|
|
84
|
-
'auto',
|
|
85
|
-
'f32',
|
|
86
|
-
'f16',
|
|
87
|
-
'bf16',
|
|
88
|
-
'q2_k',
|
|
89
|
-
'q3_k',
|
|
90
|
-
'q4_0',
|
|
91
|
-
'q4_1',
|
|
92
|
-
'q4_k',
|
|
93
|
-
'q5_0',
|
|
94
|
-
'q5_1',
|
|
95
|
-
'q5_k',
|
|
96
|
-
'q6_k',
|
|
97
|
-
'q8_0'
|
|
98
|
-
])
|
|
99
|
-
.optional()
|
|
100
|
-
.describe('Weight quantization type override; auto-detected when omitted'),
|
|
101
|
-
rng: z.enum(['cpu', 'cuda', 'std_default']).optional(),
|
|
102
|
-
sampler_rng: z.enum(['cpu', 'cuda', 'std_default']).optional(),
|
|
103
|
-
clip_on_cpu: z.boolean().optional().describe('Force CLIP text encoder to run on CPU'),
|
|
104
|
-
vae_on_cpu: z.boolean().optional().describe('Force VAE decoder to run on CPU'),
|
|
105
|
-
vae_tiling: z.boolean().optional().describe('Enable VAE tiling for large images on limited VRAM'),
|
|
106
|
-
offload_to_cpu: z
|
|
107
|
-
.boolean()
|
|
108
|
-
.optional()
|
|
109
|
-
.describe('Keep model weights in CPU memory and offload them during GPU compute'),
|
|
110
|
-
flash_attn: z.boolean().optional().describe('Enable flash attention to reduce memory usage'),
|
|
111
|
-
diffusion_fa: z
|
|
112
|
-
.boolean()
|
|
113
|
-
.optional()
|
|
114
|
-
.describe('Enable flash attention for the diffusion transformer only'),
|
|
115
|
-
lora_apply_mode: z
|
|
116
|
-
.enum(['auto', 'immediately', 'at_runtime'])
|
|
117
|
-
.optional()
|
|
118
|
-
.describe('How LoRA adapters passed via diffusion({ lora }) are applied. ' +
|
|
119
|
-
"'auto' (default): picked based on weight type — 'at_runtime' for " +
|
|
120
|
-
"quantized weights, 'immediately' for full-precision. " +
|
|
121
|
-
"'immediately': adapter is fused into the model on first use and " +
|
|
122
|
-
'persists across subsequent diffusion() calls until the model is ' +
|
|
123
|
-
'unloaded. ' +
|
|
124
|
-
"'at_runtime': adapter is applied per-call and not persisted."),
|
|
125
|
-
verbosity: z.number().optional(),
|
|
126
|
-
clipLModelSrc: modelSrcInputSchema
|
|
127
|
-
.optional()
|
|
128
|
-
.describe('CLIP-L text encoder model — required for SD3'),
|
|
129
|
-
clipGModelSrc: modelSrcInputSchema
|
|
130
|
-
.optional()
|
|
131
|
-
.describe('CLIP-G text encoder model — required for SDXL and SD3'),
|
|
132
|
-
t5XxlModelSrc: modelSrcInputSchema
|
|
133
|
-
.optional()
|
|
134
|
-
.describe('T5-XXL text encoder model — required for SD3'),
|
|
135
|
-
llmModelSrc: modelSrcInputSchema
|
|
136
|
-
.optional()
|
|
137
|
-
.describe('LLM text encoder model — required for FLUX.2 [klein] (Qwen3), ' +
|
|
138
|
-
'Ideogram 4 (Qwen3-VL), and LTX-2 video (Gemma).'),
|
|
139
|
-
vaeModelSrc: modelSrcInputSchema
|
|
140
|
-
.optional()
|
|
141
|
-
.describe('VAE decoder model — required for FLUX.2 [klein], Ideogram 4, and ' +
|
|
142
|
-
'LTX-2 video (video VAE); optional for SDXL.'),
|
|
143
|
-
highNoiseDiffusionModelSrc: modelSrcInputSchema
|
|
144
|
-
.optional()
|
|
145
|
-
.describe('High-noise diffusion expert — required for Wan 2.2 A14B ' +
|
|
146
|
-
'mixture-of-experts video models, and the only thing that enables the ' +
|
|
147
|
-
'high_noise_* / moe_boundary request fields. Omit for single-expert ' +
|
|
148
|
-
'models such as Wan 2.1 and Wan 2.2 TI2V-5B.'),
|
|
149
|
-
uncondModelSrc: modelSrcInputSchema
|
|
150
|
-
.optional()
|
|
151
|
-
.describe('Unconditional diffusion model — Ideogram 4 only. Requires diffusion mode, ' +
|
|
152
|
-
'llmModelSrc (Qwen3-VL), vaeModelSrc, and a JSON-serialized structured ' +
|
|
153
|
-
'caption with explicit bounding boxes as the generation prompt. Plain-text ' +
|
|
154
|
-
"prompts produce degenerate output or the model's placeholder response."),
|
|
155
|
-
clipVisionModelSrc: modelSrcInputSchema
|
|
156
|
-
.optional()
|
|
157
|
-
.describe('OpenCLIP ViT-H/14 weights (`clip_vision_h.safetensors`). Required for ' +
|
|
158
|
-
'Wan image-to-video (`img2vid`); omit for text-to-video-only pipelines. ' +
|
|
159
|
-
'Not used by LTX-2 (its img2vid path needs no CLIP-vision projection).'),
|
|
160
|
-
audioVaeModelSrc: modelSrcInputSchema
|
|
161
|
-
.optional()
|
|
162
|
-
.describe('Audio VAE decoder model — LTX-2 video only. Enables the synchronized ' +
|
|
163
|
-
'48 kHz audio track muxed into the output AVI; omit for silent video. ' +
|
|
164
|
-
'Ignored by the Wan layout.'),
|
|
165
|
-
embeddingsConnectorsModelSrc: modelSrcInputSchema
|
|
166
|
-
.optional()
|
|
167
|
-
.describe('Text-embedding connector weights — required for LTX-2 video. Its ' +
|
|
168
|
-
'presence selects the LTX-2 video layout (Gemma text encoder via ' +
|
|
169
|
-
'`llmModelSrc` + video VAE via `vaeModelSrc` + these connectors) instead ' +
|
|
170
|
-
'of the Wan layout.'),
|
|
171
|
-
upscaler: z
|
|
172
|
-
.object({
|
|
173
|
-
type: z
|
|
174
|
-
.literal('esrgan')
|
|
175
|
-
.optional()
|
|
176
|
-
.describe('Type of upscaler to use for post-generation upscaling when requested in diffusion({ upscale }).'),
|
|
177
|
-
model_src: modelSrcInputSchema
|
|
178
|
-
.optional()
|
|
179
|
-
.describe('ESRGAN upscaler model (e.g. RealESRGAN_x4plus_anime_6B.pth). ' +
|
|
180
|
-
'Required in diffusion mode when this `upscaler` block is set — ' +
|
|
181
|
-
'configures the post-generation upscaler invoked via diffusion({ upscale }). ' +
|
|
182
|
-
"In `mode: 'upscale'` the primary modelSrc itself is the ESRGAN model, " +
|
|
183
|
-
'so this field is ignored.'),
|
|
184
|
-
tile_size: z
|
|
185
|
-
.number()
|
|
186
|
-
.int()
|
|
187
|
-
.positive()
|
|
188
|
-
.optional()
|
|
189
|
-
.describe('ESRGAN upscaler tile size in pixels. Smaller tiles use less VRAM ' +
|
|
190
|
-
'at the cost of more passes.'),
|
|
191
|
-
direct: z
|
|
192
|
-
.boolean()
|
|
193
|
-
.optional()
|
|
194
|
-
.describe('Use direct convolution in the ESRGAN upscaler instead of im2col + ' +
|
|
195
|
-
'GEMM. Faster on some backends, slower on others.'),
|
|
196
|
-
offload_params_to_cpu: z
|
|
197
|
-
.boolean()
|
|
198
|
-
.optional()
|
|
199
|
-
.describe('Keep ESRGAN upscaler weights on CPU and offload them during compute. ' +
|
|
200
|
-
'Trades latency for VRAM headroom on memory-constrained GPUs.'),
|
|
201
|
-
threads: z
|
|
202
|
-
.union([z.literal(-1), z.number().int().positive()])
|
|
203
|
-
.optional()
|
|
204
|
-
.describe('Number of CPU threads dedicated to the ESRGAN upscaler. -1 = auto.')
|
|
205
|
-
})
|
|
206
|
-
.strict()
|
|
207
|
-
.optional()
|
|
208
|
-
.describe('ESRGAN upscaler configuration. In diffusion mode this enables the ' +
|
|
209
|
-
'post-generation upscale path invoked via diffusion({ upscale }) and ' +
|
|
210
|
-
"requires `model_src`. In `mode: 'upscale'` only the tuning fields " +
|
|
211
|
-
'(tile_size, direct, offload_params_to_cpu, threads) are honored — ' +
|
|
212
|
-
'the primary modelSrc IS the ESRGAN model in that mode and ' +
|
|
213
|
-
"`model_src` here is ignored. In `mode: 'video'` the entire `upscaler` " +
|
|
214
|
-
'object is ignored. Mode-dependent constraints (e.g. `model_src` ' +
|
|
215
|
-
'required in diffusion mode) are enforced by the sdcpp-generation ' +
|
|
216
|
-
'plugin at load time, not at the schema layer.')
|
|
217
|
-
});
|
|
218
|
-
export const diffusionStatsSchema = z.object({
|
|
219
|
-
modelLoadMs: z
|
|
220
|
-
.number()
|
|
221
|
-
.optional()
|
|
222
|
-
.describe('Time in milliseconds spent loading the diffusion model.'),
|
|
223
|
-
generationMs: z
|
|
224
|
-
.number()
|
|
225
|
-
.optional()
|
|
226
|
-
.describe('Wall-clock time in milliseconds spent generating the output.'),
|
|
227
|
-
conditionerMs: z
|
|
228
|
-
.number()
|
|
229
|
-
.optional()
|
|
230
|
-
.describe('Time in milliseconds spent conditioning the prompt before denoising.'),
|
|
231
|
-
denoiseMs: z
|
|
232
|
-
.number()
|
|
233
|
-
.optional()
|
|
234
|
-
.describe('Time in milliseconds spent in the diffusion denoising loop.'),
|
|
235
|
-
vaeMs: z
|
|
236
|
-
.number()
|
|
237
|
-
.optional()
|
|
238
|
-
.describe('Time in milliseconds spent decoding diffusion latents with the VAE.'),
|
|
239
|
-
postProcessMs: z
|
|
240
|
-
.number()
|
|
241
|
-
.optional()
|
|
242
|
-
.describe('Time in milliseconds spent encoding, upscaling, muxing, and emitting outputs.'),
|
|
243
|
-
stepsPerSecond: z
|
|
244
|
-
.number()
|
|
245
|
-
.optional()
|
|
246
|
-
.describe('Diffusion denoising throughput in sampling steps per second.'),
|
|
247
|
-
totalGenerationMs: z
|
|
248
|
-
.number()
|
|
249
|
-
.optional()
|
|
250
|
-
.describe('Total generation time in milliseconds across all images in the batch.'),
|
|
251
|
-
totalWallMs: z
|
|
252
|
-
.number()
|
|
253
|
-
.optional()
|
|
254
|
-
.describe('Total wall-clock time in milliseconds including model load and sampling.'),
|
|
255
|
-
totalSteps: z.number().optional().describe('Total number of diffusion sampling steps executed.'),
|
|
256
|
-
totalGenerations: z.number().optional().describe('Total number of generation passes executed.'),
|
|
257
|
-
totalImages: z.number().optional().describe('Total number of images produced.'),
|
|
258
|
-
totalPixels: z
|
|
259
|
-
.number()
|
|
260
|
-
.optional()
|
|
261
|
-
.describe('Total number of pixels generated across all images.'),
|
|
262
|
-
width: z.number().optional().describe('Width in pixels of each generated image.'),
|
|
263
|
-
height: z.number().optional().describe('Height in pixels of each generated image.'),
|
|
264
|
-
seed: z
|
|
265
|
-
.number()
|
|
266
|
-
.optional()
|
|
267
|
-
.describe('Seed that produced these outputs (randomized when not supplied by the caller).')
|
|
268
|
-
});
|
|
269
|
-
export const videoStatsSchema = diffusionStatsSchema
|
|
270
|
-
.pick({
|
|
271
|
-
modelLoadMs: true,
|
|
272
|
-
generationMs: true,
|
|
273
|
-
conditionerMs: true,
|
|
274
|
-
denoiseMs: true,
|
|
275
|
-
vaeMs: true,
|
|
276
|
-
postProcessMs: true,
|
|
277
|
-
stepsPerSecond: true,
|
|
278
|
-
totalGenerationMs: true,
|
|
279
|
-
totalWallMs: true,
|
|
280
|
-
totalSteps: true,
|
|
281
|
-
totalGenerations: true,
|
|
282
|
-
totalImages: true,
|
|
283
|
-
totalPixels: true,
|
|
284
|
-
width: true,
|
|
285
|
-
height: true,
|
|
286
|
-
seed: true
|
|
287
|
-
})
|
|
288
|
-
.extend({
|
|
289
|
-
totalVideos: z.number().optional().describe('Total number of videos produced.'),
|
|
290
|
-
totalVideoFrames: z.number().optional().describe('Total number of video frames produced.'),
|
|
291
|
-
videoFrames: z.number().optional().describe('Frame count of the most recent generated video.'),
|
|
292
|
-
fps: z
|
|
293
|
-
.number()
|
|
294
|
-
.optional()
|
|
295
|
-
.describe('Frames-per-second metadata for the most recent generated video.'),
|
|
296
|
-
hasAudio: z
|
|
297
|
-
.boolean()
|
|
298
|
-
.optional()
|
|
299
|
-
.describe('True when the output AVI includes a muxed audio track (LTX-2 loaded ' +
|
|
300
|
-
'with audioVaeModelSrc), false otherwise.'),
|
|
301
|
-
audioSampleRate: z
|
|
302
|
-
.number()
|
|
303
|
-
.optional()
|
|
304
|
-
.describe('Sample rate (Hz) of the muxed audio track; 0 when there is no audio.')
|
|
305
|
-
});
|
|
306
|
-
export const diffusionStreamResponseSchema = z.object({
|
|
307
|
-
type: z.literal('diffusionStream'),
|
|
308
|
-
step: z.number().optional(),
|
|
309
|
-
totalSteps: z.number().optional(),
|
|
310
|
-
elapsedMs: z.number().optional(),
|
|
311
|
-
data: z.string().optional(),
|
|
312
|
-
outputIndex: z.number().optional(),
|
|
313
|
-
done: z.boolean().optional(),
|
|
314
|
-
stats: diffusionStatsSchema.optional()
|
|
315
|
-
});
|
|
316
|
-
export const videoStreamResponseSchema = z.object({
|
|
317
|
-
type: z.literal('videoStream'),
|
|
318
|
-
step: z.number().optional(),
|
|
319
|
-
totalSteps: z.number().optional(),
|
|
320
|
-
elapsedMs: z.number().optional(),
|
|
321
|
-
data: z.string().optional(),
|
|
322
|
-
outputIndex: z.number().optional(),
|
|
323
|
-
done: z.boolean().optional(),
|
|
324
|
-
stats: videoStatsSchema.optional()
|
|
325
|
-
});
|
|
326
|
-
export const diffusionRequestSchema = z
|
|
327
|
-
.object({
|
|
328
|
-
modelId: z.string().describe('The identifier of the diffusion model to use for generation.'),
|
|
329
|
-
prompt: z.string().describe('Positive prompt describing the image to generate.'),
|
|
330
|
-
negative_prompt: z
|
|
331
|
-
.string()
|
|
332
|
-
.optional()
|
|
333
|
-
.describe('Optional negative prompt describing what to avoid.'),
|
|
334
|
-
width: z
|
|
335
|
-
.number()
|
|
336
|
-
.int()
|
|
337
|
-
.positive()
|
|
338
|
-
.multipleOf(8)
|
|
339
|
-
.optional()
|
|
340
|
-
.describe('Image width in pixels (must be a multiple of 8).'),
|
|
341
|
-
height: z
|
|
342
|
-
.number()
|
|
343
|
-
.int()
|
|
344
|
-
.positive()
|
|
345
|
-
.multipleOf(8)
|
|
346
|
-
.optional()
|
|
347
|
-
.describe('Image height in pixels (must be a multiple of 8).'),
|
|
348
|
-
steps: z.number().int().positive().optional().describe('Number of sampling steps to run.'),
|
|
349
|
-
cfg_scale: z
|
|
350
|
-
.number()
|
|
351
|
-
.optional()
|
|
352
|
-
.describe('Classifier-free guidance scale for SD 1.x / 2.x / XL / SD3 models; typical range 1–20, default 7'),
|
|
353
|
-
img_cfg_scale: z
|
|
354
|
-
.number()
|
|
355
|
-
.default(-1)
|
|
356
|
-
.describe('Image CFG scale for img2img/inpaint workflows where the image and prompt should have different guidance weights; defaults to -1 which reuses cfg_scale'),
|
|
357
|
-
guidance: z
|
|
358
|
-
.number()
|
|
359
|
-
.optional()
|
|
360
|
-
.describe('Distilled guidance for FLUX models; typical range 1–10, default 3.5'),
|
|
361
|
-
sampling_method: samplingMethodSchema
|
|
362
|
-
.optional()
|
|
363
|
-
.describe('Sampling algorithm used by the diffusion scheduler.'),
|
|
364
|
-
scheduler: scheduleTypeSchema.optional().describe('Noise schedule to apply when sampling.'),
|
|
365
|
-
seed: z
|
|
366
|
-
.number()
|
|
367
|
-
.int()
|
|
368
|
-
.optional()
|
|
369
|
-
.describe('Random seed; when omitted the SDK picks one and returns it in stats.'),
|
|
370
|
-
batch_count: z
|
|
371
|
-
.number()
|
|
372
|
-
.int()
|
|
373
|
-
.positive()
|
|
374
|
-
.optional()
|
|
375
|
-
.describe('Number of images to generate in this call.'),
|
|
376
|
-
vae_tiling: z
|
|
377
|
-
.boolean()
|
|
378
|
-
.optional()
|
|
379
|
-
.describe('Enable VAE tiling for large images on constrained VRAM (overrides model config).'),
|
|
380
|
-
cache_preset: z
|
|
381
|
-
.string()
|
|
382
|
-
.optional()
|
|
383
|
-
.describe('Optional name of a cached sampler preset to reuse.'),
|
|
384
|
-
init_image: base64StringSchema
|
|
385
|
-
.optional()
|
|
386
|
-
.describe('Base64-encoded image for img2img generation. Mutually exclusive with init_images.'),
|
|
387
|
-
init_images: z
|
|
388
|
-
.array(base64StringSchema)
|
|
389
|
-
.min(1)
|
|
390
|
-
.optional()
|
|
391
|
-
.describe('FLUX.2-only multi-reference fusion: array of base64-encoded PNG/JPEG buffers. ' +
|
|
392
|
-
'Each buffer becomes a separate reference image that the FLUX.2 transformer attends to. ' +
|
|
393
|
-
'Mutually exclusive with init_image; requires the model to be loaded with ' +
|
|
394
|
-
"config.prediction='flux2_flow' and a Qwen3 text encoder via llmModelSrc."),
|
|
395
|
-
increase_ref_index: z
|
|
396
|
-
.boolean()
|
|
397
|
-
.optional()
|
|
398
|
-
.describe('FLUX.2 fusion only. When omitted, the addon default (false) is used. When false, all ' +
|
|
399
|
-
'reference latents share one RoPE index slot and blend via attention (recommended for ' +
|
|
400
|
-
'FLUX.2-klein). When true, each reference gets its own RoPE index slot — use only with ' +
|
|
401
|
-
'text encoders that receive per-image vision tokens.'),
|
|
402
|
-
auto_resize_ref_image: z
|
|
403
|
-
.boolean()
|
|
404
|
-
.optional()
|
|
405
|
-
.describe('FLUX.2 only. When omitted, the addon default (true) is used. When true, every reference ' +
|
|
406
|
-
'image (single or fusion) is auto-resized to the target width/height before VAE-encoding. ' +
|
|
407
|
-
'Disable only if the buffers are already at the exact target dimensions.'),
|
|
408
|
-
lora: z
|
|
409
|
-
.string()
|
|
410
|
-
.min(1)
|
|
411
|
-
.regex(ABSOLUTE_PATH_PATTERN, {
|
|
412
|
-
message: 'lora must be an absolute path'
|
|
413
|
-
})
|
|
414
|
-
.optional()
|
|
415
|
-
.describe('Optional local LoRA adapter path to apply for this generation. ' +
|
|
416
|
-
'Must be an absolute filesystem path. ' +
|
|
417
|
-
'Whether the adapter persists across subsequent diffusion() calls is controlled ' +
|
|
418
|
-
'by sdcppConfigSchema.lora_apply_mode (set at loadModel time).'),
|
|
419
|
-
strength: z
|
|
420
|
-
.number()
|
|
421
|
-
.min(0)
|
|
422
|
-
.max(1)
|
|
423
|
-
.optional()
|
|
424
|
-
.describe('img2img denoising strength (0.0 = keep source, 1.0 = ignore source); used by the SD/SDXL SDEdit path. No-op for FLUX.2, which uses in-context conditioning and ignores this field.'),
|
|
425
|
-
upscale: z
|
|
426
|
-
.union([
|
|
427
|
-
z.boolean(),
|
|
428
|
-
z
|
|
429
|
-
.object({
|
|
430
|
-
repeats: z.number().int().positive().optional()
|
|
431
|
-
})
|
|
432
|
-
.strict()
|
|
433
|
-
])
|
|
434
|
-
.optional()
|
|
435
|
-
.describe('Post-generation ESRGAN upscale. ' +
|
|
436
|
-
'`true` (or `{}` / `{ repeats: 1 }`) runs a single upscale pass at the ' +
|
|
437
|
-
"model's native scale factor (e.g. x4 for RealESRGAN_x4plus). " +
|
|
438
|
-
'`false` is a no-op (same as omitting the field). ' +
|
|
439
|
-
'`{ repeats: N }` runs the upscaler N times sequentially — each pass ' +
|
|
440
|
-
"multiplies the output dimensions by the model's scale factor. When " +
|
|
441
|
-
'`batch_count > 1`, every output image is upscaled independently. ' +
|
|
442
|
-
'Requires the model to be loaded with `upscaler.model_src` set in modelConfig.')
|
|
443
|
-
})
|
|
444
|
-
.refine((d) => d.init_image === undefined || d.init_images === undefined, {
|
|
445
|
-
message: 'init_image and init_images are mutually exclusive — pass one or the other, not both.'
|
|
446
|
-
});
|
|
447
|
-
export const diffusionStreamRequestSchema = diffusionRequestSchema.extend({
|
|
448
|
-
type: z.literal('diffusionStream')
|
|
449
|
-
});
|
|
450
|
-
const videoGenerationBaseSchema = z.object({
|
|
451
|
-
modelId: z
|
|
452
|
-
.string()
|
|
453
|
-
.describe('The identifier of the loaded video model to use for generation. ' +
|
|
454
|
-
'On React Native, prefer a `modelId` loaded with a `delegate` because ' +
|
|
455
|
-
'the video diffusion models currently shipped by the SDK are too ' +
|
|
456
|
-
'large to load on typical mobile devices.'),
|
|
457
|
-
requestId: z
|
|
458
|
-
.string()
|
|
459
|
-
.min(1)
|
|
460
|
-
.optional()
|
|
461
|
-
.describe('Stable identifier for this in-flight video generation. Optional on the wire — the server falls back to a server-generated id when the field is missing.'),
|
|
462
|
-
prompt: z.string().describe('Positive prompt describing the video to generate.'),
|
|
463
|
-
negative_prompt: z
|
|
464
|
-
.string()
|
|
465
|
-
.optional()
|
|
466
|
-
.describe('Optional negative prompt describing what to avoid.'),
|
|
467
|
-
width: z
|
|
468
|
-
.number()
|
|
469
|
-
.int()
|
|
470
|
-
.positive()
|
|
471
|
-
.multipleOf(16)
|
|
472
|
-
.optional()
|
|
473
|
-
.describe('Video width in pixels (must be a multiple of 16). LTX-2 and Wan 2.2 ' +
|
|
474
|
-
'TI2V-5B additionally require a multiple of 32. LTX-2 is validated ' +
|
|
475
|
-
'against the loaded model before generation; the TI2V requirement is ' +
|
|
476
|
-
'enforced natively, derived from the loaded GGUF rather than its filename.'),
|
|
477
|
-
height: z
|
|
478
|
-
.number()
|
|
479
|
-
.int()
|
|
480
|
-
.positive()
|
|
481
|
-
.multipleOf(16)
|
|
482
|
-
.optional()
|
|
483
|
-
.describe('Video height in pixels (must be a multiple of 16). LTX-2 and Wan 2.2 ' +
|
|
484
|
-
'TI2V-5B additionally require a multiple of 32. LTX-2 is validated ' +
|
|
485
|
-
'against the loaded model before generation; the TI2V requirement is ' +
|
|
486
|
-
'enforced natively, derived from the loaded GGUF rather than its filename.'),
|
|
487
|
-
video_frames: z
|
|
488
|
-
.number()
|
|
489
|
-
.int()
|
|
490
|
-
.refine((value) => value >= 5 && (value - 1) % 4 === 0, {
|
|
491
|
-
message: 'video_frames must be an integer >= 5 of the form (4*k + 1)'
|
|
492
|
-
})
|
|
493
|
-
.optional()
|
|
494
|
-
.describe('Frame count for the generated video; must satisfy (4*k + 1), where k>=1. ' +
|
|
495
|
-
'LTX-2 additionally requires the stricter (8*k + 1) with a max of 257, ' +
|
|
496
|
-
'validated against the loaded model before generation.'),
|
|
497
|
-
fps: z
|
|
498
|
-
.number()
|
|
499
|
-
.positive()
|
|
500
|
-
.max(120)
|
|
501
|
-
.optional()
|
|
502
|
-
.describe('AVI framerate metadata in frames per second; must be in (0, 120].'),
|
|
503
|
-
seed: z
|
|
504
|
-
.number()
|
|
505
|
-
.int()
|
|
506
|
-
.optional()
|
|
507
|
-
.describe('Random seed; when omitted the SDK picks one and returns it in stats.'),
|
|
508
|
-
steps: z
|
|
509
|
-
.number()
|
|
510
|
-
.int()
|
|
511
|
-
.positive()
|
|
512
|
-
.optional()
|
|
513
|
-
.describe('Low-noise or single-expert denoising step count.'),
|
|
514
|
-
sampling_method: samplingMethodSchema
|
|
515
|
-
.optional()
|
|
516
|
-
.describe('Sampling algorithm used by the low-noise diffusion scheduler.'),
|
|
517
|
-
scheduler: scheduleTypeSchema
|
|
518
|
-
.optional()
|
|
519
|
-
.describe('Noise schedule to apply for the low-noise diffusion path.'),
|
|
520
|
-
cfg_scale: z.number().optional().describe('Classifier-free guidance scale.'),
|
|
521
|
-
flow_shift: z.number().optional().describe('Per-request flow-matching guidance shift override.'),
|
|
522
|
-
high_noise_steps: z
|
|
523
|
-
.number()
|
|
524
|
-
.int()
|
|
525
|
-
.positive()
|
|
526
|
-
.optional()
|
|
527
|
-
.describe('Wan 2.2 A14B high-noise expert step count. Requires a model loaded ' +
|
|
528
|
-
'with modelConfig.highNoiseDiffusionModelSrc; rejected otherwise. ' +
|
|
529
|
-
'Omit to let native routing derive the split from moe_boundary.'),
|
|
530
|
-
high_noise_sampler: samplingMethodSchema
|
|
531
|
-
.optional()
|
|
532
|
-
.describe('Wan 2.2 A14B high-noise expert sampler. Requires a model loaded with ' +
|
|
533
|
-
'modelConfig.highNoiseDiffusionModelSrc; rejected otherwise.'),
|
|
534
|
-
high_noise_scheduler: scheduleTypeSchema
|
|
535
|
-
.optional()
|
|
536
|
-
.describe('Wan 2.2 A14B high-noise expert scheduler. Requires a model loaded with ' +
|
|
537
|
-
'modelConfig.highNoiseDiffusionModelSrc; rejected otherwise.'),
|
|
538
|
-
high_noise_cfg_scale: z
|
|
539
|
-
.number()
|
|
540
|
-
.optional()
|
|
541
|
-
.describe('Wan 2.2 A14B high-noise expert CFG scale. Requires a model loaded with ' +
|
|
542
|
-
'modelConfig.highNoiseDiffusionModelSrc; rejected otherwise.'),
|
|
543
|
-
high_noise_flow_shift: z
|
|
544
|
-
.number()
|
|
545
|
-
.optional()
|
|
546
|
-
.describe('Wan 2.2 A14B high-noise expert flow shift override. Requires a model ' +
|
|
547
|
-
'loaded with modelConfig.highNoiseDiffusionModelSrc; rejected otherwise.'),
|
|
548
|
-
moe_boundary: z
|
|
549
|
-
.number()
|
|
550
|
-
.min(0)
|
|
551
|
-
.max(1)
|
|
552
|
-
.optional()
|
|
553
|
-
.describe('Wan 2.2 A14B mixture-of-experts boundary in [0, 1]. Requires a model ' +
|
|
554
|
-
'loaded with modelConfig.highNoiseDiffusionModelSrc; rejected otherwise.'),
|
|
555
|
-
vace_strength: z.number().min(0).max(1).optional().describe('Control-frame guidance strength.'),
|
|
556
|
-
control_frames: z
|
|
557
|
-
.array(base64StringSchema)
|
|
558
|
-
.min(1)
|
|
559
|
-
.optional()
|
|
560
|
-
.describe('Optional array of base64-encoded control-frame images.'),
|
|
561
|
-
vae_tiling: z
|
|
562
|
-
.boolean()
|
|
563
|
-
.optional()
|
|
564
|
-
.describe('Enable VAE tiling for large videos on constrained VRAM.'),
|
|
565
|
-
vae_tile_size: z
|
|
566
|
-
.union([z.number().positive(), z.string().min(1)])
|
|
567
|
-
.optional()
|
|
568
|
-
.describe('VAE tile size override.'),
|
|
569
|
-
vae_tile_overlap: z.number().optional().describe('VAE tile overlap override.'),
|
|
570
|
-
temporal_tiling: z
|
|
571
|
-
.boolean()
|
|
572
|
-
.optional()
|
|
573
|
-
.describe('LTX-2 only: tile the video VAE decode along the time axis to cap peak ' +
|
|
574
|
-
'VRAM for HD / long clips. No effect on Wan (spatial-only VAE).'),
|
|
575
|
-
cache_mode: cacheModeSchema.optional().describe('Step-caching algorithm.'),
|
|
576
|
-
cache_preset: z
|
|
577
|
-
.string()
|
|
578
|
-
.optional()
|
|
579
|
-
.describe('Optional name of a cached sampler preset to reuse.'),
|
|
580
|
-
cache_threshold: z.number().optional().describe('Direct cache reuse threshold override.')
|
|
581
|
-
});
|
|
582
|
-
// Single wire object with mode-dependent rules expressed via a shared refine.
|
|
583
|
-
// Keeping the wire schema a plain object (instead of a discriminated union)
|
|
584
|
-
// lets the client builder construct the request without an `as` cast that
|
|
585
|
-
// would otherwise disable field-level type-checking. The compile-time
|
|
586
|
-
// "img2vid requires init_image" guarantee lives on the client-facing
|
|
587
|
-
// discriminated union types below.
|
|
588
|
-
const videoRequestObjectSchema = videoGenerationBaseSchema.extend({
|
|
589
|
-
mode: z
|
|
590
|
-
.enum(['txt2vid', 'img2vid'])
|
|
591
|
-
.describe("Generation mode: 'txt2vid' (no source frame) or 'img2vid' (first-frame image)."),
|
|
592
|
-
init_image: base64StringSchema
|
|
593
|
-
.optional()
|
|
594
|
-
.describe('Base64-encoded first-frame image (PNG/JPEG). Required for img2vid; rejected for txt2vid.'),
|
|
595
|
-
strength: z
|
|
596
|
-
.number()
|
|
597
|
-
.min(0)
|
|
598
|
-
.max(1)
|
|
599
|
-
.optional()
|
|
600
|
-
.describe('img2vid denoise strength in [0, 1]; rejected for txt2vid.')
|
|
601
|
-
});
|
|
602
|
-
function refineVideoMode(data, ctx) {
|
|
603
|
-
if (data.mode === 'img2vid' && data.init_image === undefined) {
|
|
604
|
-
ctx.addIssue({
|
|
605
|
-
code: 'custom',
|
|
606
|
-
path: ['init_image'],
|
|
607
|
-
message: "init_image is required when mode is 'img2vid'."
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
if (data.mode === 'txt2vid') {
|
|
611
|
-
if (data.init_image !== undefined) {
|
|
612
|
-
ctx.addIssue({
|
|
613
|
-
code: 'custom',
|
|
614
|
-
path: ['init_image'],
|
|
615
|
-
message: 'init_image is only valid for img2vid.'
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
if (data.strength !== undefined) {
|
|
619
|
-
ctx.addIssue({
|
|
620
|
-
code: 'custom',
|
|
621
|
-
path: ['strength'],
|
|
622
|
-
message: 'strength is only valid for img2vid.'
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
export const videoRequestSchema = videoRequestObjectSchema.superRefine(refineVideoMode);
|
|
628
|
-
function refineLtxVideoRequest(data, ctx) {
|
|
629
|
-
if (data.width !== undefined && data.width % 32 !== 0) {
|
|
630
|
-
ctx.addIssue({
|
|
631
|
-
code: 'custom',
|
|
632
|
-
path: ['width'],
|
|
633
|
-
message: 'LTX-2 width must be a multiple of 32.'
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
if (data.height !== undefined && data.height % 32 !== 0) {
|
|
637
|
-
ctx.addIssue({
|
|
638
|
-
code: 'custom',
|
|
639
|
-
path: ['height'],
|
|
640
|
-
message: 'LTX-2 height must be a multiple of 32.'
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
if (data.video_frames !== undefined &&
|
|
644
|
-
(data.video_frames > 257 || (data.video_frames - 1) % 8 !== 0)) {
|
|
645
|
-
ctx.addIssue({
|
|
646
|
-
code: 'custom',
|
|
647
|
-
path: ['video_frames'],
|
|
648
|
-
message: 'LTX-2 video_frames must be at most 257 and satisfy (8*k + 1), where k>=1.'
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
export const ltxVideoRequestSchema = videoRequestSchema.superRefine(refineLtxVideoRequest);
|
|
653
|
-
const wan22MoeMask = {
|
|
654
|
-
high_noise_steps: true,
|
|
655
|
-
high_noise_sampler: true,
|
|
656
|
-
high_noise_scheduler: true,
|
|
657
|
-
high_noise_cfg_scale: true,
|
|
658
|
-
high_noise_flow_shift: true,
|
|
659
|
-
moe_boundary: true
|
|
660
|
-
};
|
|
661
|
-
const wan22MoeSchema = videoGenerationBaseSchema.pick(wan22MoeMask);
|
|
662
|
-
const wan22MoeFields = Object.keys(wan22MoeMask);
|
|
663
|
-
function refineSingleExpertVideoRequest(data, ctx) {
|
|
664
|
-
for (const field of wan22MoeFields) {
|
|
665
|
-
if (data[field] === undefined)
|
|
666
|
-
continue;
|
|
667
|
-
ctx.addIssue({
|
|
668
|
-
code: 'custom',
|
|
669
|
-
path: [field],
|
|
670
|
-
message: `${field} is a Wan 2.2 A14B mixture-of-experts parameter and the loaded ` +
|
|
671
|
-
'model has no high-noise expert. Only a model loaded with ' +
|
|
672
|
-
'modelConfig.highNoiseDiffusionModelSrc routes to a second expert; ' +
|
|
673
|
-
'single-expert layouts (Wan 2.1, Wan 2.2 TI2V-5B, LTX-2) do not.'
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
export const singleExpertVideoRequestSchema = wan22MoeSchema.superRefine(refineSingleExpertVideoRequest);
|
|
678
|
-
export const videoStreamRequestSchema = videoRequestObjectSchema
|
|
679
|
-
.extend({ type: z.literal('videoStream') })
|
|
680
|
-
.superRefine(refineVideoMode);
|
|
681
|
-
// ============================================
|
|
682
|
-
// Standalone ESRGAN upscale (mode: "upscale")
|
|
683
|
-
// ============================================
|
|
684
|
-
export const upscaleStatsSchema = z.object({
|
|
685
|
-
modelLoadMs: z
|
|
686
|
-
.number()
|
|
687
|
-
.optional()
|
|
688
|
-
.describe('Wall-clock time in milliseconds spent loading the upscaler model.'),
|
|
689
|
-
upscaleMs: z
|
|
690
|
-
.number()
|
|
691
|
-
.optional()
|
|
692
|
-
.describe('Wall-clock time in milliseconds for the most recent upscale job.'),
|
|
693
|
-
totalUpscaleMs: z
|
|
694
|
-
.number()
|
|
695
|
-
.optional()
|
|
696
|
-
.describe('Cumulative upscale time in milliseconds across all jobs.'),
|
|
697
|
-
totalWallMs: z
|
|
698
|
-
.number()
|
|
699
|
-
.optional()
|
|
700
|
-
.describe('Total wall-clock time in milliseconds including model load and upscaling.'),
|
|
701
|
-
totalUpscales: z.number().optional().describe('Cumulative number of upscale calls.'),
|
|
702
|
-
totalImages: z.number().optional().describe('Cumulative number of images produced.'),
|
|
703
|
-
totalPixels: z
|
|
704
|
-
.number()
|
|
705
|
-
.optional()
|
|
706
|
-
.describe('Cumulative number of pixels produced across all images.'),
|
|
707
|
-
width: z.number().optional().describe('Width of the most recent emitted PNG.'),
|
|
708
|
-
height: z.number().optional().describe('Height of the most recent emitted PNG.'),
|
|
709
|
-
repeats: z
|
|
710
|
-
.number()
|
|
711
|
-
.optional()
|
|
712
|
-
.describe('Number of ESRGAN passes used by the most recent upscale job.'),
|
|
713
|
-
backendDevice: z
|
|
714
|
-
.enum(['cpu', 'gpu'])
|
|
715
|
-
.optional()
|
|
716
|
-
.describe('Actual compute device used by the ESRGAN upscaler. ' +
|
|
717
|
-
'Reflects the backend stable-diffusion.cpp selected (e.g. Android `gpu` ' +
|
|
718
|
-
'falls back to `cpu` because the mobile GPU/OpenCL path is unstable).')
|
|
719
|
-
});
|
|
720
|
-
export const upscaleRequestSchema = z.object({
|
|
721
|
-
modelId: z
|
|
722
|
-
.string()
|
|
723
|
-
.describe('Identifier of the loaded upscaler model. The model must have been loaded ' +
|
|
724
|
-
"with `modelType: 'diffusion'` and `modelConfig.mode: 'upscale'`."),
|
|
725
|
-
image: z
|
|
726
|
-
.string()
|
|
727
|
-
.min(1)
|
|
728
|
-
.regex(BASE64_PATTERN)
|
|
729
|
-
.describe('Base64-encoded PNG/JPEG bytes of the source image.'),
|
|
730
|
-
repeats: z
|
|
731
|
-
.number()
|
|
732
|
-
.int()
|
|
733
|
-
.positive()
|
|
734
|
-
.optional()
|
|
735
|
-
.describe('Number of ESRGAN passes to run sequentially. Each pass multiplies ' +
|
|
736
|
-
"dimensions by the model's native scale factor; only the final image " +
|
|
737
|
-
'is emitted (`outputs.length === 1`). Defaults to 1.')
|
|
738
|
-
});
|
|
739
|
-
export const upscaleStreamRequestSchema = upscaleRequestSchema.extend({
|
|
740
|
-
type: z.literal('upscaleStream')
|
|
741
|
-
});
|
|
742
|
-
export const upscaleStreamResponseSchema = z.object({
|
|
743
|
-
type: z.literal('upscaleStream'),
|
|
744
|
-
data: z.string().optional(),
|
|
745
|
-
outputIndex: z.number().optional(),
|
|
746
|
-
done: z.boolean().optional(),
|
|
747
|
-
stats: upscaleStatsSchema.optional()
|
|
748
|
-
});
|