@qvac/sdk 0.11.0 → 0.12.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 (205) hide show
  1. package/NOTICE +1427 -39
  2. package/README.md +2 -0
  3. package/dist/client/api/classify.d.ts +23 -0
  4. package/dist/client/api/classify.js +43 -0
  5. package/dist/client/api/get-model-info.d.ts +1 -1
  6. package/dist/client/api/index.d.ts +4 -0
  7. package/dist/client/api/index.js +4 -0
  8. package/dist/client/api/load-model.js +24 -1
  9. package/dist/client/api/transcribe.d.ts +3 -0
  10. package/dist/client/api/transcribe.js +13 -2
  11. package/dist/client/api/video.d.ts +64 -0
  12. package/dist/client/api/video.js +147 -0
  13. package/dist/client/api/vla-helpers.d.ts +45 -0
  14. package/dist/client/api/vla-helpers.js +130 -0
  15. package/dist/client/api/vla.d.ts +65 -0
  16. package/dist/client/api/vla.js +109 -0
  17. package/dist/client/config-loader/resolve-config.node.d.ts +16 -0
  18. package/dist/client/config-loader/resolve-config.node.js +77 -23
  19. package/dist/client/plugins-factory.d.ts +8 -0
  20. package/dist/client/plugins-factory.js +10 -0
  21. package/dist/client/rpc/bare-client.js +62 -66
  22. package/dist/client/rpc/ensure-worker-ready.d.ts +9 -0
  23. package/dist/client/rpc/ensure-worker-ready.js +17 -0
  24. package/dist/client/rpc/node-rpc-client.js +4 -1
  25. package/dist/client/rpc/rpc-error.js +14 -1
  26. package/dist/commands/bundle/bare-pack.d.ts +13 -0
  27. package/dist/commands/bundle/bare-pack.js +54 -0
  28. package/dist/commands/bundle/constants.d.ts +7 -0
  29. package/dist/commands/bundle/constants.js +23 -0
  30. package/dist/commands/bundle/entry-gen.d.ts +2 -0
  31. package/dist/commands/bundle/entry-gen.js +48 -0
  32. package/dist/commands/bundle/index.d.ts +20 -0
  33. package/dist/commands/bundle/index.js +141 -0
  34. package/dist/commands/bundle/manifest.d.ts +21 -0
  35. package/dist/commands/bundle/manifest.js +193 -0
  36. package/dist/commands/bundle/plugins.d.ts +9 -0
  37. package/dist/commands/bundle/plugins.js +51 -0
  38. package/dist/commands/index.d.ts +5 -0
  39. package/dist/commands/index.js +2 -0
  40. package/dist/commands/verify/abi.d.ts +52 -0
  41. package/dist/commands/verify/abi.js +125 -0
  42. package/dist/commands/verify/addon-source.d.ts +43 -0
  43. package/dist/commands/verify/addon-source.js +75 -0
  44. package/dist/commands/verify/bundle-source.d.ts +12 -0
  45. package/dist/commands/verify/bundle-source.js +53 -0
  46. package/dist/commands/verify/index.d.ts +59 -0
  47. package/dist/commands/verify/index.js +371 -0
  48. package/dist/commands/verify/node-modules-source.d.ts +11 -0
  49. package/dist/commands/verify/node-modules-source.js +76 -0
  50. package/dist/commands/verify/prebuilds.d.ts +15 -0
  51. package/dist/commands/verify/prebuilds.js +39 -0
  52. package/dist/examples/classification/classify-image.d.ts +2 -0
  53. package/dist/examples/classification/classify-image.js +23 -0
  54. package/dist/examples/diffusion-txt2vid.d.ts +2 -0
  55. package/dist/examples/diffusion-txt2vid.js +81 -0
  56. package/dist/examples/plugins.js +3 -7
  57. package/dist/examples/tools/llamacpp-tools-gemma4.js +2 -5
  58. package/dist/examples/tools/llamacpp-tools-qwen35.js +2 -3
  59. package/dist/examples/transcription/parakeet-ctc-filesystem.js +18 -12
  60. package/dist/examples/transcription/parakeet-microphone-record.js +7 -12
  61. package/dist/examples/transcription/parakeet-microphone-stream.d.ts +2 -0
  62. package/dist/examples/transcription/parakeet-microphone-stream.js +79 -0
  63. package/dist/examples/transcription/parakeet-sortformer-streaming.d.ts +2 -0
  64. package/dist/examples/transcription/parakeet-sortformer-streaming.js +121 -0
  65. package/dist/examples/transcription/parakeet-sortformer.js +58 -55
  66. package/dist/examples/transcription/parakeet-tdt-filesystem.js +18 -15
  67. package/dist/examples/transcription/whispercpp-microphone-conversation.js +6 -1
  68. package/dist/examples/tts/chatterbox.js +7 -16
  69. package/dist/examples/tts/llm-to-tts-streaming.js +3 -10
  70. package/dist/examples/tts/supertonic-multilingual.js +4 -12
  71. package/dist/examples/tts/supertonic.js +5 -12
  72. package/dist/examples/vla-smolvla.d.ts +2 -0
  73. package/dist/examples/vla-smolvla.js +75 -0
  74. package/dist/examples/voice-assistant/voice-assistant.js +3 -10
  75. package/dist/expo/plugins/find-in-ancestor-node-modules.d.ts +14 -0
  76. package/dist/expo/plugins/find-in-ancestor-node-modules.js +24 -0
  77. package/dist/expo/plugins/get-project-root.d.ts +22 -0
  78. package/dist/expo/plugins/get-project-root.js +23 -0
  79. package/dist/expo/plugins/index.d.ts +4 -0
  80. package/dist/expo/plugins/index.js +4 -0
  81. package/dist/expo/plugins/resolve-sdk-package-dir.d.ts +9 -2
  82. package/dist/expo/plugins/resolve-sdk-package-dir.js +38 -11
  83. package/dist/expo/plugins/withDeviceInfo.js +2 -1
  84. package/dist/expo/plugins/withMobileBundle.d.ts +2 -17
  85. package/dist/expo/plugins/withMobileBundle.js +31 -85
  86. package/dist/index.d.ts +4 -3
  87. package/dist/index.js +4 -3
  88. package/dist/models/registry/models.d.ts +3711 -368
  89. package/dist/models/registry/models.js +7066 -3562
  90. package/dist/models/update-models/naming.js +22 -8
  91. package/dist/pear/pre.js +6 -2
  92. package/dist/schemas/cancel.d.ts +5 -0
  93. package/dist/schemas/cancel.js +1 -0
  94. package/dist/schemas/classification.d.ts +53 -0
  95. package/dist/schemas/classification.js +33 -0
  96. package/dist/schemas/common.d.ts +1001 -1739
  97. package/dist/schemas/common.js +6 -1
  98. package/dist/schemas/completion-event.d.ts +3 -0
  99. package/dist/schemas/completion-event.js +1 -0
  100. package/dist/schemas/completion-stream.d.ts +1 -0
  101. package/dist/schemas/download-asset.d.ts +13 -3
  102. package/dist/schemas/engine-addon-map.d.ts +3 -0
  103. package/dist/schemas/engine-addon-map.js +18 -5
  104. package/dist/schemas/get-model-info.d.ts +4 -0
  105. package/dist/schemas/get-model-info.js +2 -0
  106. package/dist/schemas/index.d.ts +3 -0
  107. package/dist/schemas/index.js +3 -0
  108. package/dist/schemas/llamacpp-config.d.ts +12 -2
  109. package/dist/schemas/load-model.d.ts +6152 -10764
  110. package/dist/schemas/load-model.js +75 -7
  111. package/dist/schemas/model-src-utils.d.ts +22 -2
  112. package/dist/schemas/model-types.d.ts +46 -6
  113. package/dist/schemas/model-types.js +28 -5
  114. package/dist/schemas/ocr.d.ts +5 -0
  115. package/dist/schemas/plugin.d.ts +20 -5
  116. package/dist/schemas/plugin.js +21 -4
  117. package/dist/schemas/registry.d.ts +44 -0
  118. package/dist/schemas/registry.js +5 -0
  119. package/dist/schemas/reload-config.d.ts +22 -2
  120. package/dist/schemas/sdcpp-config.d.ts +316 -1
  121. package/dist/schemas/sdcpp-config.js +232 -33
  122. package/dist/schemas/sdk-config.d.ts +654 -1324
  123. package/dist/schemas/sdk-config.js +16 -1
  124. package/dist/schemas/sdk-errors-client.d.ts +5 -0
  125. package/dist/schemas/sdk-errors-client.js +26 -1
  126. package/dist/schemas/sdk-errors-server.d.ts +3 -1
  127. package/dist/schemas/sdk-errors-server.js +20 -5
  128. package/dist/schemas/text-to-speech.d.ts +79 -696
  129. package/dist/schemas/text-to-speech.js +46 -19
  130. package/dist/schemas/transcription-config.d.ts +37 -226
  131. package/dist/schemas/transcription-config.js +76 -15
  132. package/dist/schemas/transcription.d.ts +63 -11
  133. package/dist/schemas/transcription.js +56 -2
  134. package/dist/schemas/translation-config.d.ts +60 -10
  135. package/dist/schemas/vla.d.ts +87 -0
  136. package/dist/schemas/vla.js +108 -0
  137. package/dist/scripts/run-unit-tests.js +8 -2
  138. package/dist/server/bare/ops/transcribe.d.ts +2 -1
  139. package/dist/server/bare/ops/transcribe.js +59 -34
  140. package/dist/server/bare/plugins/ggml-classification/ops/classify.d.ts +6 -0
  141. package/dist/server/bare/plugins/ggml-classification/ops/classify.js +30 -0
  142. package/dist/server/bare/plugins/ggml-classification/plugin.d.ts +32 -0
  143. package/dist/server/bare/plugins/ggml-classification/plugin.js +55 -0
  144. package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.d.ts +3 -0
  145. package/dist/server/bare/plugins/ggml-vla/ops/vla-hparams.js +12 -0
  146. package/dist/server/bare/plugins/ggml-vla/ops/vla-run.d.ts +3 -0
  147. package/dist/server/bare/plugins/ggml-vla/ops/vla-run.js +75 -0
  148. package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +54 -0
  149. package/dist/server/bare/plugins/ggml-vla/plugin.js +57 -0
  150. package/dist/server/bare/plugins/index.d.ts +3 -1
  151. package/dist/server/bare/plugins/index.js +3 -1
  152. package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +3 -0
  153. package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.d.ts +29 -0
  154. package/dist/server/bare/plugins/llamacpp-completion/ops/context-overflow.js +65 -0
  155. package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +6 -0
  156. package/dist/server/bare/plugins/llamacpp-completion/plugin.js +26 -0
  157. package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +25 -0
  158. package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +5 -0
  159. package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +67 -246
  160. package/dist/server/bare/plugins/parakeet-transcription/plugin.js +66 -97
  161. package/dist/server/bare/plugins/sdcpp-generation/ops/video.d.ts +3 -0
  162. package/dist/server/bare/plugins/sdcpp-generation/ops/video.js +199 -0
  163. package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +200 -2
  164. package/dist/server/bare/plugins/sdcpp-generation/plugin.js +61 -8
  165. package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech-stream.js +2 -15
  166. package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech.js +2 -1
  167. package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +75 -0
  168. package/dist/server/bare/plugins/tts-ggml/plugin.js +189 -0
  169. package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +29 -4
  170. package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +12 -1
  171. package/dist/server/bare/registry/model-config-utils.js +7 -0
  172. package/dist/server/bare/runtime/request-context.d.ts +1 -1
  173. package/dist/server/bare/runtime-lifecycle.js +9 -9
  174. package/dist/server/bare/types/addon-responses.d.ts +1 -0
  175. package/dist/server/env.js +4 -1
  176. package/dist/server/plugins/index.d.ts +1 -1
  177. package/dist/server/plugins/index.js +1 -1
  178. package/dist/server/plugins/registry.d.ts +1 -0
  179. package/dist/server/plugins/registry.js +5 -0
  180. package/dist/server/rpc/handler-registry.js +4 -0
  181. package/dist/server/rpc/handler-selection.d.ts +9 -0
  182. package/dist/server/rpc/handler-selection.js +14 -0
  183. package/dist/server/rpc/handler-utils.js +5 -13
  184. package/dist/server/rpc/handlers/classify.d.ts +3 -0
  185. package/dist/server/rpc/handlers/classify.js +4 -0
  186. package/dist/server/rpc/handlers/index.d.ts +2 -0
  187. package/dist/server/rpc/handlers/index.js +2 -0
  188. package/dist/server/rpc/handlers/load-model/handler.js +4 -1
  189. package/dist/server/rpc/handlers/load-model/resolve.js +9 -0
  190. package/dist/server/rpc/handlers/video-stream.d.ts +3 -0
  191. package/dist/server/rpc/handlers/video-stream.js +4 -0
  192. package/dist/server/rpc/profiling/operation-metrics.js +23 -0
  193. package/dist/server/utils/config-transform.js +1 -1
  194. package/dist/server/worker.js +14 -11
  195. package/dist/utils/errors-client.d.ts +15 -0
  196. package/dist/utils/errors-client.js +26 -0
  197. package/dist/utils/errors-server.d.ts +30 -2
  198. package/dist/utils/errors-server.js +51 -3
  199. package/package.json +66 -80
  200. package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +0 -490
  201. package/dist/server/bare/plugins/onnx-tts/plugin.js +0 -272
  202. package/dist/server/bare/plugins/onnx-tts/wav-helper.d.ts +0 -14
  203. package/dist/server/bare/plugins/onnx-tts/wav-helper.js +0 -107
  204. /package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech-stream.d.ts +0 -0
  205. /package/dist/server/bare/plugins/{onnx-tts → tts-ggml}/ops/text-to-speech.d.ts +0 -0
