@qvac/sdk 0.8.1 → 1.0.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/LICENSE +24 -1
- package/README.md +191 -373
- package/dist/client/api/cancel.d.ts +4 -22
- package/dist/client/api/cancel.js +6 -25
- package/dist/client/api/completion-stream.d.ts +30 -24
- package/dist/client/api/completion-stream.js +70 -121
- package/dist/client/api/delete-cache.js +2 -3
- package/dist/client/api/download-asset.d.ts +5 -6
- package/dist/client/api/download-asset.js +20 -16
- package/dist/client/api/embed.d.ts +4 -21
- package/dist/client/api/embed.js +14 -4
- package/dist/client/api/index.d.ts +2 -6
- package/dist/client/api/index.js +2 -6
- package/dist/client/api/load-model.d.ts +21 -49
- package/dist/client/api/load-model.js +134 -40
- package/dist/client/api/logging-stream.d.ts +4 -7
- package/dist/client/api/logging-stream.js +5 -9
- package/dist/client/api/ping.d.ts +11 -0
- package/dist/client/api/ping.js +18 -0
- package/dist/client/api/provide.d.ts +1 -1
- package/dist/client/api/provide.js +3 -4
- package/dist/client/api/rag.d.ts +21 -216
- package/dist/client/api/rag.js +36 -396
- package/dist/client/api/stop-provider.d.ts +1 -1
- package/dist/client/api/stop-provider.js +3 -4
- package/dist/client/api/text-to-speech.d.ts +2 -2
- package/dist/client/api/text-to-speech.js +3 -3
- package/dist/client/api/transcribe.d.ts +5 -9
- package/dist/client/api/transcribe.js +9 -11
- package/dist/client/api/translate.d.ts +3 -3
- package/dist/client/api/translate.js +15 -15
- package/dist/client/api/unload-model.d.ts +1 -5
- package/dist/client/api/unload-model.js +4 -17
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/logging-stream-registry.d.ts +1 -1
- package/dist/client/logging-stream-registry.js +13 -14
- package/dist/client/rpc/bare-client.d.ts +139 -3
- package/dist/client/rpc/bare-client.js +16 -117
- package/dist/client/rpc/bare-rpc-client.d.ts +4 -0
- package/dist/client/rpc/bare-rpc-client.js +87 -0
- package/dist/client/rpc/expo-rpc-client.d.ts +1 -2
- package/dist/client/rpc/expo-rpc-client.js +14 -57
- package/dist/client/rpc/node-rpc-client.d.ts +8 -3
- package/dist/client/rpc/node-rpc-client.js +62 -218
- package/dist/client/rpc/rpc-client.d.ts +2 -3
- package/dist/client/rpc/rpc-client.js +49 -184
- package/dist/constants/audio.d.ts +2 -1
- package/dist/constants/audio.js +17 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -1
- package/dist/examples/delegated-inference/consumer.js +2 -3
- package/dist/examples/download-with-cancel.js +4 -3
- package/dist/examples/embed-hyperdrive.d.ts +2 -0
- package/dist/examples/embed-hyperdrive.js +19 -0
- package/dist/examples/kv-cache-cleanup.js +2 -1
- package/dist/examples/kv-cache-custom-key.js +2 -16
- package/dist/examples/kv-cache-example.js +2 -1
- package/dist/examples/llamacpp-file-logging.d.ts +2 -0
- package/dist/examples/{logging-file-transport.js → llamacpp-file-logging.js} +8 -3
- package/dist/examples/llamacpp-filesystem.js +2 -2
- package/dist/examples/llamacpp-http.js +1 -0
- package/dist/examples/llamacpp-hyperdrive.d.ts +2 -0
- package/dist/examples/{llamacpp-p2p.js → llamacpp-hyperdrive.js} +2 -1
- package/dist/examples/llamacpp-multimodal.js +4 -3
- package/dist/examples/llamacpp-native-tools.js +30 -72
- package/dist/examples/multi-model-demo.js +3 -2
- package/dist/examples/parallel-download.js +14 -46
- package/dist/examples/rag/rag-chromadb.js +1 -0
- package/dist/examples/rag/rag-hyperdb-workspaces.d.ts +2 -0
- package/dist/examples/rag/rag-hyperdb-workspaces.js +107 -0
- package/dist/examples/rag/rag-hyperdb.d.ts +2 -0
- package/dist/examples/rag/{rag-hyperdb/ingest.js → rag-hyperdb.js} +5 -10
- package/dist/examples/rag/rag-lancedb.js +1 -0
- package/dist/examples/rag/rag-sqlite.js +1 -0
- package/dist/examples/seed-hyperdrive.d.ts +2 -0
- package/dist/examples/text-to-speech.d.ts +3 -0
- package/dist/examples/{tts/utils.js → text-to-speech.js} +63 -18
- package/dist/examples/translation/translation-indic.js +1 -4
- package/dist/examples/translation/translation-llm-context.js +1 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/translation/translation-opus.js +3 -6
- package/dist/examples/translation/translation-stream.js +3 -3
- package/dist/examples/whispercpp-filesystem.js +43 -0
- package/dist/examples/{transcription/whispercpp-microphone-record.js → whispercpp-microphone-record.js} +9 -8
- package/dist/expo/plugins/index.d.ts +0 -3
- package/dist/expo/plugins/index.js +0 -3
- package/dist/expo/plugins/withMobileBundle.d.ts +2 -5
- package/dist/expo/plugins/withMobileBundle.js +40 -121
- package/dist/expo/plugins/withQvacSDK.d.ts +0 -4
- package/dist/expo/plugins/withQvacSDK.js +1 -26
- package/dist/index.d.ts +4 -9
- package/dist/index.js +5 -11
- package/dist/logging/base-logger.js +16 -26
- package/dist/logging/index.d.ts +1 -7
- package/dist/logging/index.js +1 -7
- package/dist/logging/logger.d.ts +2 -0
- package/dist/logging/logger.js +6 -11
- package/dist/logging/stream-logger.d.ts +1 -1
- package/dist/logging/stream-logger.js +3 -6
- package/dist/logging/transport.js +2 -2
- package/dist/logging/types.d.ts +0 -2
- package/dist/logging/utils.d.ts +0 -2
- package/dist/logging/utils.js +0 -62
- package/dist/models/{registry → hyperdrive}/index.js +1 -1
- package/dist/models/hyperdrive/models.d.ts +619 -0
- package/dist/models/hyperdrive/models.js +693 -0
- package/dist/schemas/cancel.d.ts +0 -18
- package/dist/schemas/cancel.js +0 -7
- package/dist/schemas/common.d.ts +166 -3012
- package/dist/schemas/common.js +4 -27
- package/dist/schemas/completion-stream.d.ts +60 -31
- package/dist/schemas/completion-stream.js +44 -20
- package/dist/schemas/delegate.d.ts +0 -9
- package/dist/schemas/delegate.js +2 -6
- package/dist/schemas/download-asset.d.ts +3 -125
- package/dist/schemas/download-asset.js +5 -22
- package/dist/schemas/embed.d.ts +3 -3
- package/dist/schemas/embed.js +2 -9
- package/dist/schemas/index.d.ts +2 -20
- package/dist/schemas/index.js +2 -20
- package/dist/schemas/llamacpp-config.d.ts +12 -243
- package/dist/schemas/llamacpp-config.js +14 -50
- package/dist/schemas/load-model.d.ts +893 -14471
- package/dist/schemas/load-model.js +72 -325
- package/dist/schemas/logging-stream.d.ts +4 -11
- package/dist/schemas/logging-stream.js +3 -4
- package/dist/schemas/ping.d.ts +11 -0
- package/dist/schemas/ping.js +8 -0
- package/dist/schemas/rag.d.ts +52 -183
- package/dist/schemas/rag.js +23 -152
- package/dist/schemas/text-to-speech.d.ts +1 -692
- package/dist/schemas/text-to-speech.js +3 -35
- package/dist/schemas/transcription.d.ts +0 -3
- package/dist/schemas/transcription.js +0 -1
- package/dist/schemas/translate.d.ts +23 -68
- package/dist/schemas/translate.js +11 -37
- package/dist/schemas/translation-config.d.ts +7 -810
- package/dist/schemas/translation-config.js +7 -113
- package/dist/schemas/unload-model.d.ts +0 -2
- package/dist/schemas/unload-model.js +0 -2
- package/dist/schemas/whispercpp-config.d.ts +25 -0
- package/dist/schemas/whispercpp-config.js +18 -0
- package/dist/server/bare/{ops → addons}/cancel.js +1 -2
- package/dist/server/bare/addons/index.d.ts +4 -0
- package/dist/server/bare/addons/index.js +3 -0
- package/dist/server/bare/addons/llamacpp/create-model.d.ts +5 -0
- package/dist/server/bare/addons/llamacpp/create-model.js +67 -0
- package/dist/server/bare/{plugins/llamacpp-completion/ops → addons/llamacpp/handlers}/completion-stream.d.ts +1 -2
- package/dist/server/bare/{plugins/llamacpp-completion/ops → addons/llamacpp/handlers}/completion-stream.js +87 -54
- package/dist/server/bare/addons/llamacpp/handlers/embed.d.ts +4 -0
- package/dist/server/bare/{ops → addons/llamacpp/handlers}/embed.js +7 -22
- package/dist/server/bare/addons/llamacpp/index.d.ts +4 -0
- package/dist/server/bare/addons/llamacpp/index.js +3 -0
- package/dist/server/bare/{ops → addons/llamacpp}/kv-cache-utils.d.ts +1 -4
- package/dist/server/bare/{ops → addons/llamacpp}/kv-cache-utils.js +19 -54
- package/dist/server/bare/addons/load-model.d.ts +3 -0
- package/dist/server/bare/addons/load-model.js +62 -0
- package/dist/server/bare/addons/translation/create-model.d.ts +4 -0
- package/dist/server/bare/addons/translation/create-model.js +45 -0
- package/dist/server/bare/addons/translation/handlers/translate.d.ts +3 -0
- package/dist/server/bare/{ops → addons/translation/handlers}/translate.js +14 -47
- package/dist/server/bare/addons/translation/index.d.ts +3 -0
- package/dist/server/bare/addons/translation/index.js +2 -0
- package/dist/server/bare/addons/tts/create-model.d.ts +6 -0
- package/dist/server/bare/addons/tts/create-model.js +40 -0
- package/dist/server/bare/{plugins/onnx-tts/ops → addons/tts/handlers}/text-to-speech.js +3 -25
- package/dist/server/bare/addons/tts/index.d.ts +3 -0
- package/dist/server/bare/addons/tts/index.js +2 -0
- package/dist/server/bare/addons/unload-model.js +20 -0
- package/dist/server/bare/addons/whispercpp/create-model.d.ts +6 -0
- package/dist/server/bare/addons/whispercpp/create-model.js +55 -0
- package/dist/server/bare/addons/whispercpp/handlers/transcribe-stream.d.ts +3 -0
- package/dist/server/bare/addons/whispercpp/handlers/transcribe-stream.js +48 -0
- package/dist/server/bare/addons/whispercpp/index.d.ts +3 -0
- package/dist/server/bare/addons/whispercpp/index.js +2 -0
- package/dist/server/bare/delegate-rpc-client.d.ts +0 -6
- package/dist/server/bare/delegate-rpc-client.js +45 -187
- package/dist/server/bare/hyperswarm.d.ts +0 -3
- package/dist/server/bare/hyperswarm.js +6 -29
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.d.ts +1 -1
- package/dist/server/bare/rag-hyperdb/handlers/delete-embeddings.js +10 -9
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.d.ts +4 -7
- package/dist/server/bare/rag-hyperdb/handlers/save-embeddings.js +14 -13
- package/dist/server/bare/rag-hyperdb/handlers/search.js +10 -10
- package/dist/server/bare/rag-hyperdb/index.d.ts +1 -8
- package/dist/server/bare/rag-hyperdb/index.js +1 -8
- package/dist/server/bare/rag-hyperdb/rag-manager.d.ts +5 -0
- package/dist/server/bare/rag-hyperdb/rag-manager.js +65 -0
- package/dist/server/bare/registry/logging-stream-registry.d.ts +7 -24
- package/dist/server/bare/registry/logging-stream-registry.js +20 -99
- package/dist/server/bare/registry/model-registry.d.ts +26 -16
- package/dist/server/bare/registry/model-registry.js +13 -34
- package/dist/server/error-handlers.d.ts +2 -3
- package/dist/server/error-handlers.js +10 -15
- package/dist/server/http-server.d.ts +2 -0
- package/dist/server/http-server.js +189 -0
- package/dist/server/rpc/create-server.js +3 -5
- package/dist/server/rpc/handle-request.d.ts +9 -0
- package/dist/server/rpc/handle-request.js +242 -92
- package/dist/server/rpc/handlers/cancelHandler.js +3 -14
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +1 -3
- package/dist/server/rpc/handlers/completion-stream-delegated.js +8 -20
- package/dist/server/rpc/handlers/completion-stream.js +41 -2
- package/dist/server/rpc/handlers/delete-cache.js +2 -4
- package/dist/server/rpc/handlers/download-asset.js +6 -59
- package/dist/server/rpc/handlers/embed.js +19 -2
- package/dist/server/rpc/handlers/index.d.ts +0 -13
- package/dist/server/rpc/handlers/index.js +0 -13
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +11 -12
- package/dist/server/rpc/handlers/load-model/download-manager.js +28 -43
- package/dist/server/rpc/handlers/load-model/http.d.ts +1 -2
- package/dist/server/rpc/handlers/load-model/http.js +55 -424
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +1 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +171 -364
- 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/resolve.d.ts +1 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +29 -110
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +2 -6
- package/dist/server/rpc/handlers/load-model-delegated.js +20 -60
- package/dist/server/rpc/handlers/{load-model/handler.d.ts → load-model.d.ts} +2 -2
- package/dist/server/rpc/handlers/load-model.js +57 -0
- package/dist/server/rpc/handlers/logging-stream.js +4 -4
- package/dist/server/rpc/handlers/provideHandler/connection.js +10 -12
- package/dist/server/rpc/handlers/provideHandler/handler.js +17 -20
- package/dist/server/rpc/handlers/provideHandler/proxy.js +6 -8
- package/dist/server/rpc/handlers/rag.d.ts +2 -2
- package/dist/server/rpc/handlers/rag.js +43 -130
- package/dist/server/rpc/handlers/stopProvideHandler.js +2 -6
- package/dist/server/rpc/handlers/text-to-speech.js +5 -2
- package/dist/server/rpc/handlers/transcribe-stream.js +24 -2
- package/dist/server/rpc/handlers/translate.js +49 -2
- package/dist/server/rpc/handlers/unload-model.js +3 -12
- package/dist/server/rpc/index.d.ts +1 -1
- package/dist/server/utils/audio/decoder.d.ts +1 -2
- package/dist/server/utils/audio/decoder.js +12 -49
- package/dist/server/utils/cache.d.ts +8 -19
- package/dist/server/utils/cache.js +15 -100
- package/dist/server/utils/hash.d.ts +5 -0
- package/dist/server/utils/hash.js +11 -0
- package/dist/server/utils/index.d.ts +2 -7
- package/dist/server/utils/index.js +2 -7
- package/dist/server/utils/tool-parser.js +14 -28
- package/dist/server/worker.d.ts +5 -4
- package/dist/server/worker.js +89 -22
- package/package.json +41 -148
- package/NOTICE +0 -695
- package/bare-imports.json +0 -44
- package/dist/client/api/get-model-info.d.ts +0 -36
- package/dist/client/api/get-model-info.js +0 -14
- package/dist/client/api/heartbeat.d.ts +0 -30
- package/dist/client/api/heartbeat.js +0 -38
- package/dist/client/api/invoke-plugin.d.ts +0 -15
- package/dist/client/api/invoke-plugin.js +0 -38
- package/dist/client/api/ocr.d.ts +0 -31
- package/dist/client/api/ocr.js +0 -88
- package/dist/client/api/registry.d.ts +0 -14
- package/dist/client/api/registry.js +0 -37
- package/dist/client/config-loader/config-utils.d.ts +0 -5
- package/dist/client/config-loader/config-utils.js +0 -20
- package/dist/client/config-loader/resolve-config.bare.d.ts +0 -9
- package/dist/client/config-loader/resolve-config.bare.js +0 -87
- package/dist/client/config-loader/resolve-config.expo.d.ts +0 -11
- package/dist/client/config-loader/resolve-config.expo.js +0 -62
- package/dist/client/config-loader/resolve-config.node.d.ts +0 -10
- package/dist/client/config-loader/resolve-config.node.js +0 -145
- package/dist/client/init-hooks.d.ts +0 -21
- package/dist/client/init-hooks.js +0 -66
- package/dist/client/rpc/expo-device-info.d.ts +0 -6
- package/dist/client/rpc/expo-device-info.js +0 -32
- package/dist/client/rpc/profiling/index.d.ts +0 -2
- package/dist/client/rpc/profiling/index.js +0 -1
- package/dist/client/rpc/profiling/profiler.d.ts +0 -27
- package/dist/client/rpc/profiling/profiler.js +0 -139
- package/dist/constants/registry.d.ts +0 -2
- package/dist/constants/registry.js +0 -1
- package/dist/examples/cache-management.d.ts +0 -2
- package/dist/examples/cache-management.js +0 -97
- package/dist/examples/config/blind-relay/blind-relay.config.d.ts +0 -5
- package/dist/examples/config/blind-relay/blind-relay.config.js +0 -7
- package/dist/examples/config/default/default.config.d.ts +0 -8
- package/dist/examples/config/default/default.config.js +0 -6
- package/dist/examples/config/plugins/plugins.config.d.ts +0 -5
- package/dist/examples/config/plugins/plugins.config.js +0 -4
- package/dist/examples/config-reload.d.ts +0 -2
- package/dist/examples/config-reload.js +0 -49
- package/dist/examples/default-config-usage.d.ts +0 -17
- package/dist/examples/default-config-usage.js +0 -47
- package/dist/examples/delegated-inference/consumer-profiled.d.ts +0 -2
- package/dist/examples/delegated-inference/consumer-profiled.js +0 -67
- package/dist/examples/download-with-blind-relays.d.ts +0 -2
- package/dist/examples/download-with-blind-relays.js +0 -49
- package/dist/examples/embed-p2p.d.ts +0 -2
- package/dist/examples/embed-p2p.js +0 -54
- package/dist/examples/llamacpp-p2p.d.ts +0 -2
- package/dist/examples/llamacpp-sharded.d.ts +0 -2
- package/dist/examples/llamacpp-sharded.js +0 -53
- package/dist/examples/logging-file-transport.d.ts +0 -2
- package/dist/examples/logging-streaming.d.ts +0 -2
- package/dist/examples/logging-streaming.js +0 -75
- package/dist/examples/mcp-websearch.d.ts +0 -13
- package/dist/examples/mcp-websearch.js +0 -176
- package/dist/examples/ocr-fasttext.d.ts +0 -2
- package/dist/examples/ocr-fasttext.js +0 -52
- package/dist/examples/plugins.d.ts +0 -14
- package/dist/examples/plugins.js +0 -129
- package/dist/examples/profiling/basic.d.ts +0 -2
- package/dist/examples/profiling/basic.js +0 -71
- package/dist/examples/profiling/per-call.d.ts +0 -2
- package/dist/examples/profiling/per-call.js +0 -30
- package/dist/examples/quickstart.d.ts +0 -2
- package/dist/examples/quickstart.js +0 -28
- package/dist/examples/rag/rag-hyperdb/cancellation.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/cancellation.js +0 -75
- package/dist/examples/rag/rag-hyperdb/ingest.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +0 -74
- package/dist/examples/rag/rag-hyperdb/workspaces.d.ts +0 -2
- package/dist/examples/rag/rag-hyperdb/workspaces.js +0 -178
- package/dist/examples/registry-query.d.ts +0 -2
- package/dist/examples/registry-query.js +0 -87
- package/dist/examples/seed-p2p.d.ts +0 -2
- package/dist/examples/transcription/parakeet-ctc-filesystem.d.ts +0 -2
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +0 -40
- package/dist/examples/transcription/parakeet-microphone-record.d.ts +0 -2
- package/dist/examples/transcription/parakeet-microphone-record.js +0 -95
- package/dist/examples/transcription/parakeet-sortformer.d.ts +0 -2
- package/dist/examples/transcription/parakeet-sortformer.js +0 -115
- package/dist/examples/transcription/parakeet-tdt-filesystem.d.ts +0 -2
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +0 -44
- package/dist/examples/transcription/whispercpp-filesystem.js +0 -69
- package/dist/examples/transcription/whispercpp-prompt.d.ts +0 -2
- package/dist/examples/transcription/whispercpp-prompt.js +0 -67
- package/dist/examples/translation/translation-bergamot-batch.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot-batch.js +0 -49
- package/dist/examples/translation/translation-bergamot-pivot.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot-pivot.js +0 -73
- package/dist/examples/translation/translation-bergamot.d.ts +0 -2
- package/dist/examples/translation/translation-bergamot.js +0 -39
- package/dist/examples/translation/translation-llm-afriquegemma.d.ts +0 -2
- package/dist/examples/translation/translation-llm-afriquegemma.js +0 -39
- package/dist/examples/tts/chatterbox.d.ts +0 -2
- package/dist/examples/tts/chatterbox.js +0 -59
- package/dist/examples/tts/supertonic.d.ts +0 -2
- package/dist/examples/tts/supertonic.js +0 -51
- package/dist/examples/tts/utils.d.ts +0 -17
- package/dist/expo/plugins/resolve-sdk-package-dir.d.ts +0 -15
- package/dist/expo/plugins/resolve-sdk-package-dir.js +0 -31
- package/dist/expo/plugins/withAndroidArchitecture.d.ts +0 -8
- package/dist/expo/plugins/withAndroidArchitecture.js +0 -52
- package/dist/expo/plugins/withAndroidNdkVersion.d.ts +0 -8
- package/dist/expo/plugins/withAndroidNdkVersion.js +0 -31
- package/dist/expo/plugins/withDeviceInfo.d.ts +0 -10
- package/dist/expo/plugins/withDeviceInfo.js +0 -48
- package/dist/logging/addon.d.ts +0 -6
- package/dist/logging/addon.js +0 -75
- package/dist/logging/client-logger.d.ts +0 -3
- package/dist/logging/client-logger.js +0 -24
- package/dist/logging/namespaces.d.ts +0 -6
- package/dist/logging/namespaces.js +0 -6
- package/dist/logging/registry.d.ts +0 -31
- package/dist/logging/registry.js +0 -62
- package/dist/logging/server-logger.d.ts +0 -3
- package/dist/logging/server-logger.js +0 -16
- package/dist/models/registry/models.d.ts +0 -10417
- package/dist/models/registry/models.js +0 -10757
- package/dist/models/update-models/codegen.d.ts +0 -3
- package/dist/models/update-models/codegen.js +0 -135
- package/dist/models/update-models/history.d.ts +0 -24
- package/dist/models/update-models/history.js +0 -107
- package/dist/models/update-models/index.d.ts +0 -2
- package/dist/models/update-models/index.js +0 -125
- package/dist/models/update-models/naming.d.ts +0 -4
- package/dist/models/update-models/naming.js +0 -370
- package/dist/models/update-models/processing.d.ts +0 -8
- package/dist/models/update-models/processing.js +0 -67
- package/dist/models/update-models/registry.d.ts +0 -4
- package/dist/models/update-models/registry.js +0 -67
- package/dist/models/update-models/shards.d.ts +0 -4
- package/dist/models/update-models/shards.js +0 -57
- package/dist/models/update-models/types.d.ts +0 -60
- package/dist/models/update-models/types.js +0 -1
- package/dist/models/update-models/utils.d.ts +0 -3
- package/dist/models/update-models/utils.js +0 -21
- package/dist/pear/pre.d.ts +0 -18
- package/dist/pear/pre.js +0 -433
- package/dist/profiling/aggregator.d.ts +0 -15
- package/dist/profiling/aggregator.js +0 -100
- package/dist/profiling/clock.d.ts +0 -12
- package/dist/profiling/clock.js +0 -51
- package/dist/profiling/controller.d.ts +0 -33
- package/dist/profiling/controller.js +0 -123
- package/dist/profiling/envelope.d.ts +0 -10
- package/dist/profiling/envelope.js +0 -36
- package/dist/profiling/events.d.ts +0 -20
- package/dist/profiling/events.js +0 -37
- package/dist/profiling/exporters.d.ts +0 -10
- package/dist/profiling/exporters.js +0 -236
- package/dist/profiling/index.d.ts +0 -36
- package/dist/profiling/index.js +0 -31
- package/dist/profiling/ring-buffer.d.ts +0 -19
- package/dist/profiling/ring-buffer.js +0 -83
- package/dist/profiling/types.d.ts +0 -47
- package/dist/profiling/types.js +0 -1
- package/dist/schemas/archive.d.ts +0 -9
- package/dist/schemas/archive.js +0 -17
- package/dist/schemas/engine-addon-map.d.ts +0 -5
- package/dist/schemas/engine-addon-map.js +0 -52
- package/dist/schemas/get-model-info.d.ts +0 -120
- package/dist/schemas/get-model-info.js +0 -58
- package/dist/schemas/heartbeat.d.ts +0 -17
- package/dist/schemas/heartbeat.js +0 -10
- package/dist/schemas/json-schema.d.ts +0 -16
- package/dist/schemas/json-schema.js +0 -2
- package/dist/schemas/mcp-adapter.d.ts +0 -47
- package/dist/schemas/mcp-adapter.js +0 -1
- package/dist/schemas/model-src-utils.d.ts +0 -148
- package/dist/schemas/model-src-utils.js +0 -35
- package/dist/schemas/model-types.d.ts +0 -183
- package/dist/schemas/model-types.js +0 -168
- package/dist/schemas/ocr.d.ts +0 -125
- package/dist/schemas/ocr.js +0 -57
- package/dist/schemas/path-validation.d.ts +0 -10
- package/dist/schemas/path-validation.js +0 -22
- package/dist/schemas/plugin.d.ts +0 -226
- package/dist/schemas/plugin.js +0 -158
- package/dist/schemas/profiling.d.ts +0 -105
- package/dist/schemas/profiling.js +0 -66
- package/dist/schemas/registry.d.ts +0 -356
- package/dist/schemas/registry.js +0 -93
- package/dist/schemas/reload-config.d.ts +0 -476
- package/dist/schemas/reload-config.js +0 -44
- package/dist/schemas/runtime-context.d.ts +0 -19
- package/dist/schemas/runtime-context.js +0 -7
- package/dist/schemas/sdk-config.d.ts +0 -2973
- package/dist/schemas/sdk-config.js +0 -136
- package/dist/schemas/sdk-errors-client.d.ts +0 -31
- package/dist/schemas/sdk-errors-client.js +0 -143
- package/dist/schemas/sdk-errors-registry.d.ts +0 -6
- package/dist/schemas/sdk-errors-registry.js +0 -8
- package/dist/schemas/sdk-errors-server.d.ts +0 -89
- package/dist/schemas/sdk-errors-server.js +0 -451
- package/dist/schemas/shard.d.ts +0 -21
- package/dist/schemas/shard.js +0 -17
- package/dist/schemas/tools.d.ts +0 -65
- package/dist/schemas/tools.js +0 -43
- package/dist/schemas/transcription-config.d.ts +0 -383
- package/dist/schemas/transcription-config.js +0 -95
- package/dist/scripts/run-security-tests-bare.d.ts +0 -2
- package/dist/scripts/run-security-tests-bare.js +0 -78
- package/dist/scripts/run-security-tests.d.ts +0 -2
- package/dist/scripts/run-security-tests.js +0 -22
- package/dist/scripts/run-unit-tests.d.ts +0 -2
- package/dist/scripts/run-unit-tests.js +0 -17
- package/dist/server/bare/ops/embed.d.ts +0 -12
- package/dist/server/bare/ops/load-model.d.ts +0 -9
- package/dist/server/bare/ops/load-model.js +0 -85
- package/dist/server/bare/ops/transcribe.d.ts +0 -3
- package/dist/server/bare/ops/transcribe.js +0 -75
- package/dist/server/bare/ops/translate.d.ts +0 -5
- package/dist/server/bare/ops/unload-model.js +0 -41
- package/dist/server/bare/plugins/index.d.ts +0 -8
- package/dist/server/bare/plugins/index.js +0 -7
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +0 -6
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +0 -34
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +0 -220
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +0 -155
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +0 -54
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +0 -87
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +0 -367
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +0 -201
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +0 -10
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +0 -110
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +0 -86
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +0 -117
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +0 -373
- package/dist/server/bare/plugins/onnx-tts/plugin.js +0 -182
- package/dist/server/bare/plugins/onnx-tts/wav-helper.d.ts +0 -14
- package/dist/server/bare/plugins/onnx-tts/wav-helper.js +0 -107
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +0 -317
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +0 -154
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +0 -237
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +0 -86
- package/dist/server/bare/rag-hyperdb/handlers/chunk.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/chunk.js +0 -7
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/close-workspace.js +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/delete-workspace.js +0 -14
- package/dist/server/bare/rag-hyperdb/handlers/ingest.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +0 -18
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.d.ts +0 -3
- package/dist/server/bare/rag-hyperdb/handlers/list-workspaces.js +0 -4
- package/dist/server/bare/rag-hyperdb/handlers/reindex.d.ts +0 -9
- package/dist/server/bare/rag-hyperdb/handlers/reindex.js +0 -16
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.d.ts +0 -7
- package/dist/server/bare/rag-hyperdb/rag-operation-manager.js +0 -39
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.d.ts +0 -15
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +0 -136
- package/dist/server/bare/registry/config-registry.d.ts +0 -14
- package/dist/server/bare/registry/config-registry.js +0 -82
- package/dist/server/bare/registry/model-config-registry.d.ts +0 -4
- package/dist/server/bare/registry/model-config-registry.js +0 -15
- package/dist/server/bare/registry/model-config-utils.d.ts +0 -15
- package/dist/server/bare/registry/model-config-utils.js +0 -112
- package/dist/server/bare/registry/registry-client.d.ts +0 -5
- package/dist/server/bare/registry/registry-client.js +0 -37
- package/dist/server/bare/registry/runtime-context-registry.d.ts +0 -7
- package/dist/server/bare/registry/runtime-context-registry.js +0 -26
- package/dist/server/bare/utils/audio-input.d.ts +0 -10
- package/dist/server/bare/utils/audio-input.js +0 -33
- package/dist/server/bare/utils/loader-adapter.d.ts +0 -7
- package/dist/server/bare/utils/loader-adapter.js +0 -9
- package/dist/server/env.d.ts +0 -22
- package/dist/server/env.js +0 -57
- package/dist/server/plugins/index.d.ts +0 -2
- package/dist/server/plugins/index.js +0 -1
- package/dist/server/plugins/registry.d.ts +0 -9
- package/dist/server/plugins/registry.js +0 -79
- package/dist/server/rpc/delegate-transport.d.ts +0 -19
- package/dist/server/rpc/delegate-transport.js +0 -236
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
- package/dist/server/rpc/handler-registry.d.ts +0 -3
- package/dist/server/rpc/handler-registry.js +0 -113
- package/dist/server/rpc/handler-utils.d.ts +0 -23
- package/dist/server/rpc/handler-utils.js +0 -170
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/cancel-delegated.js +0 -71
- package/dist/server/rpc/handlers/get-model-info.d.ts +0 -3
- package/dist/server/rpc/handlers/get-model-info.js +0 -164
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +0 -4
- package/dist/server/rpc/handlers/heartbeat-delegated.js +0 -32
- package/dist/server/rpc/handlers/heartbeat.d.ts +0 -3
- package/dist/server/rpc/handlers/heartbeat.js +0 -3
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +0 -6
- package/dist/server/rpc/handlers/load-model/download-stats.js +0 -87
- package/dist/server/rpc/handlers/load-model/handler.js +0 -187
- package/dist/server/rpc/handlers/load-model/registry.d.ts +0 -11
- package/dist/server/rpc/handlers/load-model/registry.js +0 -548
- package/dist/server/rpc/handlers/load-model/types.d.ts +0 -29
- package/dist/server/rpc/handlers/load-model/types.js +0 -1
- package/dist/server/rpc/handlers/ocr-stream.d.ts +0 -3
- package/dist/server/rpc/handlers/ocr-stream.js +0 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +0 -15
- package/dist/server/rpc/handlers/plugin-dispatch.js +0 -59
- package/dist/server/rpc/handlers/plugin-invoke.d.ts +0 -4
- package/dist/server/rpc/handlers/plugin-invoke.js +0 -92
- package/dist/server/rpc/handlers/registry.d.ts +0 -5
- package/dist/server/rpc/handlers/registry.js +0 -157
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +0 -3
- package/dist/server/rpc/handlers/unload-model-delegated.js +0 -32
- package/dist/server/rpc/profiling/context.d.ts +0 -18
- package/dist/server/rpc/profiling/context.js +0 -38
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +0 -32
- package/dist/server/rpc/profiling/delegation-profiler.js +0 -154
- package/dist/server/rpc/profiling/index.d.ts +0 -5
- package/dist/server/rpc/profiling/index.js +0 -4
- package/dist/server/rpc/profiling/operation-metrics.d.ts +0 -25
- package/dist/server/rpc/profiling/operation-metrics.js +0 -199
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +0 -18
- package/dist/server/rpc/profiling/operation-wrappers.js +0 -124
- package/dist/server/rpc/profiling/profiler.d.ts +0 -13
- package/dist/server/rpc/profiling/profiler.js +0 -97
- package/dist/server/utils/archive.d.ts +0 -4
- package/dist/server/utils/archive.js +0 -179
- package/dist/server/utils/checksum.d.ts +0 -4
- package/dist/server/utils/checksum.js +0 -31
- package/dist/server/utils/config-transform.d.ts +0 -3
- package/dist/server/utils/config-transform.js +0 -23
- package/dist/server/utils/formatting.d.ts +0 -19
- package/dist/server/utils/formatting.js +0 -61
- package/dist/server/utils/gguf-tensor-extractor.d.ts +0 -15
- package/dist/server/utils/gguf-tensor-extractor.js +0 -314
- package/dist/server/utils/path-security.d.ts +0 -12
- package/dist/server/utils/path-security.js +0 -25
- package/dist/server/utils/shard-utils.d.ts +0 -48
- package/dist/server/utils/shard-utils.js +0 -125
- package/dist/server/utils/tool-integration.d.ts +0 -13
- package/dist/server/utils/tool-integration.js +0 -43
- package/dist/server/worker-core.d.ts +0 -6
- package/dist/server/worker-core.js +0 -88
- package/dist/utils/errors-base.d.ts +0 -3
- package/dist/utils/errors-base.js +0 -13
- package/dist/utils/errors-client.d.ts +0 -137
- package/dist/utils/errors-client.js +0 -240
- package/dist/utils/errors-server.d.ts +0 -236
- package/dist/utils/errors-server.js +0 -412
- package/dist/utils/global-singleton.d.ts +0 -2
- package/dist/utils/global-singleton.js +0 -10
- package/dist/utils/mcp-adapter.d.ts +0 -12
- package/dist/utils/mcp-adapter.js +0 -103
- package/dist/utils/object.d.ts +0 -2
- package/dist/utils/object.js +0 -3
- package/dist/utils/path-sanitize.d.ts +0 -17
- package/dist/utils/path-sanitize.js +0 -54
- package/dist/utils/tool-helpers.d.ts +0 -25
- package/dist/utils/tool-helpers.js +0 -112
- package/expo/plugins/patches/android-link.mjs +0 -63
- package/expo/plugins/patches/ios-link.mjs +0 -63
- /package/dist/examples/{seed-p2p.js → seed-hyperdrive.js} +0 -0
- /package/dist/examples/{transcription/whispercpp-filesystem.d.ts → whispercpp-filesystem.d.ts} +0 -0
- /package/dist/examples/{transcription/whispercpp-microphone-record.d.ts → whispercpp-microphone-record.d.ts} +0 -0
- /package/dist/models/{registry → hyperdrive}/index.d.ts +0 -0
- /package/dist/server/bare/{ops → addons}/cancel.d.ts +0 -0
- /package/dist/server/bare/{plugins/onnx-tts/ops → addons/tts/handlers}/text-to-speech.d.ts +0 -0
- /package/dist/server/bare/{ops → addons}/unload-model.d.ts +0 -0
package/dist/schemas/common.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { heartbeatRequestSchema, heartbeatResponseSchema } from "./heartbeat.js";
|
|
2
|
+
import { pingRequestSchema, pingResponseSchema } from "./ping.js";
|
|
4
3
|
import { completionStreamRequestSchema, completionStreamResponseSchema, } from "./completion-stream.js";
|
|
5
4
|
import { loadModelRequestSchema, loadModelResponseSchema, modelProgressUpdateSchema, } from "./load-model.js";
|
|
6
5
|
import { downloadAssetRequestSchema, downloadAssetResponseSchema, } from "./download-asset.js";
|
|
@@ -14,14 +13,10 @@ import { translateRequestSchema, translateResponseSchema } from "./translate.js"
|
|
|
14
13
|
import { loggingStreamRequestSchema, loggingStreamResponseSchema, } from "./logging-stream.js";
|
|
15
14
|
import { ttsRequestSchema, ttsResponseSchema } from "./text-to-speech.js";
|
|
16
15
|
import { errorResponseSchema } from "./error.js";
|
|
17
|
-
import { ragRequestSchema, ragResponseSchema
|
|
16
|
+
import { ragRequestSchema, ragResponseSchema } from "./rag.js";
|
|
18
17
|
import { deleteCacheRequestSchema, deleteCacheResponseSchema, } from "./delete-cache.js";
|
|
19
|
-
import { getModelInfoRequestSchema, getModelInfoResponseSchema, } from "./get-model-info.js";
|
|
20
|
-
import { ocrStreamRequestSchema, ocrStreamResponseSchema } from "./ocr.js";
|
|
21
|
-
import { pluginInvokeRequestSchema, pluginInvokeResponseSchema, pluginInvokeStreamRequestSchema, pluginInvokeStreamResponseSchema, } from "./plugin.js";
|
|
22
|
-
import { modelRegistryListRequestSchema, modelRegistryListResponseSchema, modelRegistrySearchRequestSchema, modelRegistrySearchResponseSchema, modelRegistryGetModelRequestSchema, modelRegistryGetModelResponseSchema, } from "./registry.js";
|
|
23
18
|
export const requestSchema = z.union([
|
|
24
|
-
|
|
19
|
+
pingRequestSchema,
|
|
25
20
|
loadModelRequestSchema,
|
|
26
21
|
downloadAssetRequestSchema,
|
|
27
22
|
completionStreamRequestSchema,
|
|
@@ -36,16 +31,9 @@ export const requestSchema = z.union([
|
|
|
36
31
|
stopProvideRequestSchema,
|
|
37
32
|
ragRequestSchema,
|
|
38
33
|
deleteCacheRequestSchema,
|
|
39
|
-
getModelInfoRequestSchema,
|
|
40
|
-
ocrStreamRequestSchema,
|
|
41
|
-
pluginInvokeRequestSchema,
|
|
42
|
-
pluginInvokeStreamRequestSchema,
|
|
43
|
-
modelRegistryListRequestSchema,
|
|
44
|
-
modelRegistrySearchRequestSchema,
|
|
45
|
-
modelRegistryGetModelRequestSchema,
|
|
46
34
|
]);
|
|
47
35
|
export const responseSchema = z.discriminatedUnion("type", [
|
|
48
|
-
|
|
36
|
+
pingResponseSchema,
|
|
49
37
|
loadModelResponseSchema,
|
|
50
38
|
downloadAssetResponseSchema,
|
|
51
39
|
completionStreamResponseSchema,
|
|
@@ -61,19 +49,8 @@ export const responseSchema = z.discriminatedUnion("type", [
|
|
|
61
49
|
stopProvideResponseSchema,
|
|
62
50
|
errorResponseSchema,
|
|
63
51
|
ragResponseSchema,
|
|
64
|
-
ragProgressUpdateSchema,
|
|
65
52
|
deleteCacheResponseSchema,
|
|
66
|
-
getModelInfoResponseSchema,
|
|
67
|
-
ocrStreamResponseSchema,
|
|
68
|
-
pluginInvokeResponseSchema,
|
|
69
|
-
pluginInvokeStreamResponseSchema,
|
|
70
|
-
modelRegistryListResponseSchema,
|
|
71
|
-
modelRegistrySearchResponseSchema,
|
|
72
|
-
modelRegistryGetModelResponseSchema,
|
|
73
53
|
]);
|
|
74
54
|
export const rpcOptionsSchema = z.object({
|
|
75
55
|
timeout: z.number().min(100).optional(),
|
|
76
|
-
healthCheckTimeout: z.number().min(100).optional(),
|
|
77
|
-
forceNewConnection: z.boolean().optional(),
|
|
78
|
-
profiling: perCallProfilingSchema.optional(),
|
|
79
56
|
});
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const toolSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"function">;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
parameters: z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"object">;
|
|
8
|
+
properties: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9
|
+
type: z.ZodEnum<{
|
|
10
|
+
string: "string";
|
|
11
|
+
number: "number";
|
|
12
|
+
boolean: "boolean";
|
|
13
|
+
object: "object";
|
|
14
|
+
array: "array";
|
|
15
|
+
integer: "integer";
|
|
16
|
+
}>;
|
|
17
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
}, z.core.$strip>;
|
|
2
23
|
export declare const attachmentSchema: z.ZodObject<{
|
|
3
24
|
path: z.ZodString;
|
|
4
25
|
}, z.core.$strip>;
|
|
5
|
-
export declare const generationParamsSchema: z.ZodObject<{
|
|
6
|
-
temp: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
top_p: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
top_k: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
predict: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
repeat_penalty: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
26
|
export declare const completionParamsSchema: z.ZodObject<{
|
|
16
27
|
history: z.ZodArray<z.ZodObject<{
|
|
17
28
|
role: z.ZodString;
|
|
@@ -55,16 +66,6 @@ export declare const completionClientParamsSchema: z.ZodObject<{
|
|
|
55
66
|
}, z.core.$strip>>>;
|
|
56
67
|
stream: z.ZodBoolean;
|
|
57
68
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
58
|
-
generationParams: z.ZodOptional<z.ZodObject<{
|
|
59
|
-
temp: z.ZodOptional<z.ZodNumber>;
|
|
60
|
-
top_p: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
top_k: z.ZodOptional<z.ZodNumber>;
|
|
62
|
-
predict: z.ZodOptional<z.ZodNumber>;
|
|
63
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
64
|
-
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
66
|
-
repeat_penalty: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
}, z.core.$strict>>;
|
|
68
69
|
}, z.core.$strip>;
|
|
69
70
|
export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
70
71
|
history: z.ZodArray<z.ZodObject<{
|
|
@@ -98,16 +99,6 @@ export declare const completionStreamRequestSchema: z.ZodObject<{
|
|
|
98
99
|
}, z.core.$strip>>>;
|
|
99
100
|
stream: z.ZodBoolean;
|
|
100
101
|
kvCache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
101
|
-
generationParams: z.ZodOptional<z.ZodObject<{
|
|
102
|
-
temp: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
top_p: z.ZodOptional<z.ZodNumber>;
|
|
104
|
-
top_k: z.ZodOptional<z.ZodNumber>;
|
|
105
|
-
predict: z.ZodOptional<z.ZodNumber>;
|
|
106
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
107
|
-
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
108
|
-
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
repeat_penalty: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
}, z.core.$strict>>;
|
|
111
102
|
type: z.ZodLiteral<"completionStream">;
|
|
112
103
|
}, z.core.$strip>;
|
|
113
104
|
export declare const completionStatsSchema: z.ZodObject<{
|
|
@@ -115,6 +106,41 @@ export declare const completionStatsSchema: z.ZodObject<{
|
|
|
115
106
|
tokensPerSecond: z.ZodNumber;
|
|
116
107
|
cacheTokens: z.ZodNumber;
|
|
117
108
|
}, z.core.$strip>;
|
|
109
|
+
export declare const toolCallSchema: z.ZodObject<{
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
113
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export declare const toolCallErrorSchema: z.ZodObject<{
|
|
116
|
+
code: z.ZodEnum<{
|
|
117
|
+
PARSE_ERROR: "PARSE_ERROR";
|
|
118
|
+
VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
119
|
+
UNKNOWN_TOOL: "UNKNOWN_TOOL";
|
|
120
|
+
}>;
|
|
121
|
+
message: z.ZodString;
|
|
122
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export declare const toolCallEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"toolCall">;
|
|
126
|
+
call: z.ZodObject<{
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"toolCallError">;
|
|
134
|
+
error: z.ZodObject<{
|
|
135
|
+
code: z.ZodEnum<{
|
|
136
|
+
PARSE_ERROR: "PARSE_ERROR";
|
|
137
|
+
VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
138
|
+
UNKNOWN_TOOL: "UNKNOWN_TOOL";
|
|
139
|
+
}>;
|
|
140
|
+
message: z.ZodString;
|
|
141
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
}, z.core.$strip>]>;
|
|
118
144
|
export declare const completionStreamResponseSchema: z.ZodObject<{
|
|
119
145
|
type: z.ZodLiteral<"completionStream">;
|
|
120
146
|
token: z.ZodString;
|
|
@@ -152,11 +178,14 @@ export declare const completionStreamResponseSchema: z.ZodObject<{
|
|
|
152
178
|
}, z.core.$strip>>>;
|
|
153
179
|
error: z.ZodOptional<z.ZodString>;
|
|
154
180
|
}, z.core.$strip>;
|
|
155
|
-
export type GenerationParams = z.infer<typeof generationParamsSchema>;
|
|
156
181
|
export type CompletionParams = z.infer<typeof completionParamsSchema>;
|
|
157
182
|
export type CompletionClientParams = z.input<typeof completionClientParamsSchema>;
|
|
158
183
|
export type CompletionStreamRequest = z.infer<typeof completionStreamRequestSchema>;
|
|
159
184
|
export type CompletionStreamResponse = z.infer<typeof completionStreamResponseSchema>;
|
|
160
185
|
export type Attachment = z.infer<typeof attachmentSchema>;
|
|
186
|
+
export type Tool = z.infer<typeof toolSchema>;
|
|
161
187
|
export type CompletionStats = z.infer<typeof completionStatsSchema>;
|
|
188
|
+
export type ToolCall = z.infer<typeof toolCallSchema>;
|
|
189
|
+
export type ToolCallError = z.infer<typeof toolCallErrorSchema>;
|
|
190
|
+
export type ToolCallEvent = z.infer<typeof toolCallEventSchema>;
|
|
162
191
|
//# sourceMappingURL=completion-stream.d.ts.map
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
export const toolSchema = z.object({
|
|
3
|
+
type: z.literal("function"),
|
|
4
|
+
name: z.string(),
|
|
5
|
+
description: z.string(),
|
|
6
|
+
parameters: z.object({
|
|
7
|
+
type: z.literal("object"),
|
|
8
|
+
properties: z.record(z.string(), z.object({
|
|
9
|
+
type: z.enum([
|
|
10
|
+
"string",
|
|
11
|
+
"number",
|
|
12
|
+
"integer",
|
|
13
|
+
"boolean",
|
|
14
|
+
"object",
|
|
15
|
+
"array",
|
|
16
|
+
]),
|
|
17
|
+
description: z.string().optional(),
|
|
18
|
+
enum: z.array(z.string()).optional(),
|
|
19
|
+
})),
|
|
20
|
+
required: z.array(z.string()).optional(),
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
3
23
|
export const attachmentSchema = z.object({
|
|
4
24
|
path: z.string(),
|
|
5
25
|
});
|
|
6
|
-
const kvCacheSchema = z.union([
|
|
7
|
-
z.boolean(),
|
|
8
|
-
z.string().min(1, "KV cache key cannot be empty string"),
|
|
9
|
-
]);
|
|
10
|
-
export const generationParamsSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
temp: z.number().optional(),
|
|
13
|
-
top_p: z.number().optional(),
|
|
14
|
-
top_k: z.number().optional(),
|
|
15
|
-
predict: z.number().optional(),
|
|
16
|
-
seed: z.number().optional(),
|
|
17
|
-
frequency_penalty: z.number().optional(),
|
|
18
|
-
presence_penalty: z.number().optional(),
|
|
19
|
-
repeat_penalty: z.number().optional(),
|
|
20
|
-
})
|
|
21
|
-
.strict();
|
|
22
26
|
export const completionParamsSchema = z.object({
|
|
23
27
|
history: z.array(z.object({
|
|
24
28
|
role: z.string(),
|
|
@@ -26,13 +30,12 @@ export const completionParamsSchema = z.object({
|
|
|
26
30
|
attachments: z.array(attachmentSchema).optional(),
|
|
27
31
|
})),
|
|
28
32
|
modelId: z.string(),
|
|
29
|
-
kvCache:
|
|
33
|
+
kvCache: z.union([z.boolean(), z.string()]).optional(),
|
|
30
34
|
});
|
|
31
35
|
export const completionClientParamsSchema = completionParamsSchema.extend({
|
|
32
36
|
tools: z.array(toolSchema).optional(),
|
|
33
37
|
stream: z.boolean(),
|
|
34
|
-
kvCache:
|
|
35
|
-
generationParams: generationParamsSchema.optional(),
|
|
38
|
+
kvCache: z.union([z.boolean(), z.string()]).optional(),
|
|
36
39
|
});
|
|
37
40
|
export const completionStreamRequestSchema = completionClientParamsSchema.extend({
|
|
38
41
|
type: z.literal("completionStream"),
|
|
@@ -42,6 +45,27 @@ export const completionStatsSchema = z.object({
|
|
|
42
45
|
tokensPerSecond: z.number(),
|
|
43
46
|
cacheTokens: z.number(),
|
|
44
47
|
});
|
|
48
|
+
export const toolCallSchema = z.object({
|
|
49
|
+
id: z.string(),
|
|
50
|
+
name: z.string(),
|
|
51
|
+
arguments: z.record(z.string(), z.unknown()),
|
|
52
|
+
raw: z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
export const toolCallErrorSchema = z.object({
|
|
55
|
+
code: z.enum(["PARSE_ERROR", "VALIDATION_ERROR", "UNKNOWN_TOOL"]),
|
|
56
|
+
message: z.string(),
|
|
57
|
+
raw: z.string().optional(),
|
|
58
|
+
});
|
|
59
|
+
export const toolCallEventSchema = z.union([
|
|
60
|
+
z.object({
|
|
61
|
+
type: z.literal("toolCall"),
|
|
62
|
+
call: toolCallSchema,
|
|
63
|
+
}),
|
|
64
|
+
z.object({
|
|
65
|
+
type: z.literal("toolCallError"),
|
|
66
|
+
error: toolCallErrorSchema,
|
|
67
|
+
}),
|
|
68
|
+
]);
|
|
45
69
|
export const completionStreamResponseSchema = z.object({
|
|
46
70
|
type: z.literal("completionStream"),
|
|
47
71
|
token: z.string(),
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const delegateBaseSchema: z.ZodObject<{
|
|
3
|
-
topic: z.ZodString;
|
|
4
|
-
providerPublicKey: z.ZodString;
|
|
5
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
2
|
export declare const delegateSchema: z.ZodOptional<z.ZodObject<{
|
|
9
3
|
topic: z.ZodString;
|
|
10
4
|
providerPublicKey: z.ZodString;
|
|
11
5
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
13
6
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
14
|
-
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
7
|
}, z.core.$strip>>;
|
|
16
|
-
export type DelegateBase = z.infer<typeof delegateBaseSchema>;
|
|
17
8
|
export type Delegate = z.infer<typeof delegateSchema>;
|
|
18
9
|
//# sourceMappingURL=delegate.d.ts.map
|
package/dist/schemas/delegate.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export const
|
|
2
|
+
export const delegateSchema = z
|
|
3
|
+
.object({
|
|
3
4
|
topic: z.string(),
|
|
4
5
|
providerPublicKey: z.string(),
|
|
5
6
|
timeout: z.number().min(100).optional(),
|
|
6
|
-
healthCheckTimeout: z.number().min(100).optional(),
|
|
7
|
-
});
|
|
8
|
-
export const delegateSchema = delegateBaseSchema
|
|
9
|
-
.extend({
|
|
10
7
|
fallbackToLocal: z.boolean().optional().default(false),
|
|
11
|
-
forceNewConnection: z.boolean().optional().default(false),
|
|
12
8
|
})
|
|
13
9
|
.optional();
|
|
@@ -1,120 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { ModelProgressUpdate } from "./load-model";
|
|
3
3
|
export declare const downloadAssetOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
4
|
-
assetSrc: z.
|
|
5
|
-
src: z.ZodString;
|
|
6
|
-
name: z.ZodOptional<z.ZodString>;
|
|
7
|
-
modelId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
registryPath: z.ZodOptional<z.ZodString>;
|
|
9
|
-
registrySource: z.ZodOptional<z.ZodString>;
|
|
10
|
-
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
11
|
-
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
engine: z.ZodOptional<z.ZodString>;
|
|
13
|
-
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
15
|
-
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
16
|
-
"llamacpp-completion": "llamacpp-completion";
|
|
17
|
-
"whispercpp-transcription": "whispercpp-transcription";
|
|
18
|
-
"llamacpp-embedding": "llamacpp-embedding";
|
|
19
|
-
"nmtcpp-translation": "nmtcpp-translation";
|
|
20
|
-
"onnx-tts": "onnx-tts";
|
|
21
|
-
"parakeet-transcription": "parakeet-transcription";
|
|
22
|
-
"onnx-ocr": "onnx-ocr";
|
|
23
|
-
llm: "llm";
|
|
24
|
-
whisper: "whisper";
|
|
25
|
-
embeddings: "embeddings";
|
|
26
|
-
nmt: "nmt";
|
|
27
|
-
parakeet: "parakeet";
|
|
28
|
-
tts: "tts";
|
|
29
|
-
ocr: "ocr";
|
|
30
|
-
}>, z.ZodLiteral<"vad">]>>;
|
|
31
|
-
}, z.core.$strip>]>;
|
|
4
|
+
assetSrc: z.ZodString;
|
|
32
5
|
seed: z.ZodOptional<z.ZodBoolean>;
|
|
33
6
|
}, z.core.$strip>, z.ZodTransform<{
|
|
34
7
|
seed: boolean;
|
|
35
|
-
assetSrc: string | {
|
|
36
|
-
src: string;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
modelId?: string | undefined;
|
|
39
|
-
registryPath?: string | undefined;
|
|
40
|
-
registrySource?: string | undefined;
|
|
41
|
-
blobCoreKey?: string | undefined;
|
|
42
|
-
blobIndex?: number | undefined;
|
|
43
|
-
engine?: string | undefined;
|
|
44
|
-
expectedSize?: number | undefined;
|
|
45
|
-
sha256Checksum?: string | undefined;
|
|
46
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
47
|
-
};
|
|
48
|
-
}, {
|
|
49
|
-
assetSrc: string | {
|
|
50
|
-
src: string;
|
|
51
|
-
name?: string | undefined;
|
|
52
|
-
modelId?: string | undefined;
|
|
53
|
-
registryPath?: string | undefined;
|
|
54
|
-
registrySource?: string | undefined;
|
|
55
|
-
blobCoreKey?: string | undefined;
|
|
56
|
-
blobIndex?: number | undefined;
|
|
57
|
-
engine?: string | undefined;
|
|
58
|
-
expectedSize?: number | undefined;
|
|
59
|
-
sha256Checksum?: string | undefined;
|
|
60
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
61
|
-
};
|
|
62
|
-
seed?: boolean | undefined;
|
|
63
|
-
}>>;
|
|
64
|
-
export declare const downloadAssetOptionsToRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
65
|
-
assetSrc: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
66
|
-
src: z.ZodString;
|
|
67
|
-
name: z.ZodOptional<z.ZodString>;
|
|
68
|
-
modelId: z.ZodOptional<z.ZodString>;
|
|
69
|
-
registryPath: z.ZodOptional<z.ZodString>;
|
|
70
|
-
registrySource: z.ZodOptional<z.ZodString>;
|
|
71
|
-
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
72
|
-
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
73
|
-
engine: z.ZodOptional<z.ZodString>;
|
|
74
|
-
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
75
|
-
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
76
|
-
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
77
|
-
"llamacpp-completion": "llamacpp-completion";
|
|
78
|
-
"whispercpp-transcription": "whispercpp-transcription";
|
|
79
|
-
"llamacpp-embedding": "llamacpp-embedding";
|
|
80
|
-
"nmtcpp-translation": "nmtcpp-translation";
|
|
81
|
-
"onnx-tts": "onnx-tts";
|
|
82
|
-
"parakeet-transcription": "parakeet-transcription";
|
|
83
|
-
"onnx-ocr": "onnx-ocr";
|
|
84
|
-
llm: "llm";
|
|
85
|
-
whisper: "whisper";
|
|
86
|
-
embeddings: "embeddings";
|
|
87
|
-
nmt: "nmt";
|
|
88
|
-
parakeet: "parakeet";
|
|
89
|
-
tts: "tts";
|
|
90
|
-
ocr: "ocr";
|
|
91
|
-
}>, z.ZodLiteral<"vad">]>>;
|
|
92
|
-
}, z.core.$strip>]>;
|
|
93
|
-
seed: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
-
onProgress: z.ZodOptional<z.ZodUnknown>;
|
|
95
|
-
withProgress: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
97
|
-
type: "downloadAsset";
|
|
98
8
|
assetSrc: string;
|
|
99
|
-
withProgress: boolean;
|
|
100
|
-
seed: boolean;
|
|
101
9
|
}, {
|
|
102
|
-
assetSrc: string
|
|
103
|
-
src: string;
|
|
104
|
-
name?: string | undefined;
|
|
105
|
-
modelId?: string | undefined;
|
|
106
|
-
registryPath?: string | undefined;
|
|
107
|
-
registrySource?: string | undefined;
|
|
108
|
-
blobCoreKey?: string | undefined;
|
|
109
|
-
blobIndex?: number | undefined;
|
|
110
|
-
engine?: string | undefined;
|
|
111
|
-
expectedSize?: number | undefined;
|
|
112
|
-
sha256Checksum?: string | undefined;
|
|
113
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
114
|
-
};
|
|
10
|
+
assetSrc: string;
|
|
115
11
|
seed?: boolean | undefined;
|
|
116
|
-
onProgress?: unknown;
|
|
117
|
-
withProgress?: boolean | undefined;
|
|
118
12
|
}>>;
|
|
119
13
|
export declare const downloadAssetRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
120
14
|
type: z.ZodLiteral<"downloadAsset">;
|
|
@@ -141,13 +35,6 @@ export declare const downloadAssetResponseSchema: z.ZodObject<{
|
|
|
141
35
|
export declare const downloadTypeSchema: z.ZodEnum<{
|
|
142
36
|
hyperdrive: "hyperdrive";
|
|
143
37
|
http: "http";
|
|
144
|
-
registry: "registry";
|
|
145
|
-
}>;
|
|
146
|
-
export declare const sourceTypeSchema: z.ZodEnum<{
|
|
147
|
-
hyperdrive: "hyperdrive";
|
|
148
|
-
http: "http";
|
|
149
|
-
registry: "registry";
|
|
150
|
-
filesystem: "filesystem";
|
|
151
38
|
}>;
|
|
152
39
|
export declare const downloadMetadataSchema: z.ZodObject<{
|
|
153
40
|
key: z.ZodString;
|
|
@@ -155,7 +42,6 @@ export declare const downloadMetadataSchema: z.ZodObject<{
|
|
|
155
42
|
type: z.ZodEnum<{
|
|
156
43
|
hyperdrive: "hyperdrive";
|
|
157
44
|
http: "http";
|
|
158
|
-
registry: "registry";
|
|
159
45
|
}>;
|
|
160
46
|
}, z.core.$strip>;
|
|
161
47
|
export declare const hyperdriveDownloadMetadataSchema: z.ZodObject<{
|
|
@@ -172,19 +58,12 @@ export declare const httpDownloadMetadataSchema: z.ZodObject<{
|
|
|
172
58
|
url: z.ZodURL;
|
|
173
59
|
modelPath: z.ZodString;
|
|
174
60
|
}, z.core.$strip>;
|
|
175
|
-
export declare const registryDownloadMetadataSchema: z.ZodObject<{
|
|
176
|
-
key: z.ZodString;
|
|
177
|
-
startTime: z.ZodNumber;
|
|
178
|
-
type: z.ZodLiteral<"registry">;
|
|
179
|
-
registryPath: z.ZodString;
|
|
180
|
-
}, z.core.$strip>;
|
|
181
61
|
export type DownloadAssetOptions = z.input<typeof downloadAssetOptionsSchema> & {
|
|
182
62
|
onProgress?: (progress: ModelProgressUpdate) => void;
|
|
183
63
|
};
|
|
184
64
|
export type DownloadAssetRequest = z.infer<typeof downloadAssetRequestSchema>;
|
|
185
65
|
export type DownloadAssetResponse = z.infer<typeof downloadAssetResponseSchema>;
|
|
186
66
|
export type DownloadType = z.infer<typeof downloadTypeSchema>;
|
|
187
|
-
export type SourceType = z.infer<typeof sourceTypeSchema>;
|
|
188
67
|
export type BaseDownloadEntry = z.infer<typeof downloadMetadataSchema> & {
|
|
189
68
|
promise: Promise<string>;
|
|
190
69
|
abortController: AbortController;
|
|
@@ -192,6 +71,5 @@ export type BaseDownloadEntry = z.infer<typeof downloadMetadataSchema> & {
|
|
|
192
71
|
};
|
|
193
72
|
export type HyperdriveDownloadEntry = BaseDownloadEntry & z.infer<typeof hyperdriveDownloadMetadataSchema>;
|
|
194
73
|
export type HttpDownloadEntry = BaseDownloadEntry & z.infer<typeof httpDownloadMetadataSchema>;
|
|
195
|
-
export type
|
|
196
|
-
export type DownloadEntry = HyperdriveDownloadEntry | HttpDownloadEntry | RegistryDownloadEntry;
|
|
74
|
+
export type DownloadEntry = HyperdriveDownloadEntry | HttpDownloadEntry;
|
|
197
75
|
//# sourceMappingURL=download-asset.d.ts.map
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
assetSrc:
|
|
2
|
+
export const downloadAssetOptionsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
assetSrc: z.string(),
|
|
5
5
|
seed: z.boolean().optional(),
|
|
6
|
-
});
|
|
7
|
-
export const downloadAssetOptionsSchema = downloadAssetOptionsBaseSchema.transform((data) => ({
|
|
8
|
-
...data,
|
|
9
|
-
seed: data.seed ?? false,
|
|
10
|
-
}));
|
|
11
|
-
export const downloadAssetOptionsToRequestSchema = downloadAssetOptionsBaseSchema
|
|
12
|
-
.extend({
|
|
13
|
-
onProgress: z.unknown().optional(),
|
|
14
|
-
withProgress: z.boolean().optional(),
|
|
15
6
|
})
|
|
16
7
|
.transform((data) => ({
|
|
17
|
-
|
|
18
|
-
assetSrc: modelInputToSrcSchema.parse(data.assetSrc),
|
|
19
|
-
withProgress: data.withProgress ?? !!data.onProgress,
|
|
8
|
+
...data,
|
|
20
9
|
seed: data.seed ?? false,
|
|
21
10
|
}));
|
|
22
11
|
export const downloadAssetRequestSchema = z
|
|
@@ -36,9 +25,7 @@ export const downloadAssetResponseSchema = z.object({
|
|
|
36
25
|
assetId: z.string().optional(),
|
|
37
26
|
error: z.string().optional(),
|
|
38
27
|
});
|
|
39
|
-
const
|
|
40
|
-
export const downloadTypeSchema = z.enum(downloadTypes);
|
|
41
|
-
export const sourceTypeSchema = z.enum([...downloadTypes, "filesystem"]);
|
|
28
|
+
export const downloadTypeSchema = z.enum(["hyperdrive", "http"]);
|
|
42
29
|
export const downloadMetadataSchema = z.object({
|
|
43
30
|
key: z.string(),
|
|
44
31
|
startTime: z.number(),
|
|
@@ -54,7 +41,3 @@ export const httpDownloadMetadataSchema = downloadMetadataSchema.extend({
|
|
|
54
41
|
url: z.url(),
|
|
55
42
|
modelPath: z.string(),
|
|
56
43
|
});
|
|
57
|
-
export const registryDownloadMetadataSchema = downloadMetadataSchema.extend({
|
|
58
|
-
type: z.literal("registry"),
|
|
59
|
-
registryPath: z.string(),
|
|
60
|
-
});
|
package/dist/schemas/embed.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const embedParamsSchema: z.ZodObject<{
|
|
3
3
|
modelId: z.ZodString;
|
|
4
|
-
text: z.
|
|
4
|
+
text: z.ZodString;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export declare const embedRequestSchema: z.ZodObject<{
|
|
7
7
|
modelId: z.ZodString;
|
|
8
|
-
text: z.
|
|
8
|
+
text: z.ZodString;
|
|
9
9
|
type: z.ZodLiteral<"embed">;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export declare const embedResponseSchema: z.ZodObject<{
|
|
12
12
|
type: z.ZodLiteral<"embed">;
|
|
13
13
|
success: z.ZodBoolean;
|
|
14
|
-
embedding: z.ZodDefault<z.
|
|
14
|
+
embedding: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
15
15
|
error: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
export type EmbedParams = z.infer<typeof embedParamsSchema>;
|
package/dist/schemas/embed.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const embedParamsSchema = z.object({
|
|
3
3
|
modelId: z.string(),
|
|
4
|
-
text: z.
|
|
5
|
-
z.string().min(1, "Text cannot be empty"),
|
|
6
|
-
z
|
|
7
|
-
.array(z.string().min(1, "Text cannot be empty"))
|
|
8
|
-
.min(1, "Text array cannot be empty"),
|
|
9
|
-
]),
|
|
4
|
+
text: z.string().min(1, "Text cannot be empty"),
|
|
10
5
|
});
|
|
11
6
|
export const embedRequestSchema = embedParamsSchema.extend({
|
|
12
7
|
type: z.literal("embed"),
|
|
@@ -14,8 +9,6 @@ export const embedRequestSchema = embedParamsSchema.extend({
|
|
|
14
9
|
export const embedResponseSchema = z.object({
|
|
15
10
|
type: z.literal("embed"),
|
|
16
11
|
success: z.boolean(),
|
|
17
|
-
embedding: z
|
|
18
|
-
.union([z.array(z.number()), z.array(z.array(z.number()))])
|
|
19
|
-
.default([]),
|
|
12
|
+
embedding: z.array(z.number()).default([]),
|
|
20
13
|
error: z.string().optional(),
|
|
21
14
|
});
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
export * from "./archive";
|
|
2
1
|
export * from "./cancel";
|
|
3
2
|
export * from "./completion-stream";
|
|
4
|
-
export * from "./tools";
|
|
5
3
|
export * from "./delegate";
|
|
6
4
|
export * from "./delete-cache";
|
|
7
5
|
export * from "./download-asset";
|
|
8
6
|
export * from "./embed";
|
|
9
7
|
export * from "./load-model";
|
|
10
|
-
export * from "./reload-config";
|
|
11
8
|
export * from "./logging-stream";
|
|
12
9
|
export * from "./provide";
|
|
13
10
|
export * from "./stop-provide";
|
|
14
11
|
export * from "./unload-model";
|
|
15
|
-
export * from "./
|
|
12
|
+
export * from "./ping";
|
|
16
13
|
export * from "./common";
|
|
17
14
|
export * from "./transcription";
|
|
18
15
|
export * from "./translate";
|
|
19
16
|
export * from "./translation-config";
|
|
20
17
|
export * from "./llamacpp-config";
|
|
21
|
-
export * from "./
|
|
18
|
+
export * from "./whispercpp-config";
|
|
22
19
|
export * from "./text-to-speech";
|
|
23
20
|
export * from "./error";
|
|
24
21
|
export * from "./rag";
|
|
25
|
-
export * from "./ocr";
|
|
26
|
-
export * from "./shard";
|
|
27
|
-
export { SDK_CLIENT_ERROR_CODES } from "./sdk-errors-client";
|
|
28
|
-
export { SDK_SERVER_ERROR_CODES } from "./sdk-errors-server";
|
|
29
|
-
export { REGISTRY_ERROR_CODES } from "./sdk-errors-registry";
|
|
30
|
-
export { qvacConfigSchema, deviceMatchSchema, deviceConfigDefaultsSchema, devicePatternSchema, type QvacConfig, type DeviceMatch, type DeviceConfigDefaults, type DevicePattern, } from "./sdk-config";
|
|
31
|
-
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, type ProfilerMode, type ServerBreakdown, type DelegationBreakdown, type OperationEvent, type ProfilingRequestMeta, type ProfilingResponseMeta, type PerCallProfiling, } from "./profiling";
|
|
32
|
-
export { runtimeContextSchema, type RuntimeContext } from "./runtime-context";
|
|
33
|
-
export * from "./get-model-info";
|
|
34
|
-
export * from "./model-src-utils";
|
|
35
|
-
export * from "./json-schema";
|
|
36
|
-
export { type McpClient, type McpClientInput } from "./mcp-adapter";
|
|
37
|
-
export { PUBLIC_MODEL_TYPES as MODEL_TYPES, ModelType, type CanonicalModelType, type ModelTypeInput, normalizeModelType, isCanonicalModelType, isModelTypeAlias, } from "./model-types";
|
|
38
|
-
export * from "./plugin";
|
|
39
|
-
export * from "./registry";
|
|
40
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
// Re-export all schemas and types
|
|
2
|
-
export * from "./archive.js";
|
|
3
2
|
export * from "./cancel.js";
|
|
4
3
|
export * from "./completion-stream.js";
|
|
5
|
-
export * from "./tools.js";
|
|
6
4
|
export * from "./delegate.js";
|
|
7
5
|
export * from "./delete-cache.js";
|
|
8
6
|
export * from "./download-asset.js";
|
|
9
7
|
export * from "./embed.js";
|
|
10
8
|
export * from "./load-model.js";
|
|
11
|
-
export * from "./reload-config.js";
|
|
12
9
|
export * from "./logging-stream.js";
|
|
13
10
|
export * from "./provide.js";
|
|
14
11
|
export * from "./stop-provide.js";
|
|
15
12
|
export * from "./unload-model.js";
|
|
16
|
-
export * from "./
|
|
13
|
+
export * from "./ping.js";
|
|
17
14
|
export * from "./common.js";
|
|
18
15
|
export * from "./transcription.js";
|
|
19
16
|
export * from "./translate.js";
|
|
20
17
|
export * from "./translation-config.js";
|
|
21
18
|
export * from "./llamacpp-config.js";
|
|
22
|
-
export * from "./
|
|
19
|
+
export * from "./whispercpp-config.js";
|
|
23
20
|
export * from "./text-to-speech.js";
|
|
24
21
|
export * from "./error.js";
|
|
25
22
|
export * from "./rag.js";
|
|
26
|
-
export * from "./ocr.js";
|
|
27
|
-
export * from "./shard.js";
|
|
28
|
-
export { SDK_CLIENT_ERROR_CODES } from "./sdk-errors-client.js";
|
|
29
|
-
export { SDK_SERVER_ERROR_CODES } from "./sdk-errors-server.js";
|
|
30
|
-
export { REGISTRY_ERROR_CODES } from "./sdk-errors-registry.js";
|
|
31
|
-
export { qvacConfigSchema, deviceMatchSchema, deviceConfigDefaultsSchema, devicePatternSchema, } from "./sdk-config.js";
|
|
32
|
-
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, } from "./profiling.js";
|
|
33
|
-
export { runtimeContextSchema } from "./runtime-context.js";
|
|
34
|
-
export * from "./get-model-info.js";
|
|
35
|
-
export * from "./model-src-utils.js";
|
|
36
|
-
export * from "./json-schema.js";
|
|
37
|
-
export {} from "./mcp-adapter.js";
|
|
38
|
-
export { PUBLIC_MODEL_TYPES as MODEL_TYPES, ModelType, normalizeModelType, isCanonicalModelType, isModelTypeAlias, } from "./model-types.js";
|
|
39
|
-
export * from "./plugin.js";
|
|
40
|
-
export * from "./registry.js";
|