@qvac/sdk 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +267 -63
- package/README.md +1 -1
- package/dist/client/api/diffusion.d.ts +32 -0
- package/dist/client/api/diffusion.js +103 -0
- package/dist/client/api/embed.d.ts +9 -3
- package/dist/client/api/embed.js +4 -1
- package/dist/client/api/finetune.d.ts +69 -0
- package/dist/client/api/finetune.js +139 -0
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/index.d.ts +4 -0
- package/dist/client/api/index.js +4 -0
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +1 -1
- package/dist/client/api/resume.d.ts +14 -0
- package/dist/client/api/resume.js +20 -0
- package/dist/client/api/suspend.d.ts +13 -0
- package/dist/client/api/suspend.js +19 -0
- package/dist/client/api/transcribe.d.ts +25 -17
- package/dist/client/api/transcribe.js +115 -35
- package/dist/client/rpc/bare-client.d.ts +5 -1
- package/dist/client/rpc/bare-client.js +70 -57
- package/dist/client/rpc/expo-rpc-client.d.ts +4 -0
- package/dist/client/rpc/expo-rpc-client.js +8 -0
- package/dist/client/rpc/node-rpc-client.d.ts +4 -0
- package/dist/client/rpc/node-rpc-client.js +8 -0
- package/dist/client/rpc/rpc-client.d.ts +13 -0
- package/dist/client/rpc/rpc-client.js +131 -1
- package/dist/examples/delegated-inference/composite.d.ts +2 -0
- package/dist/examples/delegated-inference/composite.js +99 -0
- package/dist/examples/diffusion-flux2-klein.d.ts +2 -0
- package/dist/examples/diffusion-flux2-klein.js +46 -0
- package/dist/examples/diffusion-simple.d.ts +2 -0
- package/dist/examples/diffusion-simple.js +17 -0
- package/dist/examples/diffusion-txt2img.d.ts +2 -0
- package/dist/examples/diffusion-txt2img.js +40 -0
- package/dist/examples/embed-p2p.js +2 -2
- package/dist/examples/finetune/llamacpp-finetune.d.ts +2 -0
- package/dist/examples/finetune/llamacpp-finetune.js +78 -0
- package/dist/examples/logging-streaming.js +1 -1
- package/dist/examples/mcp-websearch.js +2 -0
- package/dist/examples/ocr-fasttext.js +11 -0
- package/dist/examples/profiling/per-call.js +3 -3
- package/dist/examples/rag/rag-chromadb.js +2 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +1 -1
- package/dist/examples/rag/rag-lancedb.js +2 -2
- package/dist/examples/rag/rag-sqlite.js +2 -2
- package/dist/examples/suspend-resume.d.ts +2 -0
- package/dist/examples/suspend-resume.js +52 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +3 -5
- package/dist/examples/transcription/parakeet-microphone-record.js +42 -33
- package/dist/examples/transcription/parakeet-sortformer.js +13 -3
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +5 -7
- package/dist/examples/transcription/whispercpp-filesystem-streaming.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +99 -0
- package/dist/examples/transcription/whispercpp-microphone-record.js +78 -299
- package/dist/examples/transcription/whispercpp-prompt.js +11 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/tts/supertonic-multilingual.d.ts +2 -0
- package/dist/examples/tts/supertonic-multilingual.js +56 -0
- package/dist/examples/tts/supertonic.js +12 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +15176 -4264
- package/dist/models/registry/models.js +18657 -7404
- package/dist/models/update-models/codegen.js +2 -2
- package/dist/models/update-models/naming.js +26 -0
- package/dist/pear/pre.js +2 -0
- package/dist/polyfills/bare-globals.d.ts +2 -0
- package/dist/polyfills/bare-globals.js +4 -0
- package/dist/polyfills/bare-globals.noop.d.ts +2 -0
- package/dist/polyfills/bare-globals.noop.js +1 -0
- package/dist/profiling/exporters.js +16 -11
- package/dist/profiling/model-execution.d.ts +16 -0
- package/dist/profiling/model-execution.js +33 -0
- package/dist/schemas/common.d.ts +967 -198
- package/dist/schemas/common.js +16 -1
- package/dist/schemas/completion-stream.d.ts +14 -6
- package/dist/schemas/completion-stream.js +4 -3
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/embed.d.ts +19 -0
- package/dist/schemas/embed.js +7 -0
- package/dist/schemas/engine-addon-map.js +4 -1
- package/dist/schemas/finetune.d.ts +620 -0
- package/dist/schemas/finetune.js +161 -0
- package/dist/schemas/get-model-info.d.ts +2 -0
- package/dist/schemas/get-model-info.js +1 -0
- package/dist/schemas/index.d.ts +5 -1
- package/dist/schemas/index.js +5 -1
- package/dist/schemas/llamacpp-config.d.ts +26 -6
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +4005 -1400
- package/dist/schemas/load-model.js +34 -1
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +19 -1
- package/dist/schemas/model-types.js +11 -0
- package/dist/schemas/ocr.d.ts +2 -0
- package/dist/schemas/plugin.d.ts +24 -3
- package/dist/schemas/plugin.js +14 -0
- package/dist/schemas/profiling.d.ts +4 -0
- package/dist/schemas/profiling.js +4 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +9 -1
- package/dist/schemas/resume.d.ts +10 -0
- package/dist/schemas/resume.js +7 -0
- package/dist/schemas/sdcpp-config.d.ts +327 -0
- package/dist/schemas/sdcpp-config.js +102 -0
- package/dist/schemas/sdk-config.d.ts +1225 -235
- package/dist/schemas/sdk-config.js +4 -0
- package/dist/schemas/sdk-errors-server.d.ts +2 -0
- package/dist/schemas/sdk-errors-server.js +12 -0
- package/dist/schemas/suspend.d.ts +10 -0
- package/dist/schemas/suspend.js +7 -0
- package/dist/schemas/text-to-speech.d.ts +187 -10
- package/dist/schemas/text-to-speech.js +12 -4
- package/dist/schemas/transcription-config.d.ts +16 -56
- package/dist/schemas/transcription-config.js +0 -2
- package/dist/schemas/transcription.d.ts +66 -6
- package/dist/schemas/transcription.js +29 -7
- package/dist/schemas/translate.d.ts +14 -4
- package/dist/schemas/translate.js +10 -2
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/server/bare/delegate-rpc-client.js +3 -3
- package/dist/server/bare/hyperswarm.js +15 -3
- package/dist/server/bare/ops/embed.d.ts +8 -4
- package/dist/server/bare/ops/embed.js +15 -4
- package/dist/server/bare/ops/transcribe.d.ts +6 -2
- package/dist/server/bare/ops/transcribe.js +53 -1
- package/dist/server/bare/ops/translate.d.ts +4 -1
- package/dist/server/bare/ops/translate.js +28 -65
- package/dist/server/bare/ops/unload-model.js +2 -0
- package/dist/server/bare/plugins/index.d.ts +1 -0
- package/dist/server/bare/plugins/index.js +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +3 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +45 -9
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +11 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +112 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +175 -5
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +45 -35
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +11 -1
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +9 -4
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -2
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +16 -15
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +5 -7
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +11 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +2 -0
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +24 -19
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.d.ts +7 -2
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.js +22 -97
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +98 -9
- package/dist/server/bare/plugins/onnx-tts/plugin.js +85 -46
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +30 -60
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +49 -37
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +51 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +278 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +70 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +38 -2
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +43 -22
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +2 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +2 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +7 -0
- package/dist/server/bare/registry/model-config-utils.js +3 -0
- package/dist/server/bare/registry/model-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-registry.js +1 -1
- package/dist/server/bare/registry/registry-client.js +21 -0
- package/dist/server/bare/runtime-lifecycle.d.ts +28 -0
- package/dist/server/bare/runtime-lifecycle.js +132 -0
- package/dist/server/bare/types/addon-responses.d.ts +62 -0
- package/dist/server/bare/types/addon-responses.js +1 -0
- package/dist/server/env.js +3 -1
- package/dist/server/rpc/delegate-transport.js +1 -1
- package/dist/server/rpc/handle-request.js +50 -4
- package/dist/server/rpc/handler-registry.js +20 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -3
- package/dist/server/rpc/handler-utils.js +52 -50
- package/dist/server/rpc/handlers/delete-cache.js +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.js +4 -0
- package/dist/server/rpc/handlers/finetune.d.ts +3 -0
- package/dist/server/rpc/handlers/finetune.js +16 -0
- package/dist/server/rpc/handlers/index.d.ts +10 -0
- package/dist/server/rpc/handlers/index.js +10 -0
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +24 -9
- package/dist/server/rpc/handlers/load-model/registry.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry.js +31 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +1 -13
- package/dist/server/rpc/handlers/plugin-dispatch.js +21 -21
- package/dist/server/rpc/handlers/resume.d.ts +3 -0
- package/dist/server/rpc/handlers/resume.js +11 -0
- package/dist/server/rpc/handlers/suspend.d.ts +3 -0
- package/dist/server/rpc/handlers/suspend.js +11 -0
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +3 -0
- package/dist/server/rpc/handlers/transcribe.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.js +107 -16
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +51 -19
- package/dist/server/rpc/progress-throttle.d.ts +8 -0
- package/dist/server/rpc/progress-throttle.js +47 -0
- package/dist/server/rpc/rpc-utils.d.ts +5 -0
- package/dist/server/rpc/rpc-utils.js +11 -0
- package/dist/server/utils/path-security.js +1 -1
- package/dist/server/utils/tool-integration.js +10 -0
- package/dist/server/utils/tool-parser.js +9 -5
- package/dist/server/worker-core.d.ts +2 -0
- package/dist/server/worker-core.js +26 -23
- package/dist/server/worker.js +2 -1
- package/dist/utils/encoding.d.ts +9 -0
- package/dist/utils/encoding.js +14 -0
- package/dist/utils/errors-server.d.ts +6 -0
- package/dist/utils/errors-server.js +11 -0
- package/package.json +36 -25
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
|
@@ -6,7 +6,8 @@ import { nmtConfigSchema } from "./translation-config.js";
|
|
|
6
6
|
import { ttsConfigSchema } from "./text-to-speech.js";
|
|
7
7
|
import { ocrConfigSchema } from "./ocr.js";
|
|
8
8
|
import { modelSrcInputSchema, modelInputToSrcSchema, modelInputToNameSchema, } from "./model-src-utils.js";
|
|
9
|
-
import { llmModelTypeSchema, whisperModelTypeSchema, parakeetModelTypeSchema, embeddingsModelTypeSchema, nmtModelTypeSchema, ttsModelTypeSchema, ocrModelTypeSchema, ModelType, ModelTypeAliases, } from "./model-types.js";
|
|
9
|
+
import { llmModelTypeSchema, whisperModelTypeSchema, parakeetModelTypeSchema, embeddingsModelTypeSchema, nmtModelTypeSchema, ttsModelTypeSchema, ocrModelTypeSchema, diffusionModelTypeSchema, ModelType, ModelTypeAliases, } from "./model-types.js";
|
|
10
|
+
import { sdcppConfigSchema } from "./sdcpp-config.js";
|
|
10
11
|
// Set of all built-in model types (canonical + aliases) for catch-all exclusion
|
|
11
12
|
const builtInModelTypes = new Set([
|
|
12
13
|
...Object.values(ModelType),
|
|
@@ -21,6 +22,7 @@ const loadModelCommonFields = {
|
|
|
21
22
|
const loadModelRequestCommonFields = {
|
|
22
23
|
...loadModelCommonFields,
|
|
23
24
|
onProgress: z.unknown().optional(),
|
|
25
|
+
logger: z.unknown().optional(),
|
|
24
26
|
withProgress: z.boolean().optional(),
|
|
25
27
|
};
|
|
26
28
|
export const loadModelOptionsBaseSchema = z.union([
|
|
@@ -73,6 +75,13 @@ export const loadModelOptionsBaseSchema = z.union([
|
|
|
73
75
|
modelConfig: ocrConfigSchema.partial().strict().optional(),
|
|
74
76
|
})
|
|
75
77
|
.strict(),
|
|
78
|
+
z
|
|
79
|
+
.object({
|
|
80
|
+
...loadModelCommonFields,
|
|
81
|
+
modelType: diffusionModelTypeSchema,
|
|
82
|
+
modelConfig: sdcppConfigSchema.strict().optional(),
|
|
83
|
+
})
|
|
84
|
+
.strict(),
|
|
76
85
|
// Custom plugin catch-all: accepts any modelType string EXCEPT built-ins
|
|
77
86
|
z.object({
|
|
78
87
|
...loadModelCommonFields,
|
|
@@ -212,6 +221,23 @@ const loadModelOptionsToRequestBaseSchema = z.union([
|
|
|
212
221
|
withProgress: data.withProgress ?? !!data.onProgress,
|
|
213
222
|
delegate: data.delegate,
|
|
214
223
|
})),
|
|
224
|
+
z
|
|
225
|
+
.object({
|
|
226
|
+
...loadModelRequestCommonFields,
|
|
227
|
+
modelType: diffusionModelTypeSchema,
|
|
228
|
+
modelConfig: sdcppConfigSchema.strict().optional(),
|
|
229
|
+
})
|
|
230
|
+
.strict()
|
|
231
|
+
.transform((data) => ({
|
|
232
|
+
type: "loadModel",
|
|
233
|
+
modelType: ModelType.sdcppGeneration,
|
|
234
|
+
modelSrc: modelInputToSrcSchema.parse(data.modelSrc),
|
|
235
|
+
modelName: modelInputToNameSchema.parse(data.modelSrc),
|
|
236
|
+
modelConfig: data.modelConfig ?? {},
|
|
237
|
+
seed: data.seed ?? false,
|
|
238
|
+
withProgress: data.withProgress ?? !!data.onProgress,
|
|
239
|
+
delegate: data.delegate,
|
|
240
|
+
})),
|
|
215
241
|
z
|
|
216
242
|
.object({
|
|
217
243
|
...loadModelRequestCommonFields,
|
|
@@ -285,6 +311,12 @@ export const loadOcrModelRequestSchema = commonModelConfigSchema
|
|
|
285
311
|
modelConfig: ocrConfigSchema,
|
|
286
312
|
})
|
|
287
313
|
.strict();
|
|
314
|
+
export const loadDiffusionModelRequestSchema = commonModelConfigSchema
|
|
315
|
+
.extend({
|
|
316
|
+
modelType: z.literal(ModelType.sdcppGeneration),
|
|
317
|
+
modelConfig: sdcppConfigSchema.optional(),
|
|
318
|
+
})
|
|
319
|
+
.strict();
|
|
288
320
|
// Custom plugin catch-all: accepts any modelType string EXCEPT built-ins
|
|
289
321
|
export const loadCustomPluginModelRequestSchema = commonModelConfigSchema.extend({
|
|
290
322
|
modelType: z.string().refine((val) => !builtInModelTypes.has(val), {
|
|
@@ -302,6 +334,7 @@ export const loadModelSrcRequestSchema = z
|
|
|
302
334
|
loadNmtModelRequestSchema,
|
|
303
335
|
loadTtsModelRequestSchema,
|
|
304
336
|
loadOcrModelRequestSchema,
|
|
337
|
+
loadDiffusionModelRequestSchema,
|
|
305
338
|
loadCustomPluginModelRequestSchema,
|
|
306
339
|
])
|
|
307
340
|
.transform((data) => ({
|
|
@@ -18,6 +18,7 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
18
18
|
"onnx-tts": "onnx-tts";
|
|
19
19
|
"parakeet-transcription": "parakeet-transcription";
|
|
20
20
|
"onnx-ocr": "onnx-ocr";
|
|
21
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
21
22
|
llm: "llm";
|
|
22
23
|
whisper: "whisper";
|
|
23
24
|
embeddings: "embeddings";
|
|
@@ -25,6 +26,7 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
25
26
|
parakeet: "parakeet";
|
|
26
27
|
tts: "tts";
|
|
27
28
|
ocr: "ocr";
|
|
29
|
+
diffusion: "diffusion";
|
|
28
30
|
}>, z.ZodLiteral<"vad">]>>;
|
|
29
31
|
}, z.core.$strip>;
|
|
30
32
|
export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -46,6 +48,7 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
46
48
|
"onnx-tts": "onnx-tts";
|
|
47
49
|
"parakeet-transcription": "parakeet-transcription";
|
|
48
50
|
"onnx-ocr": "onnx-ocr";
|
|
51
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
49
52
|
llm: "llm";
|
|
50
53
|
whisper: "whisper";
|
|
51
54
|
embeddings: "embeddings";
|
|
@@ -53,6 +56,7 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
53
56
|
parakeet: "parakeet";
|
|
54
57
|
tts: "tts";
|
|
55
58
|
ocr: "ocr";
|
|
59
|
+
diffusion: "diffusion";
|
|
56
60
|
}>, z.ZodLiteral<"vad">]>>;
|
|
57
61
|
}, z.core.$strip>]>;
|
|
58
62
|
export type ModelDescriptor = z.infer<typeof modelDescriptorSchema>;
|
|
@@ -80,6 +84,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
80
84
|
"onnx-tts": "onnx-tts";
|
|
81
85
|
"parakeet-transcription": "parakeet-transcription";
|
|
82
86
|
"onnx-ocr": "onnx-ocr";
|
|
87
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
83
88
|
llm: "llm";
|
|
84
89
|
whisper: "whisper";
|
|
85
90
|
embeddings: "embeddings";
|
|
@@ -87,6 +92,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
87
92
|
parakeet: "parakeet";
|
|
88
93
|
tts: "tts";
|
|
89
94
|
ocr: "ocr";
|
|
95
|
+
diffusion: "diffusion";
|
|
90
96
|
}>, z.ZodLiteral<"vad">]>>;
|
|
91
97
|
}, z.core.$strip>]>, z.ZodTransform<string, string | {
|
|
92
98
|
src: string;
|
|
@@ -99,7 +105,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
99
105
|
engine?: string | undefined;
|
|
100
106
|
expectedSize?: number | undefined;
|
|
101
107
|
sha256Checksum?: string | undefined;
|
|
102
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
108
|
+
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
103
109
|
}>>;
|
|
104
110
|
/**
|
|
105
111
|
* Schema that transforms ModelSrc to its optional name
|
|
@@ -124,6 +130,7 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
124
130
|
"onnx-tts": "onnx-tts";
|
|
125
131
|
"parakeet-transcription": "parakeet-transcription";
|
|
126
132
|
"onnx-ocr": "onnx-ocr";
|
|
133
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
127
134
|
llm: "llm";
|
|
128
135
|
whisper: "whisper";
|
|
129
136
|
embeddings: "embeddings";
|
|
@@ -131,6 +138,7 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
131
138
|
parakeet: "parakeet";
|
|
132
139
|
tts: "tts";
|
|
133
140
|
ocr: "ocr";
|
|
141
|
+
diffusion: "diffusion";
|
|
134
142
|
}>, z.ZodLiteral<"vad">]>>;
|
|
135
143
|
}, z.core.$strip>]>, z.ZodTransform<string | undefined, string | {
|
|
136
144
|
src: string;
|
|
@@ -143,6 +151,6 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
143
151
|
engine?: string | undefined;
|
|
144
152
|
expectedSize?: number | undefined;
|
|
145
153
|
sha256Checksum?: string | undefined;
|
|
146
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
154
|
+
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
147
155
|
}>>;
|
|
148
156
|
//# sourceMappingURL=model-src-utils.d.ts.map
|
|
@@ -12,6 +12,7 @@ export declare const ModelType: {
|
|
|
12
12
|
readonly onnxTts: "onnx-tts";
|
|
13
13
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
14
14
|
readonly onnxOcr: "onnx-ocr";
|
|
15
|
+
readonly sdcppGeneration: "sdcpp-generation";
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Alias mappings for backward compatibility.
|
|
@@ -25,6 +26,7 @@ export declare const ModelTypeAliases: {
|
|
|
25
26
|
readonly parakeet: "parakeet-transcription";
|
|
26
27
|
readonly tts: "onnx-tts";
|
|
27
28
|
readonly ocr: "onnx-ocr";
|
|
29
|
+
readonly diffusion: "sdcpp-generation";
|
|
28
30
|
};
|
|
29
31
|
export type CanonicalModelType = (typeof ModelType)[keyof typeof ModelType];
|
|
30
32
|
export type AliasKey = keyof typeof ModelTypeAliases;
|
|
@@ -53,6 +55,7 @@ export declare const PUBLIC_MODEL_TYPES: {
|
|
|
53
55
|
readonly parakeet: "parakeet-transcription";
|
|
54
56
|
readonly tts: "onnx-tts";
|
|
55
57
|
readonly ocr: "onnx-ocr";
|
|
58
|
+
readonly diffusion: "sdcpp-generation";
|
|
56
59
|
readonly llamacppCompletion: "llamacpp-completion";
|
|
57
60
|
readonly whispercppTranscription: "whispercpp-transcription";
|
|
58
61
|
readonly llamacppEmbedding: "llamacpp-embedding";
|
|
@@ -60,6 +63,7 @@ export declare const PUBLIC_MODEL_TYPES: {
|
|
|
60
63
|
readonly onnxTts: "onnx-tts";
|
|
61
64
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
62
65
|
readonly onnxOcr: "onnx-ocr";
|
|
66
|
+
readonly sdcppGeneration: "sdcpp-generation";
|
|
63
67
|
};
|
|
64
68
|
/** Schema accepting both canonical and alias model type inputs */
|
|
65
69
|
export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
@@ -70,6 +74,7 @@ export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
|
70
74
|
"onnx-tts": "onnx-tts";
|
|
71
75
|
"parakeet-transcription": "parakeet-transcription";
|
|
72
76
|
"onnx-ocr": "onnx-ocr";
|
|
77
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
73
78
|
llm: "llm";
|
|
74
79
|
whisper: "whisper";
|
|
75
80
|
embeddings: "embeddings";
|
|
@@ -77,6 +82,7 @@ export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
|
77
82
|
parakeet: "parakeet";
|
|
78
83
|
tts: "tts";
|
|
79
84
|
ocr: "ocr";
|
|
85
|
+
diffusion: "diffusion";
|
|
80
86
|
}>;
|
|
81
87
|
/** Schema that transforms input to canonical model type */
|
|
82
88
|
export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
@@ -87,6 +93,7 @@ export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
|
87
93
|
"onnx-tts": "onnx-tts";
|
|
88
94
|
"parakeet-transcription": "parakeet-transcription";
|
|
89
95
|
"onnx-ocr": "onnx-ocr";
|
|
96
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
90
97
|
llm: "llm";
|
|
91
98
|
whisper: "whisper";
|
|
92
99
|
embeddings: "embeddings";
|
|
@@ -94,7 +101,8 @@ export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
|
94
101
|
parakeet: "parakeet";
|
|
95
102
|
tts: "tts";
|
|
96
103
|
ocr: "ocr";
|
|
97
|
-
|
|
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" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion">>;
|
|
98
106
|
/**
|
|
99
107
|
* Normalize model type input to canonical form.
|
|
100
108
|
* Custom plugin types (not in built-ins) are returned as-is.
|
|
@@ -180,4 +188,14 @@ export declare const ocrModelTypeSchema: z.ZodEnum<{
|
|
|
180
188
|
ocr: "ocr";
|
|
181
189
|
}>;
|
|
182
190
|
export type OcrModelTypeInput = z.infer<typeof ocrModelTypeSchema>;
|
|
191
|
+
/**
|
|
192
|
+
* Diffusion/Image Generation model type schema.
|
|
193
|
+
* - Alias: `"diffusion"` → resolves to `"sdcpp-generation"`
|
|
194
|
+
* - Canonical: `"sdcpp-generation"`
|
|
195
|
+
*/
|
|
196
|
+
export declare const diffusionModelTypeSchema: z.ZodEnum<{
|
|
197
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
198
|
+
diffusion: "diffusion";
|
|
199
|
+
}>;
|
|
200
|
+
export type DiffusionModelTypeInput = z.infer<typeof diffusionModelTypeSchema>;
|
|
183
201
|
//# sourceMappingURL=model-types.d.ts.map
|
|
@@ -13,6 +13,7 @@ export const ModelType = {
|
|
|
13
13
|
onnxTts: "onnx-tts",
|
|
14
14
|
parakeetTranscription: "parakeet-transcription",
|
|
15
15
|
onnxOcr: "onnx-ocr",
|
|
16
|
+
sdcppGeneration: "sdcpp-generation",
|
|
16
17
|
};
|
|
17
18
|
// === INTERNAL: Alias keys (backward compat names) ===
|
|
18
19
|
const AliasKeys = {
|
|
@@ -23,6 +24,7 @@ const AliasKeys = {
|
|
|
23
24
|
parakeet: "parakeet",
|
|
24
25
|
tts: "tts",
|
|
25
26
|
ocr: "ocr",
|
|
27
|
+
diffusion: "diffusion",
|
|
26
28
|
};
|
|
27
29
|
// === INTERNAL: Aliases (backward compat mapping) ===
|
|
28
30
|
/**
|
|
@@ -37,6 +39,7 @@ export const ModelTypeAliases = {
|
|
|
37
39
|
[AliasKeys.parakeet]: ModelType.parakeetTranscription,
|
|
38
40
|
[AliasKeys.tts]: ModelType.onnxTts,
|
|
39
41
|
[AliasKeys.ocr]: ModelType.onnxOcr,
|
|
42
|
+
[AliasKeys.diffusion]: ModelType.sdcppGeneration,
|
|
40
43
|
};
|
|
41
44
|
// Set of canonical values for quick lookup
|
|
42
45
|
const canonicalValuesSet = new Set(Object.values(ModelType));
|
|
@@ -166,3 +169,11 @@ export const ttsModelTypeSchema = modelTypeInputSchema
|
|
|
166
169
|
export const ocrModelTypeSchema = modelTypeInputSchema
|
|
167
170
|
.extract([AliasKeys.ocr, ModelType.onnxOcr])
|
|
168
171
|
.describe('OCR model type: "ocr" (alias) or "onnx-ocr" (canonical)');
|
|
172
|
+
/**
|
|
173
|
+
* Diffusion/Image Generation model type schema.
|
|
174
|
+
* - Alias: `"diffusion"` → resolves to `"sdcpp-generation"`
|
|
175
|
+
* - Canonical: `"sdcpp-generation"`
|
|
176
|
+
*/
|
|
177
|
+
export const diffusionModelTypeSchema = modelTypeInputSchema
|
|
178
|
+
.extract([AliasKeys.diffusion, ModelType.sdcppGeneration])
|
|
179
|
+
.describe('Diffusion model type: "diffusion" (alias) or "sdcpp-generation" (canonical)');
|
package/dist/schemas/ocr.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
36
36
|
"onnx-tts": "onnx-tts";
|
|
37
37
|
"parakeet-transcription": "parakeet-transcription";
|
|
38
38
|
"onnx-ocr": "onnx-ocr";
|
|
39
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
39
40
|
llm: "llm";
|
|
40
41
|
whisper: "whisper";
|
|
41
42
|
embeddings: "embeddings";
|
|
@@ -43,6 +44,7 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
43
44
|
parakeet: "parakeet";
|
|
44
45
|
tts: "tts";
|
|
45
46
|
ocr: "ocr";
|
|
47
|
+
diffusion: "diffusion";
|
|
46
48
|
}>, z.ZodLiteral<"vad">]>>;
|
|
47
49
|
}, z.core.$strip>]>>;
|
|
48
50
|
}, z.core.$strip>;
|
package/dist/schemas/plugin.d.ts
CHANGED
|
@@ -8,8 +8,19 @@ export interface PluginHandlerDefinition<TRequest extends z.ZodType = z.ZodType,
|
|
|
8
8
|
requestSchema: TRequest;
|
|
9
9
|
responseSchema: TResponse;
|
|
10
10
|
streaming: boolean;
|
|
11
|
-
|
|
12
|
-
handler: TRequest extends z.ZodType<infer I> ? TResponse extends z.ZodType<infer O> ? (request: I) => Promise<O> | AsyncGenerator<O> : never : never;
|
|
11
|
+
duplex?: boolean;
|
|
12
|
+
handler: TRequest extends z.ZodType<infer I> ? TResponse extends z.ZodType<infer O> ? (request: I, inputStream?: AsyncIterable<Buffer>) => Promise<O> | AsyncGenerator<O> : never : never;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Variant of `PluginHandlerDefinition` for duplex handlers where
|
|
16
|
+
* `inputStream` is guaranteed to be present. Use with `defineDuplexHandler`.
|
|
17
|
+
*/
|
|
18
|
+
export interface DuplexPluginHandlerDefinition<TRequest extends z.ZodType = z.ZodType, TResponse extends z.ZodType = z.ZodType> {
|
|
19
|
+
requestSchema: TRequest;
|
|
20
|
+
responseSchema: TResponse;
|
|
21
|
+
streaming: true;
|
|
22
|
+
duplex: true;
|
|
23
|
+
handler: TRequest extends z.ZodType<infer I> ? TResponse extends z.ZodType<infer O> ? (request: I, inputStream: AsyncIterable<Buffer>) => AsyncGenerator<O> : never : never;
|
|
13
24
|
}
|
|
14
25
|
/**
|
|
15
26
|
* Parameters passed to createModel when loading a plugin model.
|
|
@@ -128,6 +139,7 @@ export declare function definePlugin<T extends QvacPlugin>(plugin: T): T;
|
|
|
128
139
|
* This is an identity function that provides type checking.
|
|
129
140
|
*/
|
|
130
141
|
export declare function defineHandler<TRequest extends z.ZodType, TResponse extends z.ZodType>(definition: PluginHandlerDefinition<TRequest, TResponse>): PluginHandlerDefinition<TRequest, TResponse>;
|
|
142
|
+
export declare function defineDuplexHandler<TRequest extends z.ZodType, TResponse extends z.ZodType>(definition: DuplexPluginHandlerDefinition<TRequest, TResponse>): PluginHandlerDefinition<TRequest, TResponse>;
|
|
131
143
|
export declare const pluginHandlerDefinitionRuntimeSchema: z.ZodObject<{
|
|
132
144
|
requestSchema: z.ZodObject<{
|
|
133
145
|
safeParse: z.ZodCustom<Function, Function>;
|
|
@@ -136,6 +148,7 @@ export declare const pluginHandlerDefinitionRuntimeSchema: z.ZodObject<{
|
|
|
136
148
|
safeParse: z.ZodCustom<Function, Function>;
|
|
137
149
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
138
150
|
streaming: z.ZodBoolean;
|
|
151
|
+
duplex: z.ZodOptional<z.ZodBoolean>;
|
|
139
152
|
handler: z.ZodCustom<Function, Function>;
|
|
140
153
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
141
154
|
export declare const pluginDefinitionRuntimeSchema: z.ZodObject<{
|
|
@@ -154,6 +167,7 @@ export declare const pluginDefinitionRuntimeSchema: z.ZodObject<{
|
|
|
154
167
|
safeParse: z.ZodCustom<Function, Function>;
|
|
155
168
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
156
169
|
streaming: z.ZodBoolean;
|
|
170
|
+
duplex: z.ZodOptional<z.ZodBoolean>;
|
|
157
171
|
handler: z.ZodCustom<Function, Function>;
|
|
158
172
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
159
173
|
logging: z.ZodOptional<z.ZodObject<{
|
|
@@ -198,6 +212,11 @@ export declare const PLUGIN_TTS: "@qvac/sdk/onnx-tts/plugin";
|
|
|
198
212
|
* Provides: text extraction from images.
|
|
199
213
|
*/
|
|
200
214
|
export declare const PLUGIN_OCR: "@qvac/sdk/onnx-ocr/plugin";
|
|
215
|
+
/**
|
|
216
|
+
* Image generation plugin (stable-diffusion.cpp).
|
|
217
|
+
* Provides: text-to-image generation.
|
|
218
|
+
*/
|
|
219
|
+
export declare const PLUGIN_DIFFUSION: "@qvac/sdk/sdcpp-generation/plugin";
|
|
201
220
|
/**
|
|
202
221
|
* All built-in SDK plugins.
|
|
203
222
|
*
|
|
@@ -207,7 +226,7 @@ export declare const PLUGIN_OCR: "@qvac/sdk/onnx-ocr/plugin";
|
|
|
207
226
|
* plugins: [...SDK_DEFAULT_PLUGINS, myCustomPlugin],
|
|
208
227
|
* };
|
|
209
228
|
*/
|
|
210
|
-
export declare const SDK_DEFAULT_PLUGINS: readonly ["@qvac/sdk/llamacpp-completion/plugin", "@qvac/sdk/llamacpp-embedding/plugin", "@qvac/sdk/whispercpp-transcription/plugin", "@qvac/sdk/parakeet-transcription/plugin", "@qvac/sdk/nmtcpp-translation/plugin", "@qvac/sdk/onnx-tts/plugin", "@qvac/sdk/onnx-ocr/plugin"];
|
|
229
|
+
export declare const SDK_DEFAULT_PLUGINS: readonly ["@qvac/sdk/llamacpp-completion/plugin", "@qvac/sdk/llamacpp-embedding/plugin", "@qvac/sdk/whispercpp-transcription/plugin", "@qvac/sdk/parakeet-transcription/plugin", "@qvac/sdk/nmtcpp-translation/plugin", "@qvac/sdk/onnx-tts/plugin", "@qvac/sdk/onnx-ocr/plugin", "@qvac/sdk/sdcpp-generation/plugin"];
|
|
211
230
|
export type BuiltinPlugin = (typeof SDK_DEFAULT_PLUGINS)[number];
|
|
212
231
|
/** Native addon package for LLM completion (llama.cpp) */
|
|
213
232
|
export declare const ADDON_LLM: "@qvac/llm-llamacpp";
|
|
@@ -223,4 +242,6 @@ export declare const ADDON_NMT: "@qvac/translation-nmtcpp";
|
|
|
223
242
|
export declare const ADDON_TTS: "@qvac/tts-onnx";
|
|
224
243
|
/** Native addon package for OCR (ONNX) */
|
|
225
244
|
export declare const ADDON_OCR: "@qvac/ocr-onnx";
|
|
245
|
+
/** Native addon package for image generation (stable-diffusion.cpp) */
|
|
246
|
+
export declare const ADDON_DIFFUSION: "@qvac/diffusion-cpp";
|
|
226
247
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/schemas/plugin.js
CHANGED
|
@@ -39,6 +39,11 @@ export function definePlugin(plugin) {
|
|
|
39
39
|
export function defineHandler(definition) {
|
|
40
40
|
return definition;
|
|
41
41
|
}
|
|
42
|
+
export function defineDuplexHandler(definition) {
|
|
43
|
+
// The duplex flag guarantees inputStream is always
|
|
44
|
+
// provided at call time; the cast bridges TS function-param contravariance.
|
|
45
|
+
return definition;
|
|
46
|
+
}
|
|
42
47
|
// ============================================
|
|
43
48
|
// Worker runtime validation
|
|
44
49
|
// ============================================
|
|
@@ -55,6 +60,7 @@ export const pluginHandlerDefinitionRuntimeSchema = z
|
|
|
55
60
|
requestSchema: zodSchemaLikeRuntimeSchema,
|
|
56
61
|
responseSchema: zodSchemaLikeRuntimeSchema,
|
|
57
62
|
streaming: z.boolean({ error: "streaming must be a boolean" }),
|
|
63
|
+
duplex: z.boolean().optional(),
|
|
58
64
|
handler: functionRuntimeSchema,
|
|
59
65
|
})
|
|
60
66
|
.catchall(z.unknown());
|
|
@@ -121,6 +127,11 @@ export const PLUGIN_TTS = "@qvac/sdk/onnx-tts/plugin";
|
|
|
121
127
|
* Provides: text extraction from images.
|
|
122
128
|
*/
|
|
123
129
|
export const PLUGIN_OCR = "@qvac/sdk/onnx-ocr/plugin";
|
|
130
|
+
/**
|
|
131
|
+
* Image generation plugin (stable-diffusion.cpp).
|
|
132
|
+
* Provides: text-to-image generation.
|
|
133
|
+
*/
|
|
134
|
+
export const PLUGIN_DIFFUSION = "@qvac/sdk/sdcpp-generation/plugin";
|
|
124
135
|
/**
|
|
125
136
|
* All built-in SDK plugins.
|
|
126
137
|
*
|
|
@@ -138,6 +149,7 @@ export const SDK_DEFAULT_PLUGINS = [
|
|
|
138
149
|
PLUGIN_NMT,
|
|
139
150
|
PLUGIN_TTS,
|
|
140
151
|
PLUGIN_OCR,
|
|
152
|
+
PLUGIN_DIFFUSION,
|
|
141
153
|
];
|
|
142
154
|
// ============================================
|
|
143
155
|
// Addon Packages
|
|
@@ -156,3 +168,5 @@ export const ADDON_NMT = "@qvac/translation-nmtcpp";
|
|
|
156
168
|
export const ADDON_TTS = "@qvac/tts-onnx";
|
|
157
169
|
/** Native addon package for OCR (ONNX) */
|
|
158
170
|
export const ADDON_OCR = "@qvac/ocr-onnx";
|
|
171
|
+
/** Native addon package for image generation (stable-diffusion.cpp) */
|
|
172
|
+
export const ADDON_DIFFUSION = "@qvac/diffusion-cpp";
|
|
@@ -11,6 +11,10 @@ export declare const DELEGATION_BREAKDOWN_KEY: unique symbol;
|
|
|
11
11
|
* Symbol key for attaching operation event to response objects.
|
|
12
12
|
*/
|
|
13
13
|
export declare const OPERATION_EVENT_KEY: unique symbol;
|
|
14
|
+
/**
|
|
15
|
+
* Symbol key for attaching model execution timing.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MODEL_EXECUTION_KEY: unique symbol;
|
|
14
18
|
export declare const profilerModeSchema: z.ZodEnum<{
|
|
15
19
|
summary: "summary";
|
|
16
20
|
verbose: "verbose";
|
|
@@ -11,6 +11,10 @@ export const DELEGATION_BREAKDOWN_KEY = Symbol.for("@qvac/sdk:delegation-breakdo
|
|
|
11
11
|
* Symbol key for attaching operation event to response objects.
|
|
12
12
|
*/
|
|
13
13
|
export const OPERATION_EVENT_KEY = Symbol.for("@qvac/sdk:operation-event");
|
|
14
|
+
/**
|
|
15
|
+
* Symbol key for attaching model execution timing.
|
|
16
|
+
*/
|
|
17
|
+
export const MODEL_EXECUTION_KEY = Symbol.for("@qvac/sdk:model-execution");
|
|
14
18
|
export const profilerModeSchema = z.enum(["summary", "verbose"]);
|
|
15
19
|
/**
|
|
16
20
|
* Server-side timing breakdown (server → client).
|
|
@@ -7,6 +7,7 @@ declare const modelRegistryEntryAddonSchema: z.ZodEnum<{
|
|
|
7
7
|
parakeet: "parakeet";
|
|
8
8
|
tts: "tts";
|
|
9
9
|
ocr: "ocr";
|
|
10
|
+
diffusion: "diffusion";
|
|
10
11
|
vad: "vad";
|
|
11
12
|
other: "other";
|
|
12
13
|
}>;
|
|
@@ -18,6 +19,7 @@ export declare const modelRegistryEngineSchema: z.ZodEnum<{
|
|
|
18
19
|
"onnx-tts": "onnx-tts";
|
|
19
20
|
"parakeet-transcription": "parakeet-transcription";
|
|
20
21
|
"onnx-ocr": "onnx-ocr";
|
|
22
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
21
23
|
"onnx-vad": "onnx-vad";
|
|
22
24
|
}>;
|
|
23
25
|
export declare const modelRegistryEntrySchema: z.ZodObject<{
|
|
@@ -37,6 +39,7 @@ export declare const modelRegistryEntrySchema: z.ZodObject<{
|
|
|
37
39
|
parakeet: "parakeet";
|
|
38
40
|
tts: "tts";
|
|
39
41
|
ocr: "ocr";
|
|
42
|
+
diffusion: "diffusion";
|
|
40
43
|
vad: "vad";
|
|
41
44
|
other: "other";
|
|
42
45
|
}>;
|
|
@@ -50,6 +53,7 @@ export declare const modelRegistryEntrySchema: z.ZodObject<{
|
|
|
50
53
|
"onnx-tts": "onnx-tts";
|
|
51
54
|
"parakeet-transcription": "parakeet-transcription";
|
|
52
55
|
"onnx-ocr": "onnx-ocr";
|
|
56
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
53
57
|
"onnx-vad": "onnx-vad";
|
|
54
58
|
}>;
|
|
55
59
|
quantization: z.ZodString;
|
|
@@ -81,6 +85,7 @@ export declare const modelRegistryListResponseSchema: z.ZodObject<{
|
|
|
81
85
|
parakeet: "parakeet";
|
|
82
86
|
tts: "tts";
|
|
83
87
|
ocr: "ocr";
|
|
88
|
+
diffusion: "diffusion";
|
|
84
89
|
vad: "vad";
|
|
85
90
|
other: "other";
|
|
86
91
|
}>;
|
|
@@ -94,6 +99,7 @@ export declare const modelRegistryListResponseSchema: z.ZodObject<{
|
|
|
94
99
|
"onnx-tts": "onnx-tts";
|
|
95
100
|
"parakeet-transcription": "parakeet-transcription";
|
|
96
101
|
"onnx-ocr": "onnx-ocr";
|
|
102
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
97
103
|
"onnx-vad": "onnx-vad";
|
|
98
104
|
}>;
|
|
99
105
|
quantization: z.ZodString;
|
|
@@ -116,6 +122,7 @@ export declare const modelRegistrySearchRequestSchema: z.ZodObject<{
|
|
|
116
122
|
parakeet: "parakeet";
|
|
117
123
|
tts: "tts";
|
|
118
124
|
ocr: "ocr";
|
|
125
|
+
diffusion: "diffusion";
|
|
119
126
|
vad: "vad";
|
|
120
127
|
other: "other";
|
|
121
128
|
}>>;
|
|
@@ -140,6 +147,7 @@ export declare const modelRegistrySearchResponseSchema: z.ZodObject<{
|
|
|
140
147
|
parakeet: "parakeet";
|
|
141
148
|
tts: "tts";
|
|
142
149
|
ocr: "ocr";
|
|
150
|
+
diffusion: "diffusion";
|
|
143
151
|
vad: "vad";
|
|
144
152
|
other: "other";
|
|
145
153
|
}>;
|
|
@@ -153,6 +161,7 @@ export declare const modelRegistrySearchResponseSchema: z.ZodObject<{
|
|
|
153
161
|
"onnx-tts": "onnx-tts";
|
|
154
162
|
"parakeet-transcription": "parakeet-transcription";
|
|
155
163
|
"onnx-ocr": "onnx-ocr";
|
|
164
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
156
165
|
"onnx-vad": "onnx-vad";
|
|
157
166
|
}>;
|
|
158
167
|
quantization: z.ZodString;
|
|
@@ -187,6 +196,7 @@ export declare const modelRegistryGetModelResponseSchema: z.ZodObject<{
|
|
|
187
196
|
parakeet: "parakeet";
|
|
188
197
|
tts: "tts";
|
|
189
198
|
ocr: "ocr";
|
|
199
|
+
diffusion: "diffusion";
|
|
190
200
|
vad: "vad";
|
|
191
201
|
other: "other";
|
|
192
202
|
}>;
|
|
@@ -200,6 +210,7 @@ export declare const modelRegistryGetModelResponseSchema: z.ZodObject<{
|
|
|
200
210
|
"onnx-tts": "onnx-tts";
|
|
201
211
|
"parakeet-transcription": "parakeet-transcription";
|
|
202
212
|
"onnx-ocr": "onnx-ocr";
|
|
213
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
203
214
|
"onnx-vad": "onnx-vad";
|
|
204
215
|
}>;
|
|
205
216
|
quantization: z.ZodString;
|
|
@@ -224,6 +235,7 @@ export declare const modelRegistryRequestSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
224
235
|
parakeet: "parakeet";
|
|
225
236
|
tts: "tts";
|
|
226
237
|
ocr: "ocr";
|
|
238
|
+
diffusion: "diffusion";
|
|
227
239
|
vad: "vad";
|
|
228
240
|
other: "other";
|
|
229
241
|
}>>;
|
|
@@ -252,6 +264,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
252
264
|
parakeet: "parakeet";
|
|
253
265
|
tts: "tts";
|
|
254
266
|
ocr: "ocr";
|
|
267
|
+
diffusion: "diffusion";
|
|
255
268
|
vad: "vad";
|
|
256
269
|
other: "other";
|
|
257
270
|
}>;
|
|
@@ -265,6 +278,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
265
278
|
"onnx-tts": "onnx-tts";
|
|
266
279
|
"parakeet-transcription": "parakeet-transcription";
|
|
267
280
|
"onnx-ocr": "onnx-ocr";
|
|
281
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
268
282
|
"onnx-vad": "onnx-vad";
|
|
269
283
|
}>;
|
|
270
284
|
quantization: z.ZodString;
|
|
@@ -291,6 +305,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
291
305
|
parakeet: "parakeet";
|
|
292
306
|
tts: "tts";
|
|
293
307
|
ocr: "ocr";
|
|
308
|
+
diffusion: "diffusion";
|
|
294
309
|
vad: "vad";
|
|
295
310
|
other: "other";
|
|
296
311
|
}>;
|
|
@@ -304,6 +319,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
304
319
|
"onnx-tts": "onnx-tts";
|
|
305
320
|
"parakeet-transcription": "parakeet-transcription";
|
|
306
321
|
"onnx-ocr": "onnx-ocr";
|
|
322
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
307
323
|
"onnx-vad": "onnx-vad";
|
|
308
324
|
}>;
|
|
309
325
|
quantization: z.ZodString;
|
|
@@ -330,6 +346,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
330
346
|
parakeet: "parakeet";
|
|
331
347
|
tts: "tts";
|
|
332
348
|
ocr: "ocr";
|
|
349
|
+
diffusion: "diffusion";
|
|
333
350
|
vad: "vad";
|
|
334
351
|
other: "other";
|
|
335
352
|
}>;
|
|
@@ -343,6 +360,7 @@ export declare const modelRegistryResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
343
360
|
"onnx-tts": "onnx-tts";
|
|
344
361
|
"parakeet-transcription": "parakeet-transcription";
|
|
345
362
|
"onnx-ocr": "onnx-ocr";
|
|
363
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
346
364
|
"onnx-vad": "onnx-vad";
|
|
347
365
|
}>;
|
|
348
366
|
quantization: z.ZodString;
|
package/dist/schemas/registry.js
CHANGED
|
@@ -10,6 +10,7 @@ const modelRegistryEntryAddonSchema = z.enum([
|
|
|
10
10
|
"tts",
|
|
11
11
|
"ocr",
|
|
12
12
|
"parakeet",
|
|
13
|
+
"diffusion",
|
|
13
14
|
"other",
|
|
14
15
|
]);
|
|
15
16
|
// Canonical engine names derived from ModelType (schemas/model-types.ts) plus
|
|
@@ -25,6 +26,7 @@ export const modelRegistryEngineSchema = z.enum([
|
|
|
25
26
|
ModelType.onnxTts,
|
|
26
27
|
ModelType.onnxOcr,
|
|
27
28
|
ModelType.parakeetTranscription,
|
|
29
|
+
ModelType.sdcppGeneration,
|
|
28
30
|
"onnx-vad",
|
|
29
31
|
]);
|
|
30
32
|
export const modelRegistryEntrySchema = z.object({
|
|
@@ -86,6 +86,7 @@ export declare const reloadConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
86
86
|
"onnx-tts": "onnx-tts";
|
|
87
87
|
"parakeet-transcription": "parakeet-transcription";
|
|
88
88
|
"onnx-ocr": "onnx-ocr";
|
|
89
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
89
90
|
llm: "llm";
|
|
90
91
|
whisper: "whisper";
|
|
91
92
|
embeddings: "embeddings";
|
|
@@ -93,6 +94,7 @@ export declare const reloadConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
93
94
|
parakeet: "parakeet";
|
|
94
95
|
tts: "tts";
|
|
95
96
|
ocr: "ocr";
|
|
97
|
+
diffusion: "diffusion";
|
|
96
98
|
}>, z.ZodLiteral<"vad">]>>;
|
|
97
99
|
}, z.core.$strip>]>>>;
|
|
98
100
|
}, z.core.$strict>;
|
|
@@ -182,6 +184,7 @@ export declare const reloadConfigOptionsToRequestSchema: z.ZodUnion<readonly [z.
|
|
|
182
184
|
"onnx-tts": "onnx-tts";
|
|
183
185
|
"parakeet-transcription": "parakeet-transcription";
|
|
184
186
|
"onnx-ocr": "onnx-ocr";
|
|
187
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
185
188
|
llm: "llm";
|
|
186
189
|
whisper: "whisper";
|
|
187
190
|
embeddings: "embeddings";
|
|
@@ -189,6 +192,7 @@ export declare const reloadConfigOptionsToRequestSchema: z.ZodUnion<readonly [z.
|
|
|
189
192
|
parakeet: "parakeet";
|
|
190
193
|
tts: "tts";
|
|
191
194
|
ocr: "ocr";
|
|
195
|
+
diffusion: "diffusion";
|
|
192
196
|
}>, z.ZodLiteral<"vad">]>>;
|
|
193
197
|
}, z.core.$strip>]>>>;
|
|
194
198
|
}, z.core.$strict>;
|
|
@@ -265,7 +269,7 @@ export declare const reloadConfigOptionsToRequestSchema: z.ZodUnion<readonly [z.
|
|
|
265
269
|
engine?: string | undefined;
|
|
266
270
|
expectedSize?: number | undefined;
|
|
267
271
|
sha256Checksum?: string | undefined;
|
|
268
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
272
|
+
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
269
273
|
} | undefined;
|
|
270
274
|
};
|
|
271
275
|
}>>]>;
|
|
@@ -359,6 +363,7 @@ export declare const reloadConfigWhisperRequestSchema: z.ZodObject<{
|
|
|
359
363
|
"onnx-tts": "onnx-tts";
|
|
360
364
|
"parakeet-transcription": "parakeet-transcription";
|
|
361
365
|
"onnx-ocr": "onnx-ocr";
|
|
366
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
362
367
|
llm: "llm";
|
|
363
368
|
whisper: "whisper";
|
|
364
369
|
embeddings: "embeddings";
|
|
@@ -366,6 +371,7 @@ export declare const reloadConfigWhisperRequestSchema: z.ZodObject<{
|
|
|
366
371
|
parakeet: "parakeet";
|
|
367
372
|
tts: "tts";
|
|
368
373
|
ocr: "ocr";
|
|
374
|
+
diffusion: "diffusion";
|
|
369
375
|
}>, z.ZodLiteral<"vad">]>>;
|
|
370
376
|
}, z.core.$strip>]>>>;
|
|
371
377
|
}, z.core.$strip>;
|
|
@@ -460,6 +466,7 @@ export declare const reloadConfigRequestSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
460
466
|
"onnx-tts": "onnx-tts";
|
|
461
467
|
"parakeet-transcription": "parakeet-transcription";
|
|
462
468
|
"onnx-ocr": "onnx-ocr";
|
|
469
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
463
470
|
llm: "llm";
|
|
464
471
|
whisper: "whisper";
|
|
465
472
|
embeddings: "embeddings";
|
|
@@ -467,6 +474,7 @@ export declare const reloadConfigRequestSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
467
474
|
parakeet: "parakeet";
|
|
468
475
|
tts: "tts";
|
|
469
476
|
ocr: "ocr";
|
|
477
|
+
diffusion: "diffusion";
|
|
470
478
|
}>, z.ZodLiteral<"vad">]>>;
|
|
471
479
|
}, z.core.$strip>]>>>;
|
|
472
480
|
}, z.core.$strip>;
|