@@ -11,6 +11,11 @@ export const audioInputSchema = z.discriminatedUnion("type", [
11
11
  ]);
12
12
  const transcribeBaseSchema = z.object({
13
13
  modelId: z.string(),
14
+ /**
15
+ * Initial transcription prompt. Whisper engine only — silently
16
+ * ignored by the parakeet engine, which has no equivalent prompting
17
+ * surface in `qvac-parakeet.cpp`.
18
+ */
14
19
  prompt: z.string().optional(),
15
20
  metadata: z.boolean().optional(),
16
21
  });
@@ -40,9 +45,33 @@ export const vadStateEventSchema = z.object({
40
45
  speaking: z.boolean(),
41
46
  probability: z.number(),
42
47
  });
43
- export const endOfTurnEventSchema = z.object({
48
+ export const whisperEndOfTurnEventSchema = z.object({
49
+ source: z.literal("whisper"),
44
50
  silenceDurationMs: z.number(),
45
51
  });
52
+ export const parakeetEndOfTurnEventSchema = z.object({
53
+ source: z.literal("parakeet"),
54
+ });
55
+ const endOfTurnDiscriminatedSchema = z.discriminatedUnion("source", [
56
+ whisperEndOfTurnEventSchema,
57
+ parakeetEndOfTurnEventSchema,
58
+ ]);
59
+ /** Legacy whisper wire frames omitted `source` and only sent `silenceDurationMs`. */
60
+ function normalizeEndOfTurnWire(value) {
61
+ if (typeof value === "object" &&
62
+ value !== null &&
63
+ !("source" in value) &&
64
+ typeof value.silenceDurationMs ===
65
+ "number") {
66
+ return {
67
+ source: "whisper",
68
+ silenceDurationMs: value
69
+ .silenceDurationMs,
70
+ };
71
+ }
72
+ return value;
73
+ }
74
+ export const endOfTurnEventSchema = z.preprocess(normalizeEndOfTurnWire, endOfTurnDiscriminatedSchema);
46
75
  export const transcribeRequestSchema = transcribeParamsSchema.extend({
47
76
  type: z.literal("transcribe"),
48
77
  requestId: z
@@ -63,6 +92,30 @@ const transcriptionResultBase = z.object({
63
92
  export const transcribeResponseSchema = transcriptionResultBase.extend({
64
93
  type: z.literal("transcribe"),
65
94
  });
95
+ /**
96
+ * Per-call overrides for parakeet's duplex streaming session.
97
+ *
98
+ * Each field maps to its `streaming*`-prefixed counterpart in
99
+ * `parakeetConfig` (see `parakeetRuntimeConfigSchema`). The `streaming`
100
+ * prefix is intentionally dropped here because every field on this
101
+ * object is already namespaced under the `parakeetStreamingConfig`
102
+ * field of `transcribeStream({ ... })`. Any field omitted falls back
103
+ * to the load-time value.
104
+ */
105
+ export const parakeetStreamingRunConfigSchema = z.object({
106
+ chunkMs: z.number().int().positive().optional(),
107
+ historyMs: z.number().int().positive().optional(),
108
+ leftContextMs: z.number().int().nonnegative().optional(),
109
+ rightLookaheadMs: z.number().int().nonnegative().optional(),
110
+ emitPartials: z.boolean().optional(),
111
+ emitEnergyVad: z.boolean().optional(),
112
+ spkCacheEnable: z.boolean().optional(),
113
+ spkCacheLen: z.number().int().positive().optional(),
114
+ fifoLen: z.number().int().positive().optional(),
115
+ chunkLeftContextMs: z.number().int().nonnegative().optional(),
116
+ chunkRightContextMs: z.number().int().nonnegative().optional(),
117
+ spkCacheUpdatePeriod: z.number().int().positive().optional(),
118
+ });
66
119
  export const transcribeStreamRequestSchema = transcribeBaseSchema.extend({
67
120
  type: z.literal("transcribeStream"),
68
121
  emitVadEvents: z.boolean().optional(),
@@ -71,8 +124,9 @@ export const transcribeStreamRequestSchema = transcribeBaseSchema.extend({
71
124
  .int()
72
125
  .nonnegative()
73
126
  .optional()
74
- .describe("Silence (ms) before an endOfTurn event fires. 0 or unset disables end-of-turn detection entirely."),
127
+ .describe("Silence (ms) before an endOfTurn event fires. 0 or unset disables end-of-turn detection entirely. Whisper engine only."),
75
128
  vadRunIntervalMs: z.number().int().positive().optional(),
129
+ parakeetStreamingConfig: parakeetStreamingRunConfigSchema.optional(),
76
130
  requestId: z
77
131
  .string()
78
132
  .min(1)
@@ -144,18 +144,23 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
144
144
  diffusion: "diffusion";
145
145
  tts: "tts";
146
146
  ocr: "ocr";
147
+ vla: "vla";
147
148
  "llamacpp-completion": "llamacpp-completion";
148
149
  "whispercpp-transcription": "whispercpp-transcription";
149
150
  "llamacpp-embedding": "llamacpp-embedding";
150
151
  "nmtcpp-translation": "nmtcpp-translation";
151
152
  "onnx-tts": "onnx-tts";
153
+ "tts-ggml": "tts-ggml";
152
154
  "parakeet-transcription": "parakeet-transcription";
153
155
  "onnx-ocr": "onnx-ocr";
154
156
  "sdcpp-generation": "sdcpp-generation";
157
+ "ggml-vla": "ggml-vla";
158
+ "ggml-classification": "ggml-classification";
155
159
  llm: "llm";
156
160
  whisper: "whisper";
157
161
  nmt: "nmt";
158
162
  parakeet: "parakeet";
163
+ classification: "classification";
159
164
  }>, z.ZodLiteral<"vad">]>>;
160
165
  }, z.core.$strip>]>>;
161
166
  dstVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -174,18 +179,23 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
174
179
  diffusion: "diffusion";
175
180
  tts: "tts";
176
181
  ocr: "ocr";
182
+ vla: "vla";
177
183
  "llamacpp-completion": "llamacpp-completion";
178
184
  "whispercpp-transcription": "whispercpp-transcription";
179
185
  "llamacpp-embedding": "llamacpp-embedding";
180
186
  "nmtcpp-translation": "nmtcpp-translation";
181
187
  "onnx-tts": "onnx-tts";
188
+ "tts-ggml": "tts-ggml";
182
189
  "parakeet-transcription": "parakeet-transcription";
183
190
  "onnx-ocr": "onnx-ocr";
184
191
  "sdcpp-generation": "sdcpp-generation";
192
+ "ggml-vla": "ggml-vla";
193
+ "ggml-classification": "ggml-classification";
185
194
  llm: "llm";
186
195
  whisper: "whisper";
187
196
  nmt: "nmt";
188
197
  parakeet: "parakeet";
198
+ classification: "classification";
189
199
  }>, z.ZodLiteral<"vad">]>>;
190
200
  }, z.core.$strip>]>>;
191
201
  normalize: z.ZodOptional<z.ZodNumber>;
@@ -217,18 +227,23 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
217
227
  diffusion: "diffusion";
218
228
  tts: "tts";
219
229
  ocr: "ocr";
230
+ vla: "vla";
220
231
  "llamacpp-completion": "llamacpp-completion";
221
232
  "whispercpp-transcription": "whispercpp-transcription";
222
233
  "llamacpp-embedding": "llamacpp-embedding";
223
234
  "nmtcpp-translation": "nmtcpp-translation";
224
235
  "onnx-tts": "onnx-tts";
236
+ "tts-ggml": "tts-ggml";
225
237
  "parakeet-transcription": "parakeet-transcription";
226
238
  "onnx-ocr": "onnx-ocr";
227
239
  "sdcpp-generation": "sdcpp-generation";
240
+ "ggml-vla": "ggml-vla";
241
+ "ggml-classification": "ggml-classification";
228
242
  llm: "llm";
229
243
  whisper: "whisper";
230
244
  nmt: "nmt";
231
245
  parakeet: "parakeet";
246
+ classification: "classification";
232
247
  }>, z.ZodLiteral<"vad">]>>;
