@qvac/sdk 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +47 -45
- package/README.md +34 -35
- package/dist/client/api/batch-completion.d.ts +15 -0
- package/dist/client/api/batch-completion.js +332 -0
- package/dist/client/api/bci-transcribe.d.ts +1 -1
- package/dist/client/api/bci-transcribe.js +31 -31
- package/dist/client/api/cancel.d.ts +1 -1
- package/dist/client/api/cancel.js +18 -18
- package/dist/client/api/classify.d.ts +1 -1
- package/dist/client/api/classify.js +9 -6
- package/dist/client/api/client-request-id.js +1 -1
- package/dist/client/api/completion-stream.d.ts +3 -3
- package/dist/client/api/completion-stream.js +18 -18
- package/dist/client/api/delete-cache.js +9 -9
- package/dist/client/api/diffusion.d.ts +1 -1
- package/dist/client/api/diffusion.js +17 -11
- package/dist/client/api/download-asset.d.ts +1 -1
- package/dist/client/api/download-asset.js +11 -11
- package/dist/client/api/embed.d.ts +1 -1
- package/dist/client/api/embed.js +10 -10
- package/dist/client/api/finetune.d.ts +1 -1
- package/dist/client/api/finetune.js +25 -27
- package/dist/client/api/get-loaded-model-info.d.ts +2 -2
- package/dist/client/api/get-loaded-model-info.js +8 -8
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/get-model-info.js +7 -7
- package/dist/client/api/heartbeat.d.ts +2 -2
- package/dist/client/api/heartbeat.js +7 -7
- package/dist/client/api/index.d.ts +33 -32
- package/dist/client/api/index.js +33 -32
- package/dist/client/api/invoke-plugin.d.ts +1 -1
- package/dist/client/api/invoke-plugin.js +10 -10
- package/dist/client/api/load-model.d.ts +1 -1
- package/dist/client/api/load-model.js +32 -32
- package/dist/client/api/logging-stream.d.ts +1 -1
- package/dist/client/api/logging-stream.js +6 -6
- package/dist/client/api/ocr.d.ts +10 -1
- package/dist/client/api/ocr.js +20 -11
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +7 -7
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +65 -66
- package/dist/client/api/registry.d.ts +1 -1
- package/dist/client/api/registry.js +8 -8
- package/dist/client/api/resume.js +5 -5
- package/dist/client/api/state.d.ts +1 -1
- package/dist/client/api/state.js +5 -5
- package/dist/client/api/stop-provider.js +6 -6
- package/dist/client/api/subscribe-logs.d.ts +1 -1
- package/dist/client/api/subscribe-logs.js +3 -3
- package/dist/client/api/suspend.js +5 -5
- package/dist/client/api/text-to-speech.d.ts +1 -1
- package/dist/client/api/text-to-speech.js +37 -39
- package/dist/client/api/transcribe.d.ts +2 -2
- package/dist/client/api/transcribe.js +44 -45
- package/dist/client/api/translate.d.ts +1 -1
- package/dist/client/api/translate.js +14 -25
- package/dist/client/api/unload-model.d.ts +1 -1
- package/dist/client/api/unload-model.js +11 -11
- package/dist/client/api/upscale.d.ts +1 -1
- package/dist/client/api/upscale.js +9 -9
- package/dist/client/api/video.d.ts +8 -5
- package/dist/client/api/video.js +23 -18
- package/dist/client/api/vla-helpers.d.ts +2 -2
- package/dist/client/api/vla-helpers.js +6 -11
- package/dist/client/api/vla.d.ts +15 -11
- package/dist/client/api/vla.js +27 -23
- package/dist/client/config-loader/config-utils.d.ts +1 -1
- package/dist/client/config-loader/config-utils.js +3 -3
- package/dist/client/config-loader/resolve-config.bare.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.bare.js +11 -11
- package/dist/client/config-loader/resolve-config.expo.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.expo.js +6 -6
- package/dist/client/config-loader/resolve-config.node.d.ts +1 -1
- package/dist/client/config-loader/resolve-config.node.js +27 -27
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/init-hooks.d.ts +1 -1
- package/dist/client/init-hooks.js +12 -12
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/logging-stream-registry.js +6 -6
- package/dist/client/parse-input.d.ts +1 -1
- package/dist/client/parse-input.js +3 -3
- package/dist/client/plugins-factory.d.ts +2 -2
- package/dist/client/plugins-factory.js +2 -2
- package/dist/client/rpc/bare-client.d.ts +2 -1
- package/dist/client/rpc/bare-client.js +37 -39
- package/dist/client/rpc/ensure-worker-ready.js +4 -4
- package/dist/client/rpc/expo-device-info.d.ts +1 -1
- package/dist/client/rpc/expo-device-info.js +11 -11
- package/dist/client/rpc/expo-rpc-client.d.ts +2 -1
- package/dist/client/rpc/expo-rpc-client.js +38 -47
- package/dist/client/rpc/node-rpc-client.d.ts +2 -1
- package/dist/client/rpc/node-rpc-client.js +103 -75
- package/dist/client/rpc/profiling/index.d.ts +1 -1
- package/dist/client/rpc/profiling/index.js +1 -1
- package/dist/client/rpc/profiling/profiler.d.ts +2 -2
- package/dist/client/rpc/profiling/profiler.js +31 -34
- package/dist/client/rpc/rpc-client.d.ts +2 -2
- package/dist/client/rpc/rpc-client.js +113 -72
- package/dist/client/rpc/rpc-error.d.ts +1 -1
- package/dist/client/rpc/rpc-error.js +19 -13
- package/dist/commands/bundle/bare-pack.d.ts +1 -1
- package/dist/commands/bundle/bare-pack.js +20 -20
- package/dist/commands/bundle/constants.js +21 -21
- package/dist/commands/bundle/entry-gen.js +4 -4
- package/dist/commands/bundle/index.js +45 -47
- package/dist/commands/bundle/manifest.d.ts +1 -1
- package/dist/commands/bundle/manifest.js +44 -46
- package/dist/commands/bundle/plugins.d.ts +2 -2
- package/dist/commands/bundle/plugins.js +7 -7
- package/dist/commands/bundle/resolve-sdk-import.js +6 -13
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +2 -2
- package/dist/commands/verify/abi.d.ts +9 -9
- package/dist/commands/verify/abi.js +31 -31
- package/dist/commands/verify/addon-source.d.ts +1 -1
- package/dist/commands/verify/addon-source.js +13 -14
- package/dist/commands/verify/bundle-source.d.ts +1 -1
- package/dist/commands/verify/bundle-source.js +7 -7
- package/dist/commands/verify/index.d.ts +3 -3
- package/dist/commands/verify/index.js +18 -17
- package/dist/commands/verify/node-modules-source.d.ts +1 -1
- package/dist/commands/verify/node-modules-source.js +11 -11
- package/dist/commands/verify/prebuilds.d.ts +3 -3
- package/dist/commands/verify/prebuilds.js +8 -8
- package/dist/constants/audio.d.ts +1 -1
- package/dist/constants/audio.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/constants/registry.js +1 -1
- package/dist/examples/audio/mic-input.d.ts +1 -1
- package/dist/examples/audio/mic-input.js +31 -31
- package/dist/examples/batch-completion.d.ts +38 -0
- package/dist/examples/batch-completion.js +100 -0
- package/dist/examples/bci/bci-filesystem-streaming.js +20 -20
- package/dist/examples/bci/bci-filesystem.js +17 -17
- package/dist/examples/cache-management.js +32 -32
- package/dist/examples/cancel-by-request-id.js +11 -11
- package/dist/examples/classification/classify-image.js +5 -5
- package/dist/examples/completion-events.js +16 -18
- package/dist/examples/completion-stop-reason.js +13 -13
- package/dist/examples/concurrent-completion-collision.js +20 -20
- package/dist/examples/config/blind-relay/blind-relay.config.js +4 -4
- package/dist/examples/config/default/default.config.js +2 -2
- package/dist/examples/config/plugins/plugins.config.js +2 -2
- package/dist/examples/config-reload.js +14 -14
- package/dist/examples/default-config-usage.js +10 -13
- package/dist/examples/delegated-inference/composite.js +23 -23
- package/dist/examples/delegated-inference/consumer-profiled.js +19 -19
- package/dist/examples/delegated-inference/consumer.js +11 -11
- package/dist/examples/delegated-inference/provider.js +24 -24
- package/dist/examples/diffusion-esrgan-upscale.js +19 -19
- package/dist/examples/diffusion-flux2-klein-img2img.js +17 -17
- package/dist/examples/diffusion-flux2-klein.js +14 -14
- package/dist/examples/diffusion-ideogram.d.ts +2 -0
- package/dist/examples/diffusion-ideogram.js +108 -0
- package/dist/examples/diffusion-img2img.js +13 -13
- package/dist/examples/diffusion-img2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-img2vid-ltx.js +98 -0
- package/dist/examples/diffusion-img2vid.js +22 -23
- package/dist/examples/diffusion-simple.js +7 -7
- package/dist/examples/diffusion-txt2img.js +13 -14
- package/dist/examples/diffusion-txt2vid-ltx.d.ts +2 -0
- package/dist/examples/diffusion-txt2vid-ltx.js +92 -0
- package/dist/examples/diffusion-txt2vid.js +18 -18
- package/dist/examples/download-with-blind-relays.js +7 -8
- package/dist/examples/download-with-cancel.js +9 -9
- package/dist/examples/embed-multi-gpu.js +9 -9
- package/dist/examples/embed-p2p.js +24 -24
- package/dist/examples/finetune/llamacpp-finetune.js +21 -21
- package/dist/examples/kv-cache-cleanup.js +34 -34
- package/dist/examples/kv-cache-custom-key.js +30 -30
- package/dist/examples/kv-cache-example.js +18 -20
- package/dist/examples/llamacpp-cache.js +33 -33
- package/dist/examples/llamacpp-dynamic-tools.js +38 -38
- package/dist/examples/llamacpp-filesystem.js +13 -15
- package/dist/examples/llamacpp-http.js +12 -14
- package/dist/examples/llamacpp-multi-gpu.js +12 -12
- package/dist/examples/llamacpp-multimodal.js +16 -16
- package/dist/examples/llamacpp-p2p.js +11 -11
- package/dist/examples/llamacpp-sharded.js +12 -12
- package/dist/examples/llamacpp-structured-output.js +37 -37
- package/dist/examples/logging-file-transport.js +19 -21
- package/dist/examples/logging-global.js +8 -8
- package/dist/examples/logging-streaming.js +19 -17
- package/dist/examples/mcp-websearch.js +44 -44
- package/dist/examples/multi-model-demo.js +33 -33
- package/dist/examples/ocr-fasttext.js +17 -17
- package/dist/examples/parallel-download.js +11 -13
- package/dist/examples/plugins.js +43 -43
- package/dist/examples/profiling/basic.js +34 -36
- package/dist/examples/profiling/per-call.js +16 -16
- package/dist/examples/quickstart.bare.js +4 -6
- package/dist/examples/quickstart.js +7 -7
- package/dist/examples/rag/rag-chromadb.js +26 -26
- package/dist/examples/rag/rag-hyperdb/cancellation.js +19 -20
- package/dist/examples/rag/rag-hyperdb/ingest.js +19 -19
- package/dist/examples/rag/rag-hyperdb/pipeline.js +26 -26
- package/dist/examples/rag/rag-hyperdb/workspaces.js +46 -46
- package/dist/examples/rag/rag-lancedb.js +29 -32
- package/dist/examples/rag/rag-sqlite.js +25 -25
- package/dist/examples/registry-query.js +15 -15
- package/dist/examples/seed-p2p.js +8 -8
- package/dist/examples/suspend-resume.js +20 -20
- package/dist/examples/tools/llamacpp-native-tools.js +25 -25
- package/dist/examples/tools/llamacpp-tools-gemma4.js +14 -14
- package/dist/examples/tools/llamacpp-tools-harmony-multiturn.js +15 -15
- package/dist/examples/tools/llamacpp-tools-pythonic.js +15 -15
- package/dist/examples/tools/llamacpp-tools-qwen35.js +14 -14
- package/dist/examples/tools/shared.d.ts +2 -2
- package/dist/examples/tools/shared.js +17 -17
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +12 -12
- package/dist/examples/transcription/parakeet-microphone-record.js +19 -19
- package/dist/examples/transcription/parakeet-microphone-stream.js +23 -23
- package/dist/examples/transcription/parakeet-sortformer-streaming.js +18 -28
- package/dist/examples/transcription/parakeet-sortformer.js +21 -21
- package/dist/examples/transcription/parakeet-tdt-filesystem-chunked.d.ts +2 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem-chunked.js +203 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +13 -13
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +34 -34
- package/dist/examples/transcription/whispercpp-filesystem.js +19 -19
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +27 -27
- package/dist/examples/transcription/whispercpp-microphone-record.js +21 -21
- package/dist/examples/transcription/whispercpp-prompt.js +18 -18
- package/dist/examples/translation/translation-bergamot-batch.js +17 -17
- package/dist/examples/translation/translation-bergamot-pivot.js +16 -16
- package/dist/examples/translation/translation-bergamot.js +11 -11
- package/dist/examples/translation/translation-indic.js +10 -10
- package/dist/examples/translation/translation-llm-afriquegemma.js +10 -10
- package/dist/examples/translation/translation-llm-context.js +10 -10
- package/dist/examples/translation/translation-llm.js +13 -13
- package/dist/examples/translation/translation-stream.js +11 -11
- package/dist/examples/tts/chatterbox-enhanced.d.ts +2 -0
- package/dist/examples/tts/chatterbox-enhanced.js +55 -0
- package/dist/examples/tts/chatterbox-multilingual.d.ts +2 -0
- package/dist/examples/tts/chatterbox-multilingual.js +54 -0
- package/dist/examples/tts/chatterbox.js +18 -18
- package/dist/examples/tts/llm-to-tts-streaming.js +30 -30
- package/dist/examples/tts/supertonic-enhanced.d.ts +2 -0
- package/dist/examples/tts/supertonic-enhanced.js +57 -0
- package/dist/examples/tts/supertonic-multilingual.js +19 -19
- package/dist/examples/tts/supertonic.js +18 -18
- package/dist/examples/tts/utils.js +24 -32
- package/dist/examples/vla-groot.d.ts +2 -0
- package/dist/examples/vla-groot.js +118 -0
- package/dist/examples/vla-pi05.js +14 -14
- package/dist/examples/vla-smolvla.js +14 -14
- package/dist/examples/voice-assistant/voice-assistant.js +46 -46
- package/dist/expo/plugins/find-in-ancestor-node-modules.js +3 -3
- package/dist/expo/plugins/get-project-root.d.ts +2 -2
- package/dist/expo/plugins/get-project-root.js +1 -1
- package/dist/expo/plugins/index.d.ts +11 -11
- package/dist/expo/plugins/index.js +10 -10
- package/dist/expo/plugins/resolve-sdk-package-dir.js +7 -11
- package/dist/expo/plugins/withAndroidArchitecture.d.ts +1 -1
- package/dist/expo/plugins/withAndroidArchitecture.js +12 -12
- package/dist/expo/plugins/withAndroidNdkVersion.d.ts +1 -1
- package/dist/expo/plugins/withAndroidNdkVersion.js +9 -9
- package/dist/expo/plugins/withDeviceInfo.d.ts +1 -1
- package/dist/expo/plugins/withDeviceInfo.js +13 -13
- package/dist/expo/plugins/withMobileBundle.d.ts +1 -1
- package/dist/expo/plugins/withMobileBundle.js +34 -42
- package/dist/expo/plugins/withOpenCL.d.ts +1 -1
- package/dist/expo/plugins/withOpenCL.js +14 -16
- package/dist/expo/plugins/withQvacSDK.d.ts +1 -1
- package/dist/expo/plugins/withQvacSDK.js +12 -12
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -17
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +13 -13
- package/dist/logging/base-logger.d.ts +2 -2
- package/dist/logging/base-logger.js +6 -6
- package/dist/logging/client-logger.d.ts +1 -1
- package/dist/logging/client-logger.js +3 -3
- package/dist/logging/index.d.ts +9 -9
- package/dist/logging/index.js +8 -8
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +4 -4
- package/dist/logging/namespaces.d.ts +1 -1
- package/dist/logging/namespaces.js +5 -5
- package/dist/logging/registry.d.ts +2 -2
- package/dist/logging/registry.js +3 -3
- package/dist/logging/server-logger.d.ts +1 -1
- package/dist/logging/server-logger.js +2 -2
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/stream-logger.js +4 -4
- package/dist/logging/transport.d.ts +1 -1
- package/dist/logging/types.d.ts +1 -1
- package/dist/logging/utils.d.ts +2 -2
- package/dist/logging/utils.js +40 -41
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +5 -5
- package/dist/models/registry/models.d.ts +5622 -9241
- package/dist/models/registry/models.js +13215 -17030
- package/dist/models/update-models/codegen.d.ts +1 -1
- package/dist/models/update-models/codegen.js +8 -8
- package/dist/models/update-models/companions.d.ts +6 -1
- package/dist/models/update-models/companions.js +104 -39
- package/dist/models/update-models/history.d.ts +1 -1
- package/dist/models/update-models/history.js +11 -11
- package/dist/models/update-models/index.js +32 -34
- package/dist/models/update-models/naming.d.ts +2 -2
- package/dist/models/update-models/naming.js +181 -186
- package/dist/models/update-models/processing.d.ts +2 -2
- package/dist/models/update-models/processing.js +17 -19
- package/dist/models/update-models/registry.d.ts +2 -2
- package/dist/models/update-models/registry.js +9 -9
- package/dist/models/update-models/shards.d.ts +1 -1
- package/dist/models/update-models/shards.js +3 -3
- package/dist/models/update-models/types.d.ts +1 -1
- package/dist/models/update-models/utils.js +5 -5
- package/dist/pear/pre.js +84 -84
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +6 -6
- package/dist/profiling/clock.d.ts +1 -1
- package/dist/profiling/clock.js +10 -10
- package/dist/profiling/controller.d.ts +2 -2
- package/dist/profiling/controller.js +11 -12
- package/dist/profiling/envelope.d.ts +1 -1
- package/dist/profiling/envelope.js +4 -6
- package/dist/profiling/events.d.ts +2 -2
- package/dist/profiling/events.js +8 -10
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +81 -79
- package/dist/profiling/index.d.ts +8 -8
- package/dist/profiling/index.js +7 -7
- package/dist/profiling/model-execution.js +2 -1
- package/dist/profiling/ring-buffer.js +2 -2
- package/dist/profiling/types.d.ts +3 -3
- package/dist/schemas/archive.d.ts +1 -1
- package/dist/schemas/archive.js +8 -14
- package/dist/schemas/batch-completion-stream.d.ts +463 -0
- package/dist/schemas/batch-completion-stream.js +124 -0
- package/dist/schemas/bci-config.d.ts +1 -1
- package/dist/schemas/bci-config.js +7 -7
- package/dist/schemas/bci.d.ts +3 -3
- package/dist/schemas/bci.js +25 -31
- package/dist/schemas/cancel.d.ts +6 -1
- package/dist/schemas/cancel.js +33 -34
- package/dist/schemas/classification.d.ts +1 -1
- package/dist/schemas/classification.js +7 -7
- package/dist/schemas/common.d.ts +578 -28
- package/dist/schemas/common.js +42 -37
- package/dist/schemas/completion-event.d.ts +11 -8
- package/dist/schemas/completion-event.js +27 -26
- package/dist/schemas/completion-stream.d.ts +190 -5
- package/dist/schemas/completion-stream.js +118 -67
- package/dist/schemas/constants-registry.d.ts +67 -0
- package/dist/schemas/constants-registry.js +51 -0
- package/dist/schemas/delegate.d.ts +1 -1
- package/dist/schemas/delegate.js +7 -7
- package/dist/schemas/delete-cache.d.ts +1 -1
- package/dist/schemas/delete-cache.js +15 -11
- package/dist/schemas/download-asset.d.ts +2 -2
- package/dist/schemas/download-asset.js +21 -21
- package/dist/schemas/embed.d.ts +3 -3
- package/dist/schemas/embed.js +16 -27
- package/dist/schemas/engine-addon-map.d.ts +3 -2
- package/dist/schemas/engine-addon-map.js +25 -25
- package/dist/schemas/error.d.ts +1 -1
- package/dist/schemas/error.js +12 -13
- package/dist/schemas/finetune.d.ts +1 -1
- package/dist/schemas/finetune.js +41 -44
- package/dist/schemas/get-loaded-model-info.d.ts +17 -1
- package/dist/schemas/get-loaded-model-info.js +22 -14
- package/dist/schemas/get-model-info.d.ts +1 -1
- package/dist/schemas/get-model-info.js +48 -91
- package/dist/schemas/heartbeat.d.ts +1 -1
- package/dist/schemas/heartbeat.js +6 -6
- package/dist/schemas/index.d.ts +52 -51
- package/dist/schemas/index.js +52 -51
- package/dist/schemas/json-schema.d.ts +1 -1
- package/dist/schemas/llamacpp-config.d.ts +57 -29
- package/dist/schemas/llamacpp-config.js +43 -35
- package/dist/schemas/load-model.d.ts +1537 -185
- package/dist/schemas/load-model.js +126 -129
- package/dist/schemas/logging-stream.d.ts +1 -1
- package/dist/schemas/logging-stream.js +6 -12
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-src-utils.d.ts +1 -1
- package/dist/schemas/model-src-utils.js +13 -13
- package/dist/schemas/model-types.d.ts +1 -1
- package/dist/schemas/model-types.js +27 -27
- package/dist/schemas/ocr.d.ts +1 -1
- package/dist/schemas/ocr.js +18 -18
- package/dist/schemas/path-validation.d.ts +1 -1
- package/dist/schemas/path-validation.js +4 -4
- package/dist/schemas/plugin.d.ts +13 -14
- package/dist/schemas/plugin.js +51 -51
- package/dist/schemas/profiling.d.ts +1 -1
- package/dist/schemas/profiling.js +16 -16
- package/dist/schemas/provide.d.ts +1 -1
- package/dist/schemas/provide.js +8 -8
- package/dist/schemas/rag.d.ts +3 -3
- package/dist/schemas/rag.js +65 -70
- package/dist/schemas/registry.d.ts +1 -1
- package/dist/schemas/registry.js +44 -66
- package/dist/schemas/reload-config.d.ts +1 -1
- package/dist/schemas/reload-config.js +16 -18
- package/dist/schemas/resume.d.ts +1 -1
- package/dist/schemas/resume.js +3 -3
- package/dist/schemas/runtime-context.d.ts +1 -1
- package/dist/schemas/runtime-context.js +4 -4
- package/dist/schemas/sdcpp-config.d.ts +248 -9
- package/dist/schemas/sdcpp-config.js +395 -291
- package/dist/schemas/sdk-config.d.ts +833 -71
- package/dist/schemas/sdk-config.js +25 -29
- package/dist/schemas/sdk-errors-client.d.ts +1 -1
- package/dist/schemas/sdk-errors-client.js +80 -80
- package/dist/schemas/sdk-errors-registry.js +1 -1
- package/dist/schemas/sdk-errors-server.d.ts +1 -1
- package/dist/schemas/sdk-errors-server.js +202 -199
- package/dist/schemas/shard.d.ts +1 -1
- package/dist/schemas/shard.js +4 -4
- package/dist/schemas/state.d.ts +1 -1
- package/dist/schemas/state.js +5 -10
- package/dist/schemas/stop-provide.d.ts +1 -1
- package/dist/schemas/stop-provide.js +4 -4
- package/dist/schemas/suspend.d.ts +1 -1
- package/dist/schemas/suspend.js +3 -3
- package/dist/schemas/text-to-speech.d.ts +469 -3
- package/dist/schemas/text-to-speech.js +151 -109
- package/dist/schemas/tools.d.ts +2 -2
- package/dist/schemas/tools.js +18 -24
- package/dist/schemas/transcription-config.d.ts +1 -1
- package/dist/schemas/transcription-config.js +18 -18
- package/dist/schemas/transcription.d.ts +5 -5
- package/dist/schemas/transcription.js +31 -33
- package/dist/schemas/translate.d.ts +3 -3
- package/dist/schemas/translate.js +49 -72
- package/dist/schemas/translation-config.d.ts +1 -1
- package/dist/schemas/translation-config.js +116 -123
- package/dist/schemas/unload-model.d.ts +1 -1
- package/dist/schemas/unload-model.js +6 -6
- package/dist/schemas/vla.d.ts +11 -1
- package/dist/schemas/vla.js +52 -32
- package/dist/scripts/contract/build-contract.d.ts +38 -0
- package/dist/scripts/contract/build-contract.js +620 -0
- package/dist/scripts/contract/build-error-codes.d.ts +17 -0
- package/dist/scripts/contract/build-error-codes.js +17 -0
- package/dist/scripts/contract/build-model-type-maps.d.ts +22 -0
- package/dist/scripts/contract/build-model-type-maps.js +16 -0
- package/dist/scripts/contract/build-models-registry.d.ts +17 -0
- package/dist/scripts/contract/build-models-registry.js +31 -0
- package/dist/scripts/contract/plugin-contract.d.ts +23 -0
- package/dist/scripts/contract/plugin-contract.js +28 -0
- package/dist/scripts/export-contract.d.ts +2 -0
- package/dist/scripts/export-contract.js +27 -0
- package/dist/scripts/export-plugin-contract.d.ts +2 -0
- package/dist/scripts/export-plugin-contract.js +18 -0
- package/dist/scripts/run-security-tests.js +9 -10
- package/dist/scripts/run-unit-tests.js +11 -12
- package/dist/server/bare/delegate-connect-diagnostics.js +13 -19
- package/dist/server/bare/delegate-rpc-client.d.ts +2 -2
- package/dist/server/bare/delegate-rpc-client.js +32 -34
- package/dist/server/bare/hyperswarm.d.ts +3 -3
- package/dist/server/bare/hyperswarm.js +14 -14
- package/dist/server/bare/ops/bci-transcribe.d.ts +1 -1
- package/dist/server/bare/ops/bci-transcribe.js +44 -44
- package/dist/server/bare/ops/cancel.d.ts +2 -2
- package/dist/server/bare/ops/cancel.js +6 -6
- package/dist/server/bare/ops/embed.d.ts +1 -1
- package/dist/server/bare/ops/embed.js +26 -16
- package/dist/server/bare/ops/kv-cache-utils.d.ts +1 -1
- package/dist/server/bare/ops/kv-cache-utils.js +17 -19
- package/dist/server/bare/ops/load-model.d.ts +2 -2
- package/dist/server/bare/ops/load-model.js +14 -18
- package/dist/server/bare/ops/transcribe.d.ts +3 -3
- package/dist/server/bare/ops/transcribe.js +62 -62
- package/dist/server/bare/ops/translate.d.ts +1 -1
- package/dist/server/bare/ops/translate.js +53 -31
- package/dist/server/bare/ops/unload-model.d.ts +1 -1
- package/dist/server/bare/ops/unload-model.js +12 -12
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +2 -2
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +3 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +4 -3
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +33 -33
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +1 -1
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/ops/classify.js +8 -8
- package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-classification/plugin.js +14 -14
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/ops/ocr-stream.js +27 -26
- package/dist/server/bare/plugins/ggml-ocr/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +33 -54
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.d.ts +6 -0
- package/dist/server/bare/plugins/ggml-ocr/resolve-config.js +73 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.js +3 -3
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +1 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +23 -23
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +6 -1
- package/dist/server/bare/plugins/ggml-vla/plugin.js +15 -15
- package/dist/server/bare/plugins/index.d.ts +11 -11
- package/dist/server/bare/plugins/index.js +11 -11
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.d.ts +23 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.js +30 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.d.ts +32 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +99 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +8 -8
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +3 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +4 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +22 -4
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +65 -80
- package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +5 -5
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +2 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +34 -34
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +7 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +19 -23
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +8 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +12 -6
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +193 -19
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +235 -70
- package/dist/server/bare/plugins/llamacpp-completion/transform.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +15 -15
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +9 -4
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +27 -29
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +38 -39
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.d.ts +1 -1
- package/dist/server/bare/plugins/nmtcpp-translation/resolve-vocab.js +19 -22
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +36 -36
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +15 -17
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.d.ts +1 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/upscale.js +11 -11
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +3 -1
- package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +71 -44
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +132 -4
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +148 -70
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech-stream.js +19 -21
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.d.ts +2 -2
- package/dist/server/bare/plugins/tts-ggml/ops/text-to-speech.js +18 -34
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +9 -2
- package/dist/server/bare/plugins/tts-ggml/plugin.js +97 -49
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +52 -52
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +4 -4
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +5 -5
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +2 -2
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +3 -3
- package/dist/server/bare/rag-hyperdb/handlers/search.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +3 -3
- package/dist/server/bare/rag-hyperdb/index.d.ts +11 -11
- package/dist/server/bare/rag-hyperdb/index.js +11 -11
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +3 -3
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +20 -20
- package/dist/server/bare/registry/config-registry.d.ts +1 -1
- package/dist/server/bare/registry/config-registry.js +13 -16
- package/dist/server/bare/registry/logging-stream-registry.d.ts +1 -1
- package/dist/server/bare/registry/logging-stream-registry.js +2 -2
- package/dist/server/bare/registry/model-config-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-config-registry.js +6 -6
- package/dist/server/bare/registry/model-config-utils.d.ts +2 -2
- package/dist/server/bare/registry/model-config-utils.js +35 -35
- package/dist/server/bare/registry/model-registry.d.ts +3 -3
- package/dist/server/bare/registry/model-registry.js +11 -11
- package/dist/server/bare/registry/registry-client.d.ts +1 -1
- package/dist/server/bare/registry/registry-client.js +18 -18
- package/dist/server/bare/registry/runtime-context-registry.d.ts +1 -1
- package/dist/server/bare/registry/runtime-context-registry.js +3 -3
- package/dist/server/bare/runtime/disposable-scope.js +3 -3
- package/dist/server/bare/runtime/index.d.ts +7 -7
- package/dist/server/bare/runtime/index.js +3 -3
- package/dist/server/bare/runtime/request-context.d.ts +4 -4
- package/dist/server/bare/runtime/request-id.js +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.d.ts +1 -1
- package/dist/server/bare/runtime/request-registry-singleton.js +23 -4
- package/dist/server/bare/runtime/request-registry.d.ts +27 -12
- package/dist/server/bare/runtime/request-registry.js +39 -34
- package/dist/server/bare/runtime/with-request-context.d.ts +1 -1
- package/dist/server/bare/runtime/with-request-context.js +11 -11
- package/dist/server/bare/runtime-lifecycle.d.ts +1 -1
- package/dist/server/bare/runtime-lifecycle.js +27 -31
- package/dist/server/bare/types/addon-responses.d.ts +7 -4
- package/dist/server/bare/utils/audio-input.d.ts +2 -2
- package/dist/server/bare/utils/audio-input.js +7 -7
- package/dist/server/bare/utils/transcribe-metadata.d.ts +1 -1
- package/dist/server/bare/utils/transcribe-metadata.js +4 -4
- package/dist/server/bare/utils/tts-stats.d.ts +9 -5
- package/dist/server/bare/utils/tts-stats.js +8 -2
- package/dist/server/env.js +8 -8
- package/dist/server/error-handlers.d.ts +3 -3
- package/dist/server/error-handlers.js +11 -11
- package/dist/server/plugins/index.d.ts +1 -1
- package/dist/server/plugins/index.js +1 -1
- package/dist/server/plugins/registry.d.ts +1 -1
- package/dist/server/plugins/registry.js +12 -14
- package/dist/server/rpc/create-server.d.ts +1 -1
- package/dist/server/rpc/create-server.js +34 -13
- package/dist/server/rpc/delegate-transport.d.ts +3 -3
- package/dist/server/rpc/delegate-transport.js +43 -44
- package/dist/server/rpc/handle-request.d.ts +1 -1
- package/dist/server/rpc/handle-request.js +28 -30
- package/dist/server/rpc/handler-registry.d.ts +1 -1
- package/dist/server/rpc/handler-registry.js +102 -92
- package/dist/server/rpc/handler-selection.d.ts +3 -3
- package/dist/server/rpc/handler-selection.js +3 -3
- package/dist/server/rpc/handler-utils.d.ts +7 -7
- package/dist/server/rpc/handler-utils.js +32 -35
- package/dist/server/rpc/handlers/batch-completion-stream.d.ts +78 -0
- package/dist/server/rpc/handlers/batch-completion-stream.js +4 -0
- package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/bci-transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/bci-transcribe.js +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/cancel-delegated.js +13 -13
- package/dist/server/rpc/handlers/cancelHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/cancelHandler.js +11 -11
- package/dist/server/rpc/handlers/classify.d.ts +1 -1
- package/dist/server/rpc/handlers/classify.js +2 -2
- package/dist/server/rpc/handlers/completion-orchestrate.d.ts +42 -0
- package/dist/server/rpc/handlers/completion-orchestrate.js +190 -0
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/completion-stream-delegated.js +14 -14
- package/dist/server/rpc/handlers/completion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/completion-stream.js +2 -2
- package/dist/server/rpc/handlers/delete-cache.d.ts +1 -1
- package/dist/server/rpc/handlers/delete-cache.js +10 -10
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/diffusion-stream.js +2 -2
- package/dist/server/rpc/handlers/download-asset.d.ts +1 -1
- package/dist/server/rpc/handlers/download-asset.js +20 -20
- package/dist/server/rpc/handlers/embed.d.ts +1 -1
- package/dist/server/rpc/handlers/embed.js +2 -2
- package/dist/server/rpc/handlers/finetune.d.ts +1 -1
- package/dist/server/rpc/handlers/finetune.js +8 -6
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-loaded-model-info.js +15 -9
- package/dist/server/rpc/handlers/get-model-info.d.ts +1 -1
- package/dist/server/rpc/handlers/get-model-info.js +20 -20
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/heartbeat-delegated.js +7 -7
- package/dist/server/rpc/handlers/heartbeat.d.ts +1 -1
- package/dist/server/rpc/handlers/heartbeat.js +1 -1
- package/dist/server/rpc/handlers/index.d.ts +35 -31
- package/dist/server/rpc/handlers/index.js +36 -32
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +4 -4
- package/dist/server/rpc/handlers/load-model/download-manager.js +19 -17
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/download-stats.js +9 -11
- package/dist/server/rpc/handlers/load-model/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/handler.js +42 -43
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/http.js +100 -107
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +72 -74
- package/dist/server/rpc/handlers/load-model/index.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/index.js +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/registry-client-options.js +2 -3
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +5 -5
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +19 -21
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +6 -6
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +16 -18
- package/dist/server/rpc/handlers/load-model/registry-metadata.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry-metadata.js +23 -0
- package/dist/server/rpc/handlers/load-model/registry.d.ts +4 -3
- package/dist/server/rpc/handlers/load-model/registry.js +50 -56
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve-session.js +7 -7
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +36 -35
- package/dist/server/rpc/handlers/load-model/types.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/types.js +7 -7
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model-delegated.js +31 -30
- package/dist/server/rpc/handlers/logging-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/logging-stream.js +3 -3
- package/dist/server/rpc/handlers/ocr-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/ocr-stream.js +2 -2
- package/dist/server/rpc/handlers/plugin-dispatch.js +9 -9
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +1 -1
- package/dist/server/rpc/handlers/plugin-invoke.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/connection.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/connection.js +16 -16
- package/dist/server/rpc/handlers/provideHandler/handler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/handler.js +18 -18
- package/dist/server/rpc/handlers/provideHandler/proxy.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler/proxy.js +11 -11
- package/dist/server/rpc/handlers/provideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/provideHandler.js +1 -1
- package/dist/server/rpc/handlers/rag.d.ts +1 -1
- package/dist/server/rpc/handlers/rag.js +50 -50
- package/dist/server/rpc/handlers/registry.d.ts +1 -1
- package/dist/server/rpc/handlers/registry.js +34 -36
- package/dist/server/rpc/handlers/resume.d.ts +1 -1
- package/dist/server/rpc/handlers/resume.js +3 -3
- package/dist/server/rpc/handlers/state.d.ts +1 -1
- package/dist/server/rpc/handlers/state.js +3 -3
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +1 -1
- package/dist/server/rpc/handlers/stopProvideHandler.js +7 -7
- package/dist/server/rpc/handlers/suspend.d.ts +1 -1
- package/dist/server/rpc/handlers/suspend.js +3 -3
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech-stream.js +2 -2
- package/dist/server/rpc/handlers/text-to-speech.d.ts +1 -1
- package/dist/server/rpc/handlers/text-to-speech.js +2 -2
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe.js +2 -2
- package/dist/server/rpc/handlers/translate.d.ts +1 -1
- package/dist/server/rpc/handlers/translate.js +2 -2
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model-delegated.js +10 -10
- package/dist/server/rpc/handlers/unload-model.d.ts +1 -1
- package/dist/server/rpc/handlers/unload-model.js +10 -10
- package/dist/server/rpc/handlers/upscale-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/upscale-stream.js +2 -2
- package/dist/server/rpc/handlers/video-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/video-stream.js +2 -2
- package/dist/server/rpc/index.d.ts +2 -2
- package/dist/server/rpc/index.js +2 -2
- package/dist/server/rpc/method-shapes.d.ts +51 -0
- package/dist/server/rpc/method-shapes.js +48 -0
- package/dist/server/rpc/profiling/context.d.ts +1 -1
- package/dist/server/rpc/profiling/context.js +9 -10
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/delegation-profiler.js +23 -24
- package/dist/server/rpc/profiling/index.d.ts +4 -4
- package/dist/server/rpc/profiling/index.js +4 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +2 -2
- package/dist/server/rpc/profiling/operation-metrics.js +122 -102
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +16 -14
- package/dist/server/rpc/profiling/profiler.d.ts +2 -2
- package/dist/server/rpc/profiling/profiler.js +9 -13
- package/dist/server/rpc/rpc-utils.js +1 -4
- package/dist/server/rpc/transport-selector.d.ts +1 -1
- package/dist/server/rpc/transport-selector.js +4 -4
- package/dist/server/utils/archive.js +27 -29
- package/dist/server/utils/audio/decoder.d.ts +2 -2
- package/dist/server/utils/audio/decoder.js +11 -11
- package/dist/server/utils/cache/auto-history.d.ts +1 -1
- package/dist/server/utils/cache/auto-history.js +15 -11
- package/dist/server/utils/cache/paths.d.ts +2 -2
- package/dist/server/utils/cache/paths.js +14 -14
- package/dist/server/utils/checksum.d.ts +1 -1
- package/dist/server/utils/checksum.js +10 -12
- package/dist/server/utils/clear-storage.d.ts +1 -1
- package/dist/server/utils/clear-storage.js +8 -11
- package/dist/server/utils/completion-normalizer.d.ts +1 -1
- package/dist/server/utils/completion-normalizer.js +106 -113
- package/dist/server/utils/config-transform.d.ts +1 -1
- package/dist/server/utils/config-transform.js +2 -2
- package/dist/server/utils/expand-gguf-shards.js +4 -4
- package/dist/server/utils/formatting.js +6 -12
- package/dist/server/utils/gguf-tensor-extractor.js +17 -21
- package/dist/server/utils/index.d.ts +11 -11
- package/dist/server/utils/index.js +11 -11
- package/dist/server/utils/multi-gpu-mobile.js +1 -1
- package/dist/server/utils/path-security.d.ts +1 -1
- package/dist/server/utils/path-security.js +6 -6
- package/dist/server/utils/qvac-paths.js +3 -3
- package/dist/server/utils/response-format.d.ts +1 -1
- package/dist/server/utils/response-format.js +4 -4
- package/dist/server/utils/shard-utils.d.ts +1 -1
- package/dist/server/utils/shard-utils.js +14 -16
- package/dist/server/utils/tool-integration.d.ts +1 -1
- package/dist/server/utils/tool-integration.js +5 -9
- package/dist/server/utils/tools/dialect.d.ts +1 -1
- package/dist/server/utils/tools/dialect.js +7 -7
- package/dist/server/utils/tools/index.d.ts +2 -2
- package/dist/server/utils/tools/index.js +2 -2
- package/dist/server/utils/tools/parser.d.ts +1 -1
- package/dist/server/utils/tools/parser.js +14 -14
- package/dist/server/utils/tools/parsers/gemma4native.d.ts +2 -2
- package/dist/server/utils/tools/parsers/gemma4native.js +13 -8
- package/dist/server/utils/tools/parsers/harmony.d.ts +2 -2
- package/dist/server/utils/tools/parsers/harmony.js +9 -11
- package/dist/server/utils/tools/parsers/hermes.d.ts +2 -2
- package/dist/server/utils/tools/parsers/hermes.js +16 -16
- package/dist/server/utils/tools/parsers/json.d.ts +2 -2
- package/dist/server/utils/tools/parsers/json.js +14 -14
- package/dist/server/utils/tools/parsers/pythonic.d.ts +2 -2
- package/dist/server/utils/tools/parsers/pythonic.js +43 -43
- package/dist/server/utils/tools/parsers/qwen35.d.ts +2 -2
- package/dist/server/utils/tools/parsers/qwen35.js +20 -20
- package/dist/server/utils/tools/shared.d.ts +1 -1
- package/dist/server/utils/tools/shared.js +10 -12
- package/dist/server/utils/worker-lock.js +10 -10
- package/dist/server/worker-core.d.ts +1 -1
- package/dist/server/worker-core.js +44 -43
- package/dist/server/worker.js +9 -9
- package/dist/utils/aggregate-events.d.ts +2 -2
- package/dist/utils/aggregate-events.js +17 -19
- package/dist/utils/cache-normalize.js +1 -4
- package/dist/utils/encoding.js +1 -1
- package/dist/utils/errors-base.d.ts +1 -1
- package/dist/utils/errors-base.js +1 -1
- package/dist/utils/errors-client.d.ts +1 -1
- package/dist/utils/errors-client.js +5 -5
- package/dist/utils/errors-server.d.ts +3 -3
- package/dist/utils/errors-server.js +19 -18
- package/dist/utils/load-model-validation.js +3 -3
- package/dist/utils/mcp-adapter.d.ts +4 -4
- package/dist/utils/mcp-adapter.js +31 -38
- package/dist/utils/path-sanitize.js +14 -17
- package/dist/utils/tool-helpers.d.ts +2 -2
- package/dist/utils/tool-helpers.js +25 -26
- package/dist/utils/withTimeout.d.ts +7 -0
- package/dist/utils/withTimeout.js +11 -1
- package/dist/utils/zod-error.d.ts +1 -1
- package/dist/utils/zod-error.js +1 -1
- package/electron-forge/index.cjs +274 -317
- package/expo/plugins/patches/android-link.mjs +25 -30
- package/expo/plugins/patches/ios-link.mjs +25 -30
- package/package.json +21 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateExportName } from
|
|
1
|
+
import { generateExportName } from './naming.js';
|
|
2
2
|
export function generateModelsFileContent(models) {
|
|
3
3
|
const usedNames = new Set();
|
|
4
4
|
const named = new Map();
|
|
@@ -12,7 +12,7 @@ export function generateModelsFileContent(models) {
|
|
|
12
12
|
}
|
|
13
13
|
const modelsWithNames = models.map((m) => ({
|
|
14
14
|
...m,
|
|
15
|
-
name: named.get(m)
|
|
15
|
+
name: named.get(m)
|
|
16
16
|
}));
|
|
17
17
|
return generateFileContentWithNames(modelsWithNames);
|
|
18
18
|
}
|
|
@@ -24,7 +24,7 @@ function assignName(m, usedNames) {
|
|
|
24
24
|
quantization: m.quantization,
|
|
25
25
|
params: m.params,
|
|
26
26
|
tags: m.tags,
|
|
27
|
-
usedNames
|
|
27
|
+
usedNames
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function generateFileContentWithNames(modelsWithNames) {
|
|
@@ -44,18 +44,18 @@ function generateFileContentWithNames(modelsWithNames) {
|
|
|
44
44
|
expectedSize: ${m.expectedSize},
|
|
45
45
|
sha256Checksum: "${m.sha256Checksum}",
|
|
46
46
|
engine: "${m.engine}",
|
|
47
|
-
quantization: "${m.quantization ||
|
|
48
|
-
params: "${m.params ||
|
|
47
|
+
quantization: "${m.quantization || ''}",
|
|
48
|
+
params: "${m.params || ''}"`;
|
|
49
49
|
if (m.shardMetadata) {
|
|
50
50
|
entry += `,\n shardMetadata: ${JSON.stringify(m.shardMetadata)}`;
|
|
51
51
|
}
|
|
52
52
|
if (m.companionSet) {
|
|
53
53
|
entry += `,\n companionSet: ${JSON.stringify(m.companionSet)}`;
|
|
54
54
|
}
|
|
55
|
-
entry +=
|
|
55
|
+
entry += '\n }';
|
|
56
56
|
return entry;
|
|
57
57
|
})
|
|
58
|
-
.join(
|
|
58
|
+
.join(',\n');
|
|
59
59
|
const exports = modelsWithNames
|
|
60
60
|
.filter((m) => !m.isCompanionOnly)
|
|
61
61
|
.map((m) => {
|
|
@@ -78,7 +78,7 @@ function generateFileContentWithNames(modelsWithNames) {
|
|
|
78
78
|
params: models[${i}].params,
|
|
79
79
|
} as const;`;
|
|
80
80
|
})
|
|
81
|
-
.join(
|
|
81
|
+
.join('\n\n');
|
|
82
82
|
return `// THIS FILE IS AUTO-GENERATED BY models/update-models
|
|
83
83
|
// DO NOT MODIFY MANUALLY
|
|
84
84
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProcessedModel } from
|
|
1
|
+
import type { ProcessedModel } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Detects companion file relationships among processed models and
|
|
4
4
|
* attaches `companionSet` metadata to each primary entry.
|
|
@@ -20,6 +20,11 @@ import type { ProcessedModel } from "./types";
|
|
|
20
20
|
* The addon resolves the embedder by exact filename next to the model
|
|
21
21
|
* (`dirname(model)/bci-embedder.bin`), so the two files must be
|
|
22
22
|
* physically co-located — which the companion-set cache layout guarantees.
|
|
23
|
+
*
|
|
24
|
+
* Chatterbox MeCab/IPAdic sets (directory-based):
|
|
25
|
+
* Primary: `char.bin`
|
|
26
|
+
* Companions in same directory: dicrc, matrix.bin, mecabrc, sys.dic, unk.dic
|
|
27
|
+
* The TTS addon receives the containing directory for Japanese tokenization.
|
|
23
28
|
*/
|
|
24
29
|
export declare function groupCompanionSets(models: ProcessedModel[]): ProcessedModel[];
|
|
25
30
|
//# sourceMappingURL=companions.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createHash } from
|
|
2
|
-
import { BERGAMOT_MODEL_RE } from
|
|
1
|
+
import { createHash } from 'crypto';
|
|
2
|
+
import { BERGAMOT_MODEL_RE } from '../../schemas/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Detects companion file relationships among processed models and
|
|
5
5
|
* attaches `companionSet` metadata to each primary entry.
|
|
@@ -21,6 +21,11 @@ import { BERGAMOT_MODEL_RE } from "../../schemas/index.js";
|
|
|
21
21
|
* The addon resolves the embedder by exact filename next to the model
|
|
22
22
|
* (`dirname(model)/bci-embedder.bin`), so the two files must be
|
|
23
23
|
* physically co-located — which the companion-set cache layout guarantees.
|
|
24
|
+
*
|
|
25
|
+
* Chatterbox MeCab/IPAdic sets (directory-based):
|
|
26
|
+
* Primary: `char.bin`
|
|
27
|
+
* Companions in same directory: dicrc, matrix.bin, mecabrc, sys.dic, unk.dic
|
|
28
|
+
* The TTS addon receives the containing directory for Japanese tokenization.
|
|
24
29
|
*/
|
|
25
30
|
export function groupCompanionSets(models) {
|
|
26
31
|
const bySourcePath = new Map();
|
|
@@ -31,6 +36,7 @@ export function groupCompanionSets(models) {
|
|
|
31
36
|
groupOnnxCompanions(models, bySourcePath, companionKeys);
|
|
32
37
|
groupBergamotCompanions(models, bySourcePath, companionKeys);
|
|
33
38
|
groupBciCompanions(models, bySourcePath, companionKeys);
|
|
39
|
+
groupMecabCompanions(models, bySourcePath, companionKeys);
|
|
34
40
|
return models.map((model) => {
|
|
35
41
|
const key = sourceKey(model.registrySource, model.registryPath);
|
|
36
42
|
if (companionKeys.has(key)) {
|
|
@@ -41,17 +47,17 @@ export function groupCompanionSets(models) {
|
|
|
41
47
|
}
|
|
42
48
|
function groupOnnxCompanions(models, bySourcePath, companionKeys) {
|
|
43
49
|
for (const model of models) {
|
|
44
|
-
if (!model.registryPath.endsWith(
|
|
50
|
+
if (!model.registryPath.endsWith('.onnx'))
|
|
45
51
|
continue;
|
|
46
52
|
const dataKey = findOnnxCompanionKey(model.registrySource, model.registryPath, bySourcePath);
|
|
47
53
|
if (!dataKey)
|
|
48
54
|
continue;
|
|
49
55
|
const companion = bySourcePath.get(dataKey);
|
|
50
|
-
const primaryFilename = model.registryPath.split(
|
|
51
|
-
const dataFilename = companion.registryPath.split(
|
|
56
|
+
const primaryFilename = model.registryPath.split('/').pop() || model.registryPath;
|
|
57
|
+
const dataFilename = companion.registryPath.split('/').pop() || companion.registryPath;
|
|
52
58
|
const setKey = shortHash(`${model.registrySource}:${model.registryPath}`);
|
|
53
59
|
const primaryEntry = {
|
|
54
|
-
key:
|
|
60
|
+
key: 'modelPath',
|
|
55
61
|
registryPath: model.registryPath,
|
|
56
62
|
registrySource: model.registrySource,
|
|
57
63
|
targetName: primaryFilename,
|
|
@@ -61,10 +67,10 @@ function groupOnnxCompanions(models, bySourcePath, companionKeys) {
|
|
|
61
67
|
blobBlockOffset: model.blobBlockOffset,
|
|
62
68
|
blobBlockLength: model.blobBlockLength,
|
|
63
69
|
blobByteOffset: model.blobByteOffset,
|
|
64
|
-
primary: true
|
|
70
|
+
primary: true
|
|
65
71
|
};
|
|
66
72
|
const dataEntry = {
|
|
67
|
-
key:
|
|
73
|
+
key: 'dataPath',
|
|
68
74
|
registryPath: companion.registryPath,
|
|
69
75
|
registrySource: companion.registrySource,
|
|
70
76
|
targetName: dataFilename,
|
|
@@ -73,12 +79,12 @@ function groupOnnxCompanions(models, bySourcePath, companionKeys) {
|
|
|
73
79
|
blobCoreKey: companion.blobCoreKey,
|
|
74
80
|
blobBlockOffset: companion.blobBlockOffset,
|
|
75
81
|
blobBlockLength: companion.blobBlockLength,
|
|
76
|
-
blobByteOffset: companion.blobByteOffset
|
|
82
|
+
blobByteOffset: companion.blobByteOffset
|
|
77
83
|
};
|
|
78
84
|
const companionSetMetadata = {
|
|
79
85
|
setKey,
|
|
80
|
-
primaryKey:
|
|
81
|
-
files: [primaryEntry, dataEntry]
|
|
86
|
+
primaryKey: 'modelPath',
|
|
87
|
+
files: [primaryEntry, dataEntry]
|
|
82
88
|
};
|
|
83
89
|
model.companionSet = companionSetMetadata;
|
|
84
90
|
companionKeys.add(dataKey);
|
|
@@ -95,10 +101,10 @@ function groupBergamotCompanions(models, bySourcePath, companionKeys) {
|
|
|
95
101
|
const companions = findBergamotCompanions(source, dirPrefix, langPair, bySourcePath);
|
|
96
102
|
if (companions.length === 0)
|
|
97
103
|
continue;
|
|
98
|
-
const primaryFilename = model.registryPath.split(
|
|
104
|
+
const primaryFilename = model.registryPath.split('/').pop();
|
|
99
105
|
const setKey = shortHash(`${source}:${model.registryPath}`);
|
|
100
106
|
const primaryEntry = {
|
|
101
|
-
key:
|
|
107
|
+
key: 'modelPath',
|
|
102
108
|
registryPath: model.registryPath,
|
|
103
109
|
registrySource: source,
|
|
104
110
|
targetName: primaryFilename,
|
|
@@ -108,11 +114,11 @@ function groupBergamotCompanions(models, bySourcePath, companionKeys) {
|
|
|
108
114
|
blobBlockOffset: model.blobBlockOffset,
|
|
109
115
|
blobBlockLength: model.blobBlockLength,
|
|
110
116
|
blobByteOffset: model.blobByteOffset,
|
|
111
|
-
primary: true
|
|
117
|
+
primary: true
|
|
112
118
|
};
|
|
113
119
|
const companionEntries = [];
|
|
114
120
|
for (const { key: entryKey, model: comp } of companions) {
|
|
115
|
-
const filename = comp.registryPath.split(
|
|
121
|
+
const filename = comp.registryPath.split('/').pop();
|
|
116
122
|
companionEntries.push({
|
|
117
123
|
key: entryKey,
|
|
118
124
|
registryPath: comp.registryPath,
|
|
@@ -123,26 +129,26 @@ function groupBergamotCompanions(models, bySourcePath, companionKeys) {
|
|
|
123
129
|
blobCoreKey: comp.blobCoreKey,
|
|
124
130
|
blobBlockOffset: comp.blobBlockOffset,
|
|
125
131
|
blobBlockLength: comp.blobBlockLength,
|
|
126
|
-
blobByteOffset: comp.blobByteOffset
|
|
132
|
+
blobByteOffset: comp.blobByteOffset
|
|
127
133
|
});
|
|
128
134
|
companionKeys.add(sourceKey(comp.registrySource, comp.registryPath));
|
|
129
135
|
}
|
|
130
136
|
model.companionSet = {
|
|
131
137
|
setKey,
|
|
132
|
-
primaryKey:
|
|
133
|
-
files: [primaryEntry, ...companionEntries]
|
|
138
|
+
primaryKey: 'modelPath',
|
|
139
|
+
files: [primaryEntry, ...companionEntries]
|
|
134
140
|
};
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
|
-
const BCI_PRIMARY_FILENAME =
|
|
138
|
-
const BCI_EMBEDDER_FILENAME =
|
|
143
|
+
const BCI_PRIMARY_FILENAME = 'ggml-bci-windowed.bin';
|
|
144
|
+
const BCI_EMBEDDER_FILENAME = 'bci-embedder.bin';
|
|
139
145
|
function groupBciCompanions(models, bySourcePath, companionKeys) {
|
|
140
146
|
for (const model of models) {
|
|
141
|
-
const filename = model.registryPath.split(
|
|
147
|
+
const filename = model.registryPath.split('/').pop();
|
|
142
148
|
if (filename !== BCI_PRIMARY_FILENAME)
|
|
143
149
|
continue;
|
|
144
|
-
const lastSep = model.registryPath.lastIndexOf(
|
|
145
|
-
const dirPrefix = lastSep >= 0 ? model.registryPath.slice(0, lastSep + 1) :
|
|
150
|
+
const lastSep = model.registryPath.lastIndexOf('/');
|
|
151
|
+
const dirPrefix = lastSep >= 0 ? model.registryPath.slice(0, lastSep + 1) : '';
|
|
146
152
|
const source = model.registrySource;
|
|
147
153
|
const embedderPath = `${dirPrefix}${BCI_EMBEDDER_FILENAME}`;
|
|
148
154
|
const embedder = bySourcePath.get(sourceKey(source, embedderPath));
|
|
@@ -150,7 +156,7 @@ function groupBciCompanions(models, bySourcePath, companionKeys) {
|
|
|
150
156
|
continue;
|
|
151
157
|
const setKey = shortHash(`${source}:${model.registryPath}`);
|
|
152
158
|
const primaryEntry = {
|
|
153
|
-
key:
|
|
159
|
+
key: 'modelPath',
|
|
154
160
|
registryPath: model.registryPath,
|
|
155
161
|
registrySource: source,
|
|
156
162
|
targetName: BCI_PRIMARY_FILENAME,
|
|
@@ -160,10 +166,10 @@ function groupBciCompanions(models, bySourcePath, companionKeys) {
|
|
|
160
166
|
blobBlockOffset: model.blobBlockOffset,
|
|
161
167
|
blobBlockLength: model.blobBlockLength,
|
|
162
168
|
blobByteOffset: model.blobByteOffset,
|
|
163
|
-
primary: true
|
|
169
|
+
primary: true
|
|
164
170
|
};
|
|
165
171
|
const embedderEntry = {
|
|
166
|
-
key:
|
|
172
|
+
key: 'embedderPath',
|
|
167
173
|
registryPath: embedder.registryPath,
|
|
168
174
|
registrySource: embedder.registrySource,
|
|
169
175
|
targetName: BCI_EMBEDDER_FILENAME,
|
|
@@ -172,27 +178,79 @@ function groupBciCompanions(models, bySourcePath, companionKeys) {
|
|
|
172
178
|
blobCoreKey: embedder.blobCoreKey,
|
|
173
179
|
blobBlockOffset: embedder.blobBlockOffset,
|
|
174
180
|
blobBlockLength: embedder.blobBlockLength,
|
|
175
|
-
blobByteOffset: embedder.blobByteOffset
|
|
181
|
+
blobByteOffset: embedder.blobByteOffset
|
|
176
182
|
};
|
|
177
183
|
model.companionSet = {
|
|
178
184
|
setKey,
|
|
179
|
-
primaryKey:
|
|
180
|
-
files: [primaryEntry, embedderEntry]
|
|
185
|
+
primaryKey: 'modelPath',
|
|
186
|
+
files: [primaryEntry, embedderEntry]
|
|
181
187
|
};
|
|
182
188
|
companionKeys.add(sourceKey(embedder.registrySource, embedder.registryPath));
|
|
183
189
|
}
|
|
184
190
|
}
|
|
191
|
+
const MECAB_PRIMARY_FILENAME = 'char.bin';
|
|
192
|
+
const MECAB_REQUIRED_FILENAMES = ['dicrc', 'matrix.bin', 'mecabrc', 'sys.dic', 'unk.dic'];
|
|
193
|
+
const MECAB_IPADIC_DIR_SUFFIX = '/mecab-ipadic/';
|
|
194
|
+
function groupMecabCompanions(models, bySourcePath, companionKeys) {
|
|
195
|
+
for (const model of models) {
|
|
196
|
+
if (!model.registryPath.includes(MECAB_IPADIC_DIR_SUFFIX))
|
|
197
|
+
continue;
|
|
198
|
+
const lastSep = model.registryPath.lastIndexOf('/');
|
|
199
|
+
const filename = lastSep >= 0 ? model.registryPath.slice(lastSep + 1) : model.registryPath;
|
|
200
|
+
if (filename !== MECAB_PRIMARY_FILENAME)
|
|
201
|
+
continue;
|
|
202
|
+
const dirPrefix = lastSep >= 0 ? model.registryPath.slice(0, lastSep + 1) : '';
|
|
203
|
+
const source = model.registrySource;
|
|
204
|
+
const companions = findMecabCompanions(source, dirPrefix, bySourcePath);
|
|
205
|
+
if (companions.length !== MECAB_REQUIRED_FILENAMES.length)
|
|
206
|
+
continue;
|
|
207
|
+
const setKey = shortHash(`${source}:${dirPrefix}`);
|
|
208
|
+
const primaryEntry = {
|
|
209
|
+
key: 'mecabDictPath',
|
|
210
|
+
registryPath: model.registryPath,
|
|
211
|
+
registrySource: source,
|
|
212
|
+
targetName: MECAB_PRIMARY_FILENAME,
|
|
213
|
+
expectedSize: model.expectedSize,
|
|
214
|
+
sha256Checksum: model.sha256Checksum,
|
|
215
|
+
blobCoreKey: model.blobCoreKey,
|
|
216
|
+
blobBlockOffset: model.blobBlockOffset,
|
|
217
|
+
blobBlockLength: model.blobBlockLength,
|
|
218
|
+
blobByteOffset: model.blobByteOffset,
|
|
219
|
+
primary: true
|
|
220
|
+
};
|
|
221
|
+
const companionEntries = companions.map(({ filename, model: comp }) => {
|
|
222
|
+
companionKeys.add(sourceKey(comp.registrySource, comp.registryPath));
|
|
223
|
+
return {
|
|
224
|
+
key: `mecab:${filename}`,
|
|
225
|
+
registryPath: comp.registryPath,
|
|
226
|
+
registrySource: comp.registrySource,
|
|
227
|
+
targetName: filename,
|
|
228
|
+
expectedSize: comp.expectedSize,
|
|
229
|
+
sha256Checksum: comp.sha256Checksum,
|
|
230
|
+
blobCoreKey: comp.blobCoreKey,
|
|
231
|
+
blobBlockOffset: comp.blobBlockOffset,
|
|
232
|
+
blobBlockLength: comp.blobBlockLength,
|
|
233
|
+
blobByteOffset: comp.blobByteOffset
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
model.companionSet = {
|
|
237
|
+
setKey,
|
|
238
|
+
primaryKey: 'mecabDictPath',
|
|
239
|
+
files: [primaryEntry, ...companionEntries]
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
185
243
|
function findBergamotCompanions(source, dirPrefix, langPair, bySourcePath) {
|
|
186
244
|
const found = [];
|
|
187
245
|
const lexPath = `${dirPrefix}lex.50.50.${langPair}.s2t.bin`;
|
|
188
246
|
const lexModel = bySourcePath.get(sourceKey(source, lexPath));
|
|
189
247
|
if (lexModel) {
|
|
190
|
-
found.push({ key:
|
|
248
|
+
found.push({ key: 'lexPath', model: lexModel });
|
|
191
249
|
}
|
|
192
250
|
const sharedVocabPath = `${dirPrefix}vocab.${langPair}.spm`;
|
|
193
251
|
const sharedVocab = bySourcePath.get(sourceKey(source, sharedVocabPath));
|
|
194
252
|
if (sharedVocab) {
|
|
195
|
-
found.push({ key:
|
|
253
|
+
found.push({ key: 'sharedVocabPath', model: sharedVocab });
|
|
196
254
|
}
|
|
197
255
|
else {
|
|
198
256
|
const srcVocabPath = `${dirPrefix}srcvocab.${langPair}.spm`;
|
|
@@ -200,14 +258,24 @@ function findBergamotCompanions(source, dirPrefix, langPair, bySourcePath) {
|
|
|
200
258
|
const srcVocab = bySourcePath.get(sourceKey(source, srcVocabPath));
|
|
201
259
|
const trgVocab = bySourcePath.get(sourceKey(source, trgVocabPath));
|
|
202
260
|
if (srcVocab && trgVocab) {
|
|
203
|
-
found.push({ key:
|
|
204
|
-
found.push({ key:
|
|
261
|
+
found.push({ key: 'srcVocabPath', model: srcVocab });
|
|
262
|
+
found.push({ key: 'dstVocabPath', model: trgVocab });
|
|
205
263
|
}
|
|
206
264
|
}
|
|
207
265
|
const metadataPath = `${dirPrefix}metadata.json`;
|
|
208
266
|
const metadata = bySourcePath.get(sourceKey(source, metadataPath));
|
|
209
267
|
if (metadata) {
|
|
210
|
-
found.push({ key:
|
|
268
|
+
found.push({ key: 'metadataPath', model: metadata });
|
|
269
|
+
}
|
|
270
|
+
return found;
|
|
271
|
+
}
|
|
272
|
+
function findMecabCompanions(source, dirPrefix, bySourcePath) {
|
|
273
|
+
const found = [];
|
|
274
|
+
for (const filename of MECAB_REQUIRED_FILENAMES) {
|
|
275
|
+
const model = bySourcePath.get(sourceKey(source, `${dirPrefix}${filename}`));
|
|
276
|
+
if (!model)
|
|
277
|
+
return [];
|
|
278
|
+
found.push({ filename, model });
|
|
211
279
|
}
|
|
212
280
|
return found;
|
|
213
281
|
}
|
|
@@ -215,10 +283,7 @@ function sourceKey(source, path) {
|
|
|
215
283
|
return `${source}:${path}`;
|
|
216
284
|
}
|
|
217
285
|
function findOnnxCompanionKey(source, primaryPath, bySourcePath) {
|
|
218
|
-
const candidates = [
|
|
219
|
-
`${primaryPath}_data`,
|
|
220
|
-
`${primaryPath}.data`,
|
|
221
|
-
];
|
|
286
|
+
const candidates = [`${primaryPath}_data`, `${primaryPath}.data`];
|
|
222
287
|
for (const candidate of candidates) {
|
|
223
288
|
const key = sourceKey(source, candidate);
|
|
224
289
|
if (bySourcePath.has(key))
|
|
@@ -227,5 +292,5 @@ function findOnnxCompanionKey(source, primaryPath, bySourcePath) {
|
|
|
227
292
|
return undefined;
|
|
228
293
|
}
|
|
229
294
|
function shortHash(input) {
|
|
230
|
-
return createHash(
|
|
295
|
+
return createHash('sha256').update(input).digest('hex').substring(0, 16);
|
|
231
296
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CurrentModel, ProcessedModel } from
|
|
1
|
+
import type { CurrentModel, ProcessedModel } from './types';
|
|
2
2
|
export declare function loadCurrentModels(outputFile: string): CurrentModel[];
|
|
3
3
|
export declare function compareModels(remoteModels: ProcessedModel[], currentModels: CurrentModel[]): {
|
|
4
4
|
added: ProcessedModel[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import fs from
|
|
2
|
-
import { generateExportName } from
|
|
3
|
-
import { getCommitHash } from
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { generateExportName } from './naming.js';
|
|
3
|
+
import { getCommitHash } from './utils.js';
|
|
4
4
|
export function loadCurrentModels(outputFile) {
|
|
5
5
|
try {
|
|
6
6
|
if (!fs.existsSync(outputFile)) {
|
|
7
7
|
return [];
|
|
8
8
|
}
|
|
9
|
-
const content = fs.readFileSync(outputFile,
|
|
9
|
+
const content = fs.readFileSync(outputFile, 'utf-8');
|
|
10
10
|
const modelsMatch = content.match(/export const models = \[([\s\S]*?)\] as const/);
|
|
11
11
|
if (!modelsMatch?.[1]) {
|
|
12
12
|
return [];
|
|
@@ -19,15 +19,15 @@ export function loadCurrentModels(outputFile) {
|
|
|
19
19
|
if (match[1] && match[2]) {
|
|
20
20
|
currentModels.push({
|
|
21
21
|
name: match[1],
|
|
22
|
-
registryPath: match[2]
|
|
22
|
+
registryPath: match[2]
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
return currentModels;
|
|
27
27
|
}
|
|
28
28
|
catch (error) {
|
|
29
|
-
const message = error instanceof Error ? error.message :
|
|
30
|
-
console.warn(
|
|
29
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
30
|
+
console.warn('⚠️ Could not load current models:', message);
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -49,8 +49,8 @@ export function assignNames(models) {
|
|
|
49
49
|
quantization: m.quantization,
|
|
50
50
|
params: m.params,
|
|
51
51
|
tags: m.tags,
|
|
52
|
-
usedNames
|
|
53
|
-
})
|
|
52
|
+
usedNames
|
|
53
|
+
})
|
|
54
54
|
}));
|
|
55
55
|
}
|
|
56
56
|
export function separateUpdates(added, removed) {
|
|
@@ -60,14 +60,14 @@ export function separateUpdates(added, removed) {
|
|
|
60
60
|
return {
|
|
61
61
|
added: added.filter((m) => !updatedNames.has(m.name)),
|
|
62
62
|
updated: added.filter((m) => updatedNames.has(m.name)),
|
|
63
|
-
removed: removed.filter((m) => !updatedNames.has(m.name))
|
|
63
|
+
removed: removed.filter((m) => !updatedNames.has(m.name))
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
export function createHistoryFile(added, removed, currentModels, historyDir) {
|
|
67
67
|
if (added.length === 0 && removed.length === 0) {
|
|
68
68
|
return null;
|
|
69
69
|
}
|
|
70
|
-
const { added: trulyAdded, updated, removed: trulyRemoved
|
|
70
|
+
const { added: trulyAdded, updated, removed: trulyRemoved } = separateUpdates(added, removed);
|
|
71
71
|
if (!fs.existsSync(historyDir)) {
|
|
72
72
|
fs.mkdirSync(historyDir, { recursive: true });
|
|
73
73
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import fs from
|
|
2
|
-
import { fileURLToPath } from
|
|
3
|
-
import { execSync } from
|
|
4
|
-
import { generateModelsFileContent } from
|
|
5
|
-
import { assignNames, compareModels, createHistoryFile, loadCurrentModels, separateUpdates
|
|
6
|
-
import { collectModels } from
|
|
7
|
-
import { formatSize } from
|
|
8
|
-
const OUTPUT_FILE = fileURLToPath(new URL(
|
|
9
|
-
const HISTORY_DIR = fileURLToPath(new URL(
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
|
+
import { generateModelsFileContent } from './codegen.js';
|
|
5
|
+
import { assignNames, compareModels, createHistoryFile, loadCurrentModels, separateUpdates } from './history.js';
|
|
6
|
+
import { collectModels } from './registry.js';
|
|
7
|
+
import { formatSize } from './utils.js';
|
|
8
|
+
const OUTPUT_FILE = fileURLToPath(new URL('../registry/models.ts', import.meta.url));
|
|
9
|
+
const HISTORY_DIR = fileURLToPath(new URL('../history', import.meta.url));
|
|
10
10
|
async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
11
11
|
const timeoutMs = 30000;
|
|
12
12
|
let timedOut = false;
|
|
13
13
|
const timeoutPromise = new Promise((resolve) => {
|
|
14
14
|
setTimeout(() => {
|
|
15
15
|
timedOut = true;
|
|
16
|
-
console.log(
|
|
16
|
+
console.log('⏱️ Model check timed out');
|
|
17
17
|
console.log(" Run 'bun check-models' manually to retry");
|
|
18
18
|
resolve(null);
|
|
19
19
|
}, timeoutMs);
|
|
@@ -23,11 +23,10 @@ async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
|
23
23
|
(async () => {
|
|
24
24
|
const remoteModels = await collectModels({ showDuplicates });
|
|
25
25
|
const currentModels = loadCurrentModels(OUTPUT_FILE);
|
|
26
|
-
remoteModels.sort((a, b) => a.addon.localeCompare(b.addon) ||
|
|
27
|
-
a.registryPath.localeCompare(b.registryPath));
|
|
26
|
+
remoteModels.sort((a, b) => a.addon.localeCompare(b.addon) || a.registryPath.localeCompare(b.registryPath));
|
|
28
27
|
return { remoteModels, currentModels };
|
|
29
28
|
})(),
|
|
30
|
-
timeoutPromise
|
|
29
|
+
timeoutPromise
|
|
31
30
|
]);
|
|
32
31
|
if (timedOut || !result) {
|
|
33
32
|
process.exit(nonBlocking ? 0 : 1);
|
|
@@ -40,10 +39,10 @@ async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
|
40
39
|
}
|
|
41
40
|
const addedWithNames = assignNames(rawAdded);
|
|
42
41
|
const { added, updated, removed } = separateUpdates(addedWithNames, rawRemoved);
|
|
43
|
-
console.log(
|
|
44
|
-
console.log(
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
45
44
|
if (added.length > 0) {
|
|
46
|
-
console.log(`✨ ${added.length} new model${added.length === 1 ?
|
|
45
|
+
console.log(`✨ ${added.length} new model${added.length === 1 ? '' : 's'} available:`);
|
|
47
46
|
added.slice(0, 10).forEach((m) => {
|
|
48
47
|
console.log(` + ${m.name} (${m.addon}, ${formatSize(m.expectedSize)})`);
|
|
49
48
|
});
|
|
@@ -52,7 +51,7 @@ async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
if (updated.length > 0) {
|
|
55
|
-
console.log(`\n🔄 ${updated.length} model${updated.length === 1 ?
|
|
54
|
+
console.log(`\n🔄 ${updated.length} model${updated.length === 1 ? '' : 's'} updated:`);
|
|
56
55
|
updated.slice(0, 10).forEach((m) => {
|
|
57
56
|
console.log(` ~ ${m.name} (${m.addon}, ${formatSize(m.expectedSize)})`);
|
|
58
57
|
});
|
|
@@ -61,7 +60,7 @@ async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
if (removed.length > 0) {
|
|
64
|
-
console.log(`\n⚠️ ${removed.length} model${removed.length === 1 ?
|
|
63
|
+
console.log(`\n⚠️ ${removed.length} model${removed.length === 1 ? '' : 's'} removed:`);
|
|
65
64
|
removed.slice(0, 5).forEach((m) => {
|
|
66
65
|
console.log(` - ${m.name}`);
|
|
67
66
|
});
|
|
@@ -69,32 +68,31 @@ async function checkOnly(nonBlocking = false, showDuplicates = false) {
|
|
|
69
68
|
console.log(` ... and ${removed.length - 5} more`);
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
console.log(
|
|
71
|
+
console.log('');
|
|
73
72
|
console.log(`💡 Run 'bun update-models' to sync changes`);
|
|
74
|
-
console.log(
|
|
73
|
+
console.log('');
|
|
75
74
|
if (nonBlocking) {
|
|
76
|
-
console.log(
|
|
75
|
+
console.log('💡 Commit will proceed - update models when ready');
|
|
77
76
|
}
|
|
78
|
-
console.log(
|
|
79
|
-
console.log(
|
|
77
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
78
|
+
console.log('');
|
|
80
79
|
process.exit(nonBlocking ? 0 : 1);
|
|
81
80
|
}
|
|
82
81
|
catch (error) {
|
|
83
|
-
const message = error instanceof Error ? error.message :
|
|
84
|
-
console.error(
|
|
82
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
83
|
+
console.error('❌ Model check failed:', message);
|
|
85
84
|
process.exit(nonBlocking ? 0 : 1);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
async function updateModels(showDuplicates = false, noDedup = false) {
|
|
89
|
-
console.log(
|
|
88
|
+
console.log('🔄 Fetching models from QVAC Registry...\n');
|
|
90
89
|
const currentModels = loadCurrentModels(OUTPUT_FILE);
|
|
91
90
|
const models = await collectModels({ showDuplicates, noDedup });
|
|
92
91
|
const { added, removed } = compareModels(models, currentModels);
|
|
93
|
-
models.sort((a, b) => a.addon.localeCompare(b.addon) ||
|
|
94
|
-
a.registryPath.localeCompare(b.registryPath));
|
|
92
|
+
models.sort((a, b) => a.addon.localeCompare(b.addon) || a.registryPath.localeCompare(b.registryPath));
|
|
95
93
|
fs.writeFileSync(OUTPUT_FILE, generateModelsFileContent(models));
|
|
96
94
|
try {
|
|
97
|
-
execSync(`npx prettier --write "${OUTPUT_FILE}"`, { stdio:
|
|
95
|
+
execSync(`npx prettier --write "${OUTPUT_FILE}"`, { stdio: 'pipe' });
|
|
98
96
|
}
|
|
99
97
|
catch {
|
|
100
98
|
// prettier not available, skip formatting
|
|
@@ -104,17 +102,17 @@ async function updateModels(showDuplicates = false, noDedup = false) {
|
|
|
104
102
|
if (added.length > 0 || removed.length > 0) {
|
|
105
103
|
const historyFile = createHistoryFile(addedWithNames, removed, currentModels, HISTORY_DIR);
|
|
106
104
|
if (historyFile) {
|
|
107
|
-
const { added: trulyAdded, updated, removed: trulyRemoved
|
|
105
|
+
const { added: trulyAdded, updated, removed: trulyRemoved } = separateUpdates(addedWithNames, removed);
|
|
108
106
|
console.log(`📜 Created history file → ${historyFile}`);
|
|
109
107
|
console.log(` Added: ${trulyAdded.length}, Updated: ${updated.length}, Removed: ${trulyRemoved.length}`);
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
async function main() {
|
|
114
|
-
const CHECK_ONLY = process.argv.includes(
|
|
115
|
-
const NON_BLOCKING = process.argv.includes(
|
|
116
|
-
const SHOW_DUPLICATES = process.argv.includes(
|
|
117
|
-
const NO_DEDUP = process.argv.includes(
|
|
112
|
+
const CHECK_ONLY = process.argv.includes('--check');
|
|
113
|
+
const NON_BLOCKING = process.argv.includes('--non-blocking');
|
|
114
|
+
const SHOW_DUPLICATES = process.argv.includes('--show-duplicates');
|
|
115
|
+
const NO_DEDUP = process.argv.includes('--no-dedup');
|
|
118
116
|
if (CHECK_ONLY) {
|
|
119
117
|
await checkOnly(NON_BLOCKING, SHOW_DUPLICATES);
|
|
120
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExportNameInput } from
|
|
1
|
+
import type { ExportNameInput } from './types';
|
|
2
2
|
export declare function cleanPart(p: string): string;
|
|
3
|
-
export declare function generateExportName({ path: registryPath, engine, name: modelName, quantization, params, tags, usedNames
|
|
3
|
+
export declare function generateExportName({ path: registryPath, engine, name: modelName, quantization, params, tags, usedNames }: ExportNameInput): string;
|
|
4
4
|
//# sourceMappingURL=naming.d.ts.map
|