@qvac/sdk 0.13.4 → 0.14.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.
Files changed (220) hide show
  1. package/NOTICE +95 -1151
  2. package/README.md +1 -2
  3. package/bare-imports.json +0 -5
  4. package/dist/client/api/bci-transcribe.js +2 -1
  5. package/dist/client/api/download-asset.js +2 -1
  6. package/dist/client/api/finetune.js +6 -5
  7. package/dist/client/api/index.d.ts +1 -0
  8. package/dist/client/api/index.js +1 -0
  9. package/dist/client/api/load-model.d.ts +11 -8
  10. package/dist/client/api/load-model.js +6 -6
  11. package/dist/client/api/subscribe-logs.d.ts +28 -0
  12. package/dist/client/api/subscribe-logs.js +43 -0
  13. package/dist/client/api/text-to-speech.js +2 -1
  14. package/dist/client/config-loader/config-utils.js +2 -4
  15. package/dist/client/config-loader/resolve-config.bare.js +4 -3
  16. package/dist/client/parse-input.d.ts +3 -0
  17. package/dist/client/parse-input.js +14 -0
  18. package/dist/client/rpc/node-rpc-client.js +8 -2
  19. package/dist/client/rpc/rpc-client.js +39 -7
  20. package/dist/commands/bundle/constants.js +2 -1
  21. package/dist/examples/bci/bci-filesystem-streaming.js +14 -14
  22. package/dist/examples/bci/bci-filesystem.js +17 -13
  23. package/dist/examples/cache-management.js +38 -38
  24. package/dist/examples/cancel-by-request-id.js +9 -9
  25. package/dist/examples/completion-events.js +20 -14
  26. package/dist/examples/completion-stop-reason.js +13 -7
  27. package/dist/examples/concurrent-completion-collision.js +7 -7
  28. package/dist/examples/config-reload.js +7 -8
  29. package/dist/examples/default-config-usage.js +4 -4
  30. package/dist/examples/delegated-inference/composite.js +14 -10
  31. package/dist/examples/delegated-inference/consumer-profiled.js +13 -13
  32. package/dist/examples/delegated-inference/consumer.js +16 -12
  33. package/dist/examples/delegated-inference/provider.js +12 -12
  34. package/dist/examples/diffusion-esrgan-upscale.js +19 -15
  35. package/dist/examples/diffusion-flux2-klein-img2img.js +16 -11
  36. package/dist/examples/diffusion-flux2-klein.js +14 -9
  37. package/dist/examples/diffusion-img2img.js +9 -10
  38. package/dist/examples/diffusion-img2vid.js +17 -12
  39. package/dist/examples/diffusion-simple.js +1 -1
  40. package/dist/examples/diffusion-txt2img.js +14 -9
  41. package/dist/examples/diffusion-txt2vid.js +15 -10
  42. package/dist/examples/download-with-blind-relays.js +16 -21
  43. package/dist/examples/download-with-cancel.js +15 -16
  44. package/dist/examples/embed-multi-gpu.js +3 -4
  45. package/dist/examples/embed-p2p.js +11 -7
  46. package/dist/examples/finetune/llamacpp-finetune.js +7 -7
  47. package/dist/examples/kv-cache-cleanup.js +35 -35
  48. package/dist/examples/kv-cache-custom-key.js +24 -24
  49. package/dist/examples/kv-cache-example.js +9 -9
  50. package/dist/examples/llamacpp-cache.js +18 -14
  51. package/dist/examples/llamacpp-dynamic-tools.js +15 -9
  52. package/dist/examples/llamacpp-filesystem.js +15 -9
  53. package/dist/examples/llamacpp-http.js +12 -10
  54. package/dist/examples/llamacpp-multi-gpu.js +4 -4
  55. package/dist/examples/llamacpp-multimodal.js +13 -9
  56. package/dist/examples/llamacpp-p2p.js +8 -4
  57. package/dist/examples/llamacpp-sharded.js +5 -5
  58. package/dist/examples/llamacpp-structured-output.js +15 -9
  59. package/dist/examples/logging-file-transport.js +3 -3
  60. package/dist/examples/logging-global.d.ts +2 -0
  61. package/dist/examples/logging-global.js +34 -0
  62. package/dist/examples/logging-streaming.js +7 -10
  63. package/dist/examples/mcp-websearch.js +24 -18
  64. package/dist/examples/multi-model-demo.js +17 -11
  65. package/dist/examples/ocr-fasttext.js +14 -16
  66. package/dist/examples/parallel-download.js +7 -7
  67. package/dist/examples/plugins.js +40 -28
  68. package/dist/examples/profiling/basic.js +16 -10
  69. package/dist/examples/profiling/per-call.js +17 -11
  70. package/dist/examples/quickstart.bare.d.ts +2 -0
  71. package/dist/examples/quickstart.bare.js +18 -0
  72. package/dist/examples/quickstart.js +10 -3
  73. package/dist/examples/rag/rag-chromadb.js +18 -14
  74. package/dist/examples/rag/rag-hyperdb/cancellation.js +17 -14
  75. package/dist/examples/rag/rag-hyperdb/ingest.js +14 -12
  76. package/dist/examples/rag/rag-hyperdb/pipeline.js +19 -17
  77. package/dist/examples/rag/rag-hyperdb/workspaces.js +31 -27
  78. package/dist/examples/rag/rag-lancedb.js +12 -8
  79. package/dist/examples/rag/rag-sqlite.js +11 -7
  80. package/dist/examples/registry-query.js +17 -17
  81. package/dist/examples/seed-p2p.js +10 -6
  82. package/dist/examples/suspend-resume.js +20 -16
  83. package/dist/examples/tools/llamacpp-native-tools.js +24 -18
  84. package/dist/examples/tools/llamacpp-tools-gemma4.js +14 -8
  85. package/dist/examples/tools/llamacpp-tools-harmony-multiturn.js +20 -14
  86. package/dist/examples/tools/llamacpp-tools-pythonic.js +14 -8
  87. package/dist/examples/tools/llamacpp-tools-qwen35.js +14 -8
  88. package/dist/examples/transcription/parakeet-ctc-filesystem.js +12 -9
  89. package/dist/examples/transcription/parakeet-microphone-record.js +15 -9
  90. package/dist/examples/transcription/parakeet-microphone-stream.js +15 -9
  91. package/dist/examples/transcription/parakeet-sortformer-streaming.js +12 -6
  92. package/dist/examples/transcription/parakeet-sortformer.js +3 -5
  93. package/dist/examples/transcription/parakeet-tdt-filesystem.js +13 -10
  94. package/dist/examples/transcription/whispercpp-filesystem-streaming.js +16 -17
  95. package/dist/examples/transcription/whispercpp-filesystem.js +14 -10
  96. package/dist/examples/transcription/whispercpp-microphone-conversation.js +10 -10
  97. package/dist/examples/transcription/whispercpp-microphone-record.js +6 -6
  98. package/dist/examples/transcription/whispercpp-prompt.js +14 -10
  99. package/dist/examples/translation/translation-bergamot-batch.js +11 -7
  100. package/dist/examples/translation/translation-bergamot-pivot.js +13 -9
  101. package/dist/examples/translation/translation-bergamot.js +8 -4
  102. package/dist/examples/translation/translation-indic.js +8 -4
  103. package/dist/examples/translation/translation-llm-afriquegemma.js +7 -3
  104. package/dist/examples/translation/translation-llm-context.js +8 -4
  105. package/dist/examples/translation/translation-llm.js +7 -3
  106. package/dist/examples/translation/translation-stream.js +4 -4
  107. package/dist/examples/tts/chatterbox.js +19 -11
  108. package/dist/examples/tts/llm-to-tts-streaming.js +27 -14
  109. package/dist/examples/tts/supertonic-multilingual.js +18 -14
  110. package/dist/examples/tts/supertonic.js +19 -15
  111. package/dist/examples/tts/utils.js +1 -1
  112. package/dist/examples/vla-pi05.js +18 -14
  113. package/dist/examples/vla-smolvla.js +18 -14
  114. package/dist/examples/voice-assistant/voice-assistant.js +12 -12
  115. package/dist/index.d.ts +3 -4
  116. package/dist/index.js +3 -4
  117. package/dist/logging/client-logger.js +2 -1
  118. package/dist/logging/index.d.ts +1 -1
  119. package/dist/logging/index.js +1 -1
  120. package/dist/logging/namespaces.d.ts +1 -0
  121. package/dist/logging/namespaces.js +2 -0
  122. package/dist/logging/server-logger.js +1 -4
  123. package/dist/logging/utils.js +6 -1
  124. package/dist/models/registry/index.d.ts +17 -0
  125. package/dist/models/registry/index.js +20 -1
  126. package/dist/models/registry/models.d.ts +1062 -38
  127. package/dist/models/registry/models.js +3546 -2490
  128. package/dist/pear/pre.js +2 -2
  129. package/dist/schemas/bci-config.d.ts +37 -0
  130. package/dist/schemas/bci-config.js +2 -0
  131. package/dist/schemas/bci.d.ts +2 -0
  132. package/dist/schemas/common.d.ts +171 -94
  133. package/dist/schemas/completion-stream.d.ts +6 -3
  134. package/dist/schemas/completion-stream.js +10 -2
  135. package/dist/schemas/download-asset.d.ts +5 -5
  136. package/dist/schemas/engine-addon-map.d.ts +1 -1
  137. package/dist/schemas/engine-addon-map.js +6 -3
  138. package/dist/schemas/error.js +6 -1
  139. package/dist/schemas/llamacpp-config.d.ts +27 -8
  140. package/dist/schemas/llamacpp-config.js +19 -2
  141. package/dist/schemas/load-model.d.ts +4170 -570
  142. package/dist/schemas/load-model.js +85 -26
  143. package/dist/schemas/logging-stream.js +7 -1
  144. package/dist/schemas/model-src-utils.d.ts +6 -6
  145. package/dist/schemas/model-types.d.ts +14 -15
  146. package/dist/schemas/model-types.js +10 -11
  147. package/dist/schemas/ocr.d.ts +10 -8
  148. package/dist/schemas/ocr.js +8 -6
  149. package/dist/schemas/plugin.d.ts +6 -5
  150. package/dist/schemas/plugin.js +4 -4
  151. package/dist/schemas/rag.d.ts +4 -4
  152. package/dist/schemas/registry.d.ts +8 -8
  153. package/dist/schemas/registry.js +1 -1
  154. package/dist/schemas/reload-config.d.ts +6 -6
  155. package/dist/schemas/sdcpp-config.d.ts +12 -12
  156. package/dist/schemas/sdk-config.d.ts +171 -117
  157. package/dist/schemas/sdk-config.js +5 -5
  158. package/dist/schemas/sdk-errors-client.d.ts +1 -0
  159. package/dist/schemas/sdk-errors-client.js +7 -2
  160. package/dist/schemas/text-to-speech.d.ts +157 -13
  161. package/dist/schemas/text-to-speech.js +70 -7
  162. package/dist/schemas/transcription-config.d.ts +5 -1
  163. package/dist/schemas/transcription-config.js +2 -0
  164. package/dist/schemas/transcription.d.ts +3 -0
  165. package/dist/schemas/transcription.js +2 -1
  166. package/dist/schemas/translate.d.ts +6 -6
  167. package/dist/schemas/translate.js +2 -3
  168. package/dist/schemas/translation-config.d.ts +20 -20
  169. package/dist/server/bare/hyperswarm.js +3 -3
  170. package/dist/server/bare/ops/transcribe.js +46 -15
  171. package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +3 -0
  172. package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +13 -0
  173. package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +41 -0
  174. package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +6 -11
  175. package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +75 -0
  176. package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +11 -0
  177. package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/plugin.d.ts +16 -10
  178. package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/plugin.js +25 -18
  179. package/dist/server/bare/plugins/index.d.ts +1 -1
  180. package/dist/server/bare/plugins/index.js +1 -1
  181. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +10 -0
  182. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +29 -0
  183. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +4 -22
  184. package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +15 -7
  185. package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +7 -7
  186. package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +2 -0
  187. package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +10 -10
  188. package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +14 -8
  189. package/dist/server/bare/plugins/tts-ggml/plugin.js +12 -0
  190. package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +3 -1
  191. package/dist/server/bare/registry/logging-stream-registry.d.ts +4 -2
  192. package/dist/server/bare/registry/logging-stream-registry.js +12 -7
  193. package/dist/server/bare/registry/model-config-utils.js +2 -2
  194. package/dist/server/bare/registry/registry-client.js +1 -1
  195. package/dist/server/bare/runtime-lifecycle.d.ts +9 -0
  196. package/dist/server/bare/runtime-lifecycle.js +24 -0
  197. package/dist/server/bare/types/addon-responses.d.ts +1 -0
  198. package/dist/server/env.js +7 -10
  199. package/dist/server/plugins/registry.js +2 -4
  200. package/dist/server/rpc/handlers/load-model/handler.js +2 -4
  201. package/dist/server/rpc/handlers/load-model/http.js +253 -51
  202. package/dist/server/rpc/handlers/logging-stream.js +4 -2
  203. package/dist/server/rpc/handlers/plugin-invoke.js +5 -16
  204. package/dist/server/utils/completion-normalizer.js +13 -4
  205. package/dist/server/utils/worker-lock.js +5 -5
  206. package/dist/server/worker-core.d.ts +1 -1
  207. package/dist/server/worker-core.js +28 -18
  208. package/dist/utils/errors-client.d.ts +3 -0
  209. package/dist/utils/errors-client.js +5 -0
  210. package/dist/utils/errors-server.d.ts +2 -0
  211. package/dist/utils/errors-server.js +3 -0
  212. package/dist/utils/zod-error.d.ts +3 -0
  213. package/dist/utils/zod-error.js +4 -0
  214. package/package.json +21 -24
  215. package/dist/polyfills/bare-globals.d.ts +0 -2
  216. package/dist/polyfills/bare-globals.js +0 -4
  217. package/dist/polyfills/bare-globals.noop.d.ts +0 -2
  218. package/dist/polyfills/bare-globals.noop.js +0 -1
  219. /package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/ops/ocr-stream.d.ts +0 -0
  220. /package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/ops/ocr-stream.js +0 -0
