@qvac/inference 0.20.0 → 0.21.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 (213) hide show
  1. package/NOTICE +107 -33
  2. package/README.md +8 -5
  3. package/dist/api/assess-model-fit.d.ts +9 -4
  4. package/dist/api/assess-model-fit.js +9 -4
  5. package/dist/api/bci-transcribe.d.ts +4 -1
  6. package/dist/api/index.d.ts +1 -0
  7. package/dist/api/index.js +1 -0
  8. package/dist/api/rpc-server.d.ts +19 -0
  9. package/dist/api/rpc-server.js +44 -0
  10. package/dist/api/text-to-speech.d.ts +9 -0
  11. package/dist/api/text-to-speech.js +9 -0
  12. package/dist/api/transcribe.d.ts +11 -7
  13. package/dist/api/transcribe.js +47 -15
  14. package/dist/api/video-request.d.ts +5 -5
  15. package/dist/dispatch.js +39 -7
  16. package/dist/errors/index.d.ts +7 -0
  17. package/dist/errors/index.js +15 -0
  18. package/dist/handlers/assess-model-fit.d.ts +18 -6
  19. package/dist/handlers/assess-model-fit.js +215 -35
  20. package/dist/handlers/completion-orchestrate.js +17 -0
  21. package/dist/handlers/get-loaded-model-info.js +4 -1
  22. package/dist/handlers/get-model-info.js +29 -1
  23. package/dist/handlers/load-model/coreml-sidecars.d.ts +25 -0
  24. package/dist/handlers/load-model/coreml-sidecars.js +274 -0
  25. package/dist/handlers/load-model/hyperdrive.js +2 -2
  26. package/dist/handlers/load-model/registry-download-utils.d.ts +1 -0
  27. package/dist/handlers/load-model/registry-download-utils.js +2 -1
  28. package/dist/handlers/load-model/registry.js +59 -0
  29. package/dist/handlers/rpc-server.d.ts +23 -0
  30. package/dist/handlers/rpc-server.js +141 -0
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js +2 -1
  33. package/dist/models/registry/models.d.ts +7731 -5672
  34. package/dist/models/registry/models.js +4652 -2526
  35. package/dist/models/registry/resource-profiles.js +481 -94
  36. package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +8 -6
  37. package/dist/plugins/builtin/audiogen-ggml/plugin.js +2 -1
  38. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +73 -1
  39. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +37 -19
  40. package/dist/plugins/builtin/ggml-vla/plugin.d.ts +1 -1
  41. package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +9 -5
  42. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -1
  43. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +16 -7
  44. package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +80 -8
  45. package/dist/plugins/builtin/llamacpp-completion/plugin.js +9 -3
  46. package/dist/plugins/builtin/llamacpp-completion/transform.js +19 -0
  47. package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +5 -3
  48. package/dist/plugins/builtin/llamacpp-embedding/plugin.js +2 -1
  49. package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +121 -0
  50. package/dist/plugins/builtin/parakeet-transcription/plugin.js +56 -27
  51. package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +8 -2
  52. package/dist/plugins/builtin/sdcpp-generation/plugin.js +7 -2
  53. package/dist/plugins/builtin/tts-ggml/ops/parler-options.d.ts +2 -0
  54. package/dist/plugins/builtin/tts-ggml/ops/parler-options.js +5 -1
  55. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +27 -10
  56. package/dist/plugins/builtin/tts-ggml/plugin.d.ts +181 -0
  57. package/dist/plugins/builtin/tts-ggml/plugin.js +84 -2
  58. package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +136 -0
  59. package/dist/plugins/builtin/whispercpp-transcription/plugin.js +18 -7
  60. package/dist/plugins/ops/bci-transcribe.d.ts +6 -2
  61. package/dist/plugins/ops/bci-transcribe.js +18 -13
  62. package/dist/plugins/ops/load-model.js +2 -2
  63. package/dist/plugins/ops/transcribe.d.ts +4 -2
  64. package/dist/plugins/ops/transcribe.js +39 -2
  65. package/dist/plugins/ops/translate-stats.d.ts +2 -1
  66. package/dist/plugins/ops/translate-stats.js +64 -7
  67. package/dist/plugins/ops/translate.js +20 -4
  68. package/dist/profiling/operation-metrics.js +56 -0
  69. package/dist/registry.js +4 -0
  70. package/dist/resources/model-fit/assess.d.ts +46 -2
  71. package/dist/resources/model-fit/assess.js +67 -3
  72. package/dist/resources/model-fit/estimators/llm.js +2 -2
  73. package/dist/resources/model-fit/estimators/whisper.js +3 -4
  74. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +102 -0
  75. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +212 -0
  76. package/dist/resources/model-fit/fit-stub/project-fit-from-load.d.ts +27 -0
  77. package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +31 -0
  78. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +38 -0
  79. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +138 -0
  80. package/dist/resources/model-fit/floor.js +2 -2
  81. package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +9 -6
  82. package/dist/resources/model-fit/native-probe/advisory-fit.js +129 -80
  83. package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +2 -0
  84. package/dist/resources/model-fit/native-probe/child-engine-fit.js +41 -0
  85. package/dist/resources/model-fit/native-probe/classify-fit.d.ts +6 -0
  86. package/dist/resources/model-fit/native-probe/classify-fit.js +135 -0
  87. package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +28 -0
  88. package/dist/resources/model-fit/native-probe/create-fit-request.js +51 -0
  89. package/dist/resources/model-fit/native-probe/engine-fit.d.ts +59 -0
  90. package/dist/resources/model-fit/native-probe/engine-fit.js +13 -0
  91. package/dist/resources/model-fit/native-probe/engines/asr.d.ts +10 -0
  92. package/dist/resources/model-fit/native-probe/engines/asr.js +103 -0
  93. package/dist/resources/model-fit/native-probe/engines/audiogen.d.ts +8 -0
  94. package/dist/resources/model-fit/native-probe/engines/audiogen.js +35 -0
  95. package/dist/resources/model-fit/native-probe/engines/diffusion.d.ts +7 -0
  96. package/dist/resources/model-fit/native-probe/engines/diffusion.js +55 -0
  97. package/dist/resources/model-fit/native-probe/engines/gpu.d.ts +10 -0
  98. package/dist/resources/model-fit/native-probe/engines/gpu.js +21 -0
  99. package/dist/resources/model-fit/native-probe/engines/llama.d.ts +13 -0
  100. package/dist/resources/model-fit/native-probe/engines/llama.js +145 -0
  101. package/dist/resources/model-fit/native-probe/engines/tts.d.ts +8 -0
  102. package/dist/resources/model-fit/native-probe/engines/tts.js +106 -0
  103. package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +16 -0
  104. package/dist/resources/model-fit/native-probe/fit-outcome.js +1 -0
  105. package/dist/resources/model-fit/native-probe/fit-process.d.ts +27 -0
  106. package/dist/resources/model-fit/native-probe/fit-process.js +55 -0
  107. package/dist/resources/model-fit/native-probe/fit-runner.d.ts +1 -0
  108. package/dist/resources/model-fit/native-probe/fit-runner.js +58 -0
  109. package/dist/resources/model-fit/native-probe/run-fit.d.ts +24 -0
  110. package/dist/resources/model-fit/native-probe/run-fit.js +20 -0
  111. package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +14 -34
  112. package/dist/resources/model-fit/native-probe/run-in-process-fit.js +55 -139
  113. package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +5 -12
  114. package/dist/resources/model-fit/native-probe/run-isolated-fit.js +13 -8
  115. package/dist/resources/model-fit/platform.d.ts +9 -0
  116. package/dist/resources/model-fit/platform.js +28 -0
  117. package/dist/rpc/device-map.d.ts +13 -0
  118. package/dist/rpc/device-map.js +22 -0
  119. package/dist/rpc/discovery.d.ts +12 -0
  120. package/dist/rpc/discovery.js +225 -0
  121. package/dist/rpc/ggml-provider.d.ts +4 -0
  122. package/dist/rpc/ggml-provider.js +25 -0
  123. package/dist/rpc/index.d.ts +2 -0
  124. package/dist/rpc/index.js +1 -0
  125. package/dist/rpc/instance.d.ts +6 -0
  126. package/dist/rpc/instance.js +21 -0
  127. package/dist/rpc/inventory.d.ts +5 -0
  128. package/dist/rpc/inventory.js +144 -0
  129. package/dist/rpc/manager.d.ts +14 -0
  130. package/dist/rpc/manager.js +174 -0
  131. package/dist/rpc/network.d.ts +11 -0
  132. package/dist/rpc/network.js +85 -0
  133. package/dist/rpc/provider.d.ts +6 -0
  134. package/dist/rpc/provider.js +24 -0
  135. package/dist/runtime/lifecycle.js +31 -13
  136. package/dist/runtime/request-context.d.ts +1 -1
  137. package/dist/runtime/state.js +5 -0
  138. package/dist/schemas/assess-model-fit.d.ts +284 -77
  139. package/dist/schemas/assess-model-fit.js +93 -55
  140. package/dist/schemas/audio-gen.d.ts +6 -6
  141. package/dist/schemas/audio-gen.js +2 -2
  142. package/dist/schemas/batch-completion-stream.d.ts +13 -5
  143. package/dist/schemas/batch-completion-stream.js +5 -3
  144. package/dist/schemas/bci-config.js +1 -1
  145. package/dist/schemas/bci.d.ts +86 -1
  146. package/dist/schemas/bci.js +21 -2
  147. package/dist/schemas/cancel.d.ts +10 -0
  148. package/dist/schemas/cancel.js +2 -0
  149. package/dist/schemas/common.d.ts +765 -56
  150. package/dist/schemas/common.js +7 -0
  151. package/dist/schemas/completion-event.d.ts +6 -6
  152. package/dist/schemas/completion-stream.d.ts +27 -8
  153. package/dist/schemas/completion-stream.js +41 -4
  154. package/dist/schemas/config.d.ts +236 -30
  155. package/dist/schemas/config.js +10 -0
  156. package/dist/schemas/embed.d.ts +2 -2
  157. package/dist/schemas/error.js +13 -0
  158. package/dist/schemas/errors.d.ts +1 -0
  159. package/dist/schemas/errors.js +5 -0
  160. package/dist/schemas/index.d.ts +1 -0
  161. package/dist/schemas/index.js +1 -0
  162. package/dist/schemas/llamacpp-config.d.ts +105 -14
  163. package/dist/schemas/llamacpp-config.js +113 -3
  164. package/dist/schemas/load-model.d.ts +3102 -627
  165. package/dist/schemas/load-model.js +2 -2
  166. package/dist/schemas/mcp-adapter.d.ts +4 -0
  167. package/dist/schemas/model-config-schemas.d.ts +205 -5
  168. package/dist/schemas/model-info.d.ts +56 -0
  169. package/dist/schemas/model-info.js +5 -1
  170. package/dist/schemas/plugin.d.ts +8 -2
  171. package/dist/schemas/profiling.d.ts +4 -4
  172. package/dist/schemas/reload-config.d.ts +30 -0
  173. package/dist/schemas/rpc-server.d.ts +101 -0
  174. package/dist/schemas/rpc-server.js +87 -0
  175. package/dist/schemas/sdcpp-config.d.ts +7 -3
  176. package/dist/schemas/sdcpp-config.js +37 -2
  177. package/dist/schemas/system-resources.d.ts +4 -4
  178. package/dist/schemas/text-to-speech.d.ts +529 -1
  179. package/dist/schemas/text-to-speech.js +122 -12
  180. package/dist/schemas/tools.d.ts +2 -0
  181. package/dist/schemas/tools.js +8 -0
  182. package/dist/schemas/transcription-config.d.ts +5 -0
  183. package/dist/schemas/transcription-config.js +20 -2
  184. package/dist/schemas/transcription.d.ts +164 -0
  185. package/dist/schemas/transcription.js +71 -4
  186. package/dist/schemas/vla.d.ts +1 -1
  187. package/dist/surface.d.ts +4 -1
  188. package/dist/surface.js +3 -1
  189. package/dist/utils/addon-responses.d.ts +5 -1
  190. package/dist/utils/archive.js +5 -1
  191. package/dist/utils/asr-diagnostics.d.ts +12 -0
  192. package/dist/utils/asr-diagnostics.js +42 -0
  193. package/dist/utils/asr-events.d.ts +1 -0
  194. package/dist/utils/asr-events.js +3 -2
  195. package/dist/utils/cache/paths.js +3 -2
  196. package/dist/utils/mcp-adapter.js +7 -1
  197. package/dist/utils/multi-gpu-mobile.d.ts +1 -1
  198. package/dist/utils/multi-gpu-mobile.js +8 -6
  199. package/dist/utils/path-security.d.ts +5 -0
  200. package/dist/utils/path-security.js +14 -0
  201. package/dist/utils/tool-helpers.d.ts +4 -0
  202. package/dist/utils/tool-helpers.js +2 -0
  203. package/dist/utils/tools/defer.d.ts +93 -0
  204. package/dist/utils/tools/defer.js +290 -0
  205. package/dist/utils/tools/index.d.ts +1 -0
  206. package/dist/utils/tools/index.js +1 -0
  207. package/dist/utils/transcribe-metadata.d.ts +21 -7
  208. package/dist/utils/transcribe-metadata.js +24 -8
  209. package/dist/utils/tts-stats.d.ts +6 -0
  210. package/dist/utils/tts-stats.js +14 -1
  211. package/package.json +44 -30
  212. package/dist/resources/model-fit/native-probe/create-llama-fit-request.d.ts +0 -26
  213. package/dist/resources/model-fit/native-probe/create-llama-fit-request.js +0 -171
