@qvac/sdk 0.23.0 → 0.24.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 (239) hide show
  1. package/NOTICE +115 -58
  2. package/README.md +10 -13
  3. package/dist/examples/asr/parakeet-sortformer.js +24 -14
  4. package/dist/examples/asr/parakeet-transcribepsy-filesystem.js +40 -11
  5. package/dist/examples/asr/parakeet-unified-coreml.js +14 -9
  6. package/dist/examples/asr/whispercpp-prompt.js +9 -5
  7. package/dist/examples/assess-model-fit.d.ts +7 -9
  8. package/dist/examples/assess-model-fit.js +22 -43
  9. package/dist/examples/calc-tokens.d.ts +2 -0
  10. package/dist/examples/calc-tokens.js +21 -0
  11. package/dist/examples/classification/classify-image.js +11 -5
  12. package/dist/examples/completion-stop-reason.d.ts +3 -3
  13. package/dist/examples/completion-stop-reason.js +4 -4
  14. package/dist/examples/diffusion-flux3-klein.d.ts +2 -0
  15. package/dist/examples/diffusion-flux3-klein.js +102 -0
  16. package/dist/examples/diffusion-moss-image.d.ts +2 -0
  17. package/dist/examples/diffusion-moss-image.js +126 -0
  18. package/dist/examples/diffusion-qwen-image-21.js +15 -4
  19. package/dist/examples/embed-multimodal.d.ts +2 -0
  20. package/dist/examples/embed-multimodal.js +80 -0
  21. package/dist/examples/embed-p2p.js +2 -2
  22. package/dist/examples/image/megaloc.d.ts +2 -0
  23. package/dist/examples/image/megaloc.js +37 -0
  24. package/dist/examples/llamacpp-multimodal.js +18 -0
  25. package/dist/examples/rag/rag-hyperdb/pipeline.js +2 -2
  26. package/dist/examples/rag/rag-turbovec.js +2 -2
  27. package/dist/examples/sessions.d.ts +17 -0
  28. package/dist/examples/sessions.js +63 -0
  29. package/dist/examples/tools/llamacpp-deferred-tools.js +8 -4
  30. package/dist/scripts/check-resource-collectors-packaging.js +7 -6
  31. package/dist/scripts/contract/build-contract.d.ts +2 -1
  32. package/dist/scripts/contract/build-contract.js +13 -1
  33. package/dist/scripts/contract/constants-registry.d.ts +17 -0
  34. package/dist/scripts/contract/constants-registry.js +8 -2
  35. package/dist/scripts/contract/method-shapes.d.ts +4 -0
  36. package/dist/scripts/contract/method-shapes.js +4 -0
  37. package/dist/scripts/enforce-inference-versions.d.ts +1 -1
  38. package/dist/scripts/enforce-inference-versions.js +28 -18
  39. package/dist/scripts/generate-bare-kit-runtimes.js +101 -69
  40. package/dist/src/client/api/assess-model-fit.d.ts +17 -17
  41. package/dist/src/client/api/assess-model-fit.js +18 -31
  42. package/dist/src/client/api/audio-edit.d.ts +5 -3
  43. package/dist/src/client/api/audio-edit.js +5 -3
  44. package/dist/src/client/api/audio-gen-result.js +134 -45
  45. package/dist/src/client/api/audio-gen.d.ts +40 -3
  46. package/dist/src/client/api/audio-gen.js +40 -3
  47. package/dist/src/client/api/audio-understand.d.ts +2 -2
  48. package/dist/src/client/api/audio-understand.js +2 -2
  49. package/dist/src/client/api/batch-completion.js +2 -1
  50. package/dist/src/client/api/calc-tokens.d.ts +33 -0
  51. package/dist/src/client/api/calc-tokens.js +44 -0
  52. package/dist/src/client/api/cancel.d.ts +2 -2
  53. package/dist/src/client/api/cancel.js +2 -2
  54. package/dist/src/client/api/classify.d.ts +12 -5
  55. package/dist/src/client/api/classify.js +17 -5
  56. package/dist/src/client/api/client-request-id.d.ts +0 -15
  57. package/dist/src/client/api/client-request-id.js +15 -12
  58. package/dist/src/client/api/completion-stream.d.ts +8 -1
  59. package/dist/src/client/api/completion-stream.js +10 -1
  60. package/dist/src/client/api/delete-cache.d.ts +9 -2
  61. package/dist/src/client/api/delete-cache.js +13 -3
  62. package/dist/src/client/api/diffusion.d.ts +20 -4
  63. package/dist/src/client/api/diffusion.js +23 -5
  64. package/dist/src/client/api/embed.d.ts +82 -29
  65. package/dist/src/client/api/embed.js +64 -19
  66. package/dist/src/client/api/get-model-info.d.ts +2 -2
  67. package/dist/src/client/api/get-model-info.js +2 -2
  68. package/dist/src/client/api/get-system-resources.d.ts +2 -2
  69. package/dist/src/client/api/get-system-resources.js +2 -2
  70. package/dist/src/client/api/heartbeat.d.ts +3 -2
  71. package/dist/src/client/api/heartbeat.js +3 -2
  72. package/dist/src/client/api/index.d.ts +4 -3
  73. package/dist/src/client/api/index.js +2 -1
  74. package/dist/src/client/api/invoke-plugin.d.ts +8 -2
  75. package/dist/src/client/api/invoke-plugin.js +17 -2
  76. package/dist/src/client/api/load-model.js +5 -2
  77. package/dist/src/client/api/ocr.d.ts +5 -3
  78. package/dist/src/client/api/ocr.js +44 -21
  79. package/dist/src/client/api/rag.d.ts +1 -1
  80. package/dist/src/client/api/rag.js +1 -1
  81. package/dist/src/client/api/registry.d.ts +17 -7
  82. package/dist/src/client/api/registry.js +37 -12
  83. package/dist/src/client/api/resume.d.ts +2 -1
  84. package/dist/src/client/api/resume.js +2 -2
  85. package/dist/src/client/api/rpc-server.d.ts +4 -4
  86. package/dist/src/client/api/rpc-server.js +10 -10
  87. package/dist/src/client/api/state.d.ts +2 -2
  88. package/dist/src/client/api/state.js +2 -2
  89. package/dist/src/client/api/subscribe-logs.d.ts +2 -2
  90. package/dist/src/client/api/subscribe-logs.js +2 -2
  91. package/dist/src/client/api/suspend.d.ts +4 -2
  92. package/dist/src/client/api/suspend.js +4 -3
  93. package/dist/src/client/api/text-to-speech.d.ts +14 -5
  94. package/dist/src/client/api/text-to-speech.js +83 -29
  95. package/dist/src/client/api/transcribe.d.ts +6 -2
  96. package/dist/src/client/api/transcribe.js +7 -1
  97. package/dist/src/client/api/unload-model.d.ts +19 -7
  98. package/dist/src/client/api/unload-model.js +29 -11
  99. package/dist/src/client/api/upscale.d.ts +6 -3
  100. package/dist/src/client/api/upscale.js +9 -4
  101. package/dist/src/client/api/vector-index.d.ts +50 -16
  102. package/dist/src/client/api/vector-index.js +100 -48
  103. package/dist/src/client/api/video-request.d.ts +5 -5
  104. package/dist/src/client/api/video.d.ts +3 -2
  105. package/dist/src/client/api/video.js +3 -2
  106. package/dist/src/client/api/vla.d.ts +9 -5
  107. package/dist/src/client/api/vla.js +17 -8
  108. package/dist/src/client/api/world.d.ts +5 -5
  109. package/dist/src/client/api/world.js +4 -4
  110. package/dist/src/client/init-hooks.d.ts +6 -4
  111. package/dist/src/client/init-hooks.js +12 -15
  112. package/dist/src/client/logging-stream-registry.d.ts +6 -3
  113. package/dist/src/client/logging-stream-registry.js +31 -12
  114. package/dist/src/client/rpc/bundle-stamp.d.ts +29 -0
  115. package/dist/src/client/rpc/bundle-stamp.js +75 -0
  116. package/dist/src/client/rpc/expo-home-dir.d.ts +2 -0
  117. package/dist/src/client/rpc/expo-home-dir.js +4 -0
  118. package/dist/src/client/rpc/expo-rpc-client.js +189 -135
  119. package/dist/src/client/rpc/node-rpc-client.js +322 -413
  120. package/dist/src/client/rpc/pear-runtime.d.ts +12 -0
  121. package/dist/src/client/rpc/pear-runtime.js +12 -0
  122. package/dist/src/client/rpc/rpc-client.d.ts +5 -4
  123. package/dist/src/client/rpc/rpc-client.js +126 -23
  124. package/dist/src/client/rpc/rpc-error.js +21 -2
  125. package/dist/src/client/rpc/unbundled-harness.d.ts +16 -0
  126. package/dist/src/client/rpc/unbundled-harness.js +27 -0
  127. package/dist/src/client/rpc/worker-failure.d.ts +27 -0
  128. package/dist/src/client/rpc/worker-failure.js +61 -0
  129. package/dist/src/client/session-registry.d.ts +75 -0
  130. package/dist/src/client/session-registry.js +149 -0
  131. package/dist/src/client/session.d.ts +125 -0
  132. package/dist/src/client/session.js +148 -0
  133. package/dist/src/commands/bundle/addons.d.ts +14 -0
  134. package/dist/src/commands/bundle/addons.js +65 -0
  135. package/dist/src/commands/bundle/constants.js +1 -0
  136. package/dist/src/commands/bundle/entry-gen.d.ts +1 -5
  137. package/dist/src/commands/bundle/entry-gen.js +17 -50
  138. package/dist/src/commands/bundle/index.d.ts +59 -13
  139. package/dist/src/commands/bundle/index.js +345 -121
  140. package/dist/src/commands/bundle/link.d.ts +58 -0
  141. package/dist/src/commands/bundle/link.js +135 -0
  142. package/dist/src/commands/bundle/node-support.d.ts +13 -0
  143. package/dist/src/commands/bundle/node-support.js +23 -0
  144. package/dist/src/commands/bundle/read-bundle.d.ts +9 -0
  145. package/dist/src/commands/bundle/read-bundle.js +27 -0
  146. package/dist/src/commands/bundle/resolve-sdk-import.d.ts +6 -0
  147. package/dist/src/commands/bundle/resolve-sdk-import.js +24 -28
  148. package/dist/src/commands/bundle/scratch.d.ts +35 -0
  149. package/dist/src/commands/bundle/scratch.js +178 -0
  150. package/dist/src/commands/bundle/targets.d.ts +14 -0
  151. package/dist/src/commands/bundle/targets.js +37 -0
  152. package/dist/src/commands/host-prebuilds/index.d.ts +5 -4
  153. package/dist/src/commands/host-prebuilds/index.js +9 -7
  154. package/dist/src/commands/index.d.ts +4 -3
  155. package/dist/src/commands/verify/abi.d.ts +20 -14
  156. package/dist/src/commands/verify/abi.js +11 -79
  157. package/dist/src/commands/verify/bare-kit-runtime.d.ts +20 -22
  158. package/dist/src/commands/verify/bare-kit-runtime.js +102 -150
  159. package/dist/src/commands/verify/bare-kit-runtimes.d.ts +10 -9
  160. package/dist/src/commands/verify/bare-kit-runtimes.js +21 -21
  161. package/dist/src/commands/verify/bundle-source.js +25 -21
  162. package/dist/src/commands/verify/engines-advice.d.ts +2 -8
  163. package/dist/src/commands/verify/engines-advice.js +7 -54
  164. package/dist/src/commands/verify/index.d.ts +30 -29
  165. package/dist/src/commands/verify/index.js +92 -200
  166. package/dist/src/commands/verify/prebuilds.d.ts +3 -5
  167. package/dist/src/commands/verify/prebuilds.js +1 -2
  168. package/dist/src/commands/verify/resource-collectors.d.ts +0 -6
  169. package/dist/src/commands/verify/resource-collectors.js +1 -50
  170. package/dist/src/commands/verify/sidecar-runtime.d.ts +6 -0
  171. package/dist/src/commands/verify/sidecar-runtime.js +51 -0
  172. package/dist/src/expo/plugins/withBareKit.d.ts +59 -0
  173. package/dist/src/expo/plugins/withBareKit.js +204 -0
  174. package/dist/src/expo/plugins/withMobileBundle.d.ts +4 -11
  175. package/dist/src/expo/plugins/withMobileBundle.js +36 -57
  176. package/dist/src/expo/plugins/withQvacSDK.d.ts +1 -0
  177. package/dist/src/expo/plugins/withQvacSDK.js +3 -0
  178. package/dist/src/index.d.ts +6 -5
  179. package/dist/src/index.js +10 -14
  180. package/dist/src/logging/utils.js +10 -2
  181. package/dist/src/plugin-ids.d.ts +2 -1
  182. package/dist/src/plugin-ids.js +2 -0
  183. package/dist/src/schemas/public.d.ts +1 -1
  184. package/dist/src/schemas/public.js +1 -1
  185. package/dist/src/schemas/sdk-errors-client.d.ts +5 -6
  186. package/dist/src/schemas/sdk-errors-client.js +30 -36
  187. package/dist/src/schemas/sdk-errors-server.d.ts +11 -1
  188. package/dist/src/schemas/sdk-errors-server.js +60 -2
  189. package/dist/src/server/rpc/rpc-utils.d.ts +25 -4
  190. package/dist/src/server/rpc/rpc-utils.js +39 -5
  191. package/dist/src/utils/errors-client.d.ts +37 -29
  192. package/dist/src/utils/errors-client.js +50 -41
  193. package/dist/src/utils/errors-server.d.ts +59 -1
  194. package/dist/src/utils/errors-server.js +110 -1
  195. package/dist/src/utils/withTimeout.js +34 -17
  196. package/dist/src/worker/handle-request.js +25 -22
  197. package/dist/src/worker/handler-utils.d.ts +2 -6
  198. package/dist/src/worker/handler-utils.js +2 -20
  199. package/dist/src/worker/index.d.ts +2 -4
  200. package/dist/src/worker/index.js +23 -35
  201. package/dist/src/worker/plugins/ggml-image-embedding.d.ts +2 -0
  202. package/dist/src/worker/plugins/ggml-image-embedding.js +1 -0
  203. package/dist/src/worker/shim.d.ts +4 -0
  204. package/dist/src/worker/shim.js +7 -0
  205. package/dist/src/worker/start.d.ts +9 -0
  206. package/dist/src/worker/start.js +16 -0
  207. package/dist/src/worker/unbundled-shim.d.ts +2 -0
  208. package/dist/src/worker/unbundled-shim.js +4 -0
  209. package/docs/system-resources-support-matrix.md +27 -19
  210. package/package.json +62 -51
  211. package/src/electron-forge/index.cjs +65 -91
  212. package/dist/examples/model-fit-ui/server.d.ts +0 -24
  213. package/dist/examples/model-fit-ui/server.js +0 -221
  214. package/dist/src/client/rpc/ensure-worker-ready.d.ts +0 -9
  215. package/dist/src/client/rpc/ensure-worker-ready.js +0 -17
  216. package/dist/src/client/rpc/init-timeout.d.ts +0 -26
  217. package/dist/src/client/rpc/init-timeout.js +0 -25
  218. package/dist/src/client/rpc/ipc-socket-path.d.ts +0 -11
  219. package/dist/src/client/rpc/ipc-socket-path.js +0 -30
  220. package/dist/src/client/rpc/worker-startup-error.d.ts +0 -12
  221. package/dist/src/client/rpc/worker-startup-error.js +0 -13
  222. package/dist/src/commands/bundle/bare-pack.d.ts +0 -21
  223. package/dist/src/commands/bundle/bare-pack.js +0 -77
  224. package/dist/src/commands/bundle/manifest.d.ts +0 -25
  225. package/dist/src/commands/bundle/manifest.js +0 -192
  226. package/dist/src/expo/plugins/link-addons.d.ts +0 -18
  227. package/dist/src/expo/plugins/link-addons.js +0 -65
  228. package/dist/src/pear/pre.d.ts +0 -21
  229. package/dist/src/pear/pre.js +0 -450
  230. package/dist/src/server/env.d.ts +0 -22
  231. package/dist/src/server/env.js +0 -59
  232. package/dist/src/server/utils/qvac-paths.d.ts +0 -2
  233. package/dist/src/server/utils/qvac-paths.js +0 -5
  234. package/dist/src/server/utils/worker-lock.d.ts +0 -3
  235. package/dist/src/server/utils/worker-lock.js +0 -67
  236. package/dist/src/worker/create-server.d.ts +0 -8
  237. package/dist/src/worker/create-server.js +0 -51
  238. package/dist/src/worker/lifecycle.d.ts +0 -23
  239. package/dist/src/worker/lifecycle.js +0 -149