233
248
  }, z.core.$strip>]>;
234
249
  srcVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -247,18 +262,23 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
247
262
  diffusion: "diffusion";
248
263
  tts: "tts";
249
264
  ocr: "ocr";
265
+ vla: "vla";
250
266
  "llamacpp-completion": "llamacpp-completion";
251
267
  "whispercpp-transcription": "whispercpp-transcription";
252
268
  "llamacpp-embedding": "llamacpp-embedding";
253
269
  "nmtcpp-translation": "nmtcpp-translation";
254
270
  "onnx-tts": "onnx-tts";
271
+ "tts-ggml": "tts-ggml";
255
272
  "parakeet-transcription": "parakeet-transcription";
256
273
  "onnx-ocr": "onnx-ocr";
257
274
  "sdcpp-generation": "sdcpp-generation";
275
+ "ggml-vla": "ggml-vla";
276
+ "ggml-classification": "ggml-classification";
258
277
  llm: "llm";
259
278
  whisper: "whisper";
260
279
  nmt: "nmt";
261
280
  parakeet: "parakeet";
281
+ classification: "classification";
262
282
  }>, z.ZodLiteral<"vad">]>>;
263
283
  }, z.core.$strip>]>>;
264
284
  dstVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -277,18 +297,23 @@ export declare const nmtConfigBaseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