@@ -0,0 +1,85 @@
1
+ import net from 'bare-net';
2
+ import { createHash } from 'bare-crypto';
3
+ import { InferenceCancelledError } from '../errors/index.js';
4
+ export function rpcTopic(topic) {
5
+ return createHash('sha-256').update('qvac:ggml-rpc-discovery:v1\0').update(topic).digest();
6
+ }
7
+ // Native servers currently accept IPv4 only. Do not resolve announced hostnames.
8
+ export function privateEndpoint(url) {
9
+ const match = /^(\d+\.\d+\.\d+\.\d+):([1-9]\d{0,4})$/.exec(url);
10
+ if (!match)
11
+ return;
12
+ const host = match[1];
13
+ const octets = host.split('.').map(Number);
14
+ if (host.split('.').some((part, i) => String(octets[i]) !== part || octets[i] > 255))
15
+ return;
16
+ const [a, b] = octets;
17
+ if (!(a === 10 || (a === 172 && b >= 16 && b <= 31) || (a === 192 && b === 168)))
18
+ return;
19
+ const port = Number(match[2]);
20
+ if (port > 65535)
21
+ return;
22
+ return { host, port };
23
+ }
24
+ export function throwIfAborted(signal) {
25
+ if (signal.aborted)
26
+ throw new InferenceCancelledError('rpc');
27
+ }
28
+ export function delay(ms, signal) {
29
+ throwIfAborted(signal);
30
+ return new Promise((resolve, reject) => {
31
+ const timer = setTimeout(() => finish(), ms);
32
+ const abort = () => finish(new InferenceCancelledError('rpc'));
33
+ function finish(error) {
34
+ clearTimeout(timer);
35
+ signal.removeEventListener('abort', abort);
36
+ if (error)
37
+ reject(error);
38
+ else
39
+ resolve();
40
+ }
41
+ signal.addEventListener('abort', abort, { once: true });
42
+ });
43
+ }
44
+ export function probeTcp(host, port, timeoutMs, signal, scope) {
45
+ throwIfAborted(signal);
46
+ return new Promise((resolve, reject) => {
47
+ const socket = new net.Socket();
48
+ const timer = setTimeout(() => finish(false), timeoutMs);
49
+ const abort = () => finish(false, new InferenceCancelledError('rpc'));
50
+ let finished = false;
51
+ function finish(reachable, error) {
52
+ if (finished)
53
+ return;
54
+ finished = true;
55
+ clearTimeout(timer);
56
+ signal.removeEventListener('abort', abort);
57
+ socket.destroy();
58
+ if (error)
59
+ reject(error);
60
+ else
61
+ resolve(reachable);
62
+ }
63
+ signal.addEventListener('abort', abort, { once: true });
64
+ scope?.defer(() => finish(false));
65
+ socket.on('error', () => finish(false));
66
+ socket.on('close', () => finish(false));
67
+ socket.on('connect', () => finish(true));
68
+ try {
69
+ socket.connect(port, host);
70
+ }
71
+ catch {
72
+ finish(false);
73
+ }
74
+ });
75
+ }
76
+ export async function waitForReady(host, port, signal) {
77
+ const deadline = Date.now() + 10000;
78
+ const probeHost = host === '0.0.0.0' ? '127.0.0.1' : host;
79
+ while (Date.now() < deadline) {
80
+ if (await probeTcp(probeHost, port, Math.min(250, deadline - Date.now()), signal))
81
+ return;
82
+ await delay(Math.min(50, Math.max(0, deadline - Date.now())), signal);
83
+ }
84
+ throw new Error(`RPC server readiness timed out at ${host}:${port}`);
85
+ }
@@ -0,0 +1,6 @@
1
+ import type { RpcServerProvider } from '../schemas/rpc-server.js';
2
+ /** Register the native server implementation explicitly, without loading any model plugin. */
3
+ export declare function registerRpcServerProvider(value: RpcServerProvider): void;
4
+ export declare function hasRpcServerProvider(): boolean;
5
+ export declare function getRpcServerProvider(): RpcServerProvider;
6
+ export declare function clearRpcServerProvider(): void;
@@ -0,0 +1,24 @@
1
+ import { RpcServerOperationError } from '../errors/index.js';
2
+ let provider;
3
+ /** Register the native server implementation explicitly, without loading any model plugin. */
4
+ export function registerRpcServerProvider(value) {
5
+ if (!value || typeof value.start !== 'function') {
6
+ throw new RpcServerOperationError('registerRpcServerProvider', 'Provider must define start()');
7
+ }
8
+ if (provider) {
9
+ throw new RpcServerOperationError('registerRpcServerProvider', 'A provider is already registered');
10
+ }
11
+ provider = value;
12
+ }
13
+ export function hasRpcServerProvider() {
14
+ return provider !== undefined;
15
+ }
16
+ export function getRpcServerProvider() {
17
+ if (!provider) {
18
+ throw new RpcServerOperationError('startRpcServer', 'No RPC server provider registered. Register a provider in Bare or select rpcServerProvider when bundling the SDK worker.');
19
+ }
20
+ return provider;
21
+ }
22
+ export function clearRpcServerProvider() {
23
+ provider = undefined;
24
+ }
@@ -1,3 +1,4 @@
1
+ import { closeRpcResources } from '../handlers/rpc-server.js';
1
2
  import { initEnv } from './env.js';
