@qvac/inference 0.20.1 → 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 (212) hide show
  1. package/NOTICE +90 -24
  2. package/README.md +8 -5
  3. package/dist/api/bci-transcribe.d.ts +4 -1
  4. package/dist/api/index.d.ts +1 -0
  5. package/dist/api/index.js +1 -0
  6. package/dist/api/rpc-server.d.ts +19 -0
  7. package/dist/api/rpc-server.js +44 -0
  8. package/dist/api/text-to-speech.d.ts +9 -0
  9. package/dist/api/text-to-speech.js +9 -0
  10. package/dist/api/transcribe.d.ts +11 -7
  11. package/dist/api/transcribe.js +47 -15
  12. package/dist/api/video-request.d.ts +5 -5
  13. package/dist/dispatch.js +39 -7
  14. package/dist/errors/index.d.ts +7 -0
  15. package/dist/errors/index.js +15 -0
  16. package/dist/handlers/assess-model-fit.d.ts +8 -20
  17. package/dist/handlers/assess-model-fit.js +195 -77
  18. package/dist/handlers/completion-orchestrate.js +17 -0
  19. package/dist/handlers/get-loaded-model-info.js +4 -1
  20. package/dist/handlers/get-model-info.js +29 -1
  21. package/dist/handlers/load-model/coreml-sidecars.d.ts +25 -0
  22. package/dist/handlers/load-model/coreml-sidecars.js +274 -0
  23. package/dist/handlers/load-model/hyperdrive.js +2 -2
  24. package/dist/handlers/load-model/registry.js +59 -0
  25. package/dist/handlers/rpc-server.d.ts +23 -0
  26. package/dist/handlers/rpc-server.js +141 -0
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +2 -1
  29. package/dist/models/registry/models.d.ts +7731 -5672
  30. package/dist/models/registry/models.js +4652 -2526
  31. package/dist/models/registry/resource-profiles.js +481 -94
  32. package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +8 -6
  33. package/dist/plugins/builtin/audiogen-ggml/plugin.js +2 -1
  34. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +73 -1
  35. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +37 -19
  36. package/dist/plugins/builtin/ggml-vla/plugin.d.ts +1 -1
  37. package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +9 -5
  38. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -1
  39. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +16 -7
  40. package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +22 -11
  41. package/dist/plugins/builtin/llamacpp-completion/plugin.js +9 -3
  42. package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +5 -3
  43. package/dist/plugins/builtin/llamacpp-embedding/plugin.js +2 -1
  44. package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +121 -0
  45. package/dist/plugins/builtin/parakeet-transcription/plugin.js +56 -27
  46. package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +8 -2
  47. package/dist/plugins/builtin/sdcpp-generation/plugin.js +7 -2
  48. package/dist/plugins/builtin/tts-ggml/ops/parler-options.d.ts +2 -0
  49. package/dist/plugins/builtin/tts-ggml/ops/parler-options.js +5 -1
  50. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +27 -10
  51. package/dist/plugins/builtin/tts-ggml/plugin.d.ts +181 -0
  52. package/dist/plugins/builtin/tts-ggml/plugin.js +84 -2
  53. package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +136 -0
  54. package/dist/plugins/builtin/whispercpp-transcription/plugin.js +18 -7
  55. package/dist/plugins/ops/bci-transcribe.d.ts +6 -2
  56. package/dist/plugins/ops/bci-transcribe.js +18 -13
  57. package/dist/plugins/ops/load-model.js +2 -2
  58. package/dist/plugins/ops/transcribe.d.ts +4 -2
  59. package/dist/plugins/ops/transcribe.js +39 -2
  60. package/dist/plugins/ops/translate-stats.d.ts +2 -1
  61. package/dist/plugins/ops/translate-stats.js +64 -7
  62. package/dist/plugins/ops/translate.js +20 -4
  63. package/dist/profiling/operation-metrics.js +56 -0
  64. package/dist/registry.js +4 -0
  65. package/dist/resources/model-fit/assess.d.ts +37 -2
  66. package/dist/resources/model-fit/assess.js +24 -3
  67. package/dist/resources/model-fit/estimators/llm.js +2 -2
  68. package/dist/resources/model-fit/estimators/whisper.js +3 -4
  69. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +20 -1
  70. package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +126 -47
  71. package/dist/resources/model-fit/fit-stub/project-fit-from-load.d.ts +27 -0
  72. package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +31 -0
  73. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +38 -0
  74. package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +138 -0
  75. package/dist/resources/model-fit/floor.js +2 -2
  76. package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +9 -6
  77. package/dist/resources/model-fit/native-probe/advisory-fit.js +129 -80
  78. package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +2 -0
  79. package/dist/resources/model-fit/native-probe/child-engine-fit.js +41 -0
  80. package/dist/resources/model-fit/native-probe/classify-fit.d.ts +6 -0
  81. package/dist/resources/model-fit/native-probe/classify-fit.js +135 -0
  82. package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +28 -0
  83. package/dist/resources/model-fit/native-probe/create-fit-request.js +51 -0
  84. package/dist/resources/model-fit/native-probe/engine-fit.d.ts +59 -0
  85. package/dist/resources/model-fit/native-probe/engine-fit.js +13 -0
  86. package/dist/resources/model-fit/native-probe/engines/asr.d.ts +10 -0
  87. package/dist/resources/model-fit/native-probe/engines/asr.js +103 -0
  88. package/dist/resources/model-fit/native-probe/engines/audiogen.d.ts +8 -0
  89. package/dist/resources/model-fit/native-probe/engines/audiogen.js +35 -0
  90. package/dist/resources/model-fit/native-probe/engines/diffusion.d.ts +7 -0
  91. package/dist/resources/model-fit/native-probe/engines/diffusion.js +55 -0
  92. package/dist/resources/model-fit/native-probe/engines/gpu.d.ts +10 -0
  93. package/dist/resources/model-fit/native-probe/engines/gpu.js +21 -0
  94. package/dist/resources/model-fit/native-probe/engines/llama.d.ts +13 -0
  95. package/dist/resources/model-fit/native-probe/engines/llama.js +145 -0
  96. package/dist/resources/model-fit/native-probe/engines/tts.d.ts +8 -0
  97. package/dist/resources/model-fit/native-probe/engines/tts.js +106 -0
  98. package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +16 -0
  99. package/dist/resources/model-fit/native-probe/fit-outcome.js +1 -0
  100. package/dist/resources/model-fit/native-probe/fit-process.d.ts +27 -0
  101. package/dist/resources/model-fit/native-probe/fit-process.js +55 -0
  102. package/dist/resources/model-fit/native-probe/fit-runner.d.ts +1 -0
  103. package/dist/resources/model-fit/native-probe/fit-runner.js +58 -0
  104. package/dist/resources/model-fit/native-probe/run-fit.d.ts +24 -0
  105. package/dist/resources/model-fit/native-probe/run-fit.js +20 -0
  106. package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +14 -34
  107. package/dist/resources/model-fit/native-probe/run-in-process-fit.js +55 -139
  108. package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +5 -12
  109. package/dist/resources/model-fit/native-probe/run-isolated-fit.js +13 -8
  110. package/dist/resources/model-fit/platform.d.ts +9 -0
  111. package/dist/resources/model-fit/platform.js +28 -0
  112. package/dist/rpc/device-map.d.ts +13 -0
  113. package/dist/rpc/device-map.js +22 -0
  114. package/dist/rpc/discovery.d.ts +12 -0
  115. package/dist/rpc/discovery.js +225 -0
  116. package/dist/rpc/ggml-provider.d.ts +4 -0
  117. package/dist/rpc/ggml-provider.js +25 -0
  118. package/dist/rpc/index.d.ts +2 -0
  119. package/dist/rpc/index.js +1 -0
  120. package/dist/rpc/instance.d.ts +6 -0
  121. package/dist/rpc/instance.js +21 -0
  122. package/dist/rpc/inventory.d.ts +5 -0
  123. package/dist/rpc/inventory.js +144 -0
  124. package/dist/rpc/manager.d.ts +14 -0
  125. package/dist/rpc/manager.js +174 -0
  126. package/dist/rpc/network.d.ts +11 -0
  127. package/dist/rpc/network.js +85 -0
  128. package/dist/rpc/provider.d.ts +6 -0
  129. package/dist/rpc/provider.js +24 -0
  130. package/dist/runtime/lifecycle.js +31 -13
  131. package/dist/runtime/request-context.d.ts +1 -1
  132. package/dist/runtime/state.js +5 -0
  133. package/dist/schemas/assess-model-fit.d.ts +269 -85
  134. package/dist/schemas/assess-model-fit.js +78 -54
  135. package/dist/schemas/audio-gen.d.ts +6 -6
  136. package/dist/schemas/audio-gen.js +2 -2
  137. package/dist/schemas/batch-completion-stream.d.ts +13 -5
  138. package/dist/schemas/batch-completion-stream.js +5 -3
  139. package/dist/schemas/bci-config.js +1 -1
  140. package/dist/schemas/bci.d.ts +86 -1
  141. package/dist/schemas/bci.js +21 -2
  142. package/dist/schemas/cancel.d.ts +10 -0
  143. package/dist/schemas/cancel.js +2 -0
  144. package/dist/schemas/common.d.ts +708 -66
  145. package/dist/schemas/common.js +7 -0
  146. package/dist/schemas/completion-event.d.ts +6 -6
  147. package/dist/schemas/completion-stream.d.ts +27 -8
  148. package/dist/schemas/completion-stream.js +41 -4
  149. package/dist/schemas/config.d.ts +104 -36
  150. package/dist/schemas/config.js +10 -0
  151. package/dist/schemas/embed.d.ts +2 -2
  152. package/dist/schemas/error.js +13 -0
  153. package/dist/schemas/errors.d.ts +1 -0
  154. package/dist/schemas/errors.js +5 -0
  155. package/dist/schemas/index.d.ts +1 -0
  156. package/dist/schemas/index.js +1 -0
  157. package/dist/schemas/llamacpp-config.d.ts +25 -18
  158. package/dist/schemas/llamacpp-config.js +26 -16
  159. package/dist/schemas/load-model.d.ts +2608 -469
  160. package/dist/schemas/load-model.js +2 -2
  161. package/dist/schemas/mcp-adapter.d.ts +4 -0
  162. package/dist/schemas/model-config-schemas.d.ts +183 -6
  163. package/dist/schemas/model-info.d.ts +56 -0
  164. package/dist/schemas/model-info.js +5 -1
  165. package/dist/schemas/plugin.d.ts +8 -2
  166. package/dist/schemas/profiling.d.ts +4 -4
  167. package/dist/schemas/reload-config.d.ts +30 -0
  168. package/dist/schemas/rpc-server.d.ts +101 -0
  169. package/dist/schemas/rpc-server.js +87 -0
  170. package/dist/schemas/sdcpp-config.d.ts +7 -3
  171. package/dist/schemas/sdcpp-config.js +37 -2
  172. package/dist/schemas/system-resources.d.ts +4 -4
  173. package/dist/schemas/text-to-speech.d.ts +529 -1
  174. package/dist/schemas/text-to-speech.js +122 -12
  175. package/dist/schemas/tools.d.ts +2 -0
  176. package/dist/schemas/tools.js +8 -0
  177. package/dist/schemas/transcription-config.d.ts +5 -0
  178. package/dist/schemas/transcription-config.js +20 -2
  179. package/dist/schemas/transcription.d.ts +164 -0
  180. package/dist/schemas/transcription.js +71 -4
  181. package/dist/schemas/vla.d.ts +1 -1
  182. package/dist/surface.d.ts +4 -1
  183. package/dist/surface.js +3 -1
  184. package/dist/utils/addon-responses.d.ts +5 -1
  185. package/dist/utils/archive.js +5 -1
  186. package/dist/utils/asr-diagnostics.d.ts +12 -0
  187. package/dist/utils/asr-diagnostics.js +42 -0
  188. package/dist/utils/asr-events.d.ts +1 -0
  189. package/dist/utils/asr-events.js +3 -2
  190. package/dist/utils/cache/paths.js +3 -2
  191. package/dist/utils/mcp-adapter.js +7 -1
  192. package/dist/utils/multi-gpu-mobile.d.ts +1 -1
  193. package/dist/utils/multi-gpu-mobile.js +8 -6
  194. package/dist/utils/path-security.d.ts +5 -0
  195. package/dist/utils/path-security.js +14 -0
  196. package/dist/utils/tool-helpers.d.ts +4 -0
  197. package/dist/utils/tool-helpers.js +2 -0
  198. package/dist/utils/tools/defer.d.ts +93 -0
  199. package/dist/utils/tools/defer.js +290 -0
  200. package/dist/utils/tools/index.d.ts +1 -0
  201. package/dist/utils/tools/index.js +1 -0
  202. package/dist/utils/transcribe-metadata.d.ts +21 -7
  203. package/dist/utils/transcribe-metadata.js +24 -8
  204. package/dist/utils/tts-stats.d.ts +6 -0
  205. package/dist/utils/tts-stats.js +14 -1
  206. package/package.json +43 -29
  207. package/dist/resources/model-fit/fit-stub/index.d.ts +0 -2
  208. package/dist/resources/model-fit/fit-stub/index.js +0 -2
  209. package/dist/resources/model-fit/fit-stub/project-fit-from-stub.d.ts +0 -31
  210. package/dist/resources/model-fit/fit-stub/project-fit-from-stub.js +0 -36
  211. package/dist/resources/model-fit/native-probe/create-llama-fit-request.d.ts +0 -26
  212. package/dist/resources/model-fit/native-probe/create-llama-fit-request.js +0 -191
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { modelRegistryEntrySchema } from './registry.js';
3
+ import { modelSrcInputSchema } from './model-src-utils.js';
4
+ import { modelTypeInputSchema } from './model-types.js';
3
5
  /**
4
6
  * Advisory outcome of a pre-download fit assessment.
5
7
  *
@@ -7,37 +9,6 @@ import { modelRegistryEntrySchema } from './registry.js';
7
9
  * whenever the evidence does not support a defensible claim either way.
8
10
  */
