dsh-plugin-local-infer 0.1.3 → 0.1.4

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 (250) hide show
  1. package/README.md +22 -4
  2. package/cordis.patch.yml +7 -0
  3. package/docs/zh/README.md +14 -2
  4. package/dsh/client.js +4195 -4522
  5. package/package.json +28 -11
  6. package/packages/core/lib/adapter.d.ts +133 -9
  7. package/packages/core/lib/adapter.js +74 -1
  8. package/packages/core/lib/config.d.ts +1 -1
  9. package/packages/core/lib/config.js +1 -1
  10. package/packages/core/lib/debug.d.ts +1 -1
  11. package/packages/core/lib/debug.js +1 -1
  12. package/packages/core/lib/defaults.d.ts +1 -1
  13. package/packages/core/lib/defaults.js +1 -1
  14. package/packages/core/lib/deps.d.ts +44 -17
  15. package/packages/core/lib/deps.js +24 -8
  16. package/packages/core/lib/estimator.d.ts +1 -1
  17. package/packages/core/lib/estimator.js +1 -1
  18. package/packages/core/lib/guideline.d.ts +1 -1
  19. package/packages/core/lib/guideline.js +1 -1
  20. package/packages/core/lib/hardware.d.ts +1 -1
  21. package/packages/core/lib/hardware.js +1 -1
  22. package/packages/core/lib/hf-cache.d.ts +70 -0
  23. package/packages/core/lib/hf-cache.js +83 -0
  24. package/packages/core/lib/index.d.ts +16 -9
  25. package/packages/core/lib/index.js +10 -6
  26. package/packages/core/lib/infer-cache.d.ts +39 -0
  27. package/packages/core/lib/infer-cache.js +53 -0
  28. package/packages/core/lib/launch-command.d.ts +8 -4
  29. package/packages/core/lib/launch-command.js +13 -6
  30. package/packages/core/lib/launch-record.d.ts +1 -1
  31. package/packages/core/lib/launch-record.js +1 -1
  32. package/packages/core/lib/logs.d.ts +8 -1
  33. package/packages/core/lib/logs.js +12 -4
  34. package/packages/core/lib/models.d.ts +120 -14
  35. package/packages/core/lib/models.js +209 -17
  36. package/packages/core/lib/parameter.d.ts +31 -3
  37. package/packages/core/lib/parameter.js +1 -1
  38. package/packages/core/lib/progress.d.ts +54 -0
  39. package/packages/core/lib/progress.js +120 -0
  40. package/packages/core/lib/registrar.d.ts +20 -9
  41. package/packages/core/lib/registrar.js +27 -7
  42. package/packages/core/lib/reserve.d.ts +11 -3
  43. package/packages/core/lib/reserve.js +6 -4
  44. package/packages/core/lib/status.d.ts +12 -6
  45. package/packages/core/lib/status.js +21 -10
  46. package/packages/core/lib/sudo.d.ts +80 -0
  47. package/packages/core/lib/sudo.js +78 -0
  48. package/packages/core/package.json +1 -1
  49. package/packages/orchestrator/lib/config.d.ts +63 -0
  50. package/packages/orchestrator/lib/config.js +111 -0
  51. package/packages/orchestrator/lib/index.d.ts +51 -0
  52. package/packages/orchestrator/lib/index.js +73 -0
  53. package/packages/orchestrator/lib/route.d.ts +60 -0
  54. package/packages/orchestrator/lib/route.js +159 -0
  55. package/packages/orchestrator/locale/en.json +6 -0
  56. package/packages/orchestrator/package.json +39 -0
  57. package/packages/orchestrator/prompt.md +87 -0
  58. package/packages/providers/lib/acquire.d.ts +92 -14
  59. package/packages/providers/lib/acquire.js +215 -37
  60. package/packages/providers/lib/adapters.d.ts +136 -12
  61. package/packages/providers/lib/adapters.js +597 -70
  62. package/packages/providers/lib/debug.d.ts +1 -1
  63. package/packages/providers/lib/debug.js +1 -1
  64. package/packages/providers/lib/deps.d.ts +27 -230
  65. package/packages/providers/lib/deps.js +61 -214
  66. package/packages/providers/lib/engines/basalt/basalt.d.ts +130 -0
  67. package/packages/providers/lib/engines/basalt/basalt.js +304 -0
  68. package/packages/providers/lib/engines/basalt/basaltAdapter.d.ts +85 -0
  69. package/packages/providers/lib/engines/basalt/basaltAdapter.js +439 -0
  70. package/packages/providers/lib/engines/basalt/basaltLinux.d.ts +23 -0
  71. package/packages/providers/lib/engines/basalt/basaltLinux.js +47 -0
  72. package/packages/providers/lib/engines/basalt/basaltMacOS.d.ts +17 -0
  73. package/packages/providers/lib/engines/basalt/basaltMacOS.js +19 -0
  74. package/packages/providers/lib/engines/basalt/basaltWindows.d.ts +24 -0
  75. package/packages/providers/lib/engines/basalt/basaltWindows.js +49 -0
  76. package/packages/providers/lib/engines/engineOs.d.ts +24 -0
  77. package/packages/providers/lib/engines/engineOs.js +17 -0
  78. package/packages/providers/lib/engines/{hyperqwen.d.ts → hyperqwen/hyperqwen.d.ts} +2 -2
  79. package/packages/providers/lib/engines/{hyperqwen.js → hyperqwen/hyperqwen.js} +14 -2
  80. package/packages/providers/lib/engines/{hyperqwenAdapter.d.ts → hyperqwen/hyperqwenAdapter.d.ts} +6 -6
  81. package/packages/providers/lib/engines/{hyperqwenAdapter.js → hyperqwen/hyperqwenAdapter.js} +24 -14
  82. package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.d.ts +9 -0
  83. package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.js +9 -0
  84. package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.d.ts +9 -0
  85. package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.js +9 -0
  86. package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.d.ts +9 -0
  87. package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.js +9 -0
  88. package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.d.ts +10 -0
  89. package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.js +14 -0
  90. package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.d.ts +9 -0
  91. package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.js +9 -0
  92. package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.d.ts +9 -0
  93. package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.js +9 -0
  94. package/packages/providers/lib/engines/{infernix.d.ts → infernix/infernix.d.ts} +7 -4
  95. package/packages/providers/lib/engines/{infernix.js → infernix/infernix.js} +52 -7
  96. package/packages/providers/lib/engines/{infernixAdapter.d.ts → infernix/infernixAdapter.d.ts} +5 -6
  97. package/packages/providers/lib/engines/{infernixAdapter.js → infernix/infernixAdapter.js} +75 -42
  98. package/packages/providers/lib/engines/infernix/infernixArch.d.ts +9 -0
  99. package/packages/providers/lib/engines/infernix/infernixArch.js +9 -0
  100. package/packages/providers/lib/engines/infernix/infernixDebian.d.ts +9 -0
  101. package/packages/providers/lib/engines/infernix/infernixDebian.js +9 -0
  102. package/packages/providers/lib/engines/infernix/infernixFedora.d.ts +9 -0
  103. package/packages/providers/lib/engines/infernix/infernixFedora.js +9 -0
  104. package/packages/providers/lib/engines/infernix/infernixLinux.d.ts +17 -0
  105. package/packages/providers/lib/engines/infernix/infernixLinux.js +35 -0
  106. package/packages/providers/lib/engines/infernix/infernixMacOS.d.ts +16 -0
  107. package/packages/providers/lib/engines/infernix/infernixMacOS.js +18 -0
  108. package/packages/providers/lib/engines/infernix/infernixWindows.d.ts +16 -0
  109. package/packages/providers/lib/engines/infernix/infernixWindows.js +34 -0
  110. package/packages/providers/lib/engines/{llamacpp.d.ts → llamacpp/llamacpp.d.ts} +2 -2
  111. package/packages/providers/lib/engines/{llamacpp.js → llamacpp/llamacpp.js} +12 -2
  112. package/packages/providers/lib/engines/{llamacppAdapter.d.ts → llamacpp/llamacppAdapter.d.ts} +5 -6
  113. package/packages/providers/lib/engines/{llamacppAdapter.js → llamacpp/llamacppAdapter.js} +87 -45
  114. package/packages/providers/lib/engines/llamacpp/llamacppArch.d.ts +9 -0
  115. package/packages/providers/lib/engines/llamacpp/llamacppArch.js +9 -0
  116. package/packages/providers/lib/engines/llamacpp/llamacppDebian.d.ts +9 -0
  117. package/packages/providers/lib/engines/llamacpp/llamacppDebian.js +9 -0
  118. package/packages/providers/lib/engines/llamacpp/llamacppFedora.d.ts +9 -0
  119. package/packages/providers/lib/engines/llamacpp/llamacppFedora.js +9 -0
  120. package/packages/providers/lib/engines/llamacpp/llamacppLinux.d.ts +17 -0
  121. package/packages/providers/lib/engines/llamacpp/llamacppLinux.js +28 -0
  122. package/packages/providers/lib/engines/llamacpp/llamacppMacOS.d.ts +15 -0
  123. package/packages/providers/lib/engines/llamacpp/llamacppMacOS.js +17 -0
  124. package/packages/providers/lib/engines/llamacpp/llamacppWindows.d.ts +15 -0
  125. package/packages/providers/lib/engines/llamacpp/llamacppWindows.js +26 -0
  126. package/packages/providers/lib/engines/{ninfer.d.ts → ninfer/ninfer.d.ts} +2 -2
  127. package/packages/providers/lib/engines/{ninfer.js → ninfer/ninfer.js} +24 -2
  128. package/packages/providers/lib/engines/{ninferAdapter.d.ts → ninfer/ninferAdapter.d.ts} +5 -6
  129. package/packages/providers/lib/engines/{ninferAdapter.js → ninfer/ninferAdapter.js} +123 -55
  130. package/packages/providers/lib/engines/ninfer/ninferArch.d.ts +9 -0
  131. package/packages/providers/lib/engines/ninfer/ninferArch.js +9 -0
  132. package/packages/providers/lib/engines/ninfer/ninferDebian.d.ts +9 -0
  133. package/packages/providers/lib/engines/ninfer/ninferDebian.js +9 -0
  134. package/packages/providers/lib/engines/ninfer/ninferFedora.d.ts +9 -0
  135. package/packages/providers/lib/engines/ninfer/ninferFedora.js +9 -0
  136. package/packages/providers/lib/engines/ninfer/ninferLinux.d.ts +17 -0
  137. package/packages/providers/lib/engines/ninfer/ninferLinux.js +37 -0
  138. package/packages/providers/lib/engines/ninfer/ninferMacOS.d.ts +15 -0
  139. package/packages/providers/lib/engines/ninfer/ninferMacOS.js +17 -0
  140. package/packages/providers/lib/engines/ninfer/ninferWindows.d.ts +29 -0
  141. package/packages/providers/lib/engines/ninfer/ninferWindows.js +59 -0
  142. package/packages/providers/lib/engines/strata/strata.d.ts +1 -0
  143. package/packages/providers/lib/engines/{strata.js → strata/strata.js} +70 -3
  144. package/packages/providers/lib/engines/{strataAdapter.d.ts → strata/strataAdapter.d.ts} +5 -6
  145. package/packages/providers/lib/engines/{strataAdapter.js → strata/strataAdapter.js} +147 -111
  146. package/packages/providers/lib/engines/strata/strataArch.d.ts +9 -0
  147. package/packages/providers/lib/engines/strata/strataArch.js +9 -0
  148. package/packages/providers/lib/engines/strata/strataDebian.d.ts +9 -0
  149. package/packages/providers/lib/engines/strata/strataDebian.js +9 -0
  150. package/packages/providers/lib/engines/strata/strataFedora.d.ts +9 -0
  151. package/packages/providers/lib/engines/strata/strataFedora.js +9 -0
  152. package/packages/providers/lib/engines/strata/strataLinux.d.ts +21 -0
  153. package/packages/providers/lib/engines/strata/strataLinux.js +30 -0
  154. package/packages/providers/lib/engines/strata/strataMacOS.d.ts +16 -0
  155. package/packages/providers/lib/engines/strata/strataMacOS.js +17 -0
  156. package/packages/providers/lib/engines/strata/strataWindows.d.ts +27 -0
  157. package/packages/providers/lib/engines/strata/strataWindows.js +37 -0
  158. package/packages/providers/lib/engines.d.ts +7 -5
  159. package/packages/providers/lib/engines.js +21 -10
  160. package/packages/providers/lib/guidelines.d.ts +5 -4
  161. package/packages/providers/lib/guidelines.js +18 -5
  162. package/packages/providers/lib/index.d.ts +33 -29
  163. package/packages/providers/lib/index.js +45 -33
  164. package/packages/providers/lib/model-defaults.d.ts +5 -1
  165. package/packages/providers/lib/model-defaults.js +25 -1
  166. package/packages/providers/lib/platform.d.ts +8 -5
  167. package/packages/providers/lib/platform.js +23 -9
  168. package/packages/providers/lib/presets.d.ts +6 -4
  169. package/packages/providers/lib/presets.js +53 -5
  170. package/packages/providers/lib/systemDeps.d.ts +313 -0
  171. package/packages/providers/lib/systemDeps.js +284 -0
  172. package/packages/providers/lib/vram.d.ts +34 -8
  173. package/packages/providers/lib/vram.js +81 -8
  174. package/packages/providers/package.json +2 -2
  175. package/packages/service/lib/index.d.ts +176 -21
  176. package/packages/service/lib/index.js +589 -86
  177. package/packages/service/lib/launch-target.d.ts +19 -0
  178. package/packages/service/lib/launch-target.js +28 -0
  179. package/packages/service/lib/run-logs.d.ts +72 -0
  180. package/packages/service/lib/run-logs.js +125 -0
  181. package/packages/service/lib/types.d.ts +163 -6
  182. package/packages/service/lib/types.js +1 -1
  183. package/packages/service/package.json +2 -2
  184. package/packages/tool/lib/index.d.ts +1 -1
  185. package/packages/tool/lib/index.js +1 -1
  186. package/packages/tool/package.json +2 -2
  187. package/packages/ui/lib/config.d.ts +12 -2
  188. package/packages/ui/lib/config.js +18 -2
  189. package/packages/ui/lib/deps.d.ts +1 -1
  190. package/packages/ui/lib/deps.js +1 -1
  191. package/packages/ui/lib/form.d.ts +1 -1
  192. package/packages/ui/lib/form.js +1 -1
  193. package/packages/ui/lib/index.d.ts +7 -1
  194. package/packages/ui/lib/index.js +12 -2
  195. package/packages/ui/lib/meter.d.ts +1 -1
  196. package/packages/ui/lib/meter.js +1 -1
  197. package/packages/ui/lib/ops/engine.d.ts +142 -34
  198. package/packages/ui/lib/ops/engine.js +469 -265
  199. package/packages/ui/lib/ops/get-steps.d.ts +98 -0
  200. package/packages/ui/lib/ops/get-steps.js +359 -0
  201. package/packages/ui/lib/ops/hf.d.ts +26 -11
  202. package/packages/ui/lib/ops/hf.js +115 -25
  203. package/packages/ui/lib/ops/logs.d.ts +70 -15
  204. package/packages/ui/lib/ops/logs.js +96 -35
  205. package/packages/ui/lib/ops/model.d.ts +2 -10
  206. package/packages/ui/lib/ops/model.js +9 -16
  207. package/packages/ui/lib/request.d.ts +1 -1
  208. package/packages/ui/lib/request.js +1 -1
  209. package/packages/ui/lib/route.d.ts +22 -6
  210. package/packages/ui/lib/route.js +32 -9
  211. package/packages/ui/lib/routes/chat-template.d.ts +1 -14
  212. package/packages/ui/lib/routes/chat-template.js +1 -37
  213. package/packages/ui/lib/routes/deps.d.ts +1 -16
  214. package/packages/ui/lib/routes/deps.js +1 -27
  215. package/packages/ui/lib/routes/download.d.ts +1 -16
  216. package/packages/ui/lib/routes/download.js +1 -48
  217. package/packages/ui/lib/routes/get.d.ts +1 -18
  218. package/packages/ui/lib/routes/get.js +66 -17
  219. package/packages/ui/lib/routes/install.d.ts +1 -1
  220. package/packages/ui/lib/routes/install.js +1 -1
  221. package/packages/ui/lib/routes/launch.d.ts +13 -7
  222. package/packages/ui/lib/routes/launch.js +33 -9
  223. package/packages/ui/lib/routes/logs.d.ts +57 -0
  224. package/packages/ui/lib/routes/logs.js +117 -0
  225. package/packages/ui/lib/routes/provider-delete.d.ts +1 -1
  226. package/packages/ui/lib/routes/provider-delete.js +1 -1
  227. package/packages/ui/lib/routes/register.d.ts +1 -1
  228. package/packages/ui/lib/routes/register.js +1 -1
  229. package/packages/ui/lib/routes/save.d.ts +1 -1
  230. package/packages/ui/lib/routes/save.js +22 -2
  231. package/packages/ui/lib/routes/stop.d.ts +7 -4
  232. package/packages/ui/lib/routes/stop.js +7 -4
  233. package/packages/ui/lib/routes/stream.d.ts +40 -0
  234. package/packages/ui/lib/routes/stream.js +68 -0
  235. package/packages/ui/lib/routes/summary.d.ts +1 -1
  236. package/packages/ui/lib/routes/summary.js +1 -1
  237. package/packages/ui/lib/routes/unregister.d.ts +1 -1
  238. package/packages/ui/lib/routes/unregister.js +1 -1
  239. package/packages/ui/lib/viewmodels/deps.d.ts +1 -31
  240. package/packages/ui/lib/viewmodels/deps.js +1 -89
  241. package/packages/ui/lib/viewmodels/depsHelpers.d.ts +1 -28
  242. package/packages/ui/lib/viewmodels/depsHelpers.js +72 -11
  243. package/packages/ui/lib/viewmodels/summary.d.ts +7 -2
  244. package/packages/ui/lib/viewmodels/summary.js +55 -35
  245. package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +1 -1
  246. package/packages/ui/lib/viewmodels/summaryHelpers.js +1 -1
  247. package/packages/ui/lib/warnings.d.ts +1 -1
  248. package/packages/ui/lib/warnings.js +1 -1
  249. package/packages/ui/package.json +4 -4
  250. package/packages/providers/lib/engines/strata.d.ts +0 -53