2
3
  import { closeAllRagInstances } from '../rag/index.js';
3
4
  import { disposeAllVectorIndexes } from './vector-index-registry.js';
@@ -15,6 +16,7 @@ import { destroyResourceCollector, initializeResourceCollector } from '../resour
15
16
  // process signals or calls `Bare.exit`.
16
17
  let initialized = false;
17
18
  let cleanupRan = false;
19
+ let cleanupPromise = null;
18
20
  const logger = getEngineLogger();
19
21
  /**
20
22
  * Initialize the engine: start log buffering, read env, and acquire the cache
@@ -53,18 +55,30 @@ function clearRegistries() {
53
55
  * registry client). Idempotent. Does not release the cache lock.
54
56
  */
55
57
  async function runCleanup() {
58
+ if (cleanupPromise)
59
+ return cleanupPromise;
56
60
  if (cleanupRan)
57
61
  return;
58
- cleanupRan = true;
59
- destroyResourceCollector();
60
- clearRegistries();
61
- disposeAllVectorIndexes();
62
- await Promise.allSettled([
63
- closeAllRagInstances(),
64
- cleanupDownloads(),
65
- unloadAllModels(),
66
- closeRegistryClient()
67
- ]);
62
+ cleanupPromise = (async () => {
63
+ destroyResourceCollector();
64
+ clearRegistries();
65
+ disposeAllVectorIndexes();
66
+ await Promise.allSettled([
67
+ closeAllRagInstances(),
68
+ cleanupDownloads(),
69
+ unloadAllModels(),
70
+ closeRegistryClient()
71
+ ]);
72
+ // Models may own buffers on our RPC servers. Release them before closing their sockets.
73
+ await closeRpcResources();
74
+ cleanupRan = true;
75
+ })();
76
+ try {
77
+ await cleanupPromise;
78
+ }
79
+ finally {
80
+ cleanupPromise = null;
81
+ }
68
82
  }