@@ -1,12 +1,8 @@
1
- /**
2
- * Default worker entry point that registers ALL built-in plugins.
3
- */
4
- import { initializeWorker, ensureRPCSetup } from '../worker/lifecycle.js';
5
- import { getServerLogger } from '../logging/index.js';
6
- import { registerPlugins } from '@qvac/inference/plugins';
1
+ import { startWorker } from '../worker/start.js';
7
2
  import { llmPlugin } from '@qvac/inference/llamacpp-completion/plugin';
8
3
  import { decisionPlugin } from '@qvac/inference/llamacpp-decision/plugin';
9
4
  import { rerankPlugin } from '@qvac/inference/llamacpp-rerank/plugin';
5
+ import { imageEmbeddingPlugin } from '@qvac/inference/ggml-image-embedding/plugin';
10
6
  import { embeddingsPlugin } from '@qvac/inference/llamacpp-embedding/plugin';
11
7
  import { whisperPlugin } from '@qvac/inference/whispercpp-transcription/plugin';
12
8
  import { bciPlugin } from '@qvac/inference/bci-whispercpp-transcription/plugin';
@@ -19,33 +15,25 @@ import { diffusionPlugin } from '@qvac/inference/sdcpp-generation/plugin';
19
15
  import { audioGenPlugin } from '@qvac/inference/audiogen-ggml/plugin';