@@ -13,13 +13,16 @@
13
13
  * queries the running engine's model endpoint through the terminal for the id
14
14
  * it actually loaded (family and size sized to the host), so the registrar
15
15
  * publishes the served model, not a placeholder.
16
- * @module dsh-plugin-local-infer/providers/engines/strataAdapter
16
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataAdapter
17
17
  */
18
18
  import { join } from 'node:path';
19
- import { EngineAdapter } from '../../../core/lib/index.js';
20
- import { customArgEnv, customArgFlags, delay, envFromSpecs, flagsFromSpecs, nodeLifecycleHost, trackChild, } from "../adapters.js";
21
- import { syncAndRebuildEngine } from "../acquire.js";
22
- import { STRATA_PARAMETERS, strataModelKey } from "./strata.js";
19
+ import { EngineAdapter, autoRebuildEnabled } from '../../../../core/lib/index.js';
20
+ import { HEALTH_POLL_DEFAULT_MS, HEALTH_POLL_MAX_ATTEMPTS, auditRun, customArgEnv, customArgFlags, delay, envFromSpecs, flagsFromSpecs, logHealthPoll, nodeLifecycleHost, stopProcessPlan, trackChild, } from "../../adapters.js";
21
+ import { syncEngineForDeploy } from "../../acquire.js";
22
+ import { STRATA_PARAMETERS, strataDefaults, strataModelKey, } from "./strata.js";
23
+ import { strataLinuxSourceLaunch } from "./strataLinux.js";
24
+ import { strataMacOSSourceLaunch } from "./strataMacOS.js";
25
+ import { strataWindowsSourceLaunch } from "./strataWindows.js";
23
26
  /**
24
27
  * The Strata docker image the adapter pulls and runs. The image is the
25
28
  * upstream GitHub Container Registry artifact for the newest release's CUDA 13
@@ -34,6 +37,17 @@ export const STRATA_DOCKER_IMAGE = 'ghcr.io/niko1221/strata:latest-cuda13';
34
37
  * docs/AI_SETUP.md step 2 (Linux and Mac; Windows uses the PowerShell twin).
35
38
  */