9
11
  export const modelFitVerdictSchema = z.enum(['likely-fits', 'likely-too-large', 'unknown']);
10
- /**
11
- * Normalized workload shapes. An engine's estimator declares which kinds it
12
- * supports; anything else assesses as `unknown`.
13
- *
14
- * Phase 1 covers LLM context and an audio window. Further kinds (fixed-cost
15
- * loads, text, image, video) are additive in later phases — a kind joins the
16
- * union only once an estimator actually handles it.
17
- */
18
- export const modelFitWorkloadSchema = z.discriminatedUnion('kind', [
19
- z
20
- .object({
21
- kind: z.literal('llm'),
22
- contextTokens: z
23
- .number()
24
- .int()
25
- .positive()
26
- .describe('Context window the caller intends to use, in tokens.')
27
- })
28
- .describe('Token-context workload for llama.cpp completion and embedding models.'),
29
- z
30
- .object({
31
- kind: z.literal('audio'),
32
- windowMs: z
33
- .number()
34
- .positive()
35
- .describe('Audio window handed to the engine per call, in milliseconds.'),
36
- streaming: z.boolean().describe('Whether the caller streams continuously.'),
37
- batch: z.number().int().positive().optional().describe('Concurrent windows per call.')
38
- })
39
- .describe('Audio-window workload for speech-to-text models.')
40
- ]);
41
12
  /**
42
13
  * The part of a model constant an assessment reads. Pass a catalog constant
43
14
  * directly — the extra fields are ignored.
@@ -61,22 +32,6 @@ export const modelFitModelRefSchema = modelRegistryEntrySchema
61
32
  .optional()
62
33
  .describe('Registry source identifier, e.g. `huggingface`.')
63
34
  });
64
- /**
65
- * One model the caller is considering, with the workload it would run.
66
- *
67
- * @property model - A catalog model constant. The generated resource profile,
68
- * looked up by checksum, supplies the byte totals and transformer facts.
69
- * @property artifacts - Extra catalog constants a compound load needs (a VAD
70
- * model, a pivot model). Their artifact bytes are added to this candidate.
71
- */
72
- export const modelFitCandidateSchema = z.object({
73
- model: modelFitModelRefSchema.describe('Catalog model constant to assess.'),
74
- artifacts: z
75
- .array(modelFitModelRefSchema)
76
- .optional()
77
- .describe('Additional catalog constants this load also requires.'),
78
- workload: modelFitWorkloadSchema.describe('Workload the caller intends to run.')
79
- });
80
35
  /**
81
36
  * How the caller intends to run the candidates. This is a **declared
82
37
  * assumption** used for aggregation, not a scheduling instruction — the SDK
@@ -87,11 +42,31 @@ export const modelFitCandidateSchema = z.object({
87
42
  * - `concurrent`: every model stays resident and every peak is counted.
88
43
  */