20
16
  import { vlaPlugin } from '@qvac/inference/ggml-vla/plugin';
21
17
  import { classificationPlugin } from '@qvac/inference/ggml-classification/plugin';
22
- const { hasRPCConfig } = initializeWorker();
23
- const logger = getServerLogger();
24
- logger.info('🐻 Hello from Bare');
25
- registerPlugins([
26
- llmPlugin,
27
- embeddingsPlugin,
28
- decisionPlugin,
29
- rerankPlugin,
30
- whisperPlugin,
31
- bciPlugin,
32
- parakeetPlugin,
33
- mossTranscribePlugin,
34
- nmtPlugin,
35
- ttsPlugin,
36
- ocrPlugin,
37
- diffusionPlugin,
38
- audioGenPlugin,
39
- vlaPlugin,
40
- classificationPlugin
41
- ]);
42
- logger.info(hasRPCConfig
43
- ? 'Parsed RPC configuration from arguments'
44
- : 'Using default configuration (direct mode)');
45
- // Auto-setup RPC only if we successfully parsed RPC configuration
46
- if (hasRPCConfig) {
47
- ensureRPCSetup();
48
- }
49
- else {
50
- logger.info('Running in direct mode - RPC setup will be lazy');
18
+ export default function start(ipc, ready) {
19
+ return startWorker(ipc, ready, {
20
+ plugins: [
21
+ llmPlugin,
22
+ embeddingsPlugin,
23
+ imageEmbeddingPlugin,
24
+ decisionPlugin,
25
+ rerankPlugin,
26
+ whisperPlugin,
27
+ bciPlugin,
28
+ parakeetPlugin,
29
+ mossTranscribePlugin,
30
+ nmtPlugin,
31
+ ttsPlugin,
32
+ ocrPlugin,
33
+ diffusionPlugin,
34
+ audioGenPlugin,
35
+ vlaPlugin,
36
+ classificationPlugin
37
+ ]
38
+ });
51
39
  }
@@ -0,0 +1,2 @@
1
+ export * from '@qvac/inference/ggml-image-embedding/plugin';
2
+ //# sourceMappingURL=ggml-image-embedding.d.ts.map
@@ -0,0 +1 @@
1
+ export * from '@qvac/inference/ggml-image-embedding/plugin';
@@ -0,0 +1,4 @@
1
+ import type { Duplex } from 'bare-stream';
2
+ /** bare-stow's process runtime over `medium`, around the entry at `entryPath`. */
3
+ export declare function runEntry(medium: Duplex, entryPath: string): Promise<void>;
4
+ //# sourceMappingURL=shim.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { attach } from 'bare-stow-runtime/process';
2
+ import { pathToFileURL } from 'bare-url';
3
+ /** bare-stow's process runtime over `medium`, around the entry at `entryPath`. */
4
+ export function runEntry(medium, entryPath) {
5
+ const ipc = attach(medium);
6
+ return ipc.run(() => import(pathToFileURL(entryPath).href), ipc);
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { Duplex } from 'bare-stream';
2
+ import type { QvacPlugin, RpcServerProvider } from '@qvac/inference/surface';
3
+ export interface WorkerOptions {
4
+ plugins: readonly QvacPlugin[];
5
+ rpcServerProvider?: RpcServerProvider | undefined;
6
+ }
7
+ export type StopWorker = () => Promise<void>;
8
+ export declare function startWorker(ipc: Duplex, ready: () => void, options: WorkerOptions): StopWorker;
9
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { close as closeEngine } from '@qvac/inference/engine';
2
+ import { registerPlugins } from '@qvac/inference/plugins';
3
+ import { registerRpcServerProvider } from '@qvac/inference/rpc-server-provider';
4
+ import { handleRequest } from '../worker/handle-request.js';
5
+ import { createWorkerRpc } from '../server/rpc/rpc-utils.js';
6
+ import { getServerLogger } from '../logging/index.js';
7
+ const logger = getServerLogger();
8
+ export function startWorker(ipc, ready, options) {
9
+ registerPlugins(options.plugins);
10
+ if (options.rpcServerProvider)
11
+ registerRpcServerProvider(options.rpcServerProvider);
12
+ createWorkerRpc(ipc, handleRequest);
13
+ logger.info(`Worker ready with ${options.plugins.length} plugins`);
14
+ ready();
15
+ return closeEngine;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=unbundled-shim.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { runEntry } from '../worker/shim.js';
2
+ if (!Bare.IPC)
3
+ throw new Error('The unbundled worker runs under bare-sidecar, which opens Bare.IPC');
4
+ await runEntry(Bare.IPC, Bare.argv[2]);
@@ -59,25 +59,27 @@ native value does not establish one, rather than inventing a scope.
59
59
 
60
60
  ## Metric behavior
61
61
 
62
- | Public metric | Accepted value | Source and scope when `supported` | Current runtime evidence |
63
- | -------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------- |
64
- | `capabilities.cpu.value.logicalCores` | Positive integer | `bare-cpu-info`; scope omitted | `supported` on `darwin-arm64` |
65
- | `sample.cpu` | Number from 0 through 1 | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
66
- | `capabilities.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
67
- | `sample.memory.usedBytes` | Non-negative integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
68
- | `sample.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
69
- | `sample.memory.processUsedBytes` | Non-negative integer | `bare-os`; `process` | `supported` where `bare-os` reports RSS |
70
- | `sample.memory.processAvailableBytes` | Non-negative integer | `bare-os`; `process` | `supported` on `ios-arm64`; `unavailable` elsewhere |
71
- | `capabilities.gpus` | Array, including an empty array | `bare-gpu-info`; scope omitted | `supported` with one GPU on `darwin-arm64` |
72
- | `capabilities.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when not unified memory | `unverified` on `darwin-arm64` (unified) |
73
- | `sample.gpus` | Array aligned with the cached GPU inventory | `bare-gpu-info`; scope omitted | `supported` with one GPU sample on `darwin-arm64` |
74
- | `sample.gpus.value[].compute` | Number from 0 through 1 | `bare-gpu-info`; `device` | `supported` on `darwin-arm64` |
75
- | `sample.gpus.value[].encode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
76
- | `sample.gpus.value[].decode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
77
- | `sample.gpus.value[].memoryUsedBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
78
- | `sample.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
79
- | `sample.gpus.value[].powerWatts` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
80
- | `sample.gpus.value[].temperatureCelsius` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
62
+ | Public metric | Accepted value | Source and scope when `supported` | Current runtime evidence |
63
+ | ----------------------------------------------------- | ------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------- |
64
+ | `capabilities.cpu.value.logicalCores` | Positive integer | `bare-cpu-info`; scope omitted | `supported` on `darwin-arm64` |
65
+ | `sample.cpu` | Number from 0 through 1 | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
66
+ | `capabilities.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
67
+ | `sample.memory.usedBytes` | Non-negative integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
68
+ | `sample.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
69
+ | `sample.memory.processUsedBytes` | Non-negative integer | `bare-os`; `process` | `supported` where `bare-os` reports RSS |
70
+ | `sample.memory.processAvailableBytes` | Non-negative integer | `bare-os`; `process` | `supported` on `ios-arm64`; `unavailable` elsewhere |
71
+ | `capabilities.gpus` | Array, including an empty array | `bare-gpu-info`; scope omitted | `supported` with one GPU on `darwin-arm64` |
72
+ | `capabilities.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when not unified memory | `unverified` on `darwin-arm64` (unified) |
73
+ | `capabilities.gpus.value[].dedicatedMemoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device` | `supported` (0) on `darwin-arm64` |
74
+ | `sample.gpus` | Array aligned with the cached GPU inventory | `bare-gpu-info`; scope omitted | `supported` with one GPU sample on `darwin-arm64` |
75
+ | `sample.gpus.value[].compute` | Number from 0 through 1 | `bare-gpu-info`; `device` | `supported` on `darwin-arm64` |
76
+ | `sample.gpus.value[].encode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
77
+ | `sample.gpus.value[].decode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
78
+ | `sample.gpus.value[].memoryUsedBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
79
+ | `sample.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
80
+ | `sample.gpus.value[].dedicatedMemoryUsedBytes` | Non-negative number | `bare-gpu-info`; `device` on a unified-memory GPU, otherwise as `memoryUsedBytes` | `supported` (0) on `darwin-arm64` |
81
+ | `sample.gpus.value[].powerWatts` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
82
+ | `sample.gpus.value[].temperatureCelsius` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
81
83
 
82
84
  For GPU memory, a missing native value becomes `unavailable`. The native API
83
85
  does not identify the scope of a present value, so the SDK establishes it
@@ -101,6 +103,12 @@ itself, per device, and reports `unverified` wherever it cannot:
101
103
  Declared memory (`capabilities`) is therefore `supported` on any non-unified
102
104
  GPU, while the per-sample readings additionally require that agreement.
103
105
 
106
+ Dedicated memory is the exception to the unified-memory rule. An integrated
107
+ GPU's carve-out is reserved by the firmware and not counted as system RAM, so
108
+ `dedicatedMemoryTotalBytes` and its usage are `device`-scoped. Apple reports 0.
109
+ On a discrete GPU the fields repeat the declared memory and `memoryUsedBytes`,
110
+ under the same scope.
111
+
104
112
  ## Platform limitations
105
113
 
106
114
  - On Windows, the upstream CPU collector documents that per-core sampling covers
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/sdk",
3
- "version": "0.23.0",
4
- "qvacIpcAuthentication": "token-v1",
3
+ "version": "0.24.0",
5
4
  "license": "Apache-2.0",
6
5
  "repository": {
7
6
  "type": "git",
@@ -136,9 +135,13 @@
136
135
  "import": "./src/electron-forge/index.cjs",
137
136
  "default": "./src/electron-forge/index.cjs"
138
137
  },
139
- "./worker.mobile.bundle": "./dist/worker.mobile.bundle.js",
140
- "./worker-lifecycle": {
141
- "import": "./dist/src/worker/lifecycle.js"
138
+ "./worker.mobile": {
139
+ "types": "./dist/worker-mobile/index.d.ts",
140
+ "default": "./dist/worker-mobile/index.js"
141
+ },
142
+ "./worker": {
143
+ "types": "./dist/src/worker/start.d.ts",
144
+ "import": "./dist/src/worker/start.js"
142
145
  },
143
146
  "./plugins": {
144
147
  "import": "./dist/src/server/plugins/index.js"
@@ -155,7 +158,10 @@
155
158
  "import": "./dist/src/models/registry/index.js",
156
159
  "require": "./dist/src/models/registry/index.js"
157
160
  },
158
- "./pear-pre": "./dist/src/pear/pre.js",
161
+ "./pear": {
162
+ "types": "./dist/src/client/rpc/pear-runtime.d.ts",
163
+ "import": "./dist/src/client/rpc/pear-runtime.js"
164
+ },
159
165
  "./rpc-server-provider": {
160
166
  "types": "./dist/src/worker/rpc-server-provider.d.ts",
161
167
  "import": "./dist/src/worker/rpc-server-provider.js"
@@ -175,6 +181,10 @@
175
181
  "./llamacpp-rerank/plugin": {
176
182
  "types": "./dist/src/worker/plugins/llamacpp-rerank.d.ts",
177
183
  "import": "./dist/src/worker/plugins/llamacpp-rerank.js"
184
+ },
185
+ "./ggml-image-embedding/plugin": {
186
+ "types": "./dist/src/worker/plugins/ggml-image-embedding.d.ts",
187
+ "import": "./dist/src/worker/plugins/ggml-image-embedding.js"
178
188
  }
179
189
  },
180
190
  "imports": {
@@ -203,42 +213,43 @@
203
213
  "docs/system-resources-support-matrix.md"
204
214
  ],
205
215
  "dependencies": {
206
- "@qvac/asr-ggml": "^0.11.1",
207
- "@qvac/audiogen-ggml": "^0.9.0",
208
- "@qvac/bci-whispercpp": "^0.14.0",
209
- "@qvac/classification-ggml": "^0.34.0",
210
- "@qvac/decoder-audio": "^0.8.1",
211
- "@qvac/diffusion-cpp": "^0.31.0",
212
- "@qvac/embed-llamacpp": "^0.53.0",
216
+ "@qvac/asr-ggml": "^0.12.0",
217
+ "@qvac/audiogen-ggml": "^0.10.1",
218
+ "@qvac/bci-whispercpp": "^0.15.0",
219
+ "@qvac/classification-ggml": "^0.36.0",
220
+ "@qvac/decoder-audio": "^0.9.0",
221
+ "@qvac/diffusion-cpp": "^0.35.0",
222
+ "@qvac/embed-llamacpp": "^0.56.0",
213
223
  "@qvac/error": "^0.1.1",
214
- "@qvac/ggml-rpc-server": "^0.7.0",
215
- "@qvac/inference": "^0.23.0",
224
+ "@qvac/ggml-rpc-server": "^0.9.0",
225
+ "@qvac/inference": "^0.24.0",
216
226
  "@qvac/langdetect-text": "^0.1.2",
217
- "@qvac/llm-llamacpp": "^0.65.0",
227
+ "@qvac/llm-llamacpp": "^0.70.0",
218
228
  "@qvac/logging": "^0.1.0",
219
- "@qvac/ocr-ggml": "^0.31.0",
220
- "@qvac/translation-nmtcpp": "^0.23.0",
221
- "@qvac/tts-ggml": "^0.14.0",
222
- "@qvac/turbovec-ggml": "^0.3.0",
223
- "@qvac/vla-ggml": "^0.34.0",
229
+ "@qvac/ocr-ggml": "^0.33.0",
230
+ "@qvac/translation-nmtcpp": "^0.25.0",
231
+ "@qvac/tts-ggml": "^0.15.0",
232
+ "@qvac/turbovec-ggml": "^0.5.0",
233
+ "@qvac/vla-ggml": "^0.36.0",
224
234
  "bare-abort-controller": "^1.0.0",
225
- "bare-cpu-info": "0.1.1",
235
+ "bare-bundle": "^1.11.0",
236
+ "bare-cpu-info": "^0.1.1",
226
237
  "bare-crypto": "^1.15.0",
227
- "bare-env": "^3.0.0",
228
238
  "bare-events": "2.9.1",
229
- "bare-fs": "^4.5.1",
230
- "bare-gpu-info": "0.1.1",
231
- "bare-link": "^4.0.1",
232
- "bare-net": "^2.3.2",
239
+ "bare-fs": "^4.8.4",
240
+ "bare-gpu-info": "^0.1.3",
233
241
  "bare-os": "^3.6.2",
234
- "bare-pack": "^3.0.2",
235
242
  "bare-path": "^3.0.1",
236
- "bare-rpc": "^1.3.2",
237
- "bare-runtime": "^1.34.1",
238
- "bare-signals": "^5.0.0",
243
+ "bare-rpc": "^2.0.0",
244
+ "bare-sidecar": "^0.5.15",
245
+ "bare-stow": "0.3.6",
246
+ "bare-stow-host": "^0.2.0",
247
+ "bare-stow-runtime": "^0.1.1",
248
+ "bare-stow-target-react-native": "^0.3.0",
239
249
  "bare-stream": "2.13.3",
250
+ "bare-type": "1.4.0",
251
+ "bare-url": "^2.4.3",
240
252
  "bare-zlib": "^1.3.1",
241
- "compact-encoding": "^3.0.0",
242
253
  "corestore": "^7.4.5",
243
254
  "fast-safe-stringify": "2.1.1",
244
255
  "hyperdrive": "^13.0.1",
@@ -250,8 +261,8 @@
250
261
  "bare-buffer": "^3.4.2"
251
262
  },
252
263
  "devDependencies": {
253
- "@electron-forge/plugin-base": "^7.11.1",
254
- "@expo/config-plugins": "^54.0.4",
264
+ "@electron-forge/plugin-base": "^8.0.1",
265
+ "@expo/config-plugins": "~58.0.12",
255
266
  "bare-module": "^7.2.1",
256
267
  "@lancedb/lancedb": "^0.21.3",
257
268
  "@modelcontextprotocol/sdk": "^1.12.1",
@@ -264,40 +275,43 @@
264
275
  "ajv": "8.20.0",
265
276
  "bare-readline": "^1.2.0",
266
277
  "bare-stdio": "^1.0.2",
278
+ "bare-stow-target-pear-runtime": "^0.3.0",
267
279
  "bare-subprocess": "^6.1.0",
268
- "bare-url": "^2.4.3",
269
280
  "brittle": "^4.0.0",
270
281
  "chromadb": "^3.0.14",
271
282
  "events": "^3.3.0",
272
- "expo": "^54.0.33",
273
- "expo-device": "^8.0.10",
274
- "expo-file-system": "^19.0.21",
283
+ "expo": "^58.0.23",
284
+ "expo-device": "~58.0.5",
285
+ "expo-file-system": "~58.0.13",
286
+ "expo-modules-core": "~58.0.30",
275
287
  "husky": "^9.1.7",
276
288
  "lunte": "^1.8.4",
277
289
  "mongodb": "^7.5.0",
278
- "pear-pipe": "^1.0.6",
279
290
  "prettier": "^3.9.4",
280
291
  "prettier-config-holepunch": "^2.0.0",
281
- "react-native-bare-kit": "^0.16.0",
292
+ "react-native-bare-kit": "^0.17.1",
282
293
  "tsc-alias": "^1.8.17",
283
294
  "tsx": "4.23.1",
284
295
  "typescript": "^5.9.3",
285
296
  "@qvac/infer-base": "0.4.2"
286
297
  },
287
298
  "peerDependencies": {
288
- "@electron-forge/plugin-base": "^7.11.1",
289
- "expo-build-properties": ">=0.12.0",
290
- "expo-device": ">=8.0.0",
291
- "expo-file-system": ">=19.0.0",
292
- "expo-modules-core": ">=3.0.0",
293
- "pear-pipe": ">=1.0.0",
294
- "react-native-bare-kit": ">=0.16.0",
299
+ "@electron-forge/plugin-base": "^7.11.1 || ^8.0.0",
300
+ "bare-stow-target-pear-runtime": "^0.3.0",
301
+ "expo-build-properties": ">=58.0.0",
302
+ "expo-device": ">=58.0.0",
303
+ "expo-file-system": ">=58.0.0",
304
+ "expo-modules-core": ">=58.0.0",
305
+ "react-native-bare-kit": "^0.17.1",
295
306
  "tsx": "*"
296
307
  },
297
308
  "peerDependenciesMeta": {
298
309
  "@electron-forge/plugin-base": {
299
310
  "optional": true
300
311
  },
312
+ "bare-stow-target-pear-runtime": {
313
+ "optional": true
314
+ },
301
315
  "expo-build-properties": {
302
316
  "optional": true
303
317
  },
@@ -310,9 +324,6 @@
310
324
  "expo-modules-core": {
311
325
  "optional": true
312
326
  },
313
- "pear-pipe": {
314
- "optional": true
315
- },
316
327
  "react-native-bare-kit": {
317
328
  "optional": true
318
329
  },
@@ -325,7 +336,7 @@
325
336
  "shell-quote": "^1.10.0",
326
337
  "@electron/rebuild": "^4.2.0"
327
338
  },
328
- "gitHead": "4badf6ff1900bbf099b63792fe663a33cc0e6c82",
339
+ "gitHead": "1f559be4e208ee7e58e775bde4dd078263ca740c",
329
340
  "scripts": {
330
341
  "test:unit": "tsx scripts/run-unit-tests.ts",
331
342
  "format": "prettier --check .",