277
297
  diffusion: "diffusion";
278
298
  tts: "tts";
279
299
  ocr: "ocr";
300
+ vla: "vla";
280
301
  "llamacpp-completion": "llamacpp-completion";
281
302
  "whispercpp-transcription": "whispercpp-transcription";
282
303
  "llamacpp-embedding": "llamacpp-embedding";
283
304
  "nmtcpp-translation": "nmtcpp-translation";
284
305
  "onnx-tts": "onnx-tts";
306
+ "tts-ggml": "tts-ggml";
285
307
  "parakeet-transcription": "parakeet-transcription";
286
308
  "onnx-ocr": "onnx-ocr";
287
309
  "sdcpp-generation": "sdcpp-generation";
310
+ "ggml-vla": "ggml-vla";
311
+ "ggml-classification": "ggml-classification";
288
312
  llm: "llm";
289
313
  whisper: "whisper";
290
314
  nmt: "nmt";
291
315
  parakeet: "parakeet";
316
+ classification: "classification";
292
317
  }>, z.ZodLiteral<"vad">]>>;
293
318
  }, z.core.$strip>]>>;
294
319
  normalize: z.ZodOptional<z.ZodNumber>;
@@ -500,18 +525,23 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
500
525
  diffusion: "diffusion";
501
526
  tts: "tts";