69
83
  /**
70
84
  * Pre-terminate cleanup, callable while the isolate is still alive. Runs the
@@ -83,6 +97,7 @@ export async function cleanupForTerminate() {
83
97
  }
84
98
  catch (error) {
85
99
  logger.error('❌ Error during pre-terminate cleanup:', error);
100
+ throw error;
86
101
  }
87
102
  }
88
103
  /**
@@ -95,8 +110,11 @@ export async function close() {
95
110
  }
96
111
  catch (error) {
97
112
  logger.error('❌ Error during cleanup:', error);
113
+ throw error;
114
+ }
115
+ finally {
116
+ releaseCacheLock();
117
+ initialized = false;
118
+ cleanupRan = false;
98
119
  }
99
- releaseCacheLock();
100
- initialized = false;
101
- cleanupRan = false;
102
120
  }
@@ -11,7 +11,7 @@ import type { Logger } from '../logging/types.js';
11
11
  * The set is intentionally open-coded — adding a new kind is a one-line
12
12
  * change and the union surfaces in editor autocomplete at every call site.
13
13
  */
14
- export type RequestKind = 'completion' | 'batchCompletion' | 'embeddings' | 'transcribe' | 'translate' | 'diffusion' | 'world' | 'audiogen' | 'tts' | 'ocr' | 'vla' | 'finetune' | 'loadModel' | 'downloadAsset' | 'rag';
14
+ export type RequestKind = 'completion' | 'batchCompletion' | 'embeddings' | 'transcribe' | 'translate' | 'diffusion' | 'world' | 'audiogen' | 'tts' | 'ocr' | 'vla' | 'finetune' | 'loadModel' | 'downloadAsset' | 'rag' | 'rpcServer' | 'rpcDiscovery';
15
15
  /**
16
16
  * Lifecycle states a request transitions through. A new context starts in
17
17
  * `"running"`. `cancel(...)` flips it to `"cancelling"` and aborts the
@@ -19,6 +19,7 @@ const configRegistry = {
19
19
  requireSecureTransport: undefined,
20
20
  registryDownloadMaxRetries: undefined,
21
21
  registryStreamTimeoutMs: undefined,
22
+ fitStubBudgetMs: undefined,
22
23
  deviceDefaults: undefined,
23
24
  ragTurbovec: undefined
24
25
  };
@@ -88,6 +89,10 @@ export function setConfig(config) {
88
89
  configRegistry.registryStreamTimeoutMs = config.registryStreamTimeoutMs;
89
90
  logger.info(`✅ Registry stream timeout set to: ${config.registryStreamTimeoutMs}ms`);
90
91
  }
92
+ if (config.fitStubBudgetMs !== undefined && config.fitStubBudgetMs !== null) {
93
+ configRegistry.fitStubBudgetMs = config.fitStubBudgetMs;
94
+ logger.info(`✅ Fit stub budget set to: ${config.fitStubBudgetMs}ms`);
95
+ }
91
96
  if (config.deviceDefaults !== undefined && config.deviceDefaults !== null) {
92
97
  configRegistry.deviceDefaults = config.deviceDefaults;
93
98
  logger.info(`✅ Device defaults configured: ${config.deviceDefaults.length} pattern(s)`);