@@ -39,8 +39,7 @@ const translateParamsLlmSchema = z.object({
39
39
  .optional()
40
40
  .describe("Optional translation context passed to the LLM as a system hint."),
41
41
  });
42
- // Using z.union since each modelType accepts multiple values
43
- const translateParamsSchema = z.union([
42
+ const translateParamsSchema = z.discriminatedUnion("modelType", [
44
43
  translateParamsNmtSchema,
45
44
  translateParamsLlmSchema,
46
45
  ]);
@@ -82,7 +81,7 @@ const translateRequestIdField = z
82
81
  .min(1)
83
82
  .optional()
84
83
  .describe("Stable identifier for this in-flight translation, generated by the client at call time. Surfaces on the registry so callers can target it with `cancel({ requestId })`. Optional on the wire — the server falls back to a server-generated id when the field is missing.");
85
- export const translateRequestSchema = z.union([
84
+ export const translateRequestSchema = z.discriminatedUnion("modelType", [
86
85
  translateParamsNmtSchema.extend({
87
86
  type: z.literal("translate"),
88
87
  requestId: translateRequestIdField,
@@ -157,7 +157,7 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
157
157
  "onnx-tts": "onnx-tts";
158
158
  "tts-ggml": "tts-ggml";
159
159
  "parakeet-transcription": "parakeet-transcription";
160
- "onnx-ocr": "onnx-ocr";
160
+ "ggml-ocr": "ggml-ocr";
161
161
  "sdcpp-generation": "sdcpp-generation";
162
162
  "ggml-vla": "ggml-vla";
163
163
  "ggml-classification": "ggml-classification";
@@ -194,7 +194,7 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
194
194
  "onnx-tts": "onnx-tts";
195
195
  "tts-ggml": "tts-ggml";
196
196
  "parakeet-transcription": "parakeet-transcription";
197
- "onnx-ocr": "onnx-ocr";
197
+ "ggml-ocr": "ggml-ocr";
198
198
  "sdcpp-generation": "sdcpp-generation";
199
199
  "ggml-vla": "ggml-vla";
200
200
  "ggml-classification": "ggml-classification";
@@ -244,7 +244,7 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
244
244
  "onnx-tts": "onnx-tts";
245
245
  "tts-ggml": "tts-ggml";
246
246
  "parakeet-transcription": "parakeet-transcription";
247
- "onnx-ocr": "onnx-ocr";
247
+ "ggml-ocr": "ggml-ocr";
248
248
  "sdcpp-generation": "sdcpp-generation";
249
249
  "ggml-vla": "ggml-vla";
250
250
  "ggml-classification": "ggml-classification";
@@ -281,7 +281,7 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
281
281
  "onnx-tts": "onnx-tts";
282
282
  "tts-ggml": "tts-ggml";
283
283
  "parakeet-transcription": "parakeet-transcription";
284
- "onnx-ocr": "onnx-ocr";
284
+ "ggml-ocr": "ggml-ocr";
285
285
  "sdcpp-generation": "sdcpp-generation";
286
286
  "ggml-vla": "ggml-vla";
287
287
  "ggml-classification": "ggml-classification";
@@ -318,7 +318,7 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
318
318
  "onnx-tts": "onnx-tts";
319
319
  "tts-ggml": "tts-ggml";
320
320
  "parakeet-transcription": "parakeet-transcription";
321
- "onnx-ocr": "onnx-ocr";
321
+ "ggml-ocr": "ggml-ocr";
322
322
  "sdcpp-generation": "sdcpp-generation";
323
323
  "ggml-vla": "ggml-vla";
324
324
  "ggml-classification": "ggml-classification";
@@ -552,7 +552,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
552
552
  "onnx-tts": "onnx-tts";
553
553
  "tts-ggml": "tts-ggml";
554
554
  "parakeet-transcription": "parakeet-transcription";
555
- "onnx-ocr": "onnx-ocr";
555
+ "ggml-ocr": "ggml-ocr";
556
556
  "sdcpp-generation": "sdcpp-generation";
557
557
  "ggml-vla": "ggml-vla";
558
558
  "ggml-classification": "ggml-classification";
@@ -589,7 +589,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
589
589
  "onnx-tts": "onnx-tts";
590
590
  "tts-ggml": "tts-ggml";
591
591
  "parakeet-transcription": "parakeet-transcription";
592
- "onnx-ocr": "onnx-ocr";
592
+ "ggml-ocr": "ggml-ocr";
593
593
  "sdcpp-generation": "sdcpp-generation";
594
594
  "ggml-vla": "ggml-vla";
595
595
  "ggml-classification": "ggml-classification";
@@ -639,7 +639,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
639
639
  "onnx-tts": "onnx-tts";
640
640
  "tts-ggml": "tts-ggml";
641
641
  "parakeet-transcription": "parakeet-transcription";
642
- "onnx-ocr": "onnx-ocr";
642
+ "ggml-ocr": "ggml-ocr";
643
643
  "sdcpp-generation": "sdcpp-generation";
644
644
  "ggml-vla": "ggml-vla";
645
645
  "ggml-classification": "ggml-classification";
@@ -676,7 +676,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
676
676
  "onnx-tts": "onnx-tts";
677
677
  "tts-ggml": "tts-ggml";
678
678
  "parakeet-transcription": "parakeet-transcription";
679
- "onnx-ocr": "onnx-ocr";
679
+ "ggml-ocr": "ggml-ocr";
680
680
  "sdcpp-generation": "sdcpp-generation";
681
681
  "ggml-vla": "ggml-vla";
682
682
  "ggml-classification": "ggml-classification";
@@ -713,7 +713,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
713
713
  "onnx-tts": "onnx-tts";
714
714
  "tts-ggml": "tts-ggml";
715
715
  "parakeet-transcription": "parakeet-transcription";
716
- "onnx-ocr": "onnx-ocr";
716
+ "ggml-ocr": "ggml-ocr";
717
717
  "sdcpp-generation": "sdcpp-generation";
718
718
  "ggml-vla": "ggml-vla";
719
719
  "ggml-classification": "ggml-classification";
@@ -820,7 +820,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
820
820
  engine?: string | undefined;
821
821
  expectedSize?: number | undefined;
822
822
  sha256Checksum?: string | undefined;
823
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
823
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
824
824
  } | undefined;
825
825
  dstVocabSrc?: string | {
826
826
  src: string;
@@ -833,7 +833,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
833
833
  engine?: string | undefined;
834
834
  expectedSize?: number | undefined;
835
835
  sha256Checksum?: string | undefined;
836
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
836
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
837
837
  } | undefined;
838
838
  normalize?: number | undefined;
839
839
  pivotModel?: {
@@ -848,7 +848,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
848
848
  engine?: string | undefined;
849
849
  expectedSize?: number | undefined;
850
850
  sha256Checksum?: string | undefined;
851
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
851
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
852
852
  };
853
853
  mode?: "full" | undefined;
854
854
  beamsize?: number | undefined;
@@ -870,7 +870,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
870
870
  engine?: string | undefined;
871
871
  expectedSize?: number | undefined;
872
872
  sha256Checksum?: string | undefined;
873
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
873
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
874
874
  } | undefined;
875
875
  dstVocabSrc?: string | {
876
876
  src: string;
@@ -883,7 +883,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
883
883
  engine?: string | undefined;
884
884
  expectedSize?: number | undefined;
885
885
  sha256Checksum?: string | undefined;
886
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
886
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
887
887
  } | undefined;
888
888
  normalize?: number | undefined;
889
889
  } | undefined;
@@ -924,7 +924,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
924
924
  engine?: string | undefined;
925
925
  expectedSize?: number | undefined;
926
926
  sha256Checksum?: string | undefined;
927
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
927
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
928
928
  } | undefined;
929
929
  dstVocabSrc?: string | {
930
930
  src: string;
@@ -937,7 +937,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
937
937
  engine?: string | undefined;
938
938
  expectedSize?: number | undefined;
939
939
  sha256Checksum?: string | undefined;
940
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
940
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
941
941
  } | undefined;
942
942
  normalize?: number | undefined;
943
943
  pivotModel?: {
@@ -952,7 +952,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
952
952
  engine?: string | undefined;
953
953
  expectedSize?: number | undefined;
954
954
  sha256Checksum?: string | undefined;
955
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
955
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
956
956
  };
957
957
  mode?: "full" | undefined;
958
958
  beamsize?: number | undefined;
@@ -974,7 +974,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
974
974
  engine?: string | undefined;
975
975
  expectedSize?: number | undefined;
976
976
  sha256Checksum?: string | undefined;
977
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
977
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
978
978
  } | undefined;
979
979
  dstVocabSrc?: string | {
980
980
  src: string;
@@ -987,7 +987,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
987
987
  engine?: string | undefined;
988
988
  expectedSize?: number | undefined;
989
989
  sha256Checksum?: string | undefined;
990
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
990
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
991
991
  } | undefined;
992
992
  normalize?: number | undefined;
993
993
  } | undefined;
@@ -1,14 +1,14 @@
1
- import process from "bare-process";
1
+ import env from "bare-env";
2
2
  import Hyperswarm from "hyperswarm";
3
3
  import crypto from "bare-crypto";
4
4
  import { envSchema } from "../../schemas/provide.js";
5
5
  import { getSDKConfig } from "./registry/config-registry.js";
6
- import { registerSwarm, unregisterSwarm } from "./runtime-lifecycle.js";
6
+ import { registerSwarm, unregisterSwarm, } from "./runtime-lifecycle.js";
7
7
  import { getServerLogger } from "../../logging/index.js";
8
8
  import { Buffer } from "bare-buffer";
9
9
  const logger = getServerLogger();
10
10
  function getHyperswarmSeedBuffer() {
11
- const parsedEnv = envSchema.safeParse(process.env);
11
+ const parsedEnv = envSchema.safeParse(env);
12
12
  if (parsedEnv.success) {
13
13
  return Buffer.from(parsedEnv.data.QVAC_HYPERSWARM_SEED, "hex");
14
14
  }
@@ -58,7 +58,7 @@ import { TranscriptionFailedError } from "../../../utils/errors-server.js";
58
58
  import { nowMs } from "../../../profiling/index.js";
59
59
  import { buildStreamResult } from "../../../profiling/model-execution.js";
60
60
  import { assertMetadataSupported, toTranscribeSegment, } from "../utils/transcribe-metadata.js";
61
- import { getRequestRegistry, withRequestContext, } from "../runtime/index.js";
61
+ import { getRequestRegistry, withRequestContext } from "../runtime/index.js";
62
62
  import { generateServerRequestId } from "../runtime/request-id.js";
63
63
  export { assertMetadataSupported, toTranscribeSegment, };
64
64
  function hasRunStreaming(model) {
@@ -183,20 +183,51 @@ export async function* transcribe(params, requestId) {
183
183
  }
184
184
  const modelExecutionMs = nowMs() - modelStart;
185
185
  const stats = {
186
- ...(response.stats?.audioDurationMs !== undefined && { audioDuration: response.stats.audioDurationMs }),
187
- ...(response.stats?.realTimeFactor !== undefined && { realTimeFactor: response.stats.realTimeFactor }),
188
- ...(response.stats?.tokensPerSecond !== undefined && { tokensPerSecond: response.stats.tokensPerSecond }),
189
- ...(response.stats?.totalTokens !== undefined && { totalTokens: response.stats.totalTokens }),
190
- ...(response.stats?.totalSegments !== undefined && { totalSegments: response.stats.totalSegments }),
191
- ...(response.stats?.whisperEncodeMs !== undefined && { whisperEncodeTime: response.stats.whisperEncodeMs }),
192
- ...(response.stats?.whisperDecodeMs !== undefined && { whisperDecodeTime: response.stats.whisperDecodeMs }),
193
- ...(response.stats?.encoderMs !== undefined && { encoderTime: response.stats.encoderMs }),
194
- ...(response.stats?.decoderMs !== undefined && { decoderTime: response.stats.decoderMs }),
195
- ...(response.stats?.melSpecMs !== undefined && { melSpecTime: response.stats.melSpecMs }),
196
- ...(response.stats?.backendDevice !== undefined && { backendDevice: response.stats.backendDevice }),
197
- ...(response.stats?.backendId !== undefined && { backendId: response.stats.backendId }),
198
- ...(response.stats?.gpuMemTotalMb !== undefined && { gpuMemTotalMb: response.stats.gpuMemTotalMb }),
199
- ...(response.stats?.gpuMemFreeMb !== undefined && { gpuMemFreeMb: response.stats.gpuMemFreeMb }),
186
+ ...(response.stats?.audioDurationMs !== undefined && {
187
+ audioDuration: response.stats.audioDurationMs,
188
+ }),
189
+ ...(response.stats?.realTimeFactor !== undefined && {
190
+ realTimeFactor: response.stats.realTimeFactor,
191
+ }),
192
+ ...(response.stats?.tokensPerSecond !== undefined && {
193
+ tokensPerSecond: response.stats.tokensPerSecond,
194
+ }),
195
+ ...(response.stats?.totalTokens !== undefined && {
196
+ totalTokens: response.stats.totalTokens,
197
+ }),
198
+ ...(response.stats?.totalSegments !== undefined && {
199
+ totalSegments: response.stats.totalSegments,
200
+ }),
201
+ ...(response.stats?.whisperEncodeMs !== undefined && {
202
+ whisperEncodeTime: response.stats.whisperEncodeMs,
203
+ }),
204
+ ...(response.stats?.whisperDecodeMs !== undefined && {
205
+ whisperDecodeTime: response.stats.whisperDecodeMs,
206
+ }),
207
+ ...(response.stats?.encoderMs !== undefined && {
208
+ encoderTime: response.stats.encoderMs,
209
+ }),
210
+ ...(response.stats?.decoderMs !== undefined && {
211
+ decoderTime: response.stats.decoderMs,
212
+ }),
213
+ ...(response.stats?.melSpecMs !== undefined && {
214
+ melSpecTime: response.stats.melSpecMs,
215
+ }),
216
+ ...(response.stats?.backendDevice !== undefined && {
217
+ backendDevice: response.stats.backendDevice,
218
+ }),
219
+ ...(response.stats?.backendId !== undefined && {
220
+ backendId: response.stats.backendId,
221
+ }),
222
+ ...(response.stats?.gpuUnsupported !== undefined && {
223
+ gpuUnsupported: response.stats.gpuUnsupported,
224
+ }),
225
+ ...(response.stats?.gpuMemTotalMb !== undefined && {
226
+ gpuMemTotalMb: response.stats.gpuMemTotalMb,
227
+ }),
228
+ ...(response.stats?.gpuMemFreeMb !== undefined && {
229
+ gpuMemFreeMb: response.stats.gpuMemFreeMb,
230
+ }),
200
231
  };
201
232
  return buildStreamResult(modelExecutionMs, stats);
202
233
  }
@@ -0,0 +1,3 @@
1
+ import type { BCIWhispercppArgs } from "@qvac/bci-whispercpp";
2
+ export declare function buildBciWhispercppArgs(modelPath: string, embedderPath: string, logger: NonNullable<BCIWhispercppArgs["logger"]>): BCIWhispercppArgs;
3
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1,13 @@
1
+ export function buildBciWhispercppArgs(modelPath, embedderPath, logger) {
2
+ const args = {
3
+ files: {
4
+ model: modelPath,
5
+ ...(embedderPath ? { embedder: embedderPath } : {}),
6
+ },
7
+ logger,
8
+ opts: {
9
+ stats: true,
10
+ },
11
+ };
12
+ return args;
13
+ }
@@ -1,4 +1,5 @@
1
1
  import { type CreateModelParams, type PluginModelResult } from "../../../../schemas/index";
2
+ import { resolveBciConfig } from "./resolve-config";
2
3
  export declare const bciPlugin: {
3
4
  modelType: "bci-whispercpp-transcription";
4
5
  displayName: string;
@@ -35,7 +36,45 @@ export declare const bciPlugin: {
35
36
  caption_enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
36
37
  }, import("zod/v4/core").$strip>>;
37
38
  backendsDir: import("zod").ZodOptional<import("zod").ZodString>;
39
+ embedderModelSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
40
+ src: import("zod").ZodString;
41
+ name: import("zod").ZodOptional<import("zod").ZodString>;
42
+ modelId: import("zod").ZodOptional<import("zod").ZodString>;
43
+ registryPath: import("zod").ZodOptional<import("zod").ZodString>;
44
+ registrySource: import("zod").ZodOptional<import("zod").ZodString>;
45
+ blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
46
+ blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
47
+ engine: import("zod").ZodOptional<import("zod").ZodString>;
48
+ expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
49
+ sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
50
+ addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
51
+ embeddings: "embeddings";
52
+ diffusion: "diffusion";
53
+ tts: "tts";
54
+ ocr: "ocr";
55
+ vla: "vla";
56
+ "llamacpp-completion": "llamacpp-completion";
57
+ "whispercpp-transcription": "whispercpp-transcription";
58
+ "bci-whispercpp-transcription": "bci-whispercpp-transcription";
59
+ "llamacpp-embedding": "llamacpp-embedding";
60
+ "nmtcpp-translation": "nmtcpp-translation";
61
+ "onnx-tts": "onnx-tts";
62
+ "tts-ggml": "tts-ggml";
63
+ "parakeet-transcription": "parakeet-transcription";
64
+ "ggml-ocr": "ggml-ocr";
65
+ "sdcpp-generation": "sdcpp-generation";
66
+ "ggml-vla": "ggml-vla";
67
+ "ggml-classification": "ggml-classification";
68
+ llm: "llm";
69
+ whisper: "whisper";
70
+ bci: "bci";
71
+ nmt: "nmt";
72
+ parakeet: "parakeet";
73
+ classification: "classification";
74
+ }>, import("zod").ZodLiteral<"vad">]>>;
75
+ }, import("zod/v4/core").$strip>]>>;
38
76
  }, import("zod/v4/core").$strip>;
