@qvac/inference 0.18.2 → 0.19.1
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 +69 -36
- package/README.md +1 -5
- package/dist/api/assess-model-fit.d.ts +16 -0
- package/dist/api/assess-model-fit.js +27 -0
- package/dist/api/audio-gen.d.ts +4 -4
- package/dist/api/audio-gen.js +17 -6
- package/dist/api/completion-stream.d.ts +1 -1
- package/dist/api/completion-stream.js +1 -1
- package/dist/api/delete-cache.d.ts +7 -1
- package/dist/api/delete-cache.js +11 -1
- package/dist/api/download-asset.d.ts +1 -1
- package/dist/api/download-asset.js +2 -2
- package/dist/api/finetune.js +1 -1
- package/dist/api/get-loaded-model-info.d.ts +6 -10
- package/dist/api/get-loaded-model-info.js +6 -10
- package/dist/api/heartbeat.d.ts +5 -22
- package/dist/api/heartbeat.js +6 -23
- package/dist/api/index.d.ts +36 -35
- package/dist/api/index.js +35 -35
- package/dist/api/load-model.d.ts +5 -1
- package/dist/api/load-model.js +3 -5
- package/dist/api/logging-stream-registry.js +1 -1
- package/dist/api/resume.d.ts +0 -3
- package/dist/api/resume.js +0 -3
- package/dist/api/subscribe-logs.js +1 -1
- package/dist/api/suspend.d.ts +0 -4
- package/dist/api/suspend.js +0 -4
- package/dist/api/translate.d.ts +3 -1
- package/dist/api/translate.js +16 -8
- package/dist/api/unload-model.js +3 -5
- package/dist/api/video-request.d.ts +207 -0
- package/dist/api/video-request.js +18 -0
- package/dist/api/video.d.ts +22 -2
- package/dist/api/video.js +25 -15
- package/dist/api/vla-helpers.d.ts +1 -2
- package/dist/api/vla-helpers.js +1 -2
- package/dist/api/vla.js +1 -1
- package/dist/api/world-result.d.ts +71 -0
- package/dist/api/world-result.js +293 -0
- package/dist/api/world.d.ts +143 -0
- package/dist/api/world.js +71 -0
- package/dist/config/resolve-config.d.ts +1 -1
- package/dist/config/resolve-config.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/dispatch.js +15 -28
- package/dist/errors/index.d.ts +35 -31
- package/dist/errors/index.js +66 -56
- package/dist/handlers/assess-model-fit.d.ts +10 -0
- package/dist/handlers/assess-model-fit.js +75 -0
- package/dist/handlers/cancelHandler.js +1 -1
- package/dist/handlers/completion-orchestrate.js +1 -1
- package/dist/handlers/delete-cache.js +3 -0
- package/dist/handlers/download-asset.js +6 -5
- package/dist/handlers/finetune.js +1 -1
- package/dist/handlers/get-loaded-model-info.js +0 -12
- package/dist/handlers/get-model-info.js +1 -1
- package/dist/handlers/get-system-resources.js +8 -0
- package/dist/handlers/load-model/download-manager.d.ts +1 -1
- package/dist/handlers/load-model/download-stats.d.ts +3 -3
- package/dist/handlers/load-model/download-stats.js +5 -5
- package/dist/handlers/load-model/handler.js +6 -8
- package/dist/handlers/load-model/http-verify.d.ts +20 -0
- package/dist/handlers/load-model/http-verify.js +54 -0
- package/dist/handlers/load-model/http.d.ts +12 -2
- package/dist/handlers/load-model/http.js +119 -230
- package/dist/handlers/load-model/hyperdrive.d.ts +1 -1
- package/dist/handlers/load-model/hyperdrive.js +1 -1
- package/dist/handlers/load-model/index.d.ts +2 -2
- package/dist/handlers/load-model/index.js +2 -2
- package/dist/handlers/load-model/registry-companion-set.d.ts +1 -1
- package/dist/handlers/load-model/registry-companion-set.js +1 -1
- package/dist/handlers/load-model/registry-download-utils.d.ts +3 -3
- package/dist/handlers/load-model/registry-download-utils.js +2 -2
- package/dist/handlers/load-model/registry.d.ts +2 -2
- package/dist/handlers/load-model/registry.js +4 -4
- package/dist/handlers/load-model/resolve-session.d.ts +8 -1
- package/dist/handlers/load-model/resolve-session.js +12 -9
- package/dist/handlers/load-model/resolve.d.ts +4 -4
- package/dist/handlers/load-model/resolve.js +18 -16
- package/dist/handlers/load-model/safe-fetch.d.ts +44 -0
- package/dist/handlers/load-model/safe-fetch.js +143 -0
- package/dist/handlers/load-model/types.d.ts +9 -0
- package/dist/handlers/plugin-dispatch.js +1 -4
- package/dist/handlers/plugin-invoke.js +1 -4
- package/dist/handlers/types.d.ts +0 -2
- package/dist/handlers/unload-model.js +1 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +1 -1
- package/dist/logging/index.d.ts +5 -5
- package/dist/logging/index.js +4 -4
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +2 -2
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +2 -2
- package/dist/models/registry/models.d.ts +250 -0
- package/dist/models/registry/models.js +2071 -1806
- package/dist/models/registry/resource-profiles.d.ts +18 -0
- package/dist/models/registry/resource-profiles.js +4934 -0
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +14 -0
- package/dist/plugins/builtin/audiogen-ggml/config.js +23 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +47 -5
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +134 -4
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +47 -28
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +3 -3
- package/dist/plugins/builtin/ggml-classification/plugin.js +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.js +2 -2
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +1 -1
- package/dist/plugins/builtin/ggml-vla/plugin.js +3 -3
- package/dist/plugins/builtin/index.d.ts +12 -12
- package/dist/plugins/builtin/index.js +12 -12
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +2 -2
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +3 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +37 -26
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.d.ts +12 -11
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.js +133 -41
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +15 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +79 -17
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +22 -8
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +10 -13
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +4 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +13 -2
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +2 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +2 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +3 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.js +1 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +32 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +126 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +820 -0
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +153 -4
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +134 -13
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +1 -1
- package/dist/plugins/builtin/tts-ggml/plugin.js +2 -2
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +2 -2
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +3 -3
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/ops/kv-cache-utils.js +1 -1
- package/dist/plugins/ops/load-model.js +1 -1
- package/dist/plugins/ops/transcribe.js +2 -2
- package/dist/plugins/ops/translate.js +4 -12
- package/dist/plugins/ops/unload-model.js +19 -21
- package/dist/plugins/registry.d.ts +1 -0
- package/dist/plugins/registry.js +12 -0
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +1 -1
- package/dist/profiling/controller.d.ts +1 -1
- package/dist/profiling/controller.js +2 -2
- package/dist/profiling/envelope.d.ts +0 -1
- package/dist/profiling/envelope.js +0 -10
- package/dist/profiling/events.d.ts +2 -3
- package/dist/profiling/events.js +2 -9
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +3 -3
- package/dist/profiling/index.d.ts +13 -14
- package/dist/profiling/index.js +12 -13
- package/dist/profiling/operation-metrics.d.ts +1 -1
- package/dist/profiling/operation-metrics.js +35 -2
- package/dist/profiling/operation-wrappers.js +12 -15
- package/dist/profiling/profiler.d.ts +1 -2
- package/dist/profiling/profiler.js +7 -26
- package/dist/profiling/types.d.ts +1 -1
- package/dist/rag/handler.js +1 -1
- package/dist/rag/handlers/close-workspace.js +1 -1
- package/dist/rag/handlers/delete-embeddings.js +1 -1
- package/dist/rag/handlers/delete-workspace.js +2 -6
- package/dist/rag/handlers/ingest.js +1 -1
- package/dist/rag/handlers/list-workspaces.d.ts +1 -1
- package/dist/rag/handlers/list-workspaces.js +1 -1
- package/dist/rag/handlers/reindex.js +1 -1
- package/dist/rag/handlers/save-embeddings.js +1 -1
- package/dist/rag/handlers/search.js +1 -1
- package/dist/rag/index.d.ts +11 -11
- package/dist/rag/index.js +11 -11
- package/dist/rag/rag-workspace-manager.d.ts +4 -2
- package/dist/rag/rag-workspace-manager.js +268 -15
- package/dist/registry.js +8 -58
- package/dist/resources/collector.d.ts +3 -1
- package/dist/resources/collector.js +91 -9
- package/dist/resources/instance.d.ts +1 -1
- package/dist/resources/instance.js +1 -1
- package/dist/resources/model-fit/assess.d.ts +36 -0
- package/dist/resources/model-fit/assess.js +679 -0
- package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/darwin-arm64.js +36 -0
- package/dist/resources/model-fit/calibration/darwin-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/darwin-x64.js +38 -0
- package/dist/resources/model-fit/calibration/fit.d.ts +73 -0
- package/dist/resources/model-fit/calibration/fit.js +152 -0
- package/dist/resources/model-fit/calibration/index.d.ts +37 -0
- package/dist/resources/model-fit/calibration/index.js +75 -0
- package/dist/resources/model-fit/calibration/linux-arm64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-arm64.js +38 -0
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +39 -0
- package/dist/resources/model-fit/calibration/linux-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-x64.js +38 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +39 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +36 -0
- package/dist/resources/model-fit/calibration/win32-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64.js +38 -0
- package/dist/resources/model-fit/estimators/llm.d.ts +46 -0
- package/dist/resources/model-fit/estimators/llm.js +222 -0
- package/dist/resources/model-fit/estimators/whisper.d.ts +10 -0
- package/dist/resources/model-fit/estimators/whisper.js +77 -0
- package/dist/resources/model-fit/floor.d.ts +31 -0
- package/dist/resources/model-fit/floor.js +65 -0
- package/dist/resources/model-fit/types.d.ts +120 -0
- package/dist/resources/model-fit/types.js +1 -0
- package/dist/resources/native.d.ts +1 -1
- package/dist/resources/native.js +15 -0
- package/dist/resources/normalize.d.ts +1 -1
- package/dist/resources/types.d.ts +14 -0
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/lifecycle.js +5 -7
- package/dist/runtime/model-registry.d.ts +0 -14
- package/dist/runtime/model-registry.js +17 -40
- package/dist/runtime/registry-client.js +1 -1
- package/dist/runtime/request-context.d.ts +3 -3
- package/dist/runtime/request-context.js +13 -1
- package/dist/runtime/request-registry.d.ts +1 -1
- package/dist/runtime/request-registry.js +4 -5
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +18 -3
- package/dist/schemas/assess-model-fit.d.ts +311 -0
- package/dist/schemas/assess-model-fit.js +182 -0
- package/dist/schemas/audio-gen.d.ts +437 -7
- package/dist/schemas/audio-gen.js +131 -19
- package/dist/schemas/batch-completion-stream.d.ts +5 -2
- package/dist/schemas/batch-completion-stream.js +3 -3
- package/dist/schemas/bci-config.js +73 -27
- package/dist/schemas/bci.d.ts +3 -3
- package/dist/schemas/bci.js +5 -5
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/classification.js +13 -6
- package/dist/schemas/common.d.ts +695 -335
- package/dist/schemas/common.js +33 -31
- package/dist/schemas/completion-event.d.ts +5 -2
- package/dist/schemas/completion-event.js +2 -1
- package/dist/schemas/completion-stream.d.ts +3 -5
- package/dist/schemas/completion-stream.js +4 -8
- package/dist/schemas/config.d.ts +640 -18
- package/dist/schemas/config.js +50 -8
- package/dist/schemas/download-asset.d.ts +19 -1
- package/dist/schemas/download-asset.js +20 -4
- package/dist/schemas/engine-addon-map.d.ts +1 -1
- package/dist/schemas/engine-addon-map.js +3 -3
- package/dist/schemas/error.d.ts +2 -2
- package/dist/schemas/error.js +2 -2
- package/dist/schemas/errors.d.ts +2 -6
- package/dist/schemas/errors.js +30 -40
- package/dist/schemas/heartbeat.d.ts +10 -0
- package/dist/schemas/heartbeat.js +8 -0
- package/dist/schemas/index.d.ts +46 -44
- package/dist/schemas/index.js +45 -43
- package/dist/schemas/llamacpp-config.d.ts +32 -10
- package/dist/schemas/llamacpp-config.js +11 -8
- package/dist/schemas/load-model.d.ts +2902 -1857
- package/dist/schemas/load-model.js +52 -52
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-config-schemas.d.ts +2354 -0
- package/dist/schemas/model-config-schemas.js +46 -0
- package/dist/schemas/model-info.d.ts +10 -20
- package/dist/schemas/model-info.js +4 -25
- package/dist/schemas/model-ops.d.ts +3 -1
- package/dist/schemas/model-ops.js +7 -2
- package/dist/schemas/model-resource-profile.d.ts +109 -0
- package/dist/schemas/model-resource-profile.js +83 -0
- package/dist/schemas/model-src-utils.d.ts +1 -0
- package/dist/schemas/model-src-utils.js +33 -13
- package/dist/schemas/ocr.js +48 -13
- package/dist/schemas/path-validation.js +8 -2
- package/dist/schemas/plugin.d.ts +23 -10
- package/dist/schemas/plugin.js +11 -0
- package/dist/schemas/profiling.d.ts +138 -43
- package/dist/schemas/profiling.js +1 -22
- package/dist/schemas/rag.js +1 -1
- package/dist/schemas/registry.js +1 -1
- package/dist/schemas/reload-config.d.ts +0 -2
- package/dist/schemas/reload-config.js +2 -3
- package/dist/schemas/sdcpp-config.d.ts +344 -4
- package/dist/schemas/sdcpp-config.js +504 -17
- package/dist/schemas/system-resources.d.ts +138 -0
- package/dist/schemas/system-resources.js +3 -1
- package/dist/schemas/text-to-speech.js +183 -76
- package/dist/schemas/transcription-config.js +253 -85
- package/dist/schemas/transcription.d.ts +3 -3
- package/dist/schemas/translate.d.ts +2 -2
- package/dist/schemas/translate.js +1 -1
- package/dist/schemas/translation-config.js +53 -25
- package/dist/schemas/vla.d.ts +1 -1
- package/dist/selection.d.ts +1 -5
- package/dist/selection.js +2 -6
- package/dist/surface.d.ts +1 -1
- package/dist/utils/addon-responses.d.ts +1 -0
- package/dist/utils/aggregate-events.d.ts +1 -1
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/archive.js +2 -2
- package/dist/utils/audio-input.js +1 -1
- package/dist/utils/cache/auto-history.d.ts +1 -1
- package/dist/utils/cache/auto-history.js +1 -1
- package/dist/utils/cache/paths.js +5 -5
- package/dist/utils/completion-normalizer.js +1 -1
- package/dist/utils/gguf-tensor-extractor.js +1 -1
- package/dist/utils/image-dimensions.d.ts +26 -0
- package/dist/utils/image-dimensions.js +46 -0
- package/dist/utils/index.d.ts +13 -10
- package/dist/utils/index.js +13 -10
- package/dist/utils/mcp-adapter.d.ts +1 -1
- package/dist/utils/mcp-adapter.js +1 -1
- package/dist/utils/path-sanitize.d.ts +7 -0
- package/dist/utils/path-sanitize.js +36 -0
- package/dist/utils/path-security.d.ts +0 -7
- package/dist/utils/path-security.js +1 -36
- package/dist/utils/shard-utils.js +3 -3
- package/dist/utils/tool-integration.js +1 -1
- package/dist/utils/tools/dialect.js +1 -1
- package/dist/utils/tools/index.d.ts +2 -2
- package/dist/utils/tools/index.js +2 -2
- package/dist/utils/tools/parser.js +8 -8
- package/dist/utils/tools/parsers/dsml.d.ts +1 -1
- package/dist/utils/tools/parsers/dsml.js +1 -1
- package/dist/utils/tools/parsers/gemma4native.d.ts +1 -1
- package/dist/utils/tools/parsers/gemma4native.js +1 -1
- package/dist/utils/tools/parsers/harmony.d.ts +1 -1
- package/dist/utils/tools/parsers/harmony.js +1 -1
- package/dist/utils/tools/parsers/hermes.d.ts +1 -1
- package/dist/utils/tools/parsers/hermes.js +1 -1
- package/dist/utils/tools/parsers/json.d.ts +1 -1
- package/dist/utils/tools/parsers/json.js +1 -1
- package/dist/utils/tools/parsers/pythonic.d.ts +1 -1
- package/dist/utils/tools/parsers/pythonic.js +1 -1
- package/dist/utils/tools/parsers/qwen35.d.ts +1 -1
- package/dist/utils/tools/parsers/qwen35.js +3 -3
- package/dist/utils/url-security.d.ts +17 -0
- package/dist/utils/url-security.js +75 -0
- package/package.json +31 -26
- package/dist/api/provide.d.ts +0 -23
- package/dist/api/provide.js +0 -32
- package/dist/api/stop-provider.d.ts +0 -20
- package/dist/api/stop-provider.js +0 -30
- package/dist/p2p/cancel-delegated.d.ts +0 -3
- package/dist/p2p/cancel-delegated.js +0 -64
- package/dist/p2p/completion-stream-delegated.d.ts +0 -4
- package/dist/p2p/completion-stream-delegated.js +0 -51
- package/dist/p2p/delegate-client.d.ts +0 -9
- package/dist/p2p/delegate-client.js +0 -219
- package/dist/p2p/delegate-connect-diagnostics.d.ts +0 -8
- package/dist/p2p/delegate-connect-diagnostics.js +0 -38
- package/dist/p2p/delegate-transport.d.ts +0 -18
- package/dist/p2p/delegate-transport.js +0 -237
- package/dist/p2p/error-handlers.d.ts +0 -4
- package/dist/p2p/error-handlers.js +0 -31
- package/dist/p2p/handle-request.d.ts +0 -2
- package/dist/p2p/handle-request.js +0 -171
- package/dist/p2p/handler-utils.d.ts +0 -19
- package/dist/p2p/handler-utils.js +0 -180
- package/dist/p2p/heartbeat-delegated.d.ts +0 -3
- package/dist/p2p/heartbeat-delegated.js +0 -32
- package/dist/p2p/load-model-delegated.d.ts +0 -6
- package/dist/p2p/load-model-delegated.js +0 -132
- package/dist/p2p/progress-throttle.d.ts +0 -7
- package/dist/p2p/progress-throttle.js +0 -47
- package/dist/p2p/provideHandler/connection.d.ts +0 -2
- package/dist/p2p/provideHandler/connection.js +0 -38
- package/dist/p2p/provideHandler/handler.d.ts +0 -2
- package/dist/p2p/provideHandler/handler.js +0 -66
- package/dist/p2p/provideHandler/proxy.d.ts +0 -2
- package/dist/p2p/provideHandler/proxy.js +0 -24
- package/dist/p2p/provideHandler.d.ts +0 -1
- package/dist/p2p/provideHandler.js +0 -2
- package/dist/p2p/rpc-utils.d.ts +0 -4
- package/dist/p2p/rpc-utils.js +0 -8
- package/dist/p2p/stopProvideHandler.d.ts +0 -2
- package/dist/p2p/stopProvideHandler.js +0 -29
- package/dist/p2p/swarm.d.ts +0 -9
- package/dist/p2p/swarm.js +0 -103
- package/dist/p2p/transport-selector.d.ts +0 -2
- package/dist/p2p/transport-selector.js +0 -18
- package/dist/p2p/unload-model-delegated.d.ts +0 -2
- package/dist/p2p/unload-model-delegated.js +0 -31
- package/dist/profiling/delegation-profiler.d.ts +0 -31
- package/dist/profiling/delegation-profiler.js +0 -155
- package/dist/schemas/delegate.d.ts +0 -29
- package/dist/schemas/delegate.js +0 -40
- package/dist/schemas/provide.d.ts +0 -50
- package/dist/schemas/provide.js +0 -32
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const sdcppConfigSchema: z.ZodObject<{
|
|
3
3
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
4
4
|
diffusion: "diffusion";
|
|
5
|
+
world: "world";
|
|
5
6
|
upscale: "upscale";
|
|
6
7
|
video: "video";
|
|
7
8
|
}>>;
|
|
@@ -50,6 +51,8 @@ export declare const sdcppConfigSchema: z.ZodObject<{
|
|
|
50
51
|
}>>;
|
|
51
52
|
clip_on_cpu: z.ZodOptional<z.ZodBoolean>;
|
|
52
53
|
vae_on_cpu: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
vae_auto_cpu_fallback: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
vae_auto_cpu_fallback_memory_ratio: z.ZodOptional<z.ZodNumber>;
|
|
53
56
|
vae_tiling: z.ZodOptional<z.ZodBoolean>;
|
|
54
57
|
offload_to_cpu: z.ZodOptional<z.ZodBoolean>;
|
|
55
58
|
flash_attn: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -450,6 +453,95 @@ export declare const sdcppConfigSchema: z.ZodObject<{
|
|
|
450
453
|
classification: "classification";
|
|
451
454
|
}>, z.ZodLiteral<"vad">]>>;
|
|
452
455
|
}, z.core.$strip>]>>;
|
|
456
|
+
taehvModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
457
|
+
src: z.ZodString;
|
|
458
|
+
name: z.ZodOptional<z.ZodString>;
|
|
459
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
460
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
461
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
462
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
463
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
465
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
467
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
468
|
+
embeddings: "embeddings";
|
|
469
|
+
diffusion: "diffusion";
|
|
470
|
+
audiogen: "audiogen";
|
|
471
|
+
tts: "tts";
|
|
472
|
+
ocr: "ocr";
|
|
473
|
+
vla: "vla";
|
|
474
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
475
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
476
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
477
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
478
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
479
|
+
"onnx-tts": "onnx-tts";
|
|
480
|
+
"tts-ggml": "tts-ggml";
|
|
481
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
482
|
+
"ggml-ocr": "ggml-ocr";
|
|
483
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
484
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
485
|
+
"ggml-vla": "ggml-vla";
|
|
486
|
+
"ggml-classification": "ggml-classification";
|
|
487
|
+
llm: "llm";
|
|
488
|
+
whisper: "whisper";
|
|
489
|
+
bci: "bci";
|
|
490
|
+
nmt: "nmt";
|
|
491
|
+
parakeet: "parakeet";
|
|
492
|
+
classification: "classification";
|
|
493
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
494
|
+
}, z.core.$strip>]>>;
|
|
495
|
+
sceneSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
496
|
+
src: z.ZodString;
|
|
497
|
+
name: z.ZodOptional<z.ZodString>;
|
|
498
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
499
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
500
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
501
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
502
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
504
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
506
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
507
|
+
embeddings: "embeddings";
|
|
508
|
+
diffusion: "diffusion";
|
|
509
|
+
audiogen: "audiogen";
|
|
510
|
+
tts: "tts";
|
|
511
|
+
ocr: "ocr";
|
|
512
|
+
vla: "vla";
|
|
513
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
514
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
515
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
516
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
517
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
518
|
+
"onnx-tts": "onnx-tts";
|
|
519
|
+
"tts-ggml": "tts-ggml";
|
|
520
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
521
|
+
"ggml-ocr": "ggml-ocr";
|
|
522
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
523
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
524
|
+
"ggml-vla": "ggml-vla";
|
|
525
|
+
"ggml-classification": "ggml-classification";
|
|
526
|
+
llm: "llm";
|
|
527
|
+
whisper: "whisper";
|
|
528
|
+
bci: "bci";
|
|
529
|
+
nmt: "nmt";
|
|
530
|
+
parakeet: "parakeet";
|
|
531
|
+
classification: "classification";
|
|
532
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
533
|
+
}, z.core.$strip>]>>;
|
|
534
|
+
world: z.ZodOptional<z.ZodObject<{
|
|
535
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
536
|
+
threads: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<-1>, z.ZodNumber]>>;
|
|
537
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
538
|
+
numFramePerBlock: z.ZodOptional<z.ZodNumber>;
|
|
539
|
+
localAttnSize: z.ZodOptional<z.ZodNumber>;
|
|
540
|
+
offloadParamsToCpu: z.ZodOptional<z.ZodBoolean>;
|
|
541
|
+
frameJpegQuality: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
kvCache: z.ZodOptional<z.ZodBoolean>;
|
|
543
|
+
profile: z.ZodOptional<z.ZodBoolean>;
|
|
544
|
+
}, z.core.$strict>>;
|
|
453
545
|
upscaler: z.ZodOptional<z.ZodObject<{
|
|
454
546
|
type: z.ZodOptional<z.ZodLiteral<"esrgan">>;
|
|
455
547
|
model_src: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -726,6 +818,10 @@ export declare const videoRequestSchema: z.ZodObject<{
|
|
|
726
818
|
requestId: z.ZodOptional<z.ZodString>;
|
|
727
819
|
prompt: z.ZodString;
|
|
728
820
|
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
821
|
+
lora: z.ZodOptional<z.ZodString>;
|
|
822
|
+
lora_strength: z.ZodOptional<z.ZodNumber>;
|
|
823
|
+
stg_scale: z.ZodOptional<z.ZodNumber>;
|
|
824
|
+
stg_block: z.ZodOptional<z.ZodNumber>;
|
|
729
825
|
width: z.ZodOptional<z.ZodNumber>;
|
|
730
826
|
height: z.ZodOptional<z.ZodNumber>;
|
|
731
827
|
video_frames: z.ZodOptional<z.ZodNumber>;
|
|
@@ -760,6 +856,7 @@ export declare const videoRequestSchema: z.ZodObject<{
|
|
|
760
856
|
smoothstep: "smoothstep";
|
|
761
857
|
kl_optimal: "kl_optimal";
|
|
762
858
|
bong_tangent: "bong_tangent";
|
|
859
|
+
ltx2: "ltx2";
|
|
763
860
|
}>>;
|
|
764
861
|
cfg_scale: z.ZodOptional<z.ZodNumber>;
|
|
765
862
|
flow_shift: z.ZodOptional<z.ZodNumber>;
|
|
@@ -818,12 +915,19 @@ export declare const videoRequestSchema: z.ZodObject<{
|
|
|
818
915
|
}>;
|
|
819
916
|
init_image: z.ZodOptional<z.ZodString>;
|
|
820
917
|
strength: z.ZodOptional<z.ZodNumber>;
|
|
918
|
+
reference_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
919
|
+
reference_attention_strength: z.ZodOptional<z.ZodNumber>;
|
|
920
|
+
reference_downscale_factor: z.ZodOptional<z.ZodLiteral<1>>;
|
|
821
921
|
}, z.core.$strip>;
|
|
822
922
|
export declare const ltxVideoRequestSchema: z.ZodObject<{
|
|
823
923
|
modelId: z.ZodString;
|
|
824
924
|
requestId: z.ZodOptional<z.ZodString>;
|
|
825
925
|
prompt: z.ZodString;
|
|
826
926
|
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
927
|
+
lora: z.ZodOptional<z.ZodString>;
|
|
928
|
+
lora_strength: z.ZodOptional<z.ZodNumber>;
|
|
929
|
+
stg_scale: z.ZodOptional<z.ZodNumber>;
|
|
930
|
+
stg_block: z.ZodOptional<z.ZodNumber>;
|
|
827
931
|
width: z.ZodOptional<z.ZodNumber>;
|
|
828
932
|
height: z.ZodOptional<z.ZodNumber>;
|
|
829
933
|
video_frames: z.ZodOptional<z.ZodNumber>;
|
|
@@ -858,6 +962,7 @@ export declare const ltxVideoRequestSchema: z.ZodObject<{
|
|
|
858
962
|
smoothstep: "smoothstep";
|
|
859
963
|
kl_optimal: "kl_optimal";
|
|
860
964
|
bong_tangent: "bong_tangent";
|
|
965
|
+
ltx2: "ltx2";
|
|
861
966
|
}>>;
|
|
862
967
|
cfg_scale: z.ZodOptional<z.ZodNumber>;
|
|
863
968
|
flow_shift: z.ZodOptional<z.ZodNumber>;
|
|
@@ -916,6 +1021,32 @@ export declare const ltxVideoRequestSchema: z.ZodObject<{
|
|
|
916
1021
|
}>;
|
|
917
1022
|
init_image: z.ZodOptional<z.ZodString>;
|
|
918
1023
|
strength: z.ZodOptional<z.ZodNumber>;
|
|
1024
|
+
reference_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1025
|
+
reference_attention_strength: z.ZodOptional<z.ZodNumber>;
|
|
1026
|
+
reference_downscale_factor: z.ZodOptional<z.ZodLiteral<1>>;
|
|
1027
|
+
}, z.core.$strip>;
|
|
1028
|
+
export declare const nonLtxVideoRequestSchema: z.ZodObject<{
|
|
1029
|
+
lora: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
scheduler: z.ZodOptional<z.ZodEnum<{
|
|
1031
|
+
lcm: "lcm";
|
|
1032
|
+
discrete: "discrete";
|
|
1033
|
+
karras: "karras";
|
|
1034
|
+
exponential: "exponential";
|
|
1035
|
+
ays: "ays";
|
|
1036
|
+
gits: "gits";
|
|
1037
|
+
sgm_uniform: "sgm_uniform";
|
|
1038
|
+
simple: "simple";
|
|
1039
|
+
smoothstep: "smoothstep";
|
|
1040
|
+
kl_optimal: "kl_optimal";
|
|
1041
|
+
bong_tangent: "bong_tangent";
|
|
1042
|
+
ltx2: "ltx2";
|
|
1043
|
+
}>>;
|
|
1044
|
+
lora_strength: z.ZodOptional<z.ZodNumber>;
|
|
1045
|
+
stg_scale: z.ZodOptional<z.ZodNumber>;
|
|
1046
|
+
stg_block: z.ZodOptional<z.ZodNumber>;
|
|
1047
|
+
reference_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1048
|
+
reference_attention_strength: z.ZodOptional<z.ZodNumber>;
|
|
1049
|
+
reference_downscale_factor: z.ZodOptional<z.ZodLiteral<1>>;
|
|
919
1050
|
}, z.core.$strip>;
|
|
920
1051
|
export declare const singleExpertVideoRequestSchema: z.ZodObject<{
|
|
921
1052
|
high_noise_steps: z.ZodOptional<z.ZodNumber>;
|
|
@@ -958,6 +1089,10 @@ export declare const videoStreamRequestSchema: z.ZodObject<{
|
|
|
958
1089
|
requestId: z.ZodOptional<z.ZodString>;
|
|
959
1090
|
prompt: z.ZodString;
|
|
960
1091
|
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
1092
|
+
lora: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
lora_strength: z.ZodOptional<z.ZodNumber>;
|
|
1094
|
+
stg_scale: z.ZodOptional<z.ZodNumber>;
|
|
1095
|
+
stg_block: z.ZodOptional<z.ZodNumber>;
|
|
961
1096
|
width: z.ZodOptional<z.ZodNumber>;
|
|
962
1097
|
height: z.ZodOptional<z.ZodNumber>;
|
|
963
1098
|
video_frames: z.ZodOptional<z.ZodNumber>;
|
|
@@ -992,6 +1127,7 @@ export declare const videoStreamRequestSchema: z.ZodObject<{
|
|
|
992
1127
|
smoothstep: "smoothstep";
|
|
993
1128
|
kl_optimal: "kl_optimal";
|
|
994
1129
|
bong_tangent: "bong_tangent";
|
|
1130
|
+
ltx2: "ltx2";
|
|
995
1131
|
}>>;
|
|
996
1132
|
cfg_scale: z.ZodOptional<z.ZodNumber>;
|
|
997
1133
|
flow_shift: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1050,21 +1186,47 @@ export declare const videoStreamRequestSchema: z.ZodObject<{
|
|
|
1050
1186
|
}>;
|
|
1051
1187
|
init_image: z.ZodOptional<z.ZodString>;
|
|
1052
1188
|
strength: z.ZodOptional<z.ZodNumber>;
|
|
1189
|
+
reference_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1190
|
+
reference_attention_strength: z.ZodOptional<z.ZodNumber>;
|
|
1191
|
+
reference_downscale_factor: z.ZodOptional<z.ZodLiteral<1>>;
|
|
1053
1192
|
type: z.ZodLiteral<"videoStream">;
|
|
1054
1193
|
}, z.core.$strip>;
|
|
1055
1194
|
export type VideoStreamRequest = z.input<typeof videoStreamRequestSchema>;
|
|
1056
|
-
type VideoClientParamsCommon = Omit<VideoRequest, 'requestId' | 'mode' | 'init_image' | 'strength' | 'control_frames'> & {
|
|
1195
|
+
type VideoClientParamsCommon = Omit<VideoRequest, 'requestId' | 'mode' | 'init_image' | 'strength' | 'control_frames' | 'lora' | 'lora_strength' | 'reference_images' | 'reference_attention_strength' | 'reference_downscale_factor'> & {
|
|
1057
1196
|
control_frames?: Uint8Array[];
|
|
1058
1197
|
};
|
|
1059
|
-
|
|
1198
|
+
type VideoClientLoraParams = {
|
|
1199
|
+
lora?: never;
|
|
1200
|
+
lora_strength?: never;
|
|
1201
|
+
} | {
|
|
1202
|
+
lora: string;
|
|
1203
|
+
lora_strength?: number;
|
|
1204
|
+
};
|
|
1205
|
+
export type VideoTxt2vidClientParams = (VideoClientParamsCommon & VideoClientLoraParams & {
|
|
1060
1206
|
mode: 'txt2vid';
|
|
1061
1207
|
init_image?: never;
|
|
1062
1208
|
strength?: never;
|
|
1063
|
-
|
|
1064
|
-
|
|
1209
|
+
reference_images?: never;
|
|
1210
|
+
reference_attention_strength?: never;
|
|
1211
|
+
reference_downscale_factor?: never;
|
|
1212
|
+
}) | (VideoClientParamsCommon & {
|
|
1213
|
+
mode: 'txt2vid';
|
|
1214
|
+
init_image?: never;
|
|
1215
|
+
strength?: never;
|
|
1216
|
+
lora: string;
|
|
1217
|
+
lora_strength?: number;
|
|
1218
|
+
reference_images: readonly [Uint8Array];
|
|
1219
|
+
video_frames: number;
|
|
1220
|
+
reference_attention_strength?: number;
|
|
1221
|
+
reference_downscale_factor?: 1;
|
|
1222
|
+
});
|
|
1223
|
+
export type VideoImg2vidClientParams = VideoClientParamsCommon & VideoClientLoraParams & {
|
|
1065
1224
|
mode: 'img2vid';
|
|
1066
1225
|
init_image: Uint8Array;
|
|
1067
1226
|
strength?: number;
|
|
1227
|
+
reference_images?: never;
|
|
1228
|
+
reference_attention_strength?: never;
|
|
1229
|
+
reference_downscale_factor?: never;
|
|
1068
1230
|
};
|
|
1069
1231
|
export type VideoClientParams = VideoTxt2vidClientParams | VideoImg2vidClientParams;
|
|
1070
1232
|
export declare const upscaleStatsSchema: z.ZodObject<{
|
|
@@ -1123,4 +1285,182 @@ export type UpscaleStreamResponse = z.infer<typeof upscaleStreamResponseSchema>;
|
|
|
1123
1285
|
export type UpscaleClientParams = Omit<UpscaleRequest, 'image'> & {
|
|
1124
1286
|
image: Uint8Array;
|
|
1125
1287
|
};
|
|
1288
|
+
export declare const walkKeySchema: z.ZodEnum<{
|
|
1289
|
+
W: "W";
|
|
1290
|
+
A: "A";
|
|
1291
|
+
S: "S";
|
|
1292
|
+
D: "D";
|
|
1293
|
+
I: "I";
|
|
1294
|
+
J: "J";
|
|
1295
|
+
K: "K";
|
|
1296
|
+
L: "L";
|
|
1297
|
+
}>;
|
|
1298
|
+
export type WalkKey = z.infer<typeof walkKeySchema>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Keys held for one block, as accepted by the client helpers: an array
|
|
1301
|
+
* (`['W', 'J']`), a keys object (`{ W: true }`), or a raw 8-bit mask
|
|
1302
|
+
* (bit 0..7 = W,A,S,D,I,J,K,L). All three normalize to the array form
|
|
1303
|
+
* before the request goes on the wire.
|
|
1304
|
+
*/
|
|
1305
|
+
export type WalkKeysInput = number | readonly string[] | Readonly<Record<string, boolean | undefined>>;
|
|
1306
|
+
export declare const worldStepStatsSchema: z.ZodObject<{
|
|
1307
|
+
modelLoadMs: z.ZodOptional<z.ZodNumber>;
|
|
1308
|
+
stepMs: z.ZodOptional<z.ZodNumber>;
|
|
1309
|
+
totalStepMs: z.ZodOptional<z.ZodNumber>;
|
|
1310
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1311
|
+
totalFrames: z.ZodOptional<z.ZodNumber>;
|
|
1312
|
+
frames: z.ZodOptional<z.ZodNumber>;
|
|
1313
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1314
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1315
|
+
actionMask: z.ZodOptional<z.ZodNumber>;
|
|
1316
|
+
}, z.core.$strip>;
|
|
1317
|
+
export type WorldStepStats = z.infer<typeof worldStepStatsSchema>;
|
|
1318
|
+
export declare const worldSceneStatsSchema: z.ZodObject<{
|
|
1319
|
+
sceneCreateMs: z.ZodOptional<z.ZodNumber>;
|
|
1320
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1321
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1322
|
+
}, z.core.$strip>;
|
|
1323
|
+
export type WorldSceneStats = z.infer<typeof worldSceneStatsSchema>;
|
|
1324
|
+
export declare const worldStepRequestSchema: z.ZodObject<{
|
|
1325
|
+
modelId: z.ZodString;
|
|
1326
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
1327
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1328
|
+
W: "W";
|
|
1329
|
+
A: "A";
|
|
1330
|
+
S: "S";
|
|
1331
|
+
D: "D";
|
|
1332
|
+
I: "I";
|
|
1333
|
+
J: "J";
|
|
1334
|
+
K: "K";
|
|
1335
|
+
L: "L";
|
|
1336
|
+
}>>>;
|
|
1337
|
+
}, z.core.$strip>;
|
|
1338
|
+
export type WorldStepRequest = z.input<typeof worldStepRequestSchema>;
|
|
1339
|
+
export declare const worldStepStreamRequestSchema: z.ZodObject<{
|
|
1340
|
+
modelId: z.ZodString;
|
|
1341
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
1342
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1343
|
+
W: "W";
|
|
1344
|
+
A: "A";
|
|
1345
|
+
S: "S";
|
|
1346
|
+
D: "D";
|
|
1347
|
+
I: "I";
|
|
1348
|
+
J: "J";
|
|
1349
|
+
K: "K";
|
|
1350
|
+
L: "L";
|
|
1351
|
+
}>>>;
|
|
1352
|
+
type: z.ZodLiteral<"worldStepStream">;
|
|
1353
|
+
}, z.core.$strip>;
|
|
1354
|
+
export type WorldStepStreamRequest = z.input<typeof worldStepStreamRequestSchema>;
|
|
1355
|
+
export declare const worldStepStreamResponseSchema: z.ZodObject<{
|
|
1356
|
+
type: z.ZodLiteral<"worldStepStream">;
|
|
1357
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
1358
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1359
|
+
elapsedMs: z.ZodOptional<z.ZodNumber>;
|
|
1360
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1361
|
+
frameIndex: z.ZodOptional<z.ZodNumber>;
|
|
1362
|
+
done: z.ZodOptional<z.ZodBoolean>;
|
|
1363
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
1364
|
+
modelLoadMs: z.ZodOptional<z.ZodNumber>;
|
|
1365
|
+
stepMs: z.ZodOptional<z.ZodNumber>;
|
|
1366
|
+
totalStepMs: z.ZodOptional<z.ZodNumber>;
|
|
1367
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
1368
|
+
totalFrames: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
+
frames: z.ZodOptional<z.ZodNumber>;
|
|
1370
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1371
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1372
|
+
actionMask: z.ZodOptional<z.ZodNumber>;
|
|
1373
|
+
}, z.core.$strip>>;
|
|
1374
|
+
}, z.core.$strip>;
|
|
1375
|
+
export type WorldStepStreamResponse = z.infer<typeof worldStepStreamResponseSchema>;
|
|
1376
|
+
/**
|
|
1377
|
+
* Per-axis ceiling for a generated world. Neither the SDK nor the addon bounded
|
|
1378
|
+
* these before: the addon checks only "positive multiple of 32", and the pack
|
|
1379
|
+
* ceiling in ops/world.ts runs after native generation has already allocated the
|
|
1380
|
+
* GPU buffers and written the file, so it cannot prevent the OOM.
|
|
1381
|
+
*/
|
|
1382
|
+
export declare const MAX_SCENE_DIMENSION = 4096;
|
|
1383
|
+
/**
|
|
1384
|
+
* Total pixel budget, ~1080p rounded onto the 32 grid. Bounds the product as
|
|
1385
|
+
* well as each axis, so 4096x4096 is refused even though both axes pass. The
|
|
1386
|
+
* validated 832x480 tier sits 5x under it.
|
|
1387
|
+
*/
|
|
1388
|
+
export declare const MAX_SCENE_PIXELS: number;
|
|
1389
|
+
/**
|
|
1390
|
+
* Ceiling on the ENCODED first frame — what crosses the wire, not what the
|
|
1391
|
+
* decoder allocates. Those differ by orders of magnitude for a compressed
|
|
1392
|
+
* format, so this is not the decompression-bomb guard; the declared-dimension
|
|
1393
|
+
* check in `ops/world.ts` is. This one keeps a multi-megabyte base64 string off
|
|
1394
|
+
* the worker in the first place.
|
|
1395
|
+
*
|
|
1396
|
+
* 3 MB is generous for a frame that ends up at most 1920x1088 — and it is also
|
|
1397
|
+
* the largest value this can be *enforced* at today. `BASE64_PATTERN` is a
|
|
1398
|
+
* starred quad group that both engines give up on a little above this ceiling,
|
|
1399
|
+
* but differently, and the difference matters: measured at 4.8M characters, JSC
|
|
1400
|
+
* (Bun) returns `false`, while **V8 — which is what Bare runs — THROWS
|
|
1401
|
+
* `RangeError: Maximum call stack size exceeded`**. Since Zod runs every string
|
|
1402
|
+
* check regardless of order, a larger image reaches the pattern even after
|
|
1403
|
+
* `.max()` fails, so `safeParse` throws instead of reporting `too_big`.
|
|
1404
|
+
* 3 MB decodes to 4194304 characters, inside the range that still matches on
|
|
1405
|
+
* both. The client guards the raw byte length before encoding for the same
|
|
1406
|
+
* reason (see `createWorldSceneResult`). The pattern is shared with the
|
|
1407
|
+
* diffusion, upscale and VLA image fields, so fixing it belongs in its own
|
|
1408
|
+
* change.
|
|
1409
|
+
*/
|
|
1410
|
+
export declare const MAX_SCENE_IMAGE_BYTES: number;
|
|
1411
|
+
/**
|
|
1412
|
+
* Base64 characters for `MAX_SCENE_IMAGE_BYTES`, four per three bytes. The
|
|
1413
|
+
* ceiling is enforced on the encoded length rather than the decoded one so it
|
|
1414
|
+
* costs a string compare instead of a decode — and, since padding only ever
|
|
1415
|
+
* shortens the payload, a string within this many characters can never exceed
|
|
1416
|
+
* `MAX_SCENE_IMAGE_BYTES` once decoded.
|
|
1417
|
+
*/
|
|
1418
|
+
export declare const MAX_SCENE_IMAGE_BASE64_CHARS: number;
|
|
1419
|
+
/**
|
|
1420
|
+
* Cross-field ceilings for a scene request. Kept as a named function because
|
|
1421
|
+
* both the plain and the stream request schema have to enforce it, and because
|
|
1422
|
+
* the pixel budget is a contract worth testing directly.
|
|
1423
|
+
*/
|
|
1424
|
+
export declare function refineWorldSceneBudget(value: {
|
|
1425
|
+
width?: number | undefined;
|
|
1426
|
+
height?: number | undefined;
|
|
1427
|
+
}, ctx: z.RefinementCtx): void;
|
|
1428
|
+
export declare const worldSceneRequestSchema: z.ZodObject<{
|
|
1429
|
+
modelId: z.ZodString;
|
|
1430
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
1431
|
+
prompt: z.ZodString;
|
|
1432
|
+
image: z.ZodString;
|
|
1433
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1434
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1435
|
+
returnPack: z.ZodOptional<z.ZodBoolean>;
|
|
1436
|
+
}, z.core.$strip>;
|
|
1437
|
+
export type WorldSceneRequest = z.input<typeof worldSceneRequestSchema>;
|
|
1438
|
+
export declare const worldSceneStreamRequestSchema: z.ZodObject<{
|
|
1439
|
+
type: z.ZodLiteral<"worldSceneStream">;
|
|
1440
|
+
modelId: z.ZodString;
|
|
1441
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
prompt: z.ZodString;
|
|
1443
|
+
image: z.ZodString;
|
|
1444
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1445
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1446
|
+
returnPack: z.ZodOptional<z.ZodBoolean>;
|
|
1447
|
+
}, z.core.$strip>;
|
|
1448
|
+
export type WorldSceneStreamRequest = z.input<typeof worldSceneStreamRequestSchema>;
|
|
1449
|
+
export declare const worldSceneStreamResponseSchema: z.ZodObject<{
|
|
1450
|
+
type: z.ZodLiteral<"worldSceneStream">;
|
|
1451
|
+
data: z.ZodOptional<z.ZodString>;
|
|
1452
|
+
done: z.ZodOptional<z.ZodBoolean>;
|
|
1453
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
1454
|
+
sceneCreateMs: z.ZodOptional<z.ZodNumber>;
|
|
1455
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1456
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1457
|
+
}, z.core.$strip>>;
|
|
1458
|
+
}, z.core.$strip>;
|
|
1459
|
+
export type WorldSceneStreamResponse = z.infer<typeof worldSceneStreamResponseSchema>;
|
|
1460
|
+
export type WorldStepClientParams = Omit<WorldStepRequest, 'requestId' | 'keys'> & {
|
|
1461
|
+
keys?: WalkKeysInput;
|
|
1462
|
+
};
|
|
1463
|
+
export type WorldSceneClientParams = Omit<WorldSceneRequest, 'requestId' | 'image'> & {
|
|
1464
|
+
image: Uint8Array;
|
|
1465
|
+
};
|
|
1126
1466
|
export {};
|