502
527
  ocr: "ocr";
528
+ vla: "vla";
503
529
  "llamacpp-completion": "llamacpp-completion";
504
530
  "whispercpp-transcription": "whispercpp-transcription";
505
531
  "llamacpp-embedding": "llamacpp-embedding";
506
532
  "nmtcpp-translation": "nmtcpp-translation";
507
533
  "onnx-tts": "onnx-tts";
534
+ "tts-ggml": "tts-ggml";
508
535
  "parakeet-transcription": "parakeet-transcription";
509
536
  "onnx-ocr": "onnx-ocr";
510
537
  "sdcpp-generation": "sdcpp-generation";
538
+ "ggml-vla": "ggml-vla";
539
+ "ggml-classification": "ggml-classification";
511
540
  llm: "llm";
512
541
  whisper: "whisper";
513
542
  nmt: "nmt";
514
543
  parakeet: "parakeet";
544
+ classification: "classification";
515
545
  }>, z.ZodLiteral<"vad">]>>;
516
546
  }, z.core.$strip>]>>;
517
547
  dstVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -530,18 +560,23 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
530
560
  diffusion: "diffusion";
531
561
  tts: "tts";
532
562
  ocr: "ocr";
563
+ vla: "vla";
533
564
  "llamacpp-completion": "llamacpp-completion";
534
565
  "whispercpp-transcription": "whispercpp-transcription";
535
566
  "llamacpp-embedding": "llamacpp-embedding";
536
567
  "nmtcpp-translation": "nmtcpp-translation";
537
568
  "onnx-tts": "onnx-tts";
569
+ "tts-ggml": "tts-ggml";
538
570
  "parakeet-transcription": "parakeet-transcription";
539
571
  "onnx-ocr": "onnx-ocr";
540
572
  "sdcpp-generation": "sdcpp-generation";
573
+ "ggml-vla": "ggml-vla";
574
+ "ggml-classification": "ggml-classification";
541
575
  llm: "llm";
542
576
  whisper: "whisper";
543
577
  nmt: "nmt";
544
578
  parakeet: "parakeet";
579
+ classification: "classification";
545
580
  }>, z.ZodLiteral<"vad">]>>;
546
581
  }, z.core.$strip>]>>;
547
582
  normalize: z.ZodOptional<z.ZodNumber>;
@@ -573,18 +608,23 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
573
608
  diffusion: "diffusion";
574
609
  tts: "tts";
575
610
  ocr: "ocr";
611
+ vla: "vla";
576
612
  "llamacpp-completion": "llamacpp-completion";
577
613
  "whispercpp-transcription": "whispercpp-transcription";
578
614
  "llamacpp-embedding": "llamacpp-embedding";
579
615
  "nmtcpp-translation": "nmtcpp-translation";
580
616
  "onnx-tts": "onnx-tts";
617
+ "tts-ggml": "tts-ggml";
581
618
  "parakeet-transcription": "parakeet-transcription";
582
619
  "onnx-ocr": "onnx-ocr";
583
620
  "sdcpp-generation": "sdcpp-generation";
621
+ "ggml-vla": "ggml-vla";
622
+ "ggml-classification": "ggml-classification";
584
623
  llm: "llm";
585
624
  whisper: "whisper";
586
625
  nmt: "nmt";
587
626
  parakeet: "parakeet";
627
+ classification: "classification";
588
628
  }>, z.ZodLiteral<"vad">]>>;
589
629
  }, z.core.$strip>]>;
590
630
  srcVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -603,18 +643,23 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
603
643
  diffusion: "diffusion";
604
644
  tts: "tts";
605
645
  ocr: "ocr";
646
+ vla: "vla";
606
647
  "llamacpp-completion": "llamacpp-completion";
607
648
  "whispercpp-transcription": "whispercpp-transcription";
608
649
  "llamacpp-embedding": "llamacpp-embedding";
609
650
  "nmtcpp-translation": "nmtcpp-translation";
610
651
  "onnx-tts": "onnx-tts";
