@qvac/sdk 0.12.1 → 0.13.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 (218) hide show
  1. package/NOTICE +55 -1225
  2. package/README.md +12 -0
  3. package/dist/client/api/bci-transcribe.d.ts +57 -0
  4. package/dist/client/api/bci-transcribe.js +172 -0
  5. package/dist/client/api/get-model-info.d.ts +1 -1
  6. package/dist/client/api/index.d.ts +1 -0
  7. package/dist/client/api/index.js +1 -0
  8. package/dist/client/api/video.d.ts +26 -6
  9. package/dist/client/api/video.js +30 -7
  10. package/dist/client/api/vla.d.ts +11 -7
  11. package/dist/client/api/vla.js +11 -7
  12. package/dist/client/config-loader/resolve-config.bare.d.ts +1 -1
  13. package/dist/client/config-loader/resolve-config.bare.js +21 -35
  14. package/dist/client/rpc/bare-client.js +2 -2
  15. package/dist/commands/bundle/constants.js +2 -0
  16. package/dist/examples/bci/bci-filesystem-streaming.d.ts +2 -0
  17. package/dist/examples/bci/bci-filesystem-streaming.js +77 -0
  18. package/dist/examples/bci/bci-filesystem.d.ts +2 -0
  19. package/dist/examples/bci/bci-filesystem.js +63 -0
  20. package/dist/examples/cache-management.js +0 -1
  21. package/dist/examples/cancel-by-request-id.js +0 -1
  22. package/dist/examples/classification/classify-image.js +1 -1
  23. package/dist/examples/completion-events.js +6 -2
  24. package/dist/examples/completion-stop-reason.d.ts +25 -0
  25. package/dist/examples/completion-stop-reason.js +65 -0
  26. package/dist/examples/concurrent-completion-collision.d.ts +2 -0
  27. package/dist/examples/concurrent-completion-collision.js +98 -0
  28. package/dist/examples/config-reload.js +1 -2
  29. package/dist/examples/default-config-usage.js +0 -1
  30. package/dist/examples/delegated-inference/composite.js +0 -1
  31. package/dist/examples/delegated-inference/consumer-profiled.js +0 -1
  32. package/dist/examples/delegated-inference/consumer.js +0 -1
  33. package/dist/examples/diffusion-esrgan-upscale.js +1 -3
  34. package/dist/examples/diffusion-flux2-klein-img2img.js +1 -1
  35. package/dist/examples/diffusion-flux2-klein.js +2 -2
  36. package/dist/examples/diffusion-img2img.js +1 -1
  37. package/dist/examples/diffusion-img2vid.d.ts +2 -0
  38. package/dist/examples/diffusion-img2vid.js +78 -0
  39. package/dist/examples/diffusion-simple.js +1 -1
  40. package/dist/examples/diffusion-txt2img.js +8 -3
  41. package/dist/examples/diffusion-txt2vid.js +2 -3
  42. package/dist/examples/download-with-blind-relays.js +0 -1
  43. package/dist/examples/embed-multi-gpu.js +1 -2
  44. package/dist/examples/embed-p2p.js +4 -2
  45. package/dist/examples/finetune/llamacpp-finetune.js +5 -3
  46. package/dist/examples/kv-cache-cleanup.js +0 -1
  47. package/dist/examples/kv-cache-custom-key.js +0 -1
  48. package/dist/examples/kv-cache-example.js +4 -2
  49. package/dist/examples/llamacpp-cache.js +0 -1
  50. package/dist/examples/llamacpp-dynamic-tools.js +4 -2
  51. package/dist/examples/llamacpp-filesystem.js +1 -1
  52. package/dist/examples/llamacpp-http.js +1 -1
  53. package/dist/examples/llamacpp-multi-gpu.js +2 -2
  54. package/dist/examples/llamacpp-multimodal.js +0 -1
  55. package/dist/examples/llamacpp-p2p.js +0 -1
  56. package/dist/examples/llamacpp-sharded.js +1 -1
  57. package/dist/examples/llamacpp-structured-output.js +0 -1
  58. package/dist/examples/logging-file-transport.js +0 -1
  59. package/dist/examples/logging-streaming.js +0 -2
  60. package/dist/examples/mcp-websearch.js +0 -1
  61. package/dist/examples/multi-model-demo.js +0 -2
  62. package/dist/examples/ocr-fasttext.js +0 -1
  63. package/dist/examples/plugins.js +1 -4
  64. package/dist/examples/profiling/basic.js +3 -2
  65. package/dist/examples/profiling/per-call.js +0 -1
  66. package/dist/examples/quickstart.js +0 -1
  67. package/dist/examples/rag/rag-chromadb.js +0 -1
  68. package/dist/examples/rag/rag-hyperdb/cancellation.js +0 -1
  69. package/dist/examples/rag/rag-hyperdb/ingest.js +0 -1
  70. package/dist/examples/rag/rag-hyperdb/pipeline.js +0 -1
  71. package/dist/examples/rag/rag-hyperdb/workspaces.js +0 -1
  72. package/dist/examples/rag/rag-lancedb.js +0 -1
  73. package/dist/examples/rag/rag-sqlite.js +0 -1
  74. package/dist/examples/suspend-resume.js +0 -1
  75. package/dist/examples/tools/llamacpp-native-tools.js +0 -1
  76. package/dist/examples/tools/llamacpp-tools-gemma4.js +1 -1
  77. package/dist/examples/tools/llamacpp-tools-pythonic.js +2 -2
  78. package/dist/examples/tools/llamacpp-tools-qwen35.js +1 -1
  79. package/dist/examples/transcription/parakeet-ctc-filesystem.js +1 -1
  80. package/dist/examples/transcription/parakeet-microphone-record.js +0 -1
  81. package/dist/examples/transcription/parakeet-microphone-stream.js +0 -1
  82. package/dist/examples/transcription/parakeet-sortformer.js +1 -2
  83. package/dist/examples/transcription/parakeet-tdt-filesystem.js +1 -1
  84. package/dist/examples/transcription/whispercpp-filesystem-streaming.js +10 -6
  85. package/dist/examples/transcription/whispercpp-filesystem.js +4 -2
  86. package/dist/examples/transcription/whispercpp-microphone-conversation.js +0 -1
  87. package/dist/examples/transcription/whispercpp-microphone-record.js +0 -1
  88. package/dist/examples/transcription/whispercpp-prompt.js +0 -1
  89. package/dist/examples/translation/translation-bergamot-batch.js +1 -2
  90. package/dist/examples/translation/translation-bergamot-pivot.js +3 -4
  91. package/dist/examples/translation/translation-bergamot.js +1 -2
  92. package/dist/examples/translation/translation-indic.js +1 -2
  93. package/dist/examples/translation/translation-llm-afriquegemma.js +3 -4
  94. package/dist/examples/translation/translation-llm-context.js +1 -2
  95. package/dist/examples/translation/translation-llm.js +2 -3
  96. package/dist/examples/translation/translation-stream.js +2 -3
  97. package/dist/examples/tts/chatterbox.js +1 -2
  98. package/dist/examples/tts/llm-to-tts-streaming.js +2 -4
  99. package/dist/examples/tts/supertonic-multilingual.js +1 -2
  100. package/dist/examples/tts/supertonic.js +1 -2
  101. package/dist/examples/vla-pi05.d.ts +2 -0
  102. package/dist/examples/vla-pi05.js +84 -0
  103. package/dist/examples/vla-smolvla.js +1 -1
  104. package/dist/examples/voice-assistant/voice-assistant.js +1 -4
  105. package/dist/index.d.ts +2 -2
  106. package/dist/index.js +9 -7
  107. package/dist/models/registry/models.d.ts +869 -186
  108. package/dist/models/registry/models.js +3160 -2453
  109. package/dist/models/update-models/companions.d.ts +7 -0
  110. package/dist/models/update-models/companions.js +56 -0
  111. package/dist/models/update-models/naming.js +10 -0
  112. package/dist/pear/pre.js +2 -0
  113. package/dist/schemas/bci-config.d.ts +36 -0
  114. package/dist/schemas/bci-config.js +56 -0
  115. package/dist/schemas/bci.d.ts +177 -0
  116. package/dist/schemas/bci.js +95 -0
  117. package/dist/schemas/common.d.ts +395 -51
  118. package/dist/schemas/common.js +5 -0
  119. package/dist/schemas/completion-event.d.ts +1 -0
  120. package/dist/schemas/download-asset.d.ts +7 -3
  121. package/dist/schemas/embed.d.ts +2 -0
  122. package/dist/schemas/embed.js +1 -0
  123. package/dist/schemas/engine-addon-map.d.ts +1 -0
  124. package/dist/schemas/engine-addon-map.js +4 -1
  125. package/dist/schemas/get-model-info.d.ts +2 -0
  126. package/dist/schemas/get-model-info.js +1 -0
  127. package/dist/schemas/index.d.ts +2 -0
  128. package/dist/schemas/index.js +2 -0
  129. package/dist/schemas/llamacpp-config.d.ts +6 -2
  130. package/dist/schemas/load-model.d.ts +1841 -267
  131. package/dist/schemas/load-model.js +34 -1
  132. package/dist/schemas/model-src-utils.d.ts +10 -2
  133. package/dist/schemas/model-types.d.ts +19 -1
  134. package/dist/schemas/model-types.js +11 -0
  135. package/dist/schemas/ocr.d.ts +2 -0
  136. package/dist/schemas/plugin.d.ts +13 -5
  137. package/dist/schemas/plugin.js +13 -4
  138. package/dist/schemas/registry.d.ts +18 -0
  139. package/dist/schemas/registry.js +2 -0
  140. package/dist/schemas/reload-config.d.ts +10 -2
  141. package/dist/schemas/sdcpp-config.d.ts +75 -8
  142. package/dist/schemas/sdcpp-config.js +56 -10
  143. package/dist/schemas/sdk-config.d.ts +342 -0
  144. package/dist/schemas/text-to-speech.d.ts +8 -0
  145. package/dist/schemas/transcription-config.d.ts +2 -0
  146. package/dist/schemas/transcription.d.ts +12 -0
  147. package/dist/schemas/transcription.js +8 -0
  148. package/dist/schemas/translation-config.d.ts +44 -16
  149. package/dist/schemas/translation-config.js +2 -0
  150. package/dist/schemas/vla.d.ts +14 -0
  151. package/dist/schemas/vla.js +26 -3
  152. package/dist/server/bare/delegate-connect-diagnostics.d.ts +9 -0
  153. package/dist/server/bare/delegate-connect-diagnostics.js +44 -0
  154. package/dist/server/bare/delegate-rpc-client.js +10 -12
  155. package/dist/server/bare/hyperswarm.js +1 -0
  156. package/dist/server/bare/ops/bci-transcribe.d.ts +13 -0
  157. package/dist/server/bare/ops/bci-transcribe.js +248 -0
  158. package/dist/server/bare/ops/embed.js +2 -1
  159. package/dist/server/bare/ops/kv-cache-utils.js +4 -3
  160. package/dist/server/bare/ops/transcribe.js +6 -2
  161. package/dist/server/bare/ops/translate.js +1 -1
  162. package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +130 -0
  163. package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +116 -0
  164. package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +4 -0
  165. package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +7 -0
  166. package/dist/server/bare/plugins/ggml-vla/plugin.js +1 -1
  167. package/dist/server/bare/plugins/index.d.ts +1 -0
  168. package/dist/server/bare/plugins/index.js +1 -0
  169. package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +22 -29
  170. package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +2 -0
  171. package/dist/server/bare/plugins/llamacpp-completion/plugin.js +38 -7
  172. package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +1 -0
  173. package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +9 -1
  174. package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +14 -0
  175. package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +2 -0
  176. package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +8 -0
  177. package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +7 -1
  178. package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +58 -4
  179. package/dist/server/bare/plugins/sdcpp-generation/plugin.js +9 -4
  180. package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +10 -0
  181. package/dist/server/bare/registry/model-config-utils.js +3 -0
  182. package/dist/server/bare/runtime/request-registry-singleton.js +11 -4
  183. package/dist/server/bare/runtime/request-registry.d.ts +60 -16
  184. package/dist/server/bare/runtime/request-registry.js +258 -15
  185. package/dist/server/bare/runtime/with-request-context.d.ts +1 -1
  186. package/dist/server/bare/runtime/with-request-context.js +1 -1
  187. package/dist/server/bare/types/addon-responses.d.ts +5 -0
  188. package/dist/server/rpc/handler-registry.js +4 -0
  189. package/dist/server/rpc/handlers/bci-transcribe-stream.d.ts +3 -0
  190. package/dist/server/rpc/handlers/bci-transcribe-stream.js +4 -0
  191. package/dist/server/rpc/handlers/bci-transcribe.d.ts +3 -0
  192. package/dist/server/rpc/handlers/bci-transcribe.js +4 -0
  193. package/dist/server/rpc/handlers/download-asset.js +1 -1
  194. package/dist/server/rpc/handlers/get-model-info.js +3 -3
  195. package/dist/server/rpc/handlers/index.d.ts +4 -0
  196. package/dist/server/rpc/handlers/index.js +4 -0
  197. package/dist/server/rpc/handlers/load-model/download-manager.d.ts +1 -1
  198. package/dist/server/rpc/handlers/load-model/handler.js +1 -1
  199. package/dist/server/rpc/handlers/load-model/http.js +6 -6
  200. package/dist/server/rpc/handlers/load-model/hyperdrive.js +1 -0
  201. package/dist/server/rpc/handlers/load-model/registry-companion-set.d.ts +1 -0
  202. package/dist/server/rpc/handlers/load-model/registry-companion-set.js +2 -2
  203. package/dist/server/rpc/handlers/load-model/registry.js +1 -0
  204. package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +1 -1
  205. package/dist/server/rpc/handlers/rag.js +5 -5
  206. package/dist/server/utils/checksum.js +2 -1
  207. package/dist/server/utils/formatting.js +2 -1
  208. package/dist/server/utils/multi-gpu-mobile.d.ts +5 -0
  209. package/dist/server/utils/multi-gpu-mobile.js +10 -0
  210. package/dist/server/worker.js +2 -1
  211. package/dist/utils/aggregate-events.d.ts +2 -1
  212. package/dist/utils/aggregate-events.js +11 -3
  213. package/dist/utils/errors-server.d.ts +6 -4
  214. package/dist/utils/errors-server.js +6 -4
  215. package/electron-forge/index.cjs +820 -0
  216. package/package.json +73 -35
  217. package/dist/scripts/run-security-tests-bare.d.ts +0 -2
  218. package/dist/scripts/run-security-tests-bare.js +0 -78