36
39
  export const STRATA_BINARY_INSTALL = 'curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh';
40
+ /**
41
+ * The source-build wrapper is OS-specific (setup.sh on Linux/Mac,
42
+ * START-HERE.bat on Windows), so the launch argv comes from the host OS's
43
+ * launch function. The adapter's renderLaunch reads this map by the hardware
44
+ * profile's os, keeping the per-OS command in its own OS file.
45
+ */
46
+ const STRATA_SOURCE_LAUNCH = {
47
+ linux: strataLinuxSourceLaunch,
48
+ macos: strataMacOSSourceLaunch,
49
+ windows: strataWindowsSourceLaunch,
50
+ };
37
51
  /**
38
52
  * strataPreReadyState reads the phase the strata process is in from the tail of
39
53
  * its accumulated output. The Terminal downloads the engine and the model files
@@ -201,6 +215,7 @@ export class StrataAdapter extends EngineAdapter {
201
215
  ...(modelId !== undefined ? { modelId } : {}),
202
216
  port,
203
217
  healthUrl: `http://127.0.0.1:${port}/health`,
218
+ os: _hw.os,
204
219
  };
205
220
  }
206
221
  if (mode === 'binary') {
@@ -225,50 +240,48 @@ export class StrataAdapter extends EngineAdapter {
225
240
  ...(modelId !== undefined ? { modelId } : {}),
226
241
  port,
227
242
  healthUrl: `http://127.0.0.1:${port}/health`,
243
+ os: _hw.os,
228
244
  };
229
245
  }
230
- // The source build: run setup.sh with the model. It reuses the engine the
231
- // Get step built (the acquisition build step), downloads the named model,
232
- // and starts the engine. Running setup.sh (rather than a pre-written
233
- // run-<model>.sh start script) is model-aware and self-contained, so the
246
+ // The source build: run the OS wrapper (setup.sh on Linux/Mac,
247
+ // START-HERE.bat on Windows) with the model. It reuses the engine the Get
248
+ // step built (the acquisition build step), downloads the named model, and
249
+ // starts the engine. Running the wrapper (rather than a pre-written
250
+ // run-<model> start script) is model-aware and self-contained, so the
234
251
  // launch does not depend on the build step having written a script for this
235
- // exact model. The deploy step resolves setup.sh to an absolute path in the
236
- // checkout before spawning.
237
- const family = typeof config.family === 'string' && config.family !== '' ? config.family : 'qwen';
238
- const vision = typeof config.vision === 'string' && config.vision !== '' ? config.vision : 'on';
239
- const context = typeof config.context === 'string' && config.context !== '' ? config.context : undefined;
240
- // setup.sh's --vision takes yes|no|gpu|cpu; the surface's on|off maps onto
241
- // it (gpu and cpu pass through).
242
- const visionFlag = vision === 'on' ? 'yes' : vision === 'off' ? 'no' : vision;
252
+ // exact model. The deploy step resolves the wrapper to an absolute path in
253
+ // the checkout before spawning.
254
+ // The source-build wrapper is OS-specific (setup.sh on Linux/Mac,
255
+ // START-HERE.bat on Windows), so the argv comes from the host OS's launch
256
+ // function. The config reads (family, vision, context) are OS-agnostic and
257
+ // resolve their defaults from the parameter surface, so the defaults have
258
+ // one home.
259
+ const { family, vision, context } = strataDefaults(config);
260
+ const sourceLaunch = STRATA_SOURCE_LAUNCH[_hw.os];
243
261
  return {
244
262
  engineId: this.id,
245
263
  kind: 'process',
246
- argv: [
247
- 'setup.sh',
248
- '--yes',
249
- ...(model !== '' ? ['--model', model] : []),
250
- ...(family !== 'qwen' ? ['--family', family] : []),
251
- '--vision',
252
- visionFlag,
253
- ...(context !== undefined ? ['--context', context] : []),
254
- '--port',
255
- String(port),
256
- ...customArgs,
257
- ],
264
+ argv: sourceLaunch({ model, family, vision, context, port, customArgs }),
258
265
  env: {},
259
266
  ...(modelId !== undefined ? { modelId } : {}),
260
267
  port,
261
268
  healthUrl: `http://127.0.0.1:${port}/health`,
269
+ os: _hw.os,
262
270
  };
263
271
  }
264
272
  async deploy(plan, platform, onProgress, options) {
265
273
  if (plan.kind === 'docker') {
266
- // The image pull is the docker build step: the card's button reads
267
- // "Building..." for it.
268
- onProgress?.('build');
269
- const pull = await this.host.run(`docker pull ${STRATA_DOCKER_IMAGE}`);
270
- if (!pull.ok) {
271
- return { ok: false, detail: `docker pull failed: ${pull.detail ?? 'unknown'}` };
274
+ // Auto Rebuild off (the card's checkbox): the image pull is skipped and
275
+ // the already-present image starts. The image pull is the docker build
276
+ // step: the card's button reads "Building..." for it, and its
277
+ // `$ <command>` line reaches the launch run's log sink before the child
278
+ // spawns.
279
+ if (autoRebuildEnabled(options?.autoRebuild)) {
280
+ onProgress?.('build');
281
+ const pull = await auditRun(this.host, `docker pull ${STRATA_DOCKER_IMAGE}`, options?.onLog);
282
+ if (!pull.ok) {
283
+ return { ok: false, detail: `docker pull failed: ${pull.detail ?? 'unknown'}` };
284
+ }
272
285
  }
273
286
  const handle = this.host.spawn(plan.argv ?? [], plan.env ?? {});
274
287
  trackChild(this.children, this.planKey(plan), handle);
@@ -278,60 +291,61 @@ export class StrataAdapter extends EngineAdapter {
278
291
  const engineDir = platform?.engineDirectory;
279
292
  // The binary plan runs the strata command (on the PATH after the install
280
293
  // script), so its build step is the one-line install. The source-build
281
- // plan runs setup.sh in the checkout, so its build step is the git sync
282
- // plus the engine's own setup.sh (the acquisition build steps), and the
283
- // launch resolves setup.sh to an absolute path in that checkout.
294
+ // plan runs the OS wrapper in the checkout, so its build step is the git
295
+ // sync plus the engine's own wrapper (the acquisition build steps), and
296
+ // the launch resolves the wrapper to an absolute path in that checkout.
284
297
  const isBinary = plan.argv?.[0] === 'strata';
285
298
  let buildLogs = '';
286
299
  if (isBinary) {
287
- // The install script downloads the Terminal: the card's button reads
288
- // "Downloading..." for it.
289
- onProgress?.('download');
290
- const install = await this.host.run(STRATA_BINARY_INSTALL);
291
- if (!install.ok) {
292
- return { ok: false, detail: `strata install failed: ${install.detail ?? 'unknown'}` };
300
+ // Auto Rebuild off (the card's checkbox): the install is skipped and
301
+ // the already-installed strata command starts. The install script
302
+ // downloads the Terminal: the card's button reads "Downloading..."
303
+ // for it, and its `$ <command>` line reaches the launch run's log
304
+ // sink before the child spawns.
305
+ if (autoRebuildEnabled(options?.autoRebuild)) {
306
+ onProgress?.('download');
307
+ const install = await auditRun(this.host, STRATA_BINARY_INSTALL, options?.onLog);
308
+ if (!install.ok) {
309
+ return { ok: false, detail: `strata install failed: ${install.detail ?? 'unknown'}` };
310
+ }
293
311
  }
294
312
  }
295
313
  else {
296
- // The source build needs the checkout directory to resolve setup.sh;
297
- // without it the launch cannot find the engine.
314
+ // The source build needs the checkout directory to resolve the OS
315
+ // wrapper; without it the launch cannot find the engine.
298
316
  if (engineDir === undefined) {
299
317
  return {
300
318
  ok: false,
301
- detail: 'the source build needs an engine directory (the Get step checkout) to run setup.sh',
319
+ detail: 'the source build needs an engine directory (the Get step checkout) to run the OS wrapper',
302
320
  };
303
321
  }
304
- if (options?.autoRebuild !== false) {
305
- onProgress?.('download');
306
- const sync = await syncAndRebuildEngine(this.host, {
322
+ if (autoRebuildEnabled(options?.autoRebuild)) {
323
+ // The conditional rebuild fetches the checkout, prices it against the
324
+ // remote branch, and rebuilds only when it is behind (or a fresh
325
+ // clone). The decision, the build command, and its output are
326
+ // captured into buildLogs and threaded to the card's Logs section.
327
+ const sync = await syncEngineForDeploy(this.host, {
307
328
  engineId: this.id,
308
329
  directory: engineDir,
309
- ...(platform?.engineFork !== undefined ? { fork: platform.engineFork } : {}),
310
- ...(options?.allowRunDeps !== undefined ? { allowRunDeps: options.allowRunDeps } : {}),
311
- ...(platform?.buildCommands !== undefined
312
- ? { buildCommands: platform.buildCommands }
313
- : {}),
314
- // Report the build phase the moment the build steps start, so the
315
- // card's button reads "Building..." while the build is in flight.
316
- onBuildStart: () => onProgress?.('build'),
317
- }, () => { });
318
- buildLogs = sync.logs;
330
+ ...(platform !== undefined ? { platform } : {}),
331
+ ...(options !== undefined ? { options } : {}),
332
+ // The host OS the build steps pick for: a Windows host reads the
333
+ // engine's Windows build steps when the user carries no build-
334
+ // command override.
335
+ ...(plan.os !== undefined ? { os: plan.os } : {}),
336
+ ...(onProgress !== undefined ? { onProgress } : {}),
337
+ });
338
+ buildLogs = sync.buildLogs;
319
339
  if (!sync.ok) {
320
340
  return { ok: false, detail: sync.detail ?? 'unknown', logs: buildLogs };
321
341
  }
322
- // The build output reads as a fresh Logs section: a "Building..."
323
- // separator leads the build decision and output, the same line the
324
- // card writes when the build step event lands.
325
- if (sync.rebuilt && buildLogs !== '') {
326
- buildLogs = `--- Building...\n${buildLogs}`;
327
- }
328
342
  }
329
343
  }
330
344
  const withLogs = (result) => buildLogs !== '' ? { ...result, logs: buildLogs } : result;
331
- // The source-build plan names setup.sh relative to the checkout; resolve
332
- // it to an absolute path so spawn finds it (spawn resolves a bare name
333
- // against PATH, not the cwd). The binary plan's strata is on the PATH, so
334
- // it spawns as-is.
345
+ // The source-build plan names the OS wrapper relative to the checkout;
346
+ // resolve it to an absolute path so spawn finds it (spawn resolves a bare
347
+ // name against PATH, not the cwd). The binary plan's strata is on the
348
+ // PATH, so it spawns as-is.
335
349
  const argv = plan.argv ?? [];
336
350
  const spawnArgv = !isBinary && engineDir !== undefined
337
351
  ? [join(engineDir, argv[0] ?? 'setup.sh'), ...argv.slice(1)]
@@ -351,62 +365,85 @@ export class StrataAdapter extends EngineAdapter {
351
365
  // reports the start phase: a 200 is ready, a process that ended before
352
366
  // readiness is failed, and a process still fetching its files after the
353
367
  // attempt cap is downloading (in progress, not a failure) so the card
354
- // re-polls instead of showing a broken launch.
355
- const pollMs = options?.pollMs ?? 1000;
356
- const maxAttempts = options?.maxAttempts ?? 120;
357
- let last = { status: 0, ok: false };
358
- let lastPreReady = null;
359
- for (let attempt = 1; attempt <= maxAttempts; attempt++) {
360
- last = await this.host.fetch(plan.healthUrl);
361
- if (last.status === 200) {
362
- return { healthy: true, status: 200, state: 'ready' };
363
- }
364
- // A running tracked process reports its start phase from its output. A
365
- // missing handle (no deploy tracked one, or the process already ended)
366
- // falls through to the plain poll: the health URL stays down, so the
367
- // loop times out and reads the start as failed.
368
+ // re-polls instead of showing a broken launch. The shared logHealthPoll
369
+ // wrap carries the URL-query rule (one `> GET` line ahead of the settled
370
+ // verdict, retries silent).
371
+ return logHealthPoll(options?.onLog, plan.healthUrl, async () => {
372
+ const pollMs = options?.pollMs ?? HEALTH_POLL_DEFAULT_MS;
373
+ const maxAttempts = options?.maxAttempts ?? HEALTH_POLL_MAX_ATTEMPTS;
374
+ // The tracked handle is read before the loop: trackChild drops the map
375
+ // entry when the child ends, so a late read would miss the exit state
376
+ // the early-exit check needs.
368
377
  const handle = this.children.get(this.planKey(plan));
369
- if (handle !== undefined) {
370
- lastPreReady = strataPreReadyState(handle.logs ?? '');
378
+ let last = { status: 0, ok: false };
379
+ let lastPreReady = null;
380
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
381
+ // The state read runs before the fetch: a child that settled (a crash,
382
+ // a pkill, or a spawn failure) will never report 200, so the poll
383
+ // ends here with a failed result instead of the full attempt cap.
384
+ if (handle?.hasExited?.() === true) {
385
+ return {
386
+ healthy: false,
387
+ status: last.status,
388
+ state: 'failed',
389
+ detail: 'the engine process exited before it reported ready',
390
+ };
391
+ }
392
+ last = await this.host.fetch(plan.healthUrl);
393
+ if (last.status === 200) {
394
+ return { healthy: true, status: 200, state: 'ready' };
395
+ }
396
+ // A running tracked process reports its start phase from its output. A
397
+ // missing handle (no deploy tracked one, or the process already ended)
398
+ // falls through to the plain poll: the health URL stays down, so the
399
+ // loop times out and reads the start as failed.
400
+ if (handle !== undefined) {
401
+ lastPreReady = strataPreReadyState(handle.logs ?? '');
402
+ }
403
+ if (pollMs > 0 && attempt < maxAttempts) {
404
+ await delay(pollMs);
405
+ }
371
406
  }
372
- if (pollMs > 0 && attempt < maxAttempts) {
373
- await delay(pollMs);
407
+ // The engine did not report ready within the attempt cap. If it was still
408
+ // downloading its files, read the start as in progress (downloading): the
409
+ // download is not a broken launch, and the card re-polls until the engine
410
+ // reports ready. If the download was done and the engine was starting,
411
+ // read the start as failed (a stuck start timed out).
412
+ if (lastPreReady === 'downloading') {
413
+ return {
414
+ healthy: false,
415
+ status: last.status,
416
+ state: 'downloading',
417
+ detail: 'the engine is still downloading its model files',
418
+ };
374
419
  }
375
- }
376
- // The engine did not report ready within the attempt cap. If it was still
377
- // downloading its files, read the start as in progress (downloading): the
378
- // download is not a broken launch, and the card re-polls until the engine
379
- // reports ready. If the download was done and the engine was starting,
380
- // read the start as failed (a stuck start timed out).
381
- if (lastPreReady === 'downloading') {
382
420
  return {
383
421
  healthy: false,
384
422
  status: last.status,
385
- state: 'downloading',
386
- detail: 'the engine is still downloading its model files',
423
+ state: 'failed',
424
+ detail: `health check did not return 200 within ${maxAttempts} attempts`,
387
425
  };
388
- }
389
- return {
390
- healthy: false,
391
- status: last.status,
392
- state: 'failed',
393
- detail: `health check did not return 200 within ${maxAttempts} attempts`,
394
- };
426
+ });
395
427
  }
396
- async stop(plan) {
428
+ async stop(plan, log) {
397
429
  if (plan.kind === 'docker' && plan.containerName !== undefined) {
398
- await this.host.run(`docker stop ${plan.containerName}`);
430
+ await auditRun(this.host, `docker stop ${plan.containerName}`, log);
399
431
  }
400
432
  // The binary plan stops through the strata command; the source-build plan
401
433
  // has no strata command, so it stops by signalling the tracked process.
402
434
  if (plan.kind === 'process' && plan.argv?.[0] === 'strata') {
403
- await this.host.run('strata launch --stop');
435
+ await auditRun(this.host, 'strata launch --stop', log);
404
436
  }
405
437
  const handle = this.children.get(this.planKey(plan));
406
438
  if (handle !== undefined) {
407
439
  handle.kill();
408
440
  this.children.delete(this.planKey(plan));
441
+ return;
409
442
  }
443
+ // No tracked child (an engine a DSH restart re-adopted): signal the pid
444
+ // the stored launch record stamped on the plan, so the stop reaches a
445
+ // process this adapter instance did not spawn.
446
+ await stopProcessPlan(this.host, plan, log);
410
447
  }
411
448
  buildMode(config) {
412
449
  const mode = config.buildMode;
@@ -418,10 +455,9 @@ export class StrataAdapter extends EngineAdapter {
418
455
  return 'binary';
419
456
  }
420
457
  port(config) {
458
+ // 8080 is the port the strata launch CLI binds by default, so a bare
459
+ // config launches on it.
421
460
  return typeof config.port === 'number' ? config.port : 8080;
422
461
  }
423
- planKey(plan) {
424
- return `${plan.engineId}:${plan.port}`;
425
- }
426
462
  }
427
- //# sourceMappingURL=strataAdapter.js.map
463
+ //# sourceMappingURL=strataAdapter.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Arch Linux build profile. Arch builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataArch
6
+ */
7
+ import type { EngineOsProfile } from '../engineOs.ts';
8
+ export declare const STRATA_ARCH: EngineOsProfile;
9
+ //# sourceMappingURL=strataArch.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Arch Linux build profile. Arch builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataArch
6
+ */
7
+ import { STRATA_LINUX } from "./strataLinux.js";
8
+ export const STRATA_ARCH = STRATA_LINUX;
9
+ //# sourceMappingURL=strataArch.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Debian build profile. Debian builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataDebian
6
+ */
7
+ import type { EngineOsProfile } from '../engineOs.ts';
8
+ export declare const STRATA_DEBIAN: EngineOsProfile;
9
+ //# sourceMappingURL=strataDebian.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Debian build profile. Debian builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataDebian
6
+ */
7
+ import { STRATA_LINUX } from "./strataLinux.js";
8
+ export const STRATA_DEBIAN = STRATA_LINUX;
9
+ //# sourceMappingURL=strataDebian.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Fedora build profile. Fedora builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataFedora
6
+ */
7
+ import type { EngineOsProfile } from '../engineOs.ts';
8
+ export declare const STRATA_FEDORA: EngineOsProfile;
9
+ //# sourceMappingURL=strataFedora.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Strata Fedora build profile. Fedora builds Strata through the shared
3
+ * Linux route (the engine's own setup.sh), so this profile reuses the shared
4
+ * Linux profile and carries no build steps of its own.
5
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataFedora
6
+ */
7
+ import { STRATA_LINUX } from "./strataLinux.js";
8
+ export const STRATA_FEDORA = STRATA_LINUX;
9
+ //# sourceMappingURL=strataFedora.js.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The Strata shared Linux build profile. Every Linux distro (Arch, Debian,
3
+ * Fedora) builds Strata through the engine's own setup.sh: the README's
4
+ * Build-from-source route, which downloads what it needs and installs the
5
+ * `strata` Terminal to the path. `--yes` takes the recommended answer to every
6
+ * question and `--no-start` builds and installs without starting the server,
7
+ * which the adapter's launch step then does. There is no build directory,
8
+ * because setup.sh installs the binary to the path. The distro profiles reuse
9
+ * this profile.
10
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataLinux
11
+ */
12
+ import type { EngineOsProfile } from '../engineOs.ts';
13
+ import { type StrataSourceLaunchArgs } from './strata.ts';
14
+ export declare const STRATA_LINUX: EngineOsProfile;
15
+ /**
16
+ * strataLinuxSourceLaunch renders the source-build launch argv for the Linux
17
+ * route: the engine's own setup.sh with --yes (unattended) and the resolved
18
+ * model, family, vision, context, and port. macOS reuses this route.
19
+ */
20
+ export declare function strataLinuxSourceLaunch(args: StrataSourceLaunchArgs): string[];
21
+ //# sourceMappingURL=strataLinux.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The Strata shared Linux build profile. Every Linux distro (Arch, Debian,
3
+ * Fedora) builds Strata through the engine's own setup.sh: the README's
4
+ * Build-from-source route, which downloads what it needs and installs the
5
+ * `strata` Terminal to the path. `--yes` takes the recommended answer to every
6
+ * question and `--no-start` builds and installs without starting the server,
7
+ * which the adapter's launch step then does. There is no build directory,
8
+ * because setup.sh installs the binary to the path. The distro profiles reuse
9
+ * this profile.
10
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataLinux
11
+ */
12
+ import { strataSourceLaunchArgs } from "./strata.js";
13
+ import { SYSTEM_DEPS } from "../../systemDeps.js";
14
+ export const STRATA_LINUX = {
15
+ buildSteps: ['cd {dir} && ./setup.sh --yes --no-start'],
16
+ binary: 'strata',
17
+ // The Strata source build git-clones the repo and runs setup.sh, which
18
+ // downloads what it needs; the only host deps are git (the clone) and curl
19
+ // (the model download).
20
+ deps: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
21
+ };
22
+ /**
23
+ * strataLinuxSourceLaunch renders the source-build launch argv for the Linux
24
+ * route: the engine's own setup.sh with --yes (unattended) and the resolved
25
+ * model, family, vision, context, and port. macOS reuses this route.
26
+ */
27
+ export function strataLinuxSourceLaunch(args) {
28
+ return strataSourceLaunchArgs('setup.sh', args);
29
+ }
30
+ //# sourceMappingURL=strataLinux.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The Strata macOS build profile. macOS builds Strata through the engine's own
3
+ * setup.sh, the same route as Linux (the README's setup walks both), so this
4
+ * profile reuses the shared Linux build steps; the binary keeps its plain
5
+ * name (no .exe on macOS).
6
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataMacOS
7
+ */
8
+ import type { EngineOsProfile } from '../engineOs.ts';
9
+ import type { StrataSourceLaunchArgs } from './strata.ts';
10
+ export declare const STRATA_MACOS: EngineOsProfile;
11
+ /**
12
+ * strataMacOSSourceLaunch reuses the Linux source-build launch: macOS builds
13
+ * through the same setup.sh route, so the argv is identical.
14
+ */
15
+ export declare function strataMacOSSourceLaunch(args: StrataSourceLaunchArgs): string[];
16
+ //# sourceMappingURL=strataMacOS.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The Strata macOS build profile. macOS builds Strata through the engine's own
3
+ * setup.sh, the same route as Linux (the README's setup walks both), so this
4
+ * profile reuses the shared Linux build steps; the binary keeps its plain
5
+ * name (no .exe on macOS).
6
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataMacOS
7
+ */
8
+ import { STRATA_LINUX, strataLinuxSourceLaunch } from "./strataLinux.js";
9
+ export const STRATA_MACOS = STRATA_LINUX;
10
+ /**
11
+ * strataMacOSSourceLaunch reuses the Linux source-build launch: macOS builds
12
+ * through the same setup.sh route, so the argv is identical.
13
+ */
14
+ export function strataMacOSSourceLaunch(args) {
15
+ return strataLinuxSourceLaunch(args);
16
+ }
17
+ //# sourceMappingURL=strataMacOS.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Strata Windows build profile. The Windows source route is the engine's
3
+ * own START-HERE.bat wrapper (docs/SOURCE_INSTALL.md, From source: Windows),
4
+ * not the Linux setup.sh. `--yes` accepts the recommended answer to every
5
+ * question, so the step runs unattended. The wrapper acquires a ready-made
6
+ * engine when one fits the PC, and compiles one when it does not: the
7
+ * compile needs the Visual Studio 2022 Build Tools with the C++ workload
8
+ * (the sources are C++20, so VS2019 is too old). When setup cannot find the
9
+ * toolchain, point STRATA_VCVARS at vcvars64.bat before running. The build
10
+ * keeps its dependencies and products in the source install and writes the
11
+ * launch scripts (run-<model>.bat) and run configs (strata-<model>.json)
12
+ * into the checkout, so the profile carries no build directory. Updates run
13
+ * through UPDATE.bat.
14
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataWindows
15
+ */
16
+ import type { EngineOsProfile } from '../engineOs.ts';
17
+ import { type StrataSourceLaunchArgs } from './strata.ts';
18
+ export declare const STRATA_WINDOWS: EngineOsProfile;
19
+ /**
20
+ * strataWindowsSourceLaunch renders the source-build launch argv for the
21
+ * Windows route: the engine's own START-HERE.bat wrapper with --yes
22
+ * (unattended) and the resolved model, family, vision, context, and port. The
23
+ * wrapper acquires a ready-made engine when one fits the PC, and compiles one
24
+ * (the Visual Studio 2022 C++ toolchain) when it does not.
25
+ */
26
+ export declare function strataWindowsSourceLaunch(args: StrataSourceLaunchArgs): string[];
27
+ //# sourceMappingURL=strataWindows.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The Strata Windows build profile. The Windows source route is the engine's
3
+ * own START-HERE.bat wrapper (docs/SOURCE_INSTALL.md, From source: Windows),
4
+ * not the Linux setup.sh. `--yes` accepts the recommended answer to every
5
+ * question, so the step runs unattended. The wrapper acquires a ready-made
6
+ * engine when one fits the PC, and compiles one when it does not: the
7
+ * compile needs the Visual Studio 2022 Build Tools with the C++ workload
8
+ * (the sources are C++20, so VS2019 is too old). When setup cannot find the
9
+ * toolchain, point STRATA_VCVARS at vcvars64.bat before running. The build
10
+ * keeps its dependencies and products in the source install and writes the
11
+ * launch scripts (run-<model>.bat) and run configs (strata-<model>.json)
12
+ * into the checkout, so the profile carries no build directory. Updates run
13
+ * through UPDATE.bat.
14
+ * @module dsh-plugin-local-infer/providers/engines/strata/strataWindows
15
+ */
16
+ import { strataSourceLaunchArgs } from "./strata.js";
17
+ import { SYSTEM_DEPS } from "../../systemDeps.js";
18
+ export const STRATA_WINDOWS = {
19
+ buildSteps: ['cd {dir} && .\\START-HERE.bat --yes'],
20
+ // The engine command is the strata Terminal on every platform (a
21
+ // PowerShell command on Windows), so the name stays plain.
22
+ binary: 'strata',
23
+ // The Windows source route is the engine's own START-HERE.bat wrapper; the
24
+ // host deps are the same git-plus-curl list as the Linux route.
25
+ deps: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
26
+ };
27
+ /**
28
+ * strataWindowsSourceLaunch renders the source-build launch argv for the
29
+ * Windows route: the engine's own START-HERE.bat wrapper with --yes
30
+ * (unattended) and the resolved model, family, vision, context, and port. The
31
+ * wrapper acquires a ready-made engine when one fits the PC, and compiles one
32
+ * (the Visual Studio 2022 C++ toolchain) when it does not.
33
+ */
34
+ export function strataWindowsSourceLaunch(args) {
35
+ return strataSourceLaunchArgs('START-HERE.bat', args);
36
+ }
37
+ //# sourceMappingURL=strataWindows.js.map
@@ -20,10 +20,12 @@ export interface EngineInfo {
20
20
  }
21
21
  /**
22
22
  * The engines the Web card offers, in the order the card lists them. NInfer,
23
- * Hyper-Qwen, Infernix, llama.cpp, and Strata all carry parameter surfaces
24
- * (llama.cpp's is the specified set the plan names, verified when the binary
25
- * lands); Strata's surface is the `strata launch` flags and it supports all
26
- * three build modes (docker, source build, and the binary install).
23
+ * Hyper-Qwen, Infernix, llama.cpp, Strata, and Basalt all carry parameter
24
+ * surfaces (llama.cpp's is the specified set the plan names, verified when the
25
+ * binary lands); Strata's surface is the `strata launch` flags and it supports
26
+ * all three build modes (docker, source build, and the binary install);
27
+ * Basalt's surface is the `basalt_config.json` settings and it is local-build
28
+ * only (the C++/CUDA engine ships no container image).
27
29
  */
28
30
  export declare const ENGINES: readonly EngineInfo[];
29
- //# sourceMappingURL=engines.d.ts.map
31
+ //# sourceMappingURL=engines.d.ts.map