652
+ "tts-ggml": "tts-ggml";
611
653
  "parakeet-transcription": "parakeet-transcription";
612
654
  "onnx-ocr": "onnx-ocr";
613
655
  "sdcpp-generation": "sdcpp-generation";
656
+ "ggml-vla": "ggml-vla";
657
+ "ggml-classification": "ggml-classification";
614
658
  llm: "llm";
615
659
  whisper: "whisper";
616
660
  nmt: "nmt";
617
661
  parakeet: "parakeet";
662
+ classification: "classification";
618
663
  }>, z.ZodLiteral<"vad">]>>;
619
664
  }, z.core.$strip>]>>;
620
665
  dstVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -633,18 +678,23 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
633
678
  diffusion: "diffusion";
634
679
  tts: "tts";
635
680
  ocr: "ocr";
681
+ vla: "vla";
636
682
  "llamacpp-completion": "llamacpp-completion";
637
683
  "whispercpp-transcription": "whispercpp-transcription";
638
684
  "llamacpp-embedding": "llamacpp-embedding";
639
685
  "nmtcpp-translation": "nmtcpp-translation";
640
686
  "onnx-tts": "onnx-tts";
687
+ "tts-ggml": "tts-ggml";
641
688
  "parakeet-transcription": "parakeet-transcription";
642
689
  "onnx-ocr": "onnx-ocr";
643
690
  "sdcpp-generation": "sdcpp-generation";
691
+ "ggml-vla": "ggml-vla";
692
+ "ggml-classification": "ggml-classification";
644
693
  llm: "llm";
645
694
  whisper: "whisper";
646
695
  nmt: "nmt";
647
696
  parakeet: "parakeet";
697
+ classification: "classification";
648
698
  }>, z.ZodLiteral<"vad">]>>;
649
699
  }, z.core.$strip>]>>;
650
700
  normalize: z.ZodOptional<z.ZodNumber>;
@@ -742,7 +792,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
742
792
  engine?: string | undefined;
743
793
  expectedSize?: number | undefined;
744
794
  sha256Checksum?: string | undefined;
745
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
795
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
746
796
  } | undefined;
747
797
  dstVocabSrc?: string | {
748
798
  src: string;
@@ -755,7 +805,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
755
805
  engine?: string | undefined;
756
806
  expectedSize?: number | undefined;
757
807
  sha256Checksum?: string | undefined;
758
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
808
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
759
809
  } | undefined;
760
810
  normalize?: number | undefined;
761
811
  pivotModel?: {
@@ -770,7 +820,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
770
820
  engine?: string | undefined;
771
821
  expectedSize?: number | undefined;
772
822
  sha256Checksum?: string | undefined;
773
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
823
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
774
824
  };
775
825
  mode?: "full" | undefined;
776
826
  beamsize?: number | undefined;
@@ -792,7 +842,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
792
842
  engine?: string | undefined;
793
843
  expectedSize?: number | undefined;
794
844
  sha256Checksum?: string | undefined;
795
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
845
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
796
846
  } | undefined;
797
847
  dstVocabSrc?: string | {
798
848
  src: string;
@@ -805,7 +855,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
805
855
  engine?: string | undefined;
806
856
  expectedSize?: number | undefined;
807
857
  sha256Checksum?: string | undefined;
808
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
858
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
809
859
  } | undefined;
810
860
  normalize?: number | undefined;
811
861
  } | undefined;
@@ -846,7 +896,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
846
896
  engine?: string | undefined;
847
897
  expectedSize?: number | undefined;
848
898
  sha256Checksum?: string | undefined;
849
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
899
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
850
900
  } | undefined;
851
901
  dstVocabSrc?: string | {
852
902
  src: string;
@@ -859,7 +909,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
859
909
  engine?: string | undefined;
860
910
  expectedSize?: number | undefined;
861
911
  sha256Checksum?: string | undefined;
862
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
912
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
863
913
  } | undefined;
864
914
  normalize?: number | undefined;
865
915
  pivotModel?: {
@@ -874,7 +924,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
874
924
  engine?: string | undefined;
875
925
  expectedSize?: number | undefined;
876
926
  sha256Checksum?: string | undefined;
877
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
927
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
878
928
  };
879
929
  mode?: "full" | undefined;
880
930
  beamsize?: number | undefined;
@@ -896,7 +946,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
896
946
  engine?: string | undefined;
897
947
  expectedSize?: number | undefined;
898
948
  sha256Checksum?: string | undefined;
899
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
949
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
900
950
  } | undefined;
901
951
  dstVocabSrc?: string | {
902
952
  src: string;
@@ -909,7 +959,7 @@ export declare const nmtConfigSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodOb
909
959
  engine?: string | undefined;
910
960
  expectedSize?: number | undefined;
911
961
  sha256Checksum?: string | undefined;
912
- addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "nmt" | "parakeet" | "vad" | undefined;
962
+ addon?: "embeddings" | "diffusion" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
913
963
  } | undefined;
914
964
  normalize?: number | undefined;
