@qvac/sdk 0.9.2 → 0.10.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 +15 -68
- package/dist/client/api/cancel.d.ts +1 -1
- package/dist/client/api/cancel.js +1 -1
- package/dist/client/api/completion-stream.d.ts +51 -12
- package/dist/client/api/completion-stream.js +129 -56
- package/dist/client/api/delete-cache.d.ts +1 -0
- package/dist/client/api/delete-cache.js +1 -0
- package/dist/client/api/diffusion.d.ts +17 -2
- package/dist/client/api/diffusion.js +21 -4
- package/dist/client/api/embed.d.ts +4 -0
- package/dist/client/api/finetune.d.ts +21 -0
- package/dist/client/api/get-loaded-model-info.d.ts +25 -0
- package/dist/client/api/get-loaded-model-info.js +36 -0
- package/dist/client/api/get-model-info.d.ts +9 -1
- package/dist/client/api/get-model-info.js +8 -0
- package/dist/client/api/heartbeat.d.ts +2 -2
- package/dist/client/api/heartbeat.js +2 -2
- package/dist/client/api/index.d.ts +3 -1
- package/dist/client/api/index.js +3 -1
- package/dist/client/api/invoke-plugin.d.ts +16 -0
- package/dist/client/api/invoke-plugin.js +16 -0
- package/dist/client/api/load-model.d.ts +36 -3
- package/dist/client/api/load-model.js +31 -10
- package/dist/client/api/provide.d.ts +11 -5
- package/dist/client/api/provide.js +11 -6
- package/dist/client/api/rag.d.ts +9 -0
- package/dist/client/api/rag.js +9 -0
- package/dist/client/api/registry.d.ts +26 -0
- package/dist/client/api/registry.js +26 -0
- package/dist/client/api/resume.d.ts +20 -4
- package/dist/client/api/resume.js +20 -4
- package/dist/client/api/state.d.ts +23 -0
- package/dist/client/api/state.js +29 -0
- package/dist/client/api/stop-provider.d.ts +11 -5
- package/dist/client/api/stop-provider.js +11 -5
- package/dist/client/api/suspend.d.ts +21 -3
- package/dist/client/api/suspend.js +21 -3
- package/dist/client/api/text-to-speech.d.ts +64 -6
- package/dist/client/api/text-to-speech.js +423 -47
- package/dist/client/api/transcribe.d.ts +29 -4
- package/dist/client/api/transcribe.js +86 -28
- package/dist/client/api/translate.d.ts +1 -0
- package/dist/client/api/translate.js +1 -0
- package/dist/client/rpc/bare-client.js +22 -1
- package/dist/client/rpc/expo-rpc-client.d.ts +1 -1
- package/dist/client/rpc/expo-rpc-client.js +96 -4
- package/dist/client/rpc/node-rpc-client.js +36 -0
- package/dist/examples/audio/mic-input.d.ts +9 -0
- package/dist/examples/audio/mic-input.js +111 -0
- package/dist/examples/completion-events.d.ts +18 -0
- package/dist/examples/completion-events.js +79 -0
- package/dist/examples/delegated-inference/composite.js +12 -18
- package/dist/examples/delegated-inference/consumer-profiled.js +4 -11
- package/dist/examples/delegated-inference/consumer.js +8 -13
- package/dist/examples/delegated-inference/provider.js +11 -16
- package/dist/examples/diffusion-flux2-klein-img2img.d.ts +2 -0
- package/dist/examples/diffusion-flux2-klein-img2img.js +60 -0
- package/dist/examples/diffusion-flux2-klein.js +1 -0
- package/dist/examples/diffusion-img2img.d.ts +2 -0
- package/dist/examples/diffusion-img2img.js +49 -0
- package/dist/examples/diffusion-txt2img.js +2 -1
- package/dist/examples/kv-cache-example.js +11 -12
- package/dist/examples/llamacpp-cache.d.ts +2 -0
- package/dist/examples/llamacpp-cache.js +107 -0
- package/dist/examples/llamacpp-dynamic-tools.d.ts +2 -0
- package/dist/examples/llamacpp-dynamic-tools.js +144 -0
- package/dist/examples/llamacpp-native-tools.js +2 -8
- package/dist/examples/llamacpp-structured-output.d.ts +2 -0
- package/dist/examples/llamacpp-structured-output.js +106 -0
- package/dist/examples/llamacpp-tools-pythonic.d.ts +2 -0
- package/dist/examples/llamacpp-tools-pythonic.js +69 -0
- package/dist/examples/plugins.js +4 -4
- package/dist/examples/suspend-resume.js +21 -4
- package/dist/examples/transcription/parakeet-microphone-record.js +6 -33
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +7 -5
- package/dist/examples/transcription/whispercpp-filesystem.js +12 -3
- package/dist/examples/transcription/whispercpp-microphone-record.js +6 -29
- package/dist/examples/translation/translation-stream.js +5 -5
- package/dist/examples/tts/llm-to-tts-streaming.d.ts +16 -0
- package/dist/examples/tts/llm-to-tts-streaming.js +143 -0
- package/dist/examples/tts/supertonic-multilingual.js +3 -3
- package/dist/examples/tts/supertonic.js +3 -3
- package/dist/examples/tts/utils.d.ts +11 -1
- package/dist/examples/tts/utils.js +70 -17
- package/dist/examples/voice-assistant/voice-assistant.d.ts +2 -0
- package/dist/examples/voice-assistant/voice-assistant.js +207 -0
- package/dist/expo/plugins/withMobileBundle.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/logging/logger.d.ts +11 -0
- package/dist/logging/logger.js +11 -0
- package/dist/logging/types.d.ts +18 -0
- package/dist/models/registry/models.d.ts +6620 -6185
- package/dist/models/registry/models.js +6296 -5318
- package/dist/models/update-models/codegen.js +84 -23
- package/dist/models/update-models/companions.d.ts +18 -0
- package/dist/models/update-models/companions.js +175 -0
- package/dist/models/update-models/naming.js +0 -25
- package/dist/models/update-models/registry.js +4 -2
- package/dist/models/update-models/types.d.ts +37 -9
- package/dist/profiling/index.d.ts +49 -0
- package/dist/profiling/index.js +49 -0
- package/dist/schemas/cancel.d.ts +6 -2
- package/dist/schemas/cancel.js +14 -7
- package/dist/schemas/common.d.ts +353 -271
- package/dist/schemas/common.js +26 -5
- package/dist/schemas/completion-event.d.ts +225 -0
- package/dist/schemas/completion-event.js +79 -0
- package/dist/schemas/completion-stream.d.ts +122 -31
- package/dist/schemas/completion-stream.js +137 -36
- package/dist/schemas/delegate.d.ts +0 -2
- package/dist/schemas/delegate.js +25 -6
- package/dist/schemas/download-asset.d.ts +5 -5
- package/dist/schemas/embed.js +21 -9
- package/dist/schemas/engine-addon-map.d.ts +11 -1
- package/dist/schemas/engine-addon-map.js +2 -2
- package/dist/schemas/get-loaded-model-info.d.ts +52 -0
- package/dist/schemas/get-loaded-model-info.js +44 -0
- package/dist/schemas/get-model-info.d.ts +2 -2
- package/dist/schemas/get-model-info.js +103 -32
- package/dist/schemas/heartbeat.d.ts +0 -1
- package/dist/schemas/index.d.ts +4 -1
- package/dist/schemas/index.js +4 -1
- package/dist/schemas/llamacpp-config.d.ts +14 -4
- package/dist/schemas/llamacpp-config.js +5 -0
- package/dist/schemas/load-model.d.ts +3233 -1260
- package/dist/schemas/load-model.js +23 -16
- package/dist/schemas/model-src-utils.d.ts +7 -6
- package/dist/schemas/model-src-utils.js +27 -1
- package/dist/schemas/model-types.d.ts +4 -4
- package/dist/schemas/ocr.d.ts +1 -1
- package/dist/schemas/plugin.d.ts +27 -3
- package/dist/schemas/plugin.js +27 -2
- package/dist/schemas/profiling.js +11 -3
- package/dist/schemas/provide.d.ts +1 -3
- package/dist/schemas/provide.js +0 -3
- package/dist/schemas/rag.d.ts +4 -4
- package/dist/schemas/registry.d.ts +10 -10
- package/dist/schemas/registry.js +36 -14
- package/dist/schemas/reload-config.d.ts +73 -7
- package/dist/schemas/sdcpp-config.d.ts +16 -8
- package/dist/schemas/sdcpp-config.js +118 -25
- package/dist/schemas/sdk-config.d.ts +116 -90
- package/dist/schemas/sdk-config.js +16 -0
- package/dist/schemas/sdk-errors-client.d.ts +3 -0
- package/dist/schemas/sdk-errors-client.js +16 -1
- package/dist/schemas/sdk-errors-server.d.ts +3 -0
- package/dist/schemas/sdk-errors-server.js +23 -0
- package/dist/schemas/state.d.ts +23 -0
- package/dist/schemas/state.js +14 -0
- package/dist/schemas/stop-provide.d.ts +0 -5
- package/dist/schemas/stop-provide.js +2 -6
- package/dist/schemas/text-to-speech.d.ts +93 -27
- package/dist/schemas/text-to-speech.js +27 -0
- package/dist/schemas/tools.d.ts +16 -0
- package/dist/schemas/tools.js +15 -0
- package/dist/schemas/transcription-config.d.ts +8 -8
- package/dist/schemas/transcription.d.ts +33 -0
- package/dist/schemas/transcription.js +9 -0
- package/dist/schemas/translate.js +59 -19
- package/dist/schemas/translation-config.d.ts +157 -133
- package/dist/schemas/translation-config.js +34 -11
- package/dist/server/bare/delegate-rpc-client.d.ts +1 -1
- package/dist/server/bare/delegate-rpc-client.js +131 -122
- package/dist/server/bare/hyperswarm.d.ts +2 -2
- package/dist/server/bare/hyperswarm.js +12 -7
- package/dist/server/bare/ops/cancel.js +7 -0
- package/dist/server/bare/ops/kv-cache-utils.d.ts +7 -10
- package/dist/server/bare/ops/kv-cache-utils.js +31 -40
- package/dist/server/bare/ops/load-model.js +0 -1
- package/dist/server/bare/ops/transcribe.d.ts +11 -4
- package/dist/server/bare/ops/transcribe.js +25 -4
- package/dist/server/bare/ops/translate.js +42 -4
- package/dist/server/bare/ops/unload-model.js +21 -19
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +1 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +13 -8
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +257 -85
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +101 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +135 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +79 -22
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +57 -32
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +10 -16
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +69 -44
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +113 -94
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +1 -1
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +1 -2
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech-stream.d.ts +7 -0
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech-stream.js +116 -0
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.d.ts +2 -3
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.js +71 -9
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +41 -13
- package/dist/server/bare/plugins/onnx-tts/plugin.js +48 -3
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +15 -7
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +5 -6
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +6 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +8 -5
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +13 -13
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +17 -1
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +40 -17
- package/dist/server/bare/registry/config-registry.js +14 -3
- package/dist/server/bare/registry/model-registry.d.ts +8 -10
- package/dist/server/bare/registry/model-registry.js +17 -12
- package/dist/server/bare/registry/registry-client.js +79 -19
- package/dist/server/bare/runtime-lifecycle.d.ts +2 -1
- package/dist/server/bare/runtime-lifecycle.js +13 -2
- package/dist/server/bare/types/addon-responses.d.ts +8 -3
- package/dist/server/bare/utils/transcribe-metadata.d.ts +21 -0
- package/dist/server/bare/utils/transcribe-metadata.js +28 -0
- package/dist/server/bare/utils/tts-stats.d.ts +22 -0
- package/dist/server/bare/utils/tts-stats.js +10 -0
- package/dist/server/rpc/create-server.d.ts +4 -1
- package/dist/server/rpc/create-server.js +5 -1
- package/dist/server/rpc/delegate-transport.js +36 -29
- package/dist/server/rpc/handle-request.js +28 -3
- package/dist/server/rpc/handler-registry.js +7 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -0
- package/dist/server/rpc/handler-utils.js +22 -0
- package/dist/server/rpc/handlers/cancel-delegated.js +3 -5
- package/dist/server/rpc/handlers/cancelHandler.js +4 -5
- package/dist/server/rpc/handlers/completion-stream-delegated.js +14 -5
- package/dist/server/rpc/handlers/delete-cache.js +8 -3
- package/dist/server/rpc/handlers/download-asset.js +3 -24
- package/dist/server/rpc/handlers/get-loaded-model-info.d.ts +3 -0
- package/dist/server/rpc/handlers/get-loaded-model-info.js +39 -0
- package/dist/server/rpc/handlers/get-model-info.js +93 -84
- package/dist/server/rpc/handlers/heartbeat-delegated.js +2 -2
- package/dist/server/rpc/handlers/index.d.ts +6 -0
- package/dist/server/rpc/handlers/index.js +6 -0
- package/dist/server/rpc/handlers/load-model/download-manager.d.ts +35 -9
- package/dist/server/rpc/handlers/load-model/download-manager.js +142 -38
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +5 -4
- package/dist/server/rpc/handlers/load-model/download-stats.js +49 -8
- package/dist/server/rpc/handlers/load-model/handler.js +31 -50
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/http.js +97 -142
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -2
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +55 -74
- package/dist/server/rpc/handlers/load-model/index.d.ts +0 -1
- package/dist/server/rpc/handlers/load-model/index.js +0 -1
- package/dist/server/rpc/handlers/load-model/registry-client-options.d.ts +27 -0
- package/dist/server/rpc/handlers/load-model/registry-client-options.js +19 -0
- package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +22 -0
- package/dist/server/rpc/handlers/load-model/registry-companion-set.js +208 -0
- package/dist/server/rpc/handlers/load-model/registry-download-utils.d.ts +24 -0
- package/dist/server/rpc/handlers/load-model/registry-download-utils.js +114 -0
- package/dist/server/rpc/handlers/load-model/registry.d.ts +2 -20
- package/dist/server/rpc/handlers/load-model/registry.js +109 -381
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +15 -0
- package/dist/server/rpc/handlers/load-model/resolve-session.js +61 -0
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.js +14 -23
- package/dist/server/rpc/handlers/load-model/types.d.ts +11 -4
- package/dist/server/rpc/handlers/load-model/types.js +28 -1
- package/dist/server/rpc/handlers/load-model-delegated.js +2 -4
- package/dist/server/rpc/handlers/plugin-dispatch.js +9 -5
- package/dist/server/rpc/handlers/plugin-invoke.js +1 -1
- package/dist/server/rpc/handlers/provideHandler/connection.js +13 -2
- package/dist/server/rpc/handlers/provideHandler/handler.js +42 -29
- package/dist/server/rpc/handlers/state.d.ts +3 -0
- package/dist/server/rpc/handlers/state.js +7 -0
- package/dist/server/rpc/handlers/stopProvideHandler.d.ts +2 -2
- package/dist/server/rpc/handlers/stopProvideHandler.js +12 -7
- package/dist/server/rpc/handlers/text-to-speech-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/text-to-speech-stream.js +4 -0
- package/dist/server/rpc/handlers/unload-model-delegated.js +3 -3
- package/dist/server/rpc/profiling/operation-metrics.js +20 -0
- package/dist/server/rpc/rpc-utils.js +1 -1
- package/dist/server/rpc/transport-selector.d.ts +3 -0
- package/dist/server/rpc/transport-selector.js +18 -0
- package/dist/server/utils/cache/auto-history.d.ts +4 -0
- package/dist/server/utils/cache/auto-history.js +22 -0
- package/dist/server/utils/{cache.d.ts → cache/paths.d.ts} +22 -5
- package/dist/server/utils/{cache.js → cache/paths.js} +36 -20
- package/dist/server/utils/cache/types.d.ts +8 -0
- package/dist/server/utils/cache/types.js +1 -0
- package/dist/server/utils/checksum.d.ts +2 -2
- package/dist/server/utils/checksum.js +1 -1
- package/dist/server/utils/clear-storage.d.ts +5 -0
- package/dist/server/utils/clear-storage.js +17 -0
- package/dist/server/utils/completion-normalizer.d.ts +17 -0
- package/dist/server/utils/completion-normalizer.js +301 -0
- package/dist/server/utils/expand-gguf-shards.d.ts +3 -0
- package/dist/server/utils/expand-gguf-shards.js +22 -0
- package/dist/server/utils/formatting.js +1 -1
- package/dist/server/utils/index.d.ts +4 -2
- package/dist/server/utils/index.js +4 -2
- package/dist/server/utils/qvac-paths.d.ts +2 -0
- package/dist/server/utils/qvac-paths.js +5 -0
- package/dist/server/utils/response-format.d.ts +3 -0
- package/dist/server/utils/response-format.js +20 -0
- package/dist/server/utils/tool-integration.d.ts +15 -4
- package/dist/server/utils/tool-integration.js +21 -41
- package/dist/server/utils/tools/dialect.d.ts +8 -0
- package/dist/server/utils/tools/dialect.js +12 -0
- package/dist/server/utils/tools/index.d.ts +3 -0
- package/dist/server/utils/tools/index.js +2 -0
- package/dist/server/utils/tools/parser.d.ts +6 -0
- package/dist/server/utils/tools/parser.js +40 -0
- package/dist/server/utils/tools/parsers/hermes.d.ts +4 -0
- package/dist/server/utils/tools/parsers/hermes.js +100 -0
- package/dist/server/utils/tools/parsers/json.d.ts +6 -0
- package/dist/server/utils/tools/parsers/json.js +115 -0
- package/dist/server/utils/tools/parsers/pythonic.d.ts +4 -0
- package/dist/server/utils/tools/parsers/pythonic.js +267 -0
- package/dist/server/utils/tools/shared.d.ts +18 -0
- package/dist/server/utils/tools/shared.js +54 -0
- package/dist/server/utils/worker-lock.d.ts +3 -0
- package/dist/server/utils/worker-lock.js +67 -0
- package/dist/server/worker-core.d.ts +16 -1
- package/dist/server/worker-core.js +114 -14
- package/dist/utils/aggregate-events.d.ts +16 -0
- package/dist/utils/aggregate-events.js +52 -0
- package/dist/utils/cache-normalize.d.ts +10 -0
- package/dist/utils/cache-normalize.js +23 -0
- package/dist/utils/encoding.d.ts +8 -0
- package/dist/utils/encoding.js +13 -0
- package/dist/utils/errors-client.d.ts +12 -0
- package/dist/utils/errors-client.js +20 -0
- package/dist/utils/errors-server.d.ts +14 -0
- package/dist/utils/errors-server.js +31 -0
- package/dist/utils/load-model-validation.d.ts +7 -0
- package/dist/utils/load-model-validation.js +18 -0
- package/expo/plugins/patches/android-link.mjs +1 -1
- package/expo/plugins/patches/ios-link.mjs +1 -1
- package/package.json +14 -18
- package/dist/examples/translation/translation-opus.d.ts +0 -2
- package/dist/examples/translation/translation-opus.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/utils/model-path.d.ts +0 -5
- package/dist/server/utils/model-path.js +0 -7
- package/dist/server/utils/tool-parser.d.ts +0 -7
- package/dist/server/utils/tool-parser.js +0 -248
|
@@ -25,7 +25,7 @@ const loadModelRequestCommonFields = {
|
|
|
25
25
|
logger: z.unknown().optional(),
|
|
26
26
|
withProgress: z.boolean().optional(),
|
|
27
27
|
};
|
|
28
|
-
export const
|
|
28
|
+
export const loadBuiltinModelOptionsBaseSchema = z.union([
|
|
29
29
|
z
|
|
30
30
|
.object({
|
|
31
31
|
...loadModelCommonFields,
|
|
@@ -82,14 +82,18 @@ export const loadModelOptionsBaseSchema = z.union([
|
|
|
82
82
|
modelConfig: sdcppConfigSchema.strict().optional(),
|
|
83
83
|
})
|
|
84
84
|
.strict(),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
modelConfig: z.record(z.string(), z.unknown()).optional(),
|
|
85
|
+
]);
|
|
86
|
+
// Custom plugin catch-all: any modelType string EXCEPT built-ins.
|
|
87
|
+
export const loadCustomPluginModelOptionsBaseSchema = z.object({
|
|
88
|
+
...loadModelCommonFields,
|
|
89
|
+
modelType: z.string().refine((val) => !builtInModelTypes.has(val), {
|
|
90
|
+
message: "Built-in model types must use their specific schema",
|
|
92
91
|
}),
|
|
92
|
+
modelConfig: z.record(z.string(), z.unknown()).optional(),
|
|
93
|
+
});
|
|
94
|
+
export const loadModelOptionsBaseSchema = z.union([
|
|
95
|
+
loadBuiltinModelOptionsBaseSchema,
|
|
96
|
+
loadCustomPluginModelOptionsBaseSchema,
|
|
93
97
|
]);
|
|
94
98
|
export const loadModelOptionsSchema = loadModelOptionsBaseSchema.transform((data) => ({
|
|
95
99
|
...data,
|
|
@@ -176,13 +180,15 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
176
180
|
modelType: ModelType.nmtcppTranslation,
|
|
177
181
|
modelSrc: modelInputToSrcSchema.parse(data.modelSrc),
|
|
178
182
|
modelName: modelInputToNameSchema.parse(data.modelSrc),
|
|
179
|
-
modelConfig:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
modelConfig: data.modelConfig.engine === "Bergamot" && data.modelConfig.pivotModel
|
|
184
|
+
? {
|
|
185
|
+
...data.modelConfig,
|
|
186
|
+
pivotModel: {
|
|
187
|
+
...data.modelConfig.pivotModel,
|
|
188
|
+
modelSrc: modelInputToSrcSchema.parse(data.modelConfig.pivotModel.modelSrc),
|
|
189
|
+
},
|
|
190
|
+
}
|
|
191
|
+
: data.modelConfig,
|
|
186
192
|
seed: data.seed ?? false,
|
|
187
193
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
188
194
|
delegate: data.delegate,
|
|
@@ -368,8 +374,9 @@ export const modelProgressUpdateSchema = z.object({
|
|
|
368
374
|
overallPercentage: z.number(),
|
|
369
375
|
})
|
|
370
376
|
.optional(),
|
|
371
|
-
|
|
377
|
+
fileSetInfo: z
|
|
372
378
|
.object({
|
|
379
|
+
setKey: z.string(),
|
|
373
380
|
currentFile: z.string(),
|
|
374
381
|
fileIndex: z.number(),
|
|
375
382
|
totalFiles: z.number(),
|
|
@@ -11,6 +11,7 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
11
11
|
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
13
13
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
14
|
+
embeddings: "embeddings";
|
|
14
15
|
"llamacpp-completion": "llamacpp-completion";
|
|
15
16
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
16
17
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -21,7 +22,6 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
21
22
|
"sdcpp-generation": "sdcpp-generation";
|
|
22
23
|
llm: "llm";
|
|
23
24
|
whisper: "whisper";
|
|
24
|
-
embeddings: "embeddings";
|
|
25
25
|
nmt: "nmt";
|
|
26
26
|
parakeet: "parakeet";
|
|
27
27
|
tts: "tts";
|
|
@@ -41,6 +41,7 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
41
41
|
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
42
42
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
43
43
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
44
|
+
embeddings: "embeddings";
|
|
44
45
|
"llamacpp-completion": "llamacpp-completion";
|
|
45
46
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
46
47
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -51,7 +52,6 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
51
52
|
"sdcpp-generation": "sdcpp-generation";
|
|
52
53
|
llm: "llm";
|
|
53
54
|
whisper: "whisper";
|
|
54
|
-
embeddings: "embeddings";
|
|
55
55
|
nmt: "nmt";
|
|
56
56
|
parakeet: "parakeet";
|
|
57
57
|
tts: "tts";
|
|
@@ -77,6 +77,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
77
77
|
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
78
78
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
79
79
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
80
|
+
embeddings: "embeddings";
|
|
80
81
|
"llamacpp-completion": "llamacpp-completion";
|
|
81
82
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
82
83
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -87,7 +88,6 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
87
88
|
"sdcpp-generation": "sdcpp-generation";
|
|
88
89
|
llm: "llm";
|
|
89
90
|
whisper: "whisper";
|
|
90
|
-
embeddings: "embeddings";
|
|
91
91
|
nmt: "nmt";
|
|
92
92
|
parakeet: "parakeet";
|
|
93
93
|
tts: "tts";
|
|
@@ -105,7 +105,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
105
105
|
engine?: string | undefined;
|
|
106
106
|
expectedSize?: number | undefined;
|
|
107
107
|
sha256Checksum?: string | undefined;
|
|
108
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "
|
|
108
|
+
addon?: "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
109
109
|
}>>;
|
|
110
110
|
/**
|
|
111
111
|
* Schema that transforms ModelSrc to its optional name
|
|
@@ -123,6 +123,7 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
123
123
|
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
124
124
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
125
125
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
126
|
+
embeddings: "embeddings";
|
|
126
127
|
"llamacpp-completion": "llamacpp-completion";
|
|
127
128
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
128
129
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -133,7 +134,6 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
133
134
|
"sdcpp-generation": "sdcpp-generation";
|
|
134
135
|
llm: "llm";
|
|
135
136
|
whisper: "whisper";
|
|
136
|
-
embeddings: "embeddings";
|
|
137
137
|
nmt: "nmt";
|
|
138
138
|
parakeet: "parakeet";
|
|
139
139
|
tts: "tts";
|
|
@@ -151,6 +151,7 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
151
151
|
engine?: string | undefined;
|
|
152
152
|
expectedSize?: number | undefined;
|
|
153
153
|
sha256Checksum?: string | undefined;
|
|
154
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "
|
|
154
|
+
addon?: "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
155
155
|
}>>;
|
|
156
|
+
export declare function inferModelTypeFromModelSrc(modelSrc: unknown): string | undefined;
|
|
156
157
|
//# sourceMappingURL=model-src-utils.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { modelTypeInputSchema } from "./model-types.js";
|
|
2
|
+
import { modelTypeInputSchema, normalizeModelType, isCanonicalModelType, isModelTypeAlias, } from "./model-types.js";
|
|
3
|
+
import { resolveCanonicalEngine } from "./engine-addon-map.js";
|
|
3
4
|
// Addon field accepts model type inputs plus "vad"
|
|
4
5
|
const addonSchema = z.union([modelTypeInputSchema, z.literal("vad")]);
|
|
5
6
|
export const modelDescriptorSchema = z.object({
|
|
@@ -33,3 +34,28 @@ export const modelInputToNameSchema = modelSrcInputSchema.transform((modelSrc) =
|
|
|
33
34
|
}
|
|
34
35
|
return undefined;
|
|
35
36
|
});
|
|
37
|
+
export function inferModelTypeFromModelSrc(modelSrc) {
|
|
38
|
+
if (typeof modelSrc !== "object" || modelSrc === null) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const descriptor = modelSrc;
|
|
42
|
+
const engine = descriptor["engine"];
|
|
43
|
+
if (typeof engine === "string" && engine.length > 0) {
|
|
44
|
+
const canonical = resolveCanonicalEngine(engine);
|
|
45
|
+
if (canonical)
|
|
46
|
+
return canonical;
|
|
47
|
+
if (isCanonicalModelType(engine) || isModelTypeAlias(engine)) {
|
|
48
|
+
return normalizeModelType(engine);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const addon = descriptor["addon"];
|
|
52
|
+
if (typeof addon === "string" && addon.length > 0) {
|
|
53
|
+
const canonical = resolveCanonicalEngine(addon);
|
|
54
|
+
if (canonical)
|
|
55
|
+
return canonical;
|
|
56
|
+
if (isCanonicalModelType(addon) || isModelTypeAlias(addon)) {
|
|
57
|
+
return normalizeModelType(addon);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
@@ -67,6 +67,7 @@ export declare const PUBLIC_MODEL_TYPES: {
|
|
|
67
67
|
};
|
|
68
68
|
/** Schema accepting both canonical and alias model type inputs */
|
|
69
69
|
export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
70
|
+
embeddings: "embeddings";
|
|
70
71
|
"llamacpp-completion": "llamacpp-completion";
|
|
71
72
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
72
73
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -77,7 +78,6 @@ export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
|
77
78
|
"sdcpp-generation": "sdcpp-generation";
|
|
78
79
|
llm: "llm";
|
|
79
80
|
whisper: "whisper";
|
|
80
|
-
embeddings: "embeddings";
|
|
81
81
|
nmt: "nmt";
|
|
82
82
|
parakeet: "parakeet";
|
|
83
83
|
tts: "tts";
|
|
@@ -86,6 +86,7 @@ export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
|
86
86
|
}>;
|
|
87
87
|
/** Schema that transforms input to canonical model type */
|
|
88
88
|
export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
89
|
+
embeddings: "embeddings";
|
|
89
90
|
"llamacpp-completion": "llamacpp-completion";
|
|
90
91
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
91
92
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -96,13 +97,12 @@ export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
|
96
97
|
"sdcpp-generation": "sdcpp-generation";
|
|
97
98
|
llm: "llm";
|
|
98
99
|
whisper: "whisper";
|
|
99
|
-
embeddings: "embeddings";
|
|
100
100
|
nmt: "nmt";
|
|
101
101
|
parakeet: "parakeet";
|
|
102
102
|
tts: "tts";
|
|
103
103
|
ocr: "ocr";
|
|
104
104
|
diffusion: "diffusion";
|
|
105
|
-
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation", "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "
|
|
105
|
+
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation", "embeddings" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion">>;
|
|
106
106
|
/**
|
|
107
107
|
* Normalize model type input to canonical form.
|
|
108
108
|
* Custom plugin types (not in built-ins) are returned as-is.
|
|
@@ -154,8 +154,8 @@ export type ParakeetModelTypeInput = z.infer<typeof parakeetModelTypeSchema>;
|
|
|
154
154
|
* - Canonical: `"llamacpp-embedding"`
|
|
155
155
|
*/
|
|
156
156
|
export declare const embeddingsModelTypeSchema: z.ZodEnum<{
|
|
157
|
-
"llamacpp-embedding": "llamacpp-embedding";
|
|
158
157
|
embeddings: "embeddings";
|
|
158
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
159
159
|
}>;
|
|
160
160
|
export type EmbeddingsModelTypeInput = z.infer<typeof embeddingsModelTypeSchema>;
|
|
161
161
|
/**
|
package/dist/schemas/ocr.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
29
29
|
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
30
30
|
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
31
31
|
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
32
|
+
embeddings: "embeddings";
|
|
32
33
|
"llamacpp-completion": "llamacpp-completion";
|
|
33
34
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
34
35
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
@@ -39,7 +40,6 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
39
40
|
"sdcpp-generation": "sdcpp-generation";
|
|
40
41
|
llm: "llm";
|
|
41
42
|
whisper: "whisper";
|
|
42
|
-
embeddings: "embeddings";
|
|
43
43
|
nmt: "nmt";
|
|
44
44
|
parakeet: "parakeet";
|
|
45
45
|
tts: "tts";
|
package/dist/schemas/plugin.d.ts
CHANGED
|
@@ -58,7 +58,6 @@ export interface PluginModel {
|
|
|
58
58
|
}
|
|
59
59
|
export interface PluginModelResult {
|
|
60
60
|
model: PluginModel;
|
|
61
|
-
loader: unknown;
|
|
62
61
|
}
|
|
63
62
|
export interface PluginLogging {
|
|
64
63
|
module: unknown;
|
|
@@ -131,14 +130,39 @@ export type PluginInvokeStreamRequest = z.infer<typeof pluginInvokeStreamRequest
|
|
|
131
130
|
export type PluginInvokeStreamResponse = z.infer<typeof pluginInvokeStreamResponseSchema>;
|
|
132
131
|
/**
|
|
133
132
|
* Helper function to define a plugin with full type inference.
|
|
134
|
-
*
|
|
133
|
+
*
|
|
134
|
+
* Identity function whose only role is to constrain `plugin` to the
|
|
135
|
+
* `QvacPlugin` shape so consumers get accurate autocompletion and type
|
|
136
|
+
* errors for plugin manifests without having to write an explicit type
|
|
137
|
+
* annotation.
|
|
138
|
+
*
|
|
139
|
+
* @param plugin - The plugin manifest to register.
|
|
140
|
+
* @returns The same `plugin` value, typed as the caller's `T`.
|
|
135
141
|
*/
|
|
136
142
|
export declare function definePlugin<T extends QvacPlugin>(plugin: T): T;
|
|
137
143
|
/**
|
|
138
144
|
* Helper function to define a handler with full type inference.
|
|
139
|
-
*
|
|
145
|
+
*
|
|
146
|
+
* Identity function whose only role is to constrain `definition` to a
|
|
147
|
+
* `PluginHandlerDefinition<TRequest, TResponse>` so the Zod request /
|
|
148
|
+
* response schemas flow through to the handler body without an explicit
|
|
149
|
+
* type annotation on the caller side.
|
|
150
|
+
*
|
|
151
|
+
* @param definition - The plugin handler definition (request/response schemas and handler function).
|
|
152
|
+
* @returns The same `definition` value, typed as `PluginHandlerDefinition<TRequest, TResponse>`.
|
|
140
153
|
*/
|
|
141
154
|
export declare function defineHandler<TRequest extends z.ZodType, TResponse extends z.ZodType>(definition: PluginHandlerDefinition<TRequest, TResponse>): PluginHandlerDefinition<TRequest, TResponse>;
|
|
155
|
+
/**
|
|
156
|
+
* Helper function to define a duplex (bidirectional streaming) handler with full type inference.
|
|
157
|
+
*
|
|
158
|
+
* Identity function whose only role is to constrain `definition` to a
|
|
159
|
+
* `DuplexPluginHandlerDefinition` and cast it to the unified
|
|
160
|
+
* `PluginHandlerDefinition` shape. This bridges TS function-parameter
|
|
161
|
+
* contravariance so duplex handlers can be registered alongside unary ones.
|
|
162
|
+
*
|
|
163
|
+
* @param definition - The duplex plugin handler definition (request/response schemas and streaming handler function).
|
|
164
|
+
* @returns The same `definition` value, typed as `PluginHandlerDefinition<TRequest, TResponse>`.
|
|
165
|
+
*/
|
|
142
166
|
export declare function defineDuplexHandler<TRequest extends z.ZodType, TResponse extends z.ZodType>(definition: DuplexPluginHandlerDefinition<TRequest, TResponse>): PluginHandlerDefinition<TRequest, TResponse>;
|
|
143
167
|
export declare const pluginHandlerDefinitionRuntimeSchema: z.ZodObject<{
|
|
144
168
|
requestSchema: z.ZodObject<{
|
package/dist/schemas/plugin.js
CHANGED
|
@@ -27,18 +27,43 @@ export const pluginInvokeStreamResponseSchema = z.object({
|
|
|
27
27
|
// ============================================
|
|
28
28
|
/**
|
|
29
29
|
* Helper function to define a plugin with full type inference.
|
|
30
|
-
*
|
|
30
|
+
*
|
|
31
|
+
* Identity function whose only role is to constrain `plugin` to the
|
|
32
|
+
* `QvacPlugin` shape so consumers get accurate autocompletion and type
|
|
33
|
+
* errors for plugin manifests without having to write an explicit type
|
|
34
|
+
* annotation.
|
|
35
|
+
*
|
|
36
|
+
* @param plugin - The plugin manifest to register.
|
|
37
|
+
* @returns The same `plugin` value, typed as the caller's `T`.
|
|
31
38
|
*/
|
|
32
39
|
export function definePlugin(plugin) {
|
|
33
40
|
return plugin;
|
|
34
41
|
}
|
|
35
42
|
/**
|
|
36
43
|
* Helper function to define a handler with full type inference.
|
|
37
|
-
*
|
|
44
|
+
*
|
|
45
|
+
* Identity function whose only role is to constrain `definition` to a
|
|
46
|
+
* `PluginHandlerDefinition<TRequest, TResponse>` so the Zod request /
|
|
47
|
+
* response schemas flow through to the handler body without an explicit
|
|
48
|
+
* type annotation on the caller side.
|
|
49
|
+
*
|
|
50
|
+
* @param definition - The plugin handler definition (request/response schemas and handler function).
|
|
51
|
+
* @returns The same `definition` value, typed as `PluginHandlerDefinition<TRequest, TResponse>`.
|
|
38
52
|
*/
|
|
39
53
|
export function defineHandler(definition) {
|
|
40
54
|
return definition;
|
|
41
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Helper function to define a duplex (bidirectional streaming) handler with full type inference.
|
|
58
|
+
*
|
|
59
|
+
* Identity function whose only role is to constrain `definition` to a
|
|
60
|
+
* `DuplexPluginHandlerDefinition` and cast it to the unified
|
|
61
|
+
* `PluginHandlerDefinition` shape. This bridges TS function-parameter
|
|
62
|
+
* contravariance so duplex handlers can be registered alongside unary ones.
|
|
63
|
+
*
|
|
64
|
+
* @param definition - The duplex plugin handler definition (request/response schemas and streaming handler function).
|
|
65
|
+
* @returns The same `definition` value, typed as `PluginHandlerDefinition<TRequest, TResponse>`.
|
|
66
|
+
*/
|
|
42
67
|
export function defineDuplexHandler(definition) {
|
|
43
68
|
// The duplex flag guarantees inputStream is always
|
|
44
69
|
// provided at call time; the cast bridges TS function-param contravariance.
|
|
@@ -64,7 +64,15 @@ export const profilingResponseMetaSchema = z.object({
|
|
|
64
64
|
operation: operationEventSchema.optional(),
|
|
65
65
|
});
|
|
66
66
|
export const perCallProfilingSchema = z.object({
|
|
67
|
-
enabled: z
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
enabled: z
|
|
68
|
+
.boolean()
|
|
69
|
+
.optional()
|
|
70
|
+
.describe("Enable profiling for this call only; when omitted, the SDK-level profiler configuration applies."),
|
|
71
|
+
includeServerBreakdown: z
|
|
72
|
+
.boolean()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe("Include server-side timing breakdown in the profiling payload."),
|
|
75
|
+
mode: profilerModeSchema
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Profiling detail level: `"summary"` aggregates only, `"verbose"` retains recent events.'),
|
|
70
78
|
});
|
|
@@ -7,7 +7,6 @@ export declare const firewallConfigSchema: z.ZodObject<{
|
|
|
7
7
|
publicKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export declare const provideParamsSchema: z.ZodObject<{
|
|
10
|
-
topic: z.ZodString;
|
|
11
10
|
firewall: z.ZodOptional<z.ZodObject<{
|
|
12
11
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
13
12
|
allow: "allow";
|
|
@@ -17,8 +16,6 @@ export declare const provideParamsSchema: z.ZodObject<{
|
|
|
17
16
|
}, z.core.$strip>>;
|
|
18
17
|
}, z.core.$strict>;
|
|
19
18
|
export declare const provideRequestSchema: z.ZodObject<{
|
|
20
|
-
type: z.ZodLiteral<"provide">;
|
|
21
|
-
topic: z.ZodString;
|
|
22
19
|
firewall: z.ZodOptional<z.ZodObject<{
|
|
23
20
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
24
21
|
allow: "allow";
|
|
@@ -26,6 +23,7 @@ export declare const provideRequestSchema: z.ZodObject<{
|
|
|
26
23
|
}>>;
|
|
27
24
|
publicKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
28
25
|
}, z.core.$strip>>;
|
|
26
|
+
type: z.ZodLiteral<"provide">;
|
|
29
27
|
}, z.core.$strict>;
|
|
30
28
|
export declare const provideResponseSchema: z.ZodObject<{
|
|
31
29
|
type: z.ZodLiteral<"provide">;
|
package/dist/schemas/provide.js
CHANGED
|
@@ -5,14 +5,11 @@ export const firewallConfigSchema = z.object({
|
|
|
5
5
|
});
|
|
6
6
|
export const provideParamsSchema = z
|
|
7
7
|
.object({
|
|
8
|
-
topic: z.string(),
|
|
9
8
|
firewall: firewallConfigSchema.optional(),
|
|
10
9
|
})
|
|
11
10
|
.strict();
|
|
12
11
|
export const provideRequestSchema = provideParamsSchema.extend({
|
|
13
12
|
type: z.literal("provide"),
|
|
14
|
-
topic: z.string(),
|
|
15
|
-
firewall: firewallConfigSchema.optional(),
|
|
16
13
|
});
|
|
17
14
|
export const provideResponseSchema = z.object({
|
|
18
15
|
type: z.literal("provide"),
|
package/dist/schemas/rag.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export declare const ragIngestParamsSchema: z.ZodObject<{
|
|
|
13
13
|
character: "character";
|
|
14
14
|
}>>;
|
|
15
15
|
splitStrategy: z.ZodOptional<z.ZodEnum<{
|
|
16
|
-
token: "token";
|
|
17
16
|
character: "character";
|
|
18
17
|
word: "word";
|
|
18
|
+
token: "token";
|
|
19
19
|
sentence: "sentence";
|
|
20
20
|
line: "line";
|
|
21
21
|
}>>;
|
|
@@ -34,9 +34,9 @@ export declare const ragChunkParamsSchema: z.ZodObject<{
|
|
|
34
34
|
character: "character";
|
|
35
35
|
}>>;
|
|
36
36
|
splitStrategy: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
token: "token";
|
|
38
37
|
character: "character";
|
|
39
38
|
word: "word";
|
|
39
|
+
token: "token";
|
|
40
40
|
sentence: "sentence";
|
|
41
41
|
line: "line";
|
|
42
42
|
}>>;
|
|
@@ -91,9 +91,9 @@ export declare const ragRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
91
91
|
character: "character";
|
|
92
92
|
}>>;
|
|
93
93
|
splitStrategy: z.ZodOptional<z.ZodEnum<{
|
|
94
|
-
token: "token";
|
|
95
94
|
character: "character";
|
|
96
95
|
word: "word";
|
|
96
|
+
token: "token";
|
|
97
97
|
sentence: "sentence";
|
|
98
98
|
line: "line";
|
|
99
99
|
}>>;
|
|
@@ -113,9 +113,9 @@ export declare const ragRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
113
113
|
character: "character";
|
|
114
114
|
}>>;
|
|
115
115
|
splitStrategy: z.ZodOptional<z.ZodEnum<{
|
|
116
|
-
token: "token";
|
|
117
116
|
character: "character";
|
|
118
117
|
word: "word";
|
|
118
|
+
token: "token";
|
|
119
119
|
sentence: "sentence";
|
|
120
120
|
line: "line";
|
|
121
121
|
}>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
declare const modelRegistryEntryAddonSchema: z.ZodEnum<{
|
|
3
|
+
embeddings: "embeddings";
|
|
3
4
|
llm: "llm";
|
|
4
5
|
whisper: "whisper";
|
|
5
|
-
embeddings: "embeddings";
|
|
6
6
|
nmt: "nmt";
|
|
7
7
|
parakeet: "parakeet";
|
|
8
8
|
tts: "tts";
|
|
@@ -32,9 +32,9 @@ export declare const modelRegistryEntrySchema: z.ZodObject<{
|
|
|
32
32
|
blobByteOffset: z.ZodNumber;
|
|
33
33
|
modelId: z.ZodString;
|
|
34
34
|
addon: z.ZodEnum<{
|
|
35
|
+
embeddings: "embeddings";
|
|
35
36
|
llm: "llm";
|
|
36
37
|
whisper: "whisper";
|
|
37
|
-
embeddings: "embeddings";
|
|
38
38
|
nmt: "nmt";
|
|
39
39
|
parakeet: "parakeet";
|
|
40
40
|
tts: "tts";
|
|
@@ -78,9 +78,9 @@ export declare const modelRegistryListResponseSchema: z.ZodObject<{
|
|
|
78
78
|
blobByteOffset: z.ZodNumber;
|
|
79
79
|
modelId: z.ZodString;
|
|
80
80
|
addon: z.ZodEnum<{
|
|
81
|
+
embeddings: "embeddings";
|
|
81
82
|
llm: "llm";
|
|
82
83
|
whisper: "whisper";
|
|
83
|
-
embeddings: "embeddings";
|
|
84
84
|
nmt: "nmt";
|
|
85
85
|
parakeet: "parakeet";
|
|
86
86
|
tts: "tts";
|
|
@@ -115,9 +115,9 @@ export declare const modelRegistrySearchRequestSchema: z.ZodObject<{
|
|
|
115
115
|
engine: z.ZodOptional<z.ZodString>;
|
|
116
116
|
quantization: z.ZodOptional<z.ZodString>;
|
|
117
117
|
addon: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
embeddings: "embeddings";
|
|
118
119
|
llm: "llm";
|
|
119
120
|
whisper: "whisper";
|
|
120
|
-
embeddings: "embeddings";
|
|
121
121
|
nmt: "nmt";
|
|
122
122
|
parakeet: "parakeet";
|
|
123
123
|
tts: "tts";
|
|
@@ -140,9 +140,9 @@ export declare const modelRegistrySearchResponseSchema: z.ZodObject<{
|
|
|
140
140
|
blobByteOffset: z.ZodNumber;
|
|
141
141
|
modelId: z.ZodString;
|
|
142
142
|
addon: z.ZodEnum<{
|
|
143
|
+
embeddings: "embeddings";
|
|
143
144
|
llm: "llm";
|
|
144
145
|
whisper: "whisper";
|
|
145
|
-
embeddings: "embeddings";
|
|
146
146
|
nmt: "nmt";
|
|
147
147
|
parakeet: "parakeet";
|
|
148
148
|
tts: "tts";
|
|
@@ -189,9 +189,9 @@ export declare const modelRegistryGetModelResponseSchema: z.ZodObject<{
|
|
|
189
189
|
blobByteOffset: z.ZodNumber;
|
|
190
190
|
modelId: z.ZodString;
|
|
191
191
|
addon: z.ZodEnum<{
|
|
192
|
+
embeddings: "embeddings";
|
|
192
193
|
llm: "llm";
|
|
193
194
|
whisper: "whisper";
|
|
194
|
-
embeddings: "embeddings";
|
|
195
195
|
nmt: "nmt";
|
|
196
196
|
parakeet: "parakeet";
|
|
197
197
|
tts: "tts";
|
|
@@ -228,9 +228,9 @@ export declare const modelRegistryRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
228
228
|
engine: z.ZodOptional<z.ZodString>;
|
|
229
229
|
quantization: z.ZodOptional<z.ZodString>;
|
|
230
230
|
addon: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
embeddings: "embeddings";
|
|
231
232
|
llm: "llm";
|
|
232
233
|
whisper: "whisper";
|
|
233
|
-
embeddings: "embeddings";
|
|
234
234
|
nmt: "nmt";
|
|
235
235
|
parakeet: "parakeet";
|
|
236
236
|
tts: "tts";
|
|
@@ -257,9 +257,9 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
257
257
|
blobByteOffset: z.ZodNumber;
|
|
258
258
|
modelId: z.ZodString;
|
|
259
259
|
addon: z.ZodEnum<{
|
|
260
|
+
embeddings: "embeddings";
|
|
260
261
|
llm: "llm";
|
|
261
262
|
whisper: "whisper";
|
|
262
|
-
embeddings: "embeddings";
|
|
263
263
|
nmt: "nmt";
|
|
264
264
|
parakeet: "parakeet";
|
|
265
265
|
tts: "tts";
|
|
@@ -298,9 +298,9 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
298
298
|
blobByteOffset: z.ZodNumber;
|
|
299
299
|
modelId: z.ZodString;
|
|
300
300
|
addon: z.ZodEnum<{
|
|
301
|
+
embeddings: "embeddings";
|
|
301
302
|
llm: "llm";
|
|
302
303
|
whisper: "whisper";
|
|
303
|
-
embeddings: "embeddings";
|
|
304
304
|
nmt: "nmt";
|
|
305
305
|
parakeet: "parakeet";
|
|
306
306
|
tts: "tts";
|
|
@@ -339,9 +339,9 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
339
339
|
blobByteOffset: z.ZodNumber;
|
|
340
340
|
modelId: z.ZodString;
|
|
341
341
|
addon: z.ZodEnum<{
|
|
342
|
+
embeddings: "embeddings";
|
|
342
343
|
llm: "llm";
|
|
343
344
|
whisper: "whisper";
|
|
344
|
-
embeddings: "embeddings";
|
|
345
345
|
nmt: "nmt";
|
|
346
346
|
parakeet: "parakeet";
|
|
347
347
|
tts: "tts";
|
package/dist/schemas/registry.js
CHANGED
|
@@ -30,20 +30,42 @@ export const modelRegistryEngineSchema = z.enum([
|
|
|
30
30
|
"onnx-vad",
|
|
31
31
|
]);
|
|
32
32
|
export const modelRegistryEntrySchema = z.object({
|
|
33
|
-
name: z.string(),
|
|
34
|
-
registryPath: z
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
name: z.string().describe("Catalog name of the model entry."),
|
|
34
|
+
registryPath: z
|
|
35
|
+
.string()
|
|
36
|
+
.describe("Registry-relative path to the model."),
|
|
37
|
+
registrySource: z
|
|
38
|
+
.string()
|
|
39
|
+
.describe("Registry source identifier, e.g. `huggingface`."),
|
|
40
|
+
blobCoreKey: z
|
|
41
|
+
.string()
|
|
42
|
+
.describe("Hyperdrive blob core key for the model file."),
|
|
43
|
+
blobBlockOffset: z
|
|
44
|
+
.number()
|
|
45
|
+
.describe("Starting block offset of the model file in the blob."),
|
|
46
|
+
blobBlockLength: z
|
|
47
|
+
.number()
|
|
48
|
+
.describe("Number of blocks occupied by the model file."),
|
|
49
|
+
blobByteOffset: z
|
|
50
|
+
.number()
|
|
51
|
+
.describe("Starting byte offset of the model file within its block."),
|
|
52
|
+
modelId: z
|
|
53
|
+
.string()
|
|
54
|
+
.describe("Unique identifier used to reference the model in SDK calls."),
|
|
55
|
+
addon: modelRegistryEntryAddonSchema.describe("Inference addon / capability category this model belongs to."),
|
|
56
|
+
expectedSize: z
|
|
57
|
+
.number()
|
|
58
|
+
.describe("Expected total size of the model file in bytes."),
|
|
59
|
+
sha256Checksum: z
|
|
60
|
+
.string()
|
|
61
|
+
.describe("Expected SHA-256 checksum of the model file."),
|
|
62
|
+
engine: modelRegistryEngineSchema.describe("Canonical inference engine identifier."),
|
|
63
|
+
quantization: z
|
|
64
|
+
.string()
|
|
65
|
+
.describe("Quantization identifier, e.g. `Q4_K_M`."),
|
|
66
|
+
params: z
|
|
67
|
+
.string()
|
|
68
|
+
.describe("Parameter-count label for the model, e.g. `7B`."),
|
|
47
69
|
});
|
|
48
70
|
// QVAC Model Registry list request/response
|
|
49
71
|
export const modelRegistryListRequestSchema = z.object({
|