77
+ resolveConfig: typeof resolveBciConfig;
39
78
  createModel(params: CreateModelParams): PluginModelResult;
40
79
  handlers: {
41
80
  bciTranscribe: import("../../../../schemas/index").PluginHandlerDefinition<import("zod").ZodObject<{
@@ -66,6 +105,7 @@ export declare const bciPlugin: {
66
105
  melSpecTime: import("zod").ZodOptional<import("zod").ZodNumber>;
67
106
  backendDevice: import("zod").ZodOptional<import("zod").ZodNumber>;
68
107
  backendId: import("zod").ZodOptional<import("zod").ZodNumber>;
108
+ gpuUnsupported: import("zod").ZodOptional<import("zod").ZodNumber>;
69
109
  gpuMemTotalMb: import("zod").ZodOptional<import("zod").ZodNumber>;
70
110
  gpuMemFreeMb: import("zod").ZodOptional<import("zod").ZodNumber>;
71
111
  }, import("zod/v4/core").$strip>>;
@@ -108,6 +148,7 @@ export declare const bciPlugin: {
108
148
  melSpecTime: import("zod").ZodOptional<import("zod").ZodNumber>;
109
149
  backendDevice: import("zod").ZodOptional<import("zod").ZodNumber>;
110
150
  backendId: import("zod").ZodOptional<import("zod").ZodNumber>;
151
+ gpuUnsupported: import("zod").ZodOptional<import("zod").ZodNumber>;
111
152
  gpuMemTotalMb: import("zod").ZodOptional<import("zod").ZodNumber>;
112
153
  gpuMemFreeMb: import("zod").ZodOptional<import("zod").ZodNumber>;
113
154
  }, import("zod/v4/core").$strip>>;
@@ -4,18 +4,12 @@ import { definePlugin, defineHandler, defineDuplexHandler, bciTranscribeRequestS
4
4
  import { createStreamLogger, registerAddonLogger } from "../../../../logging/index.js";
5
5
  import { bciTranscribe, bciTranscribeStream, } from "../../ops/bci-transcribe.js";
6
6
  import { attachModelExecutionMs } from "../../../../profiling/model-execution.js";
7
- function createBciModel(modelId, modelPath, bciConfig) {
7
+ import { buildBciWhispercppArgs } from "./args.js";
8
+ import { resolveBciConfig } from "./resolve-config.js";
9
+ function createBciModel(modelId, modelPath, bciConfig, embedderPath) {
8
10
  const logger = createStreamLogger(modelId, ModelType.bciWhispercppTranscription);
9
11
  registerAddonLogger(modelId, ModelType.bciWhispercppTranscription, logger);
10
- const args = {
11
- files: {
12
- model: modelPath,
13
- },
14
- logger,
15
- opts: {
16
- stats: true,
17
- },
18
- };
12
+ const args = buildBciWhispercppArgs(modelPath, embedderPath, logger);
19
13
  const model = new BCIWhispercpp(args, bciConfig);
20
14
  return { model };
21
15
  }
@@ -24,9 +18,10 @@ export const bciPlugin = definePlugin({
24
18
  displayName: "BCI (whisper.cpp)",
25
19
  addonPackage: ADDON_BCI,
26
20
  loadConfigSchema: bciConfigSchema,
21
+ resolveConfig: resolveBciConfig,
27
22
  createModel(params) {
28
23
  const bciConfig = (params.modelConfig ?? {});
29
- const { model } = createBciModel(params.modelId, params.modelPath, bciConfig);
24
+ const { model } = createBciModel(params.modelId, params.modelPath, bciConfig, params.artifacts?.["embedderPath"] ?? "");
30
25
  return { model };
31
26
  },
32
27
  handlers: {
@@ -0,0 +1,75 @@
1
+ import type { BciConfig, ResolveContext } from "../../../../schemas/index";
2
+ export declare function resolveBciConfig(cfg: BciConfig, ctx: ResolveContext): Promise<{
3
+ config: {
4
+ whisperConfig?: {
5
+ language?: string | undefined;
6
+ n_threads?: number | undefined;
7
+ temperature?: number | undefined;
8
+ suppress_nst?: boolean | undefined;
9
+ suppress_blank?: boolean | undefined;
10
+ duration_ms?: number | undefined;
11
+ translate?: boolean | undefined;
12
+ no_timestamps?: boolean | undefined;
13
+ single_segment?: boolean | undefined;
14
+ print_special?: boolean | undefined;
15
+ print_progress?: boolean | undefined;
16
+ print_realtime?: boolean | undefined;
17
+ print_timestamps?: boolean | undefined;
18
+ detect_language?: boolean | undefined;
19
+ greedy_best_of?: number | undefined;
20
+ beam_search_beam_size?: number | undefined;
21
+ } | undefined;
22
+ bciConfig?: {
23
+ day_idx?: number | undefined;
24
+ } | undefined;
25
+ contextParams?: {
26
+ model?: string | undefined;
27
+ use_gpu?: boolean | undefined;
28
+ flash_attn?: boolean | undefined;
29
+ gpu_device?: number | undefined;
30
+ } | undefined;
31
+ miscConfig?: {
32
+ caption_enabled?: boolean | undefined;
33
+ } | undefined;
34
+ backendsDir?: string | undefined;
35
+ };
36
+ artifacts?: never;
37
+ } | {
38
+ config: {
39
+ whisperConfig?: {
40
+ language?: string | undefined;
41
+ n_threads?: number | undefined;
42
+ temperature?: number | undefined;
43
+ suppress_nst?: boolean | undefined;
44
+ suppress_blank?: boolean | undefined;
45
+ duration_ms?: number | undefined;
46
+ translate?: boolean | undefined;
47
+ no_timestamps?: boolean | undefined;
48
+ single_segment?: boolean | undefined;
49
+ print_special?: boolean | undefined;
50
+ print_progress?: boolean | undefined;
51
+ print_realtime?: boolean | undefined;
52
+ print_timestamps?: boolean | undefined;
53
+ detect_language?: boolean | undefined;
54
+ greedy_best_of?: number | undefined;
55
+ beam_search_beam_size?: number | undefined;
56
+ } | undefined;
57
+ bciConfig?: {
58
+ day_idx?: number | undefined;
59
+ } | undefined;
60
+ contextParams?: {
61
+ model?: string | undefined;
62
+ use_gpu?: boolean | undefined;
63
+ flash_attn?: boolean | undefined;
64
+ gpu_device?: number | undefined;
65
+ } | undefined;
66
+ miscConfig?: {
67
+ caption_enabled?: boolean | undefined;
68
+ } | undefined;
69
+ backendsDir?: string | undefined;
70
+ };
71
+ artifacts: {
72
+ embedderPath: string;
73
+ };
74
+ }>;
75
+ //# sourceMappingURL=resolve-config.d.ts.map
@@ -0,0 +1,11 @@
1
+ export async function resolveBciConfig(cfg, ctx) {
2
+ const { embedderModelSrc, ...bciConfig } = cfg;
3
+ if (!embedderModelSrc) {
4
+ return { config: bciConfig };
5
+ }
6
+ const embedderPath = await ctx.resolveModelPath(embedderModelSrc);
7
+ return {
8
+ config: bciConfig,
9
+ artifacts: { embedderPath },
10
+ };
11
+ }
@@ -1,26 +1,28 @@
1
1
  import { type CreateModelParams, type PluginModelResult, type OCRConfig, type ResolveContext, type ResolveResult } from "../../../../schemas/index";
2
2
  export declare const ocrPlugin: {
3
- modelType: "onnx-ocr";
3
+ modelType: "ggml-ocr";
4
4
  displayName: string;
5
- addonPackage: "@qvac/ocr-onnx";
5
+ addonPackage: "@qvac/ocr-ggml";
6
6
  loadConfigSchema: import("zod").ZodObject<{
7
7
  langList: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
8
- useGPU: import("zod").ZodOptional<import("zod").ZodBoolean>;
9
- timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
10
- pipelineMode: import("zod").ZodOptional<import("zod").ZodEnum<{
8
+ pipelineType: import("zod").ZodOptional<import("zod").ZodEnum<{
11
9
  easyocr: "easyocr";
12
10
  doctr: "doctr";
13
11
  }>>;
14
12
  magRatio: import("zod").ZodOptional<import("zod").ZodNumber>;
13
+ canvasSize: import("zod").ZodOptional<import("zod").ZodNumber>;
15
14
  defaultRotationAngles: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
16
15
  contrastRetry: import("zod").ZodOptional<import("zod").ZodBoolean>;
17
16
  lowConfidenceThreshold: import("zod").ZodOptional<import("zod").ZodNumber>;
18
17
  recognizerBatchSize: import("zod").ZodOptional<import("zod").ZodNumber>;
19
- decodingMethod: import("zod").ZodOptional<import("zod").ZodEnum<{
20
- attention: "attention";
21
- ctc: "ctc";
18
+ nThreads: import("zod").ZodOptional<import("zod").ZodNumber>;
19
+ backendDevice: import("zod").ZodOptional<import("zod").ZodEnum<{
20
+ cpu: "cpu";
21
+ vulkan: "vulkan";
22
+ metal: "metal";
23
+ opencl: "opencl";
22
24
  }>>;
23
- straightenPages: import("zod").ZodOptional<import("zod").ZodBoolean>;
25
+ gpuDevice: import("zod").ZodOptional<import("zod").ZodNumber>;
24
26
  detectorModelSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
25
27
  src: import("zod").ZodString;
26
28
  name: import("zod").ZodOptional<import("zod").ZodString>;
@@ -46,7 +48,7 @@ export declare const ocrPlugin: {
46
48
  "onnx-tts": "onnx-tts";
47
49
  "tts-ggml": "tts-ggml";
48
50
  "parakeet-transcription": "parakeet-transcription";
49
- "onnx-ocr": "onnx-ocr";
51
+ "ggml-ocr": "ggml-ocr";
50
52
  "sdcpp-generation": "sdcpp-generation";
51
53
  "ggml-vla": "ggml-vla";
52
54
  "ggml-classification": "ggml-classification";
@@ -91,5 +93,9 @@ export declare const ocrPlugin: {
91
93
  }, import("zod/v4/core").$strip>>;
92
94
  }, import("zod/v4/core").$strip>>;
93
95
  };
96
+ logging: {
97
+ module: import("@qvac/ocr-ggml/addonLogging").AddonLogging;
98
+ namespace: "ggml-ocr";
99
+ };
94
100
  };
95
101
  //# sourceMappingURL=plugin.d.ts.map