915
965
  } | undefined;
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ export declare const vlaConfigSchema: z.ZodObject<{
3
+ backend: z.ZodOptional<z.ZodEnum<{
4
+ cpu: "cpu";
5
+ auto: "auto";
6
+ }>>;
7
+ verbosity: z.ZodOptional<z.ZodNumber>;
8
+ }, z.core.$strip>;
9
+ export type VlaConfig = z.input<typeof vlaConfigSchema>;
10
+ export declare const vlaHparamsSchema: z.ZodObject<{
11
+ chunkSize: z.ZodNumber;
12
+ actionDim: z.ZodNumber;
13
+ maxActionDim: z.ZodNumber;
14
+ maxStateDim: z.ZodNumber;
15
+ tokenizerMaxLength: z.ZodNumber;
16
+ visionImageSize: z.ZodNumber;
17
+ }, z.core.$strip>;
18
+ export type VlaHparams = z.infer<typeof vlaHparamsSchema>;
19
+ export declare const vlaStatsSchema: z.ZodObject<{
20
+ vision_ms: z.ZodOptional<z.ZodNumber>;
21
+ smollm2_compute_ms: z.ZodOptional<z.ZodNumber>;
22
+ smollm2_total_ms: z.ZodOptional<z.ZodNumber>;
23
+ ode_ms: z.ZodOptional<z.ZodNumber>;
24
+ total_ms: z.ZodOptional<z.ZodNumber>;
25
+ backendDevice: z.ZodOptional<z.ZodNumber>;
26
+ }, z.core.$strip>;
27
+ export type VlaStats = z.infer<typeof vlaStatsSchema>;
28
+ export declare const vlaRunRequestSchema: z.ZodObject<{
29
+ type: z.ZodLiteral<"vlaRun">;
30
+ modelId: z.ZodString;
31
+ images: z.ZodArray<z.ZodString>;
32
+ imgWidth: z.ZodNumber;
33
+ imgHeight: z.ZodNumber;
34
+ state: z.ZodString;
35
+ tokens: z.ZodString;
36
+ mask: z.ZodString;
37
+ noise: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ export type VlaRunRequest = z.input<typeof vlaRunRequestSchema>;
40
+ export declare const vlaRunResponseSchema: z.ZodObject<{
41
+ actions: z.ZodString;
42
+ actionDim: z.ZodNumber;
43
+ chunkSize: z.ZodNumber;
44
+ stats: z.ZodOptional<z.ZodObject<{
45
+ vision_ms: z.ZodOptional<z.ZodNumber>;
46
+ smollm2_compute_ms: z.ZodOptional<z.ZodNumber>;
47
+ smollm2_total_ms: z.ZodOptional<z.ZodNumber>;
48
+ ode_ms: z.ZodOptional<z.ZodNumber>;
49
+ total_ms: z.ZodOptional<z.ZodNumber>;
50
+ backendDevice: z.ZodOptional<z.ZodNumber>;
51
+ }, z.core.$strip>>;
52
+ }, z.core.$strip>;
53
+ export type VlaRunResponse = z.infer<typeof vlaRunResponseSchema>;
54
+ export declare const vlaHparamsRequestSchema: z.ZodObject<{
55
+ type: z.ZodLiteral<"vlaHparams">;
56
+ modelId: z.ZodString;
57
+ }, z.core.$strip>;
58
+ export type VlaHparamsRequest = z.input<typeof vlaHparamsRequestSchema>;
59
+ export declare const vlaHparamsResponseSchema: z.ZodObject<{
60
+ hparams: z.ZodObject<{
61
+ chunkSize: z.ZodNumber;
62
+ actionDim: z.ZodNumber;
63
+ maxActionDim: z.ZodNumber;
64
+ maxStateDim: z.ZodNumber;
65
+ tokenizerMaxLength: z.ZodNumber;
66
+ visionImageSize: z.ZodNumber;
67
+ }, z.core.$strip>;
68
+ backendName: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strip>;
70
+ export type VlaHparamsResponse = z.infer<typeof vlaHparamsResponseSchema>;
71
+ export interface VlaClientRunParams {
72
+ modelId: string;
73
+ images: Float32Array[];
74
+ imgWidth: number;
75
+ imgHeight: number;
76
+ state: Float32Array;
77
+ tokens: Int32Array;
78
+ mask: Uint8Array;
79
+ noise?: Float32Array;
80
+ }
81
+ export interface VlaClientRunResult {
82
+ actions: Float32Array;
83
+ actionDim: number;
84
+ chunkSize: number;
85
+ stats?: VlaStats;
86
+ }
87
+ //# sourceMappingURL=vla.d.ts.map
@@ -0,0 +1,108 @@
1
+ import { z } from "zod";
2
+ const BASE64_PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
3
+ // ============================================
4
+ // Load-time config
5
+ // ============================================
6
+ export const vlaConfigSchema = z.object({
7
+ backend: z
8
+ .enum(["auto", "cpu"])
9
+ .optional()
10
+ .describe("Backend selection passed to `VlaModel.load({ backend })`. " +
11
+ "`'auto'` (default) prefers an accepted GPU (Vulkan / Metal / OpenCL) and falls back to CPU. " +
12
+ "`'cpu'` forces CPU regardless of available accelerators."),
13
+ verbosity: z
14
+ .number()
15
+ .int()
16
+ .optional()
17
+ .describe("Native log verbosity forwarded to the addon (0=ERROR, 1=WARN, 2=INFO, 3=DEBUG)."),
18
+ });
19
+ // ============================================
20
+ // Hparams (returned by the addon after load)
21
+ // ============================================
22
+ export const vlaHparamsSchema = z.object({
23
+ chunkSize: z.number().int().nonnegative(),
24
+ actionDim: z.number().int().nonnegative(),
25
+ maxActionDim: z.number().int().nonnegative(),
26
+ maxStateDim: z.number().int().nonnegative(),
27
+ tokenizerMaxLength: z.number().int().nonnegative(),
28
+ visionImageSize: z.number().int().nonnegative(),
29
+ });
30
+ // ============================================
31
+ // Stats
32
+ // ============================================
33
+ export const vlaStatsSchema = z.object({
34
+ vision_ms: z.number().optional(),
35
+ smollm2_compute_ms: z.number().optional(),
36
+ smollm2_total_ms: z.number().optional(),
37
+ ode_ms: z.number().optional(),
38
+ total_ms: z.number().optional(),
39
+ backendDevice: z
40
+ .number()
41
+ .optional()
42
+ .describe("0 = CPU backend, 1 = GPU backend (Vulkan / Metal / OpenCL)."),
43
+ });
44
+ // ============================================
45
+ // Run request / response (wire format)
46
+ //
47
+ // Typed arrays travel as base64-encoded ArrayBuffers because JSON-RPC can't
48
+ // carry them natively. The client API helpers (`vla()` in client/api/vla.ts)
49
+ // keep the consumer-facing `Float32Array | Int32Array | Uint8Array` shape
50
+ // and handle the encoding internally.
51
+ // ============================================
52
+ export const vlaRunRequestSchema = z.object({
53
+ type: z.literal("vlaRun"),
54
+ modelId: z.string(),
55
+ images: z
56
+ .array(z.string().min(1).regex(BASE64_PATTERN))
57
+ .min(1)
58
+ .describe("Base64-encoded preprocessed images. Each entry is the underlying " +
59
+ "ArrayBuffer of a `Float32Array` produced by `vlaPreprocessImage(...)`. " +
60
+ "Length per image must equal `3 * imgWidth * imgHeight`."),
61
+ imgWidth: z.number().int().positive(),
62
+ imgHeight: z.number().int().positive(),
63
+ state: z
64
+ .string()
65
+ .min(1)
66
+ .regex(BASE64_PATTERN)
67
+ .describe("Base64-encoded `Float32Array` of length `hparams.maxStateDim`. " +
68
+ "Use `vlaPadState(state, hparams.maxStateDim)` to zero-pad."),
69
+ tokens: z
70
+ .string()
71
+ .min(1)
72
+ .regex(BASE64_PATTERN)
73
+ .describe("Base64-encoded `Int32Array` of length `hparams.tokenizerMaxLength`."),
74
+ mask: z
75
+ .string()
76
+ .min(1)
77
+ .regex(BASE64_PATTERN)
78
+ .describe("Base64-encoded `Uint8Array` of length `hparams.tokenizerMaxLength`."),
79
+ noise: z
80
+ .string()
81
+ .min(1)
82
+ .regex(BASE64_PATTERN)
83
+ .optional()
84
+ .describe("Optional base64-encoded `Float32Array` of length " +
85
+ "`hparams.chunkSize * hparams.maxActionDim`. When omitted the addon " +
86
+ "samples its own prior."),
87
+ });
88
+ export const vlaRunResponseSchema = z.object({
89
+ actions: z
90
+ .string()
91
+ .min(1)
92
+ .regex(BASE64_PATTERN)
93
+ .describe("Base64-encoded `Float32Array` of length `hparams.chunkSize * hparams.actionDim`."),
94
+ actionDim: z.number().int().positive(),
95
+ chunkSize: z.number().int().positive(),
96
+ stats: vlaStatsSchema.optional(),
97
+ });
98
+ // ============================================
99
+ // Hparams request / response (plugin handler)
100
+ // ============================================
101
+ export const vlaHparamsRequestSchema = z.object({
102
+ type: z.literal("vlaHparams"),
103
+ modelId: z.string(),
104
+ });
105
+ export const vlaHparamsResponseSchema = z.object({
106
+ hparams: vlaHparamsSchema,
107
+ backendName: z.string().nullable(),
108
+ });
@@ -1,4 +1,4 @@
1
- import { readdirSync } from "fs";
1
+ import { readFileSync, readdirSync } from "fs";
2
2
  import { join, dirname } from "path";
3
3
  import { spawnSync } from "child_process";
4
4
  import { fileURLToPath } from "url";
@@ -19,8 +19,14 @@ function collectTestFiles(dir) {
19
19
  }
20
20
  const testFiles = collectTestFiles(testDir);
21
21
  let hasFailure = false;
22
+ function usesNodeTestRunner(filePath) {
23
+ const source = readFileSync(filePath, "utf8");
24
+ return (source.includes("from 'node:test'") ||
25
+ source.includes('from "node:test"'));
26
+ }
22
27
  for (const file of testFiles) {
23
- const result = spawnSync("bun", ["run", file], {
28
+ const args = usesNodeTestRunner(file) ? ["test", file] : ["run", file];
29
+ const result = spawnSync("bun", args, {
24
30
  stdio: "inherit",
25
31
  });
26
32
  if (result.status !== 0) {
@@ -1,4 +1,4 @@
1
- import { type TranscribeParams, type TranscribeSegment, type TranscribeStats, type TranscribeStreamEvent } from "../../../schemas/index";
1
+ import { type TranscribeParams, type TranscribeSegment, type TranscribeStats, type TranscribeStreamEvent, type ParakeetStreamingRunConfig } from "../../../schemas/index";
2
2
  import { assertMetadataSupported, toTranscribeSegment, type WhisperAddonSegment } from "../utils/transcribe-metadata";
3
3
  export { assertMetadataSupported, toTranscribeSegment, type WhisperAddonSegment, };
4
4
  type TranscribeReturn = {
@@ -13,6 +13,7 @@ export interface TranscribeStreamOpts {
13
13
  emitVadEvents?: boolean;
14
14
  endOfTurnSilenceMs?: number;
15
15
  vadRunIntervalMs?: number;
16
+ parakeetStreamingConfig?: ParakeetStreamingRunConfig;
16
17
  }
17
18
  export declare function transcribeStream(modelId: string, audioInputStream: AsyncIterable<Buffer>, prompt: string | undefined, metadata: true, opts?: TranscribeStreamOpts, requestId?: string): AsyncGenerator<TranscribeSegment | TranscribeStreamEvent, void, void>;
18
19
  export declare function transcribeStream(modelId: string, audioInputStream: AsyncIterable<Buffer>, prompt?: string, metadata?: boolean, opts?: TranscribeStreamOpts, requestId?: string): AsyncGenerator<string | TranscribeStreamEvent, void, void>;