@@ -0,0 +1,44 @@
1
+ import { withTimeout } from "../../utils/withTimeout.js";
2
+ import { getServerLogger } from "../../logging/index.js";
3
+ const logger = getServerLogger();
4
+ export const DHT_BOOTSTRAP_WAIT_CAP_MS = 5000;
5
+ // A cold routing table makes findPeer return empty -> spurious PEER_NOT_FOUND,
6
+ // so wait for bootstrap, but only when not yet ready to keep warm-path latency.
7
+ export async function ensureDhtBootstrapped(dht, timeout) {
8
+ if (dht.bootstrapped)
9
+ return;
10
+ const cap = timeout === undefined
11
+ ? DHT_BOOTSTRAP_WAIT_CAP_MS
12
+ : Math.min(timeout, DHT_BOOTSTRAP_WAIT_CAP_MS);
13
+ try {
14
+ await withTimeout(dht.fullyBootstrapped(), cap);
15
+ }
16
+ catch (error) {
17
+ logger.warn(`DHT not bootstrapped within ${cap}ms before delegated connect; attempting anyway`, { error });
18
+ }
19
+ }
20
+ // Map an opaque DHT connect error onto why the peer was unreachable: not found
21
+ // on the DHT vs found-but-un-holepunchable. Relays only bridge after a peer is
22
+ // found, so they can never resolve a PEER_NOT_FOUND.
23
+ export function describeConnectFailure(error, publicKey, relayCount) {
24
+ const code = typeof error === "object" && error !== null && "code" in error
25
+ ? String(error.code)
26
+ : undefined;
27
+ const relayNote = relayCount > 0
28
+ ? `${relayCount} swarm relay(s) configured`
29
+ : "no swarm relays configured";
30
+ switch (code) {
31
+ case "PEER_NOT_FOUND":
32
+ return `provider ${publicKey} was not found on the DHT — it may be offline, still bootstrapping, or unreachable from this network. Relays bridge a connection only after the provider is located, so they cannot find an unannounced provider (${relayNote}).`;
33
+ case "PEER_CONNECTION_FAILED":
34
+ case "CANNOT_HOLEPUNCH":
35
+ case "REMOTE_NOT_HOLEPUNCHABLE":
36
+ case "REMOTE_NOT_HOLEPUNCHING":
37
+ case "HOLEPUNCH_ABORTED":
38
+ case "HOLEPUNCH_PROBE_TIMEOUT":
39
+ case "HOLEPUNCH_DOUBLE_RANDOMIZED_NATS":
40
+ return `provider ${publicKey} was found but a connection could not be established (NAT/holepunch failure: ${code}; ${relayNote}).`;
41
+ default:
42
+ return error instanceof Error ? error.message : String(error);
43
+ }
44
+ }
@@ -1,4 +1,6 @@
1
1
  import { getSwarm } from "./hyperswarm.js";