89
44
  export const modelFitExecutionSchema = z.enum(['sequential', 'concurrent']);
45
+ /**
46
+ * A load to assess, in `loadModel`'s own parameters. The engine's plugin
47
+ * resolves it, so the config and the artifact keys the fitter reads are the
48
+ * ones the load would run with.
49
+ *
50
+ * Each source resolves to the registry's weightless description of the
51
+ * artifact, or to the file itself where it is already on disk.
52
+ */
53
+ export const modelFitCandidateSchema = z.object({
54
+ modelSrc: modelSrcInputSchema
55
+ .optional()
56
+ .describe('The model to assess, as `loadModel` takes it. Optional for the loads `loadModel` also takes without one, where every source is a config field.'),
57
+ modelType: modelTypeInputSchema
58
+ .optional()
59
+ .describe('Engine that would run the load. Inferred from `modelSrc` when omitted, as `loadModel` infers it; required only where the source does not name one.'),
60
+ modelConfig: z
61
+ .record(z.string(), z.unknown())
62
+ .optional()
63
+ .describe('The config `loadModel` would be given, including any companion model sources.')
64
+ });
90
65
  export const assessModelFitInputSchema = z.object({
91
66
  models: z
92
67
  .array(modelFitCandidateSchema)
93
68
  .min(1)
94
- .describe('Candidates to assess together under one memory budget.'),
69
+ .describe('Models to assess together under one memory budget.'),
95
70
  execution: modelFitExecutionSchema
96
71
  .default('sequential')
97
72
  .describe('Declared co-residency assumption for aggregation. Not a scheduling instruction: the SDK does not serialize, reserve, or enforce anything.'),
@@ -165,6 +140,10 @@ export const modelFitModelResultSchema = z.object({
165
140
  .string()
166
141
  .optional()
167
142
  .describe('Estimator that produced the bounds, e.g. `llm-v1`, or `floor-v1` for a computed floor.'),
143
+ device: z
144
+ .string()
145
+ .optional()
146
+ .describe('Where this load resolved to execute, after the host’s own device defaults: `gpu` or `cpu`. The llama fitters read device memory alone and decline a `cpu` load, which then carries no `native-fit` evidence; the speech and voice fitters answer for one like any other. Absent for an engine that expresses no placement.'),
168
147
  reasons: z.array(z.string()).describe('Why this model got this verdict.')
169
148
  });
170
149
  export const assessModelFitResultSchema = z.object({
@@ -193,8 +172,8 @@ export const assessModelFitResultSchema = z.object({
193
172
  * The other fit question, kept in this file on purpose: `assessModelFit` above
194
173
  * answers "should I download this?" from calibrated coefficients and a checksum,
195
174
  * while the native probe answers "will the load I am about to run fit?" by
196
- * reading the GGUF on disk in a disposable child. Two evidence classes, so two
197
- * verdict vocabularies:
175
+ * handing the model file and the resolved settings to the fitter of the engine
176
+ * that would run it. Two evidence classes, so two verdict vocabularies:
198
177
  *
199
178
  * - `likely-fits` / `likely-too-large` hedge because a formula is an estimate.
200
179
  * - `fit` / `does-not-fit` do not, because the probe measured this build of this
@@ -210,22 +189,67 @@ export const nativeProbePlanSchema = z.object({
210
189
  nGpuLayers: z.number().int().describe('Layers the probe would offload.'),
211
190
  nGpuDevices: z.number().int().describe('GPU devices the offload would span.')
212
191
  });
192
+ /**
193
+ * What the fitter measured. Each field is optional because the engines do not
194
+ * all measure the same things: the diffusion fitter answers with a placement
195
+ * and a per-module table rather than a total, so it fills `report` alone.
196
+ *
197
+ * `weightsBytes`, `contextBytes` and `computeBytes` divide `deviceBytes` where
198
+ * the engine separates them, and are absent together where it reports only a
199
+ * total. They are summed across devices, as `deviceBytes` is, so a load spread
200
+ * over more than one device is described by its totals and `deviceName` names
201
+ * the first.
202
+ *
203
+ * `deviceFreeBytes` is the backend's own gauge. A device sharing the host pool,
204
+ * as Apple silicon and Adreno/Mali do, reports what it could address rather
205
+ * than what the machine would give back, so it is an upper bound there.
206
+ */
207
+ export const nativeProbeProjectionSchema = z.object({
208
+ deviceName: z.string().optional().describe('Device the projection was made against.'),
209
+ deviceBytes: z
210
+ .number()
211
+ .optional()
212
+ .describe('Peak the load would place on the device, under the workload the probe assumed.'),
213
+ hostBytes: z.number().optional().describe('Peak the load would place in host RAM.'),
214
+ weightsBytes: z.number().optional().describe('Model weights, within `deviceBytes`.'),
215
+ contextBytes: z
216
+ .number()
217
+ .optional()
218
+ .describe('Context, KV cache and decoder state, within `deviceBytes`.'),
219
+ computeBytes: z
220
+ .number()
221
+ .optional()
222
+ .describe('Compute buffers and graph arenas, within `deviceBytes`.'),
223
+ deviceFreeBytes: z.number().optional().describe('Device memory free when the probe ran.'),
224
+ deviceTotalBytes: z.number().optional().describe('Device memory installed.'),
225
+ report: z
226
+ .string()
227
+ .optional()
228
+ .describe("The engine's own per-module memory table, suitable for a log line.")
229
+ });
213
230
  export const nativeProbeFitSchema = z
214
231
  .object({
215
- verdict: nativeProbeVerdictSchema.describe('Advisory outcome. `unknown` means no verdict was obtainable — the check was disabled, the load shape is unsupported, or the child produced no usable answer.'),
232
+ verdict: nativeProbeVerdictSchema.describe('Advisory outcome. `unknown` means no verdict was obtainable — the check was disabled, the load shape is unsupported, or the fitter produced no usable answer.'),
216
233
  basis: z
217
234
  .literal('native-probe')
218
- .describe('Evidence class: a disposable llama.cpp child that read the model file and the resolved load settings.'),
235
+ .describe("Evidence class: the engine's own fitter, run against the model file and the resolved load settings."),
236
+ engine: z
237
+ .string()
238
+ .optional()
239
+ .describe('Engine package whose fitter produced this outcome. Absent when none ran.'),
219
240
  estimatorVersion: z
220
241
  .string()
221
- .describe('Version of the probe integration that produced this outcome, covering the load-setting partitioning and the headroom policy — `native-probe-v1` withholds 1024 MiB plus the on-disk bytes of every model already resident in this worker.'),
242
+ .describe('Version of the probe integration that produced this outcome, covering the load-setting partitioning and the headroom policy. Under `native-probe-v2` the engine withholds 1024 MiB plus the on-disk bytes of every model already resident in this worker, and a `fit` is then judged against the same budget `assessModelFit` reports, under the basis that platform uses and less the `interactive-v1` reserve, counting device memory only where it comes out of system RAM.'),
222
243
  reason: z
223
244
  .string()
224
245
  .describe('Machine-readable reason for the verdict. Never parsed out of log text.'),
225
246
  message: z.string().optional().describe('Human-readable detail, when the reason has any.'),
226
247
  plan: nativeProbePlanSchema
227
248
  .optional()
228
- .describe('Placement the probe projected. Present only on a `fit` verdict.')
249
+ .describe('Placement the probe projected. Present wherever the fitter resolved one.'),
250
+ projection: nativeProbeProjectionSchema
251
+ .optional()
252
+ .describe('What the fitter measured. Present on `fit` and `does-not-fit` alike, since a load that does not fit is where the figures matter most.')
229
253
  })
230
254
  .meta({ title: 'NativeProbeFit' });
231
255
  export const assessModelFitRequestSchema = assessModelFitInputSchema.extend({
@@ -1013,8 +1013,8 @@ export declare const audioUnderstandResponseSchema: z.ZodObject<{
1013
1013
  diagnostics: z.ZodOptional<z.ZodObject<{
1014
1014
  selectedBackend: z.ZodString;
1015
1015
  selectedDevice: z.ZodEnum<{
1016
- gpu: "gpu";
1017
1016
  cpu: "cpu";
1017
+ gpu: "gpu";
1018
1018
  }>;
1019
1019
  graphicsApi: z.ZodOptional<z.ZodEnum<{
1020
1020
  vulkan: "vulkan";
@@ -1036,8 +1036,8 @@ export declare const audioUnderstandResponseSchema: z.ZodObject<{
1036
1036
  fallback: z.ZodOptional<z.ZodObject<{
1037
1037
  requestedBackend: z.ZodOptional<z.ZodString>;
1038
1038
  requestedDevice: z.ZodOptional<z.ZodEnum<{
1039
- gpu: "gpu";
1040
1039
  cpu: "cpu";
1040
+ gpu: "gpu";
1041
1041
  }>>;
1042
1042
  reason: z.ZodString;
1043
1043
  }, z.core.$strip>>;
@@ -1089,8 +1089,8 @@ export declare const audioGenStreamResponseSchema: z.ZodObject<{
1089
1089
  diagnostics: z.ZodOptional<z.ZodObject<{
1090
1090
  selectedBackend: z.ZodString;
1091
1091
  selectedDevice: z.ZodEnum<{
1092
- gpu: "gpu";
1093
1092
  cpu: "cpu";
1093
+ gpu: "gpu";
1094
1094
  }>;
1095
1095
  graphicsApi: z.ZodOptional<z.ZodEnum<{
1096
1096
  vulkan: "vulkan";
@@ -1112,8 +1112,8 @@ export declare const audioGenStreamResponseSchema: z.ZodObject<{
1112
1112
  fallback: z.ZodOptional<z.ZodObject<{
1113
1113
  requestedBackend: z.ZodOptional<z.ZodString>;
1114
1114
  requestedDevice: z.ZodOptional<z.ZodEnum<{
1115
- gpu: "gpu";
1116
1115
  cpu: "cpu";
1116
+ gpu: "gpu";
1117
1117
  }>>;
1118
1118
  reason: z.ZodString;
1119
1119
  }, z.core.$strip>>;
@@ -1166,8 +1166,8 @@ export declare const audioEditStreamResponseSchema: z.ZodObject<{
1166
1166
  diagnostics: z.ZodOptional<z.ZodObject<{
1167
1167
  selectedBackend: z.ZodString;
1168
1168
  selectedDevice: z.ZodEnum<{
1169
- gpu: "gpu";
1170
1169
  cpu: "cpu";
1170
+ gpu: "gpu";
1171
1171
  }>;
1172
1172
  graphicsApi: z.ZodOptional<z.ZodEnum<{
1173
1173
  vulkan: "vulkan";
@@ -1189,8 +1189,8 @@ export declare const audioEditStreamResponseSchema: z.ZodObject<{
1189
1189
  fallback: z.ZodOptional<z.ZodObject<{
1190
1190
  requestedBackend: z.ZodOptional<z.ZodString>;
1191
1191
  requestedDevice: z.ZodOptional<z.ZodEnum<{
1192
- gpu: "gpu";
1193
1192
  cpu: "cpu";
1193
+ gpu: "gpu";
1194
1194
  }>>;
1195
1195
  reason: z.ZodString;
1196
1196
  }, z.core.$strip>>;
@@ -120,7 +120,7 @@ const minimaxRuntimeConfigShape = {
120
120
  .min(0)
121
121
  .max(MINIMAX_MAX_INFERENCE_STEPS)
122
122
  .optional()
123
- .describe('MiniMax flow sampling steps; `0` uses the model default.'),
123
+ .describe('MiniMax flow sampling steps; `0` uses the engine default (20).'),
124
124
  cfgScale: minimaxCfgScaleSchema.optional()
125
125
  };
126
126
  const acestepAudioGenRuntimeConfigSchema = z
@@ -266,7 +266,7 @@ const audioGenGenerationShape = {
266
266
  .min(0)
267
267
  .max(MINIMAX_MAX_INFERENCE_STEPS)
268
268
  .optional()
269
- .describe('MiniMax flow steps for this generation; 0 uses the model default. MiniMax only; rejected by ACE-Step.'),
269
+ .describe('MiniMax flow steps for this generation; 0 uses the engine default (20). MiniMax only; rejected by ACE-Step.'),
270
270
  cfgScale: minimaxCfgScaleSchema
271
271
  .optional()
272
272
  .describe('MiniMax flow classifier-free guidance scale for this generation. MiniMax only; rejected by ACE-Step.'),
@@ -40,6 +40,8 @@ export declare const batchPromptSchema: z.ZodObject<{
40
40
  type: z.ZodLiteral<"function">;
41
41
  name: z.ZodString;
42
42
  description: z.ZodString;
43
+ deferLoading: z.ZodOptional<z.ZodBoolean>;
44
+ group: z.ZodOptional<z.ZodString>;
43
45
  parameters: z.ZodObject<{
44
46
  type: z.ZodLiteral<"object">;
45
47
  properties: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -98,6 +100,8 @@ declare const batchPromptStreamSchema: z.ZodObject<{
98
100
  type: z.ZodLiteral<"function">;
99
101
  name: z.ZodString;
100
102
  description: z.ZodString;
103
+ deferLoading: z.ZodOptional<z.ZodBoolean>;
104
+ group: z.ZodOptional<z.ZodString>;
101
105
  parameters: z.ZodObject<{
102
106
  type: z.ZodLiteral<"object">;
103
107
  properties: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -157,6 +161,8 @@ export declare const batchCompletionClientParamsSchema: z.ZodObject<{
157
161
  type: z.ZodLiteral<"function">;
158
162
  name: z.ZodString;
159
163
  description: z.ZodString;
164
+ deferLoading: z.ZodOptional<z.ZodBoolean>;
165
+ group: z.ZodOptional<z.ZodString>;
160
166
  parameters: z.ZodObject<{
161
167
  type: z.ZodLiteral<"object">;
162
168
  properties: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -244,6 +250,8 @@ export declare const batchCompletionStreamRequestSchema: z.ZodObject<{
244
250
  type: z.ZodLiteral<"function">;
245
251
  name: z.ZodString;
246
252
  description: z.ZodString;
253
+ deferLoading: z.ZodOptional<z.ZodBoolean>;
254
+ group: z.ZodOptional<z.ZodString>;
247
255
  parameters: z.ZodObject<{
248
256
  type: z.ZodLiteral<"object">;
249
257
  properties: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -313,8 +321,8 @@ export declare const batchCompletionEventSchema: z.ZodObject<{
313
321
  avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
314
322
  toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
315
323
  backendDevice: z.ZodOptional<z.ZodEnum<{
316
- gpu: "gpu";
317
324
  cpu: "cpu";
325
+ gpu: "gpu";
318
326
  }>>;
319
327
  }, z.core.$strip>;
320
328
  }, z.core.$strip>, z.ZodObject<{
@@ -332,8 +340,8 @@ export declare const batchCompletionEventSchema: z.ZodObject<{
332
340
  seq: z.ZodNumber;
333
341
  stopReason: z.ZodOptional<z.ZodEnum<{
334
342
  cancelled: "cancelled";
335
- eos: "eos";
336
343
  length: "length";
344
+ eos: "eos";
337
345
  stopSequence: "stopSequence";
338
346
  }>>;
339
347
  raw: z.ZodOptional<z.ZodObject<{
@@ -394,8 +402,8 @@ export declare const batchCompletionStreamResponseSchema: z.ZodObject<{
394
402
  avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
395
403
  toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
396
404
  backendDevice: z.ZodOptional<z.ZodEnum<{
397
- gpu: "gpu";
398
405
  cpu: "cpu";
406
+ gpu: "gpu";
399
407
  }>>;
400
408
  }, z.core.$strip>;
401
409
  }, z.core.$strip>, z.ZodObject<{
@@ -413,8 +421,8 @@ export declare const batchCompletionStreamResponseSchema: z.ZodObject<{
413
421
  seq: z.ZodNumber;
414
422
  stopReason: z.ZodOptional<z.ZodEnum<{
415
423
  cancelled: "cancelled";
416
- eos: "eos";
417
424
  length: "length";
425
+ eos: "eos";
418
426
  stopSequence: "stopSequence";
419
427
  }>>;
420
428
  raw: z.ZodOptional<z.ZodObject<{
@@ -433,8 +441,8 @@ export declare const batchCompletionStreamResponseSchema: z.ZodObject<{
433
441
  avgConcurrentSeq: z.ZodOptional<z.ZodNumber>;
434
442
  toolDefinitionsDropped: z.ZodOptional<z.ZodNumber>;
435
443
  backendDevice: z.ZodOptional<z.ZodEnum<{
436
- gpu: "gpu";
437
444
  cpu: "cpu";
445
+ gpu: "gpu";
438
446
  }>>;
439
447
  }, z.core.$strip>>;
440
448
  }, z.core.$strict>;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { completionEventSchema, completionStatsSchema } from './completion-event.js';
3
- import { completionParamsSchema, generationParamsSchema, refineToolChoiceMatchesTools, responseFormatSchema, toolDialectSchema } from './completion-stream.js';
3
+ import { completionParamsSchema, generationParamsSchema, refineReservedToolNames, refineToolChoiceMatchesTools, responseFormatSchema, toolDialectSchema } from './completion-stream.js';
4
4
  import { toolSchema } from './tools.js';
5
5
  const mcpClientInputSchema = z.custom();
6
6
  const batchPromptBaseSchema = z
@@ -40,14 +40,16 @@ export const batchPromptSchema = batchPromptBaseSchema
40
40
  })
41
41
  .strict()
42
42
  .superRefine(refineNoToolsWithStructuredOutput)
43
- .superRefine(refineToolChoiceMatchesTools);
43
+ .superRefine(refineToolChoiceMatchesTools)
44
+ .superRefine(refineReservedToolNames);
44
45
  const batchPromptStreamSchema = batchPromptBaseSchema
45
46
  .extend({
46
47
  tools: z.array(toolSchema).optional().describe('Resolved per-prompt tools the model can call.')
47
48
  })
48
49
  .strict()
49
50
  .superRefine(refineNoToolsWithStructuredOutput)
50
- .superRefine(refineToolChoiceMatchesTools);
51
+ .superRefine(refineToolChoiceMatchesTools)
52
+ .superRefine(refineReservedToolNames);
51
53
  const batchCompletionClientParamsBaseSchema = z
52
54
  .object({
53
55
  modelId: z.string().describe('The identifier of the model to use for batch completion.'),
@@ -45,7 +45,7 @@ const bciWhisperConfigSchema = z
45
45
  detect_language: z
46
46
  .boolean()
47
47
  .optional()
48
- .describe("Not supported natively (rejected by the addon); use `language: 'auto'` to auto-detect the spoken language."),
48
+ .describe("Detect the spoken language and stop: whisper.cpp returns straight after detection, so the transcript comes back empty. Use `language: 'auto'` to detect and transcribe in one call."),
49
49
  greedy_best_of: z
50
50
  .number()
51
51
  .int()
@@ -36,6 +36,20 @@ export declare const bciTranscribeRequestSchema: z.ZodObject<{
36
36
  type: z.ZodLiteral<"bciTranscribe">;
37
37
  requestId: z.ZodOptional<z.ZodString>;
38
38
  }, z.core.$strip>;
39
+ /**
40
+ * A streamed BCI segment. Only the sliding-window stream produces
41
+ * `windowStartTimestep`, so it is not on the shared segment shape.
42
+ */
43
+ export declare const bciStreamSegmentSchema: z.ZodObject<{
44
+ text: z.ZodString;
45
+ startMs: z.ZodNumber;
46
+ endMs: z.ZodNumber;
47
+ append: z.ZodBoolean;
48
+ id: z.ZodNumber;
49
+ isEndOfTurn: z.ZodOptional<z.ZodBoolean>;
50
+ startsWord: z.ZodOptional<z.ZodBoolean>;
51
+ windowStartTimestep: z.ZodOptional<z.ZodNumber>;
52
+ }, z.core.$strip>;
39
53
  export declare const bciTranscribeResponseSchema: z.ZodObject<{
40
54
  text: z.ZodOptional<z.ZodString>;
41
55
  done: z.ZodOptional<z.ZodBoolean>;
@@ -55,6 +69,18 @@ export declare const bciTranscribeResponseSchema: z.ZodObject<{
55
69
  gpuUnsupported: z.ZodOptional<z.ZodNumber>;
56
70
  gpuMemTotalMb: z.ZodOptional<z.ZodNumber>;
57
71
  gpuMemFreeMb: z.ZodOptional<z.ZodNumber>;
72
+ totalTime: z.ZodOptional<z.ZodNumber>;
73
+ totalWallMs: z.ZodOptional<z.ZodNumber>;
74
+ totalSamples: z.ZodOptional<z.ZodNumber>;
75
+ processCalls: z.ZodOptional<z.ZodNumber>;
76
+ whisperSampleMs: z.ZodOptional<z.ZodNumber>;
77
+ whisperBatchdMs: z.ZodOptional<z.ZodNumber>;
78
+ whisperPromptMs: z.ZodOptional<z.ZodNumber>;
79
+ totalTranscriptions: z.ZodOptional<z.ZodNumber>;
80
+ modelLoadMs: z.ZodOptional<z.ZodNumber>;
81
+ totalEncodedFrames: z.ZodOptional<z.ZodNumber>;
82
+ encoderOnCoreml: z.ZodOptional<z.ZodNumber>;
83
+ encoderUsedCoreml: z.ZodOptional<z.ZodNumber>;
58
84
  }, z.core.$strip>>;
59
85
  error: z.ZodOptional<z.ZodString>;
60
86
  segment: z.ZodOptional<z.ZodObject<{
@@ -63,8 +89,51 @@ export declare const bciTranscribeResponseSchema: z.ZodObject<{
63
89
  endMs: z.ZodNumber;
64
90
  append: z.ZodBoolean;
65
91
  id: z.ZodNumber;
92
+ isEndOfTurn: z.ZodOptional<z.ZodBoolean>;
93
+ startsWord: z.ZodOptional<z.ZodBoolean>;
66
94
  }, z.core.$strip>>;
67
95
  type: z.ZodLiteral<"bciTranscribe">;
96
+ diagnostics: z.ZodOptional<z.ZodObject<{
97
+ selectedBackend: z.ZodString;
98
+ selectedDevice: z.ZodEnum<{
99
+ cpu: "cpu";
100
+ gpu: "gpu";
101
+ }>;
102
+ graphicsApi: z.ZodOptional<z.ZodEnum<{
103
+ vulkan: "vulkan";
104
+ metal: "metal";
105
+ opencl: "opencl";
106
+ cuda: "cuda";
107
+ opengl: "opengl";
108
+ webgpu: "webgpu";
109
+ direct3d11: "direct3d11";
110
+ direct3d12: "direct3d12";
111
+ levelZero: "levelZero";
112
+ rocm: "rocm";
113
+ }>>;
114
+ driver: z.ZodOptional<z.ZodObject<{
115
+ name: z.ZodString;
116
+ version: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strip>>;
118
+ gpuId: z.ZodOptional<z.ZodString>;
119
+ fallback: z.ZodOptional<z.ZodObject<{
120
+ requestedBackend: z.ZodOptional<z.ZodString>;
121
+ requestedDevice: z.ZodOptional<z.ZodEnum<{
122
+ cpu: "cpu";
123
+ gpu: "gpu";
124
+ }>>;
125
+ reason: z.ZodString;
126
+ }, z.core.$strip>>;
127
+ probe: z.ZodOptional<z.ZodObject<{
128
+ status: z.ZodEnum<{
129
+ unknown: "unknown";
130
+ compatible: "compatible";
131
+ incompatible: "incompatible";
132
+ }>;
133
+ backend: z.ZodString;
134
+ reason: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>>;
68
137
  }, z.core.$strip>;
69
138
  /**
70
139
  * Per-call overrides for the BCI addon's sliding-window streaming
@@ -112,16 +181,31 @@ export declare const bciTranscribeStreamResponseSchema: z.ZodObject<{
112
181
  gpuUnsupported: z.ZodOptional<z.ZodNumber>;
113
182
  gpuMemTotalMb: z.ZodOptional<z.ZodNumber>;
114
183
  gpuMemFreeMb: z.ZodOptional<z.ZodNumber>;
184
+ totalTime: z.ZodOptional<z.ZodNumber>;
185
+ totalWallMs: z.ZodOptional<z.ZodNumber>;
186
+ totalSamples: z.ZodOptional<z.ZodNumber>;
187
+ processCalls: z.ZodOptional<z.ZodNumber>;
188
+ whisperSampleMs: z.ZodOptional<z.ZodNumber>;
189
+ whisperBatchdMs: z.ZodOptional<z.ZodNumber>;
190
+ whisperPromptMs: z.ZodOptional<z.ZodNumber>;
191
+ totalTranscriptions: z.ZodOptional<z.ZodNumber>;
192
+ modelLoadMs: z.ZodOptional<z.ZodNumber>;
193
+ totalEncodedFrames: z.ZodOptional<z.ZodNumber>;
194
+ encoderOnCoreml: z.ZodOptional<z.ZodNumber>;
195
+ encoderUsedCoreml: z.ZodOptional<z.ZodNumber>;
115
196
  }, z.core.$strip>>;
116
197
  error: z.ZodOptional<z.ZodString>;
198
+ type: z.ZodLiteral<"bciTranscribeStream">;
117
199
  segment: z.ZodOptional<z.ZodObject<{
118
200
  text: z.ZodString;
119
201
  startMs: z.ZodNumber;
120
202
  endMs: z.ZodNumber;
121
203
  append: z.ZodBoolean;
122
204
  id: z.ZodNumber;
205
+ isEndOfTurn: z.ZodOptional<z.ZodBoolean>;
206
+ startsWord: z.ZodOptional<z.ZodBoolean>;
207
+ windowStartTimestep: z.ZodOptional<z.ZodNumber>;
123
208
  }, z.core.$strip>>;
124
- type: z.ZodLiteral<"bciTranscribeStream">;
125
209
  }, z.core.$strip>;
126
210
  export type NeuralInput = z.infer<typeof neuralInputSchema>;
127
211
  export type BciTranscribeParams = z.infer<typeof bciTranscribeParamsSchema>;
@@ -131,6 +215,7 @@ export type BciTranscribeClientParamsParsed = z.output<typeof bciTranscribeClien
131
215
  export type BciStreamOpts = z.infer<typeof bciStreamOptsSchema>;
132
216
  export type BciTranscribeStreamRequest = z.infer<typeof bciTranscribeStreamRequestSchema>;
133
217
  export type BciTranscribeStreamResponse = z.infer<typeof bciTranscribeStreamResponseSchema>;
218
+ export type BciStreamSegment = z.infer<typeof bciStreamSegmentSchema>;
134
219
  /** Client parameters for `bciTranscribe()`. */
135
220
  export interface BciTranscribeClientParams {
136
221
  /** Identifier returned by `loadModel()` for a loaded BCI model. */
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { inferenceBackendDiagnosticsSchema } from './system-resources.js';
2
3
  import { transcribeSegmentSchema, transcribeStatsSchema } from './transcription.js';
3
4
  // Neural-signal binary input. The BCI addon consumes a raw neural buffer
4
5
  // (not audio): pass it inline as base64 or point at a local `.bin` file.
@@ -42,8 +43,25 @@ const bciTranscriptionResultBase = z.object({
42
43
  error: z.string().optional(),
43
44
  segment: transcribeSegmentSchema.optional()
44
45
  });
46
+ /**
47
+ * A streamed BCI segment. Only the sliding-window stream produces
48
+ * `windowStartTimestep`, so it is not on the shared segment shape.
49
+ */
50
+ export const bciStreamSegmentSchema = transcribeSegmentSchema.extend({
51
+ windowStartTimestep: z
52
+ .number()
53
+ .int()
54
+ .nonnegative()
55
+ .optional()
56
+ .describe("Absolute index of the 20 ms timestep at which this segment's owning decode window began. Emitted with `emit: 'delta'` only: the segment's own timestamps are window-local, so add `windowStartTimestep * 20` ms to `startMs` / `endMs` to place them on the stream timeline.")
57
+ });
45
58
  export const bciTranscribeResponseSchema = bciTranscriptionResultBase.extend({
46
- type: z.literal('bciTranscribe')
59
+ type: z.literal('bciTranscribe'),
60
+ // Batch only: the addon reports no stats for a stream, so no backend
61
+ // verdict can be derived there.
62
+ diagnostics: inferenceBackendDiagnosticsSchema
63
+ .optional()
64
+ .describe('Backend selection detail for the completed run, on the terminal frame. Carries the same payload the engine attaches to the internal diagnostics symbol, so an RPC client can read it.')
47
65
  });
48
66
  /**
49
67
  * Per-call overrides for the BCI addon's sliding-window streaming
@@ -85,5 +103,6 @@ export const bciTranscribeStreamRequestSchema = bciTranscribeBaseSchema.extend({
85
103
  .describe('Stable identifier for this in-flight duplex BCI transcription, generated by the caller at call time. Surfaces on the registry so callers can target it with `cancel({ requestId })`. Optional — falls back to a generated id when the field is missing.')
86
104
  });
87
105
  export const bciTranscribeStreamResponseSchema = bciTranscriptionResultBase.extend({
88
- type: z.literal('bciTranscribeStream')
106
+ type: z.literal('bciTranscribeStream'),
107
+ segment: bciStreamSegmentSchema.optional()
89
108
  });
@@ -30,6 +30,8 @@ declare const cancelKindSchema: z.ZodEnum<{
30
30
  finetune: "finetune";
31
31
  loadModel: "loadModel";
32
32
  downloadAsset: "downloadAsset";
33
+ rpcServer: "rpcServer";
34
+ rpcDiscovery: "rpcDiscovery";
33
35
  rag: "rag";
34
36
  }>;
35
37
  /**
@@ -80,6 +82,8 @@ declare const cancelBroadParamsSchema: z.ZodObject<{
80
82
  finetune: "finetune";
81
83
  loadModel: "loadModel";
82
84
  downloadAsset: "downloadAsset";
85
+ rpcServer: "rpcServer";
86
+ rpcDiscovery: "rpcDiscovery";
83
87
  rag: "rag";
84
88
  }>>;
85
89
  }, z.core.$strip>;
@@ -105,6 +109,8 @@ declare const cancelParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
109
  finetune: "finetune";
106
110
  loadModel: "loadModel";
107
111
  downloadAsset: "downloadAsset";
112
+ rpcServer: "rpcServer";
113
+ rpcDiscovery: "rpcDiscovery";
108
114
  rag: "rag";
109
115
  }>>;
110
116
  }, z.core.$strip>], "operation">;
@@ -132,6 +138,8 @@ export declare const cancelRequestSchema: z.ZodIntersection<z.ZodObject<{
132
138
  finetune: "finetune";
133
139
  loadModel: "loadModel";
134
140
  downloadAsset: "downloadAsset";
141
+ rpcServer: "rpcServer";
142
+ rpcDiscovery: "rpcDiscovery";
135
143
  rag: "rag";
136
144
  }>>;
137
145
  }, z.core.$strip>], "operation">>;
@@ -172,6 +180,8 @@ export declare const cancelBroadSugarSchema: z.ZodObject<{
172
180
  finetune: "finetune";
173
181
  loadModel: "loadModel";
174
182
  downloadAsset: "downloadAsset";
183
+ rpcServer: "rpcServer";
184
+ rpcDiscovery: "rpcDiscovery";
175
185
  rag: "rag";
176
186
  }>>;
177
187
  }, z.core.$strict>;
@@ -34,6 +34,8 @@ const cancelKindSchema = z
34
34
  'finetune',
35
35
  'loadModel',
36
36
  'downloadAsset',
37
+ 'rpcServer',
38
+ 'rpcDiscovery',
37
39
  'rag'
38
40
  ])
39
41
  .describe('Optional kind narrowing for the broad cancel. Omitting it cancels every in-flight request on the model.');