2
+ import { getSDKConfig } from "./registry/config-registry.js";
3
+ import { ensureDhtBootstrapped, describeConnectFailure, } from "./delegate-connect-diagnostics.js";
2
4
  import RPC from "bare-rpc";
3
5
  import { withTimeout } from "../../utils/withTimeout.js";
4
6
  import { DelegateConnectionFailedError } from "../../utils/errors-server.js";
@@ -6,6 +8,7 @@ import { getServerLogger } from "../../logging/index.js";
6
8
  import { nowMs } from "../../profiling/index.js";
7
9
  import { cacheDelegationConnectionTime, clearPeerConnectionTracking, } from "../rpc/profiling/delegation-profiler.js";
8
10
  import { getNextCommandId } from "../rpc/rpc-utils.js";
11
+ import { Buffer } from "bare-buffer";
9
12
  const logger = getServerLogger();
10
13
  const activeRPCs = new Map();
11
14
  const activeConnections = new Map();
@@ -15,6 +18,9 @@ const activeConnections = new Map();
15
18
  // open multiple sockets, clobber the active maps, and leak the loser.
16
19
  const inflightConnections = new Map();
17
20
  const HEALTH_CHECK_TIMEOUT_MS = 1500;
21
+ function getConfiguredRelayCount() {
22
+ return getSDKConfig().swarmRelays?.length ?? 0;
23
+ }
18
24
  function isHeartbeatResponse(payload) {
19
25
  return (typeof payload === "object" &&
20
26
  payload !== null &&
@@ -134,18 +140,10 @@ async function ensureRPCConnection(publicKey, timeout, healthCheckTimeout) {
134
140
  }
135
141
  const connectionStart = nowMs();
136
142
  let conn;
143
+ const relayCount = getConfiguredRelayCount();
137
144
  try {
138
- logger.info(`🔗 Establishing direct DHT connection to peer: ${publicKey}${timeout ? `, timeout: ${timeout}ms` : ""}`);
139
- // We deliberately do NOT `await swarm.dht.fullyBootstrapped()` here. The
140
- // earlier guard (added with #1729 to side-step a theoretical PEER_NOT_FOUND
141
- // on a fully-cold swarm) added a serial 1-3s wait on every first delegated
142
- // call — measurably regressing `loadModel.delegation.connection` vs 0.9.0
143
- // (≈3.2× slower in local benches). `getSwarm()` is invoked early during
144
- // SDK init (registry/runtime), so by the time the consumer reaches this
145
- // path the routing table is already warm enough; `dht.connect()` also
146
- // bootstraps on demand if it isn't, so we lose nothing by skipping the
147
- // explicit await.
148
- getSwarm();
145
+ logger.info(`🔗 Establishing direct DHT connection to peer: ${publicKey}${timeout ? `, timeout: ${timeout}ms` : ""} (${relayCount} swarm relay(s) configured)`);
146
+ await ensureDhtBootstrapped(getSwarm().dht, getRemainingTimeout());
149
147
  conn = openDhtConnection(publicKey);
150
148
  await waitForOpen(conn, getRemainingTimeout());
151
149
  logger.info(`🍺 Peer connection opened: ${publicKey}`);
@@ -163,7 +161,7 @@ async function ensureRPCConnection(publicKey, timeout, healthCheckTimeout) {
163
161
  }
164
162
  cleanupStaleConnection(publicKey);
165
163
  logger.error("Failed to establish RPC connection:", error);
166
- throw new DelegateConnectionFailedError(`RPC connection failed: ${error instanceof Error ? error.message : String(error)}`, error);
164
+ throw new DelegateConnectionFailedError(`RPC connection failed: ${describeConnectFailure(error, publicKey, relayCount)}`, error);
167
165
  }
168
166
  }
169
167
  // Create an RPC instance for a specific HyperSwarm peer.
@@ -5,6 +5,7 @@ import { envSchema } from "../../schemas/provide.js";
5
5
  import { getSDKConfig } from "./registry/config-registry.js";
6
6
  import { registerSwarm, unregisterSwarm } from "./runtime-lifecycle.js";
7
7
  import { getServerLogger } from "../../logging/index.js";
8
+ import { Buffer } from "bare-buffer";
8
9
  const logger = getServerLogger();
9
10
  function getHyperswarmSeedBuffer() {
10
11
  const parsedEnv = envSchema.safeParse(process.env);
@@ -0,0 +1,13 @@
1
+ import { type BciStreamOpts, type BciTranscribeParams, type TranscribeSegment, type TranscribeStats } from "../../../schemas/index";
2
+ type BciTranscribeReturn = {
3
+ modelExecutionMs: number;
4
+ stats?: TranscribeStats;
5
+ };
6
+ export declare function bciTranscribe(params: BciTranscribeParams & {
7
+ metadata: true;
8
+ }, requestId?: string): AsyncGenerator<TranscribeSegment, BciTranscribeReturn, void>;
9
+ export declare function bciTranscribe(params: BciTranscribeParams, requestId?: string): AsyncGenerator<string, BciTranscribeReturn, void>;
10
+ export declare function bciTranscribeStream(modelId: string, neuralStream: AsyncIterable<Buffer>, metadata: true, opts?: BciStreamOpts, requestId?: string): AsyncGenerator<TranscribeSegment, void, void>;
11
+ export declare function bciTranscribeStream(modelId: string, neuralStream: AsyncIterable<Buffer>, metadata?: boolean, opts?: BciStreamOpts, requestId?: string): AsyncGenerator<string, void, void>;
12
+ export {};
13
+ //# sourceMappingURL=bci-transcribe.d.ts.map
@@ -0,0 +1,248 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
53
+ import { getModel } from "../registry/model-registry.js";
54
+ import {} from "../../../schemas/index.js";
55
+ import { getServerLogger } from "../../../logging/index.js";
56
+ import { TranscriptionFailedError } from "../../../utils/errors-server.js";
57
+ import { nowMs } from "../../../profiling/index.js";
58
+ import { buildStreamResult } from "../../../profiling/model-execution.js";
59
+ import { toTranscribeSegment, } from "../utils/transcribe-metadata.js";
60
+ import { getRequestRegistry, withRequestContext, } from "../runtime/index.js";
61
+ import { generateServerRequestId } from "../runtime/request-id.js";
62
+ async function runBci(model, input) {
63
+ switch (input.type) {
64
+ case "base64":
65
+ return model.transcribe(Buffer.from(input.value, "base64"));
66
+ case "filePath":
67
+ return model.transcribeFile(input.value);
68
+ default:
69
+ throw new TranscriptionFailedError("Invalid neural input");
70
+ }
71
+ }
72
+ export async function* bciTranscribe(params, requestId) {
73
+ const env_1 = { stack: [], error: void 0, hasError: false };
74
+ try {
75
+ const { modelId, metadata } = params;
76
+ // Open a request-scoped lifecycle. The registry routes
77
+ // `cancel({ requestId })` and `cancel({ modelId, kind: "transcribe" })`
78
+ // through this context. Falls back to a server-generated id if the
79
+ // client didn't send one.
80
+ const ctx = __addDisposableResource(env_1, await getRequestRegistry().begin({
81
+ requestId: requestId ?? generateServerRequestId(),
82
+ kind: "transcribe",
83
+ modelId,
84
+ }), true);
85
+ const requestLogger = withRequestContext(getServerLogger(), ctx);
86
+ const model = getModel(modelId);
87
+ // Hard-cancel wiring: the BCI addon exposes a model-wide `cancel()`
88
+ // that interrupts the currently-running job. The per-iteration
89
+ // `if (ctx.signal.aborted) break` below is the soft-cancel safety net
90
+ // for the gap between the abort firing and the iterator's next pull.
91
+ const onAbort = () => {
92
+ if (typeof model.cancel === "function") {
93
+ model.cancel().catch((err) => {
94
+ requestLogger.warn(`[cancel] model.cancel() rejected during abort for modelId=${modelId}: ${err instanceof Error ? err.message : String(err)}`);
95
+ });
96
+ }
97
+ };
98
+ ctx.signal.addEventListener("abort", onAbort, { once: true });
99
+ if (ctx.signal.aborted)
100
+ onAbort();
101
+ ctx.scope.defer(() => {
102
+ ctx.signal.removeEventListener("abort", onAbort);
103
+ });
104
+ const modelStart = nowMs();
105
+ const response = await runBci(model, params.neuralData);
106
+ for await (const output of response.iterate()) {
107
+ if (ctx.signal.aborted)
108
+ break;
109
+ requestLogger.debug("BCI Transcription Update:", output);
110
+ const chunks = Array.isArray(output) ? output : [output];
111
+ if (metadata) {
112
+ for (const chunk of chunks) {
113
+ if (!chunk.text)
114
+ continue;
115
+ yield toTranscribeSegment(chunk);
116
+ }
117
+ continue;
118
+ }
119
+ const text = chunks.map((chunk) => chunk.text).join("");
120
+ if (text.trim()) {
121
+ yield text;
122
+ }
123
+ }
124
+ const modelExecutionMs = nowMs() - modelStart;
125
+ const stats = {
126
+ ...(response.stats?.audioDurationMs !== undefined && {
127
+ audioDuration: response.stats.audioDurationMs,
128
+ }),
129
+ ...(response.stats?.realTimeFactor !== undefined && {
130
+ realTimeFactor: response.stats.realTimeFactor,
131
+ }),
132
+ ...(response.stats?.tokensPerSecond !== undefined && {
133
+ tokensPerSecond: response.stats.tokensPerSecond,
134
+ }),
135
+ ...(response.stats?.totalTokens !== undefined && {
136
+ totalTokens: response.stats.totalTokens,
137
+ }),
138
+ ...(response.stats?.totalSegments !== undefined && {
139
+ totalSegments: response.stats.totalSegments,
140
+ }),
141
+ ...(response.stats?.whisperEncodeMs !== undefined && {
142
+ whisperEncodeTime: response.stats.whisperEncodeMs,
143
+ }),
144
+ ...(response.stats?.whisperDecodeMs !== undefined && {
145
+ whisperDecodeTime: response.stats.whisperDecodeMs,
146
+ }),
147
+ ...(response.stats?.encoderMs !== undefined && {
148
+ encoderTime: response.stats.encoderMs,
149
+ }),
150
+ ...(response.stats?.decoderMs !== undefined && {
151
+ decoderTime: response.stats.decoderMs,
152
+ }),
153
+ ...(response.stats?.melSpecMs !== undefined && {
154
+ melSpecTime: response.stats.melSpecMs,
155
+ }),
156
+ ...(response.stats?.backendDevice !== undefined && {
157
+ backendDevice: response.stats.backendDevice,
158
+ }),
159
+ ...(response.stats?.backendId !== undefined && {
160
+ backendId: response.stats.backendId,
161
+ }),
162
+ ...(response.stats?.gpuMemTotalMb !== undefined && {
163
+ gpuMemTotalMb: response.stats.gpuMemTotalMb,
164
+ }),
165
+ ...(response.stats?.gpuMemFreeMb !== undefined && {
166
+ gpuMemFreeMb: response.stats.gpuMemFreeMb,
167
+ }),
168
+ };
169
+ return buildStreamResult(modelExecutionMs, stats);
170
+ }
171
+ catch (e_1) {
172
+ env_1.error = e_1;
173
+ env_1.hasError = true;
174
+ }
175
+ finally {
176
+ const result_1 = __disposeResources(env_1);
177
+ if (result_1)
178
+ await result_1;
179
+ }
180
+ }
181
+ export async function* bciTranscribeStream(modelId, neuralStream, metadata, opts, requestId) {
182
+ const env_2 = { stack: [], error: void 0, hasError: false };
183
+ try {
184
+ // Same `kind: "transcribe"` as the unary BCI variant — the registry
185
+ // doesn't distinguish streaming vs non-streaming variants of the same
186
+ // operation, so `cancel({ modelId, kind: "transcribe" })` cancels
187
+ // either shape.
188
+ const ctx = __addDisposableResource(env_2, await getRequestRegistry().begin({
189
+ requestId: requestId ?? generateServerRequestId(),
190
+ kind: "transcribe",
191
+ modelId,
192
+ }), true);
193
+ const requestLogger = withRequestContext(getServerLogger(), ctx);
194
+ const model = getModel(modelId);
195
+ // Hard-cancel wiring: `cancel()` tears down the active stream driver
196
+ // and interrupts the running window job. The per-iteration abort guard
197
+ // below is the soft-cancel safety net between the abort firing and the
198
+ // iterator's next pull.
199
+ const onAbort = () => {
200
+ if (typeof model.cancel === "function") {
201
+ model.cancel().catch((err) => {
202
+ requestLogger.warn(`[cancel] model.cancel() rejected during abort for modelId=${modelId}: ${err instanceof Error ? err.message : String(err)}`);
203
+ });
204
+ }
205
+ };
206
+ ctx.signal.addEventListener("abort", onAbort, { once: true });
207
+ if (ctx.signal.aborted)
208
+ onAbort();
209
+ ctx.scope.defer(() => {
210
+ ctx.signal.removeEventListener("abort", onAbort);
211
+ });
212
+ const streamOpts = {
213
+ ...(opts?.windowTimesteps !== undefined && {
214
+ windowTimesteps: opts.windowTimesteps,
215
+ }),
216
+ ...(opts?.hopTimesteps !== undefined && { hopTimesteps: opts.hopTimesteps }),
217
+ ...(opts?.emit !== undefined && { emit: opts.emit }),
218
+ };
219
+ const response = await model.transcribeStream(neuralStream, streamOpts);
220
+ for await (const output of response.iterate()) {
221
+ if (ctx.signal.aborted)
222
+ break;
223
+ requestLogger.debug("BCI Stream Transcription Update:", output);
224
+ const chunks = Array.isArray(output) ? output : [output];
225
+ if (metadata) {
226
+ for (const chunk of chunks) {
227
+ if (!chunk.text)
228
+ continue;
229
+ yield toTranscribeSegment(chunk);
230
+ }
231
+ continue;
232
+ }
233
+ const text = chunks.map((chunk) => chunk.text).join("");
234
+ if (text.trim()) {
235
+ yield text;
236
+ }
237
+ }
238
+ }
239
+ catch (e_2) {
240
+ env_2.error = e_2;
241
+ env_2.hasError = true;
242
+ }
243
+ finally {
244
+ const result_2 = __disposeResources(env_2);
245
+ if (result_2)
246
+ await result_2;
247
+ }
248
+ }
@@ -66,7 +66,7 @@ export async function embed(params, requestId) {
66
66
  // `cancel({ requestId })` and broad `cancel({ modelId, kind: "embeddings" })`
67
67
  // straight to this context's signal. Falls back to a server-generated
68
68
  // id if the client didn't send one (older releases).
69
- const ctx = __addDisposableResource(env_1, getRequestRegistry().begin({
69
+ const ctx = __addDisposableResource(env_1, await getRequestRegistry().begin({
70
70
  requestId: requestId ?? generateServerRequestId(),
71
71
  kind: "embeddings",
72
72
  modelId,
@@ -121,6 +121,7 @@ export async function embed(params, requestId) {
121
121
  ...(response.stats?.tokens_per_second !== undefined && { tokensPerSecond: response.stats.tokens_per_second }),
122
122
  ...(response.stats?.total_tokens !== undefined && { totalTokens: response.stats.total_tokens }),
123
123
  ...(response.stats?.backendDevice !== undefined && { backendDevice: response.stats.backendDevice }),
124
+ ...(response.stats?.context_size !== undefined && { contextSize: response.stats.context_size }),
124
125
  };
125
126
  const embeddingsArray = rawEmbeddings[0];
126
127
  if (Array.isArray(text)) {
@@ -3,6 +3,7 @@ import { promises as fsPromises } from "bare-fs";
3
3
  import path from "bare-path";
4
4
  import { getAutoCacheLookupHistory, getKVCacheDir, validateAndJoinPath, } from "../../utils/index.js";
5
5
  import { getServerLogger } from "../../../logging/index.js";
6
+ import { Buffer } from "bare-buffer";
6
7
  const logger = getServerLogger();
7
8
  // In-memory KV-cache state lives in `KvCacheSession` (the single
8
9
  // mutation point for all three KV-cache bookkeeping layers). This
@@ -23,13 +24,13 @@ function getToolNamesForHash(tools) {
23
24
  // Cache hash based on system prompt + tool names
24
25
  // Different tools = different cache (tools anchored in first message, protected from n_discarded)
25
26
  export function generateConfigHash(systemPrompt, tools) {
26
- const hash = crypto.createHash("sha256");
27
+ const hash = crypto.createHash("sha-256");
27
28
  const toolNames = getToolNamesForHash(tools);
28
29
  hash.update(Buffer.from(JSON.stringify({ systemPrompt, toolNames }), "utf8"));
29
- return hash.digest("hex").substring(0, 16);
30
+ return (hash.digest("hex")).substring(0, 16);
30
31
  }
31
32
  export function generateCacheKey(messages) {
32
- const hash = crypto.createHash("sha256");
33
+ const hash = crypto.createHash("sha-256");
33
34
  const historyString = JSON.stringify(messages);
34
35
  const historyBuffer = Buffer.from(historyString, "utf8");
35
36
  hash.update(historyBuffer);
@@ -117,7 +117,7 @@ export async function* transcribe(params, requestId) {
117
117
  // `cancel({ requestId })` and `cancel({ modelId, kind: "transcribe" })`
118
118
  // through this context. Falls back to a server-generated id if the
119
119
  // client didn't send one.
120
- const ctx = __addDisposableResource(env_1, getRequestRegistry().begin({
120
+ const ctx = __addDisposableResource(env_1, await getRequestRegistry().begin({
121
121
  requestId: requestId ?? generateServerRequestId(),
122
122
  kind: "transcribe",
123
123
  modelId,
@@ -193,6 +193,10 @@ export async function* transcribe(params, requestId) {
193
193
  ...(response.stats?.encoderMs !== undefined && { encoderTime: response.stats.encoderMs }),
194
194
  ...(response.stats?.decoderMs !== undefined && { decoderTime: response.stats.decoderMs }),
195
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 }),
196
200
  };
197
201
  return buildStreamResult(modelExecutionMs, stats);
198
202
  }
@@ -228,7 +232,7 @@ export async function* transcribeStream(modelId, audioInputStream, prompt, metad
228
232
  // doesn't distinguish streaming vs non-streaming variants of the same
229
233
  // operation, so `cancel({ modelId, kind: "transcribe" })` cancels
230
234
  // either shape.
231
- const ctx = __addDisposableResource(env_2, getRequestRegistry().begin({
235
+ const ctx = __addDisposableResource(env_2, await getRequestRegistry().begin({
232
236
  requestId: requestId ?? generateServerRequestId(),
233
237
  kind: "transcribe",
234
238
  modelId,
@@ -116,7 +116,7 @@ export async function* translate(params, requestId) {
116
116
  // exits on `signal.aborted`, scope unwinds, and the addon may run
117
117
  // to completion in the background — acceptable because the result
118
118
  // is dropped either way.
119
- const ctx = __addDisposableResource(env_1, getRequestRegistry().begin({
119
+ const ctx = __addDisposableResource(env_1, await getRequestRegistry().begin({
120
120
  requestId: requestId ?? generateServerRequestId(),
121
121
  kind: "translate",
122
122
  modelId,
@@ -0,0 +1,130 @@
1
+ import { type CreateModelParams, type PluginModelResult } from "../../../../schemas/index";
2
+ export declare const bciPlugin: {
3
+ modelType: "bci-whispercpp-transcription";
4
+ displayName: string;
5
+ addonPackage: "@qvac/bci-whispercpp";
6
+ loadConfigSchema: import("zod").ZodObject<{
7
+ whisperConfig: import("zod").ZodOptional<import("zod").ZodObject<{
8
+ language: import("zod").ZodOptional<import("zod").ZodString>;
9
+ n_threads: import("zod").ZodOptional<import("zod").ZodNumber>;
10
+ temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
11
+ suppress_nst: import("zod").ZodOptional<import("zod").ZodBoolean>;
12
+ suppress_blank: import("zod").ZodOptional<import("zod").ZodBoolean>;
13
+ duration_ms: import("zod").ZodOptional<import("zod").ZodNumber>;
14
+ translate: import("zod").ZodOptional<import("zod").ZodBoolean>;
15
+ no_timestamps: import("zod").ZodOptional<import("zod").ZodBoolean>;
16
+ single_segment: import("zod").ZodOptional<import("zod").ZodBoolean>;
17
+ print_special: import("zod").ZodOptional<import("zod").ZodBoolean>;
18
+ print_progress: import("zod").ZodOptional<import("zod").ZodBoolean>;
19
+ print_realtime: import("zod").ZodOptional<import("zod").ZodBoolean>;
20
+ print_timestamps: import("zod").ZodOptional<import("zod").ZodBoolean>;
21
+ detect_language: import("zod").ZodOptional<import("zod").ZodBoolean>;
22
+ greedy_best_of: import("zod").ZodOptional<import("zod").ZodNumber>;
23
+ beam_search_beam_size: import("zod").ZodOptional<import("zod").ZodNumber>;
24
+ }, import("zod/v4/core").$strip>>;
25
+ bciConfig: import("zod").ZodOptional<import("zod").ZodObject<{
26
+ day_idx: import("zod").ZodOptional<import("zod").ZodNumber>;
27
+ }, import("zod/v4/core").$strip>>;
28
+ contextParams: import("zod").ZodOptional<import("zod").ZodObject<{
29
+ model: import("zod").ZodOptional<import("zod").ZodString>;
30
+ use_gpu: import("zod").ZodOptional<import("zod").ZodBoolean>;
31
+ flash_attn: import("zod").ZodOptional<import("zod").ZodBoolean>;
32
+ gpu_device: import("zod").ZodOptional<import("zod").ZodNumber>;
33
+ }, import("zod/v4/core").$strip>>;
34
+ miscConfig: import("zod").ZodOptional<import("zod").ZodObject<{
35
+ caption_enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
36
+ }, import("zod/v4/core").$strip>>;
37
+ backendsDir: import("zod").ZodOptional<import("zod").ZodString>;
38
+ }, import("zod/v4/core").$strip>;
39
+ createModel(params: CreateModelParams): PluginModelResult;
40
+ handlers: {
41
+ bciTranscribe: import("../../../../schemas/index").PluginHandlerDefinition<import("zod").ZodObject<{
42
+ modelId: import("zod").ZodString;
43
+ metadata: import("zod").ZodOptional<import("zod").ZodBoolean>;
44
+ neuralData: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
45
+ type: import("zod").ZodLiteral<"base64">;
46
+ value: import("zod").ZodString;
47
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
48
+ type: import("zod").ZodLiteral<"filePath">;
49
+ value: import("zod").ZodString;
50
+ }, import("zod/v4/core").$strip>], "type">;
51
+ type: import("zod").ZodLiteral<"bciTranscribe">;
52
+ requestId: import("zod").ZodOptional<import("zod").ZodString>;
53
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
54
+ text: import("zod").ZodOptional<import("zod").ZodString>;
55
+ done: import("zod").ZodOptional<import("zod").ZodBoolean>;
56
+ stats: import("zod").ZodOptional<import("zod").ZodObject<{
57
+ audioDuration: import("zod").ZodOptional<import("zod").ZodNumber>;
58
+ realTimeFactor: import("zod").ZodOptional<import("zod").ZodNumber>;
59
+ tokensPerSecond: import("zod").ZodOptional<import("zod").ZodNumber>;
60
+ totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
61
+ totalSegments: import("zod").ZodOptional<import("zod").ZodNumber>;
62
+ whisperEncodeTime: import("zod").ZodOptional<import("zod").ZodNumber>;
63
+ whisperDecodeTime: import("zod").ZodOptional<import("zod").ZodNumber>;
64
+ encoderTime: import("zod").ZodOptional<import("zod").ZodNumber>;
65
+ decoderTime: import("zod").ZodOptional<import("zod").ZodNumber>;
66
+ melSpecTime: import("zod").ZodOptional<import("zod").ZodNumber>;
67
+ backendDevice: import("zod").ZodOptional<import("zod").ZodNumber>;
68
+ backendId: import("zod").ZodOptional<import("zod").ZodNumber>;
69
+ gpuMemTotalMb: import("zod").ZodOptional<import("zod").ZodNumber>;
70
+ gpuMemFreeMb: import("zod").ZodOptional<import("zod").ZodNumber>;
71
+ }, import("zod/v4/core").$strip>>;
72
+ error: import("zod").ZodOptional<import("zod").ZodString>;
73
+ segment: import("zod").ZodOptional<import("zod").ZodObject<{
74
+ text: import("zod").ZodString;
75
+ startMs: import("zod").ZodNumber;
76
+ endMs: import("zod").ZodNumber;
77
+ append: import("zod").ZodBoolean;
78
+ id: import("zod").ZodNumber;
79
+ }, import("zod/v4/core").$strip>>;
80
+ type: import("zod").ZodLiteral<"bciTranscribe">;
81
+ }, import("zod/v4/core").$strip>>;
82
+ bciTranscribeStream: import("../../../../schemas/index").PluginHandlerDefinition<import("zod").ZodObject<{
83
+ modelId: import("zod").ZodString;
84
+ metadata: import("zod").ZodOptional<import("zod").ZodBoolean>;
85
+ type: import("zod").ZodLiteral<"bciTranscribeStream">;
86
+ streamOpts: import("zod").ZodOptional<import("zod").ZodObject<{
87
+ windowTimesteps: import("zod").ZodOptional<import("zod").ZodNumber>;
88
+ hopTimesteps: import("zod").ZodOptional<import("zod").ZodNumber>;
89
+ emit: import("zod").ZodOptional<import("zod").ZodEnum<{
90
+ full: "full";
91
+ delta: "delta";
92
+ }>>;
93
+ }, import("zod/v4/core").$strip>>;
94
+ requestId: import("zod").ZodOptional<import("zod").ZodString>;
95
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
96
+ text: import("zod").ZodOptional<import("zod").ZodString>;
97
+ done: import("zod").ZodOptional<import("zod").ZodBoolean>;
98
+ stats: import("zod").ZodOptional<import("zod").ZodObject<{
99
+ audioDuration: import("zod").ZodOptional<import("zod").ZodNumber>;
100
+ realTimeFactor: import("zod").ZodOptional<import("zod").ZodNumber>;
101
+ tokensPerSecond: import("zod").ZodOptional<import("zod").ZodNumber>;
102
+ totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
103
+ totalSegments: import("zod").ZodOptional<import("zod").ZodNumber>;
104
+ whisperEncodeTime: import("zod").ZodOptional<import("zod").ZodNumber>;
105
+ whisperDecodeTime: import("zod").ZodOptional<import("zod").ZodNumber>;
106
+ encoderTime: import("zod").ZodOptional<import("zod").ZodNumber>;
107
+ decoderTime: import("zod").ZodOptional<import("zod").ZodNumber>;
108
+ melSpecTime: import("zod").ZodOptional<import("zod").ZodNumber>;
109
+ backendDevice: import("zod").ZodOptional<import("zod").ZodNumber>;
110
+ backendId: import("zod").ZodOptional<import("zod").ZodNumber>;
111
+ gpuMemTotalMb: import("zod").ZodOptional<import("zod").ZodNumber>;
112
+ gpuMemFreeMb: import("zod").ZodOptional<import("zod").ZodNumber>;
113
+ }, import("zod/v4/core").$strip>>;
114
+ error: import("zod").ZodOptional<import("zod").ZodString>;
115
+ segment: import("zod").ZodOptional<import("zod").ZodObject<{
116
+ text: import("zod").ZodString;
117
+ startMs: import("zod").ZodNumber;
118
+ endMs: import("zod").ZodNumber;
119
+ append: import("zod").ZodBoolean;
120
+ id: import("zod").ZodNumber;
121
+ }, import("zod/v4/core").$strip>>;
122
+ type: import("zod").ZodLiteral<"bciTranscribeStream">;
123
+ }, import("zod/v4/core").$strip>>;
124
+ };
125
+ logging: {
126
+ module: import("@qvac/bci-whispercpp/addonLogging").AddonLogging;
127
+ namespace: "bci-whispercpp-transcription";
128
+ };
129
+ };
130
+ //# sourceMappingURL=plugin.d.ts.map