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
@@ -32,4 +32,4 @@ export declare function isDshDebugMode(ctx: Context): boolean;
32
32
  * debug messages).
33
33
  */
34
34
  export declare function createDshDebugLogger(ctx: Context): DebugLogger;
35
- //# sourceMappingURL=debug.d.ts.map
35
+ //# sourceMappingURL=debug.d.ts.map
@@ -109,4 +109,4 @@ export function createDshDebugLogger(ctx) {
109
109
  },
110
110
  });
111
111
  }
112
- //# sourceMappingURL=debug.js.map
112
+ //# sourceMappingURL=debug.js.map
@@ -1,238 +1,26 @@
1
1
  /**
2
- * The per-OS SystemDep install command data. Each dep declares its purpose,
3
- * the which/version probe that reads "already installed", and its install
4
- * block keyed by package manager, mirroring the qwen-ninfer launcher header
5
- * (apt and the CUDA keyring on Debian/Ubuntu, pacman on Arch). The engine
6
- * dep plans map (engine, build mode) to these deps: a local NInfer build
7
- * needs the compile toolchain and the CUDA toolkit, a docker engine needs the
8
- * container runtime, and every engine downloads its model through the hf CLI.
2
+ * The per-engine dep plans, keyed by engine id. The local build-mode lists are
3
+ * sourced from the engine OS profile's deps (the Windows profile carries the
4
+ * winget/MSVC toolchain, the shared Linux profile the apt/dnf/pacman/brew
5
+ * toolchain), so the per-platform local lists have one home in the profiles.
6
+ * The docker and binary lists stay central here: they are build modes, not
7
+ * platform-specific, so they do not ride the OS profiles.
9
8
  *
10
- * The dnf and brew blocks are the plan's "flagged when untested" sets: they
11
- * name the right packages but have not been run on a live host.
9
+ * The shared SystemDep install command catalog (the named host deps every
10
+ * list composes) lives in systemDeps.ts; it is re-exported here so the
11
+ * catalog keeps its public home in this module.
12
12
  * @module dsh-plugin-local-infer/providers/deps
13
13
  */
14
- import type { EngineDepPlan, HardwareProfile } from 'dsh-plugin-local-infer/core';
14
+ import type { EngineDepPlan, SystemDep } from 'dsh-plugin-local-infer/core';
15
+ export { SYSTEM_DEPS } from './systemDeps.ts';
15
16
  /**
16
- * The named host deps every engine plan composes. The install blocks are the
17
- * copy/paste commands the user runs; envAfter carries the per-manager export
18
- * lines (the CUDA paths differ between Debian and Arch).
17
+ * engineLocalDeps reads the host build deps an engine's local build needs on
18
+ * an OS, from the engine OS profile's deps (the single home for the
19
+ * per-platform toolchain). A Windows host reads the Windows profile (the
20
+ * winget/MSVC route); every other host reads the shared Linux profile, so a
21
+ * macOS host gets the Linux toolchain list.
19
22
  */
20
- export declare const SYSTEM_DEPS: {
21
- cmake: {
22
- id: string;
23
- purpose: string;
24
- requiresSudo: true;
25
- detect: (hw: HardwareProfile) => Promise<boolean>;
26
- install: {
27
- apt: {
28
- commands: string[];
29
- };
30
- dnf: {
31
- commands: string[];
32
- };
33
- pacman: {
34
- commands: string[];
35
- };
36
- brew: {
37
- commands: string[];
38
- };
39
- };
40
- };
41
- ninja: {
42
- id: string;
43
- purpose: string;
44
- requiresSudo: true;
45
- detect: (hw: HardwareProfile) => Promise<boolean>;
46
- install: {
47
- apt: {
48
- commands: string[];
49
- };
50
- dnf: {
51
- commands: string[];
52
- };
53
- pacman: {
54
- commands: string[];
55
- };
56
- brew: {
57
- commands: string[];
58
- };
59
- };
60
- };
61
- pkgConfig: {
62
- id: string;
63
- purpose: string;
64
- requiresSudo: true;
65
- detect: (hw: HardwareProfile) => Promise<boolean>;
66
- install: {
67
- apt: {
68
- commands: string[];
69
- };
70
- dnf: {
71
- commands: string[];
72
- };
73
- pacman: {
74
- commands: string[];
75
- };
76
- brew: {
77
- commands: string[];
78
- };
79
- };
80
- };
81
- ffmpeg: {
82
- id: string;
83
- purpose: string;
84
- requiresSudo: true;
85
- detect: (hw: HardwareProfile) => Promise<boolean>;
86
- install: {
87
- apt: {
88
- commands: string[];
89
- };
90
- dnf: {
91
- commands: string[];
92
- };
93
- pacman: {
94
- commands: string[];
95
- };
96
- brew: {
97
- commands: string[];
98
- };
99
- };
100
- };
101
- curl: {
102
- id: string;
103
- purpose: string;
104
- requiresSudo: true;
105
- detect: (hw: HardwareProfile) => Promise<boolean>;
106
- install: {
107
- apt: {
108
- commands: string[];
109
- };
110
- dnf: {
111
- commands: string[];
112
- };
113
- pacman: {
114
- commands: string[];
115
- };
116
- brew: {
117
- commands: string[];
118
- };
119
- };
120
- };
121
- cudaToolkit: {
122
- id: string;
123
- purpose: string;
124
- requiresSudo: true;
125
- detect: (hw: HardwareProfile) => Promise<boolean>;
126
- install: {
127
- apt: {
128
- commands: string[];
129
- envAfter: {
130
- CUDACXX: string;
131
- };
132
- };
133
- dnf: {
134
- commands: string[];
135
- envAfter: {
136
- CUDACXX: string;
137
- };
138
- };
139
- pacman: {
140
- commands: string[];
141
- envAfter: {
142
- CUDAToolkit_ROOT: string;
143
- CUDACXX: string;
144
- TORCH_CUDA_ARCH_LIST: string;
145
- };
146
- };
147
- brew: {
148
- commands: string[];
149
- envAfter: {
150
- CUDACXX: string;
151
- };
152
- };
153
- };
154
- };
155
- git: {
156
- id: string;
157
- purpose: string;
158
- requiresSudo: true;
159
- detect: (hw: HardwareProfile) => Promise<boolean>;
160
- install: {
161
- apt: {
162
- commands: string[];
163
- };
164
- dnf: {
165
- commands: string[];
166
- };
167
- pacman: {
168
- commands: string[];
169
- };
170
- brew: {
171
- commands: string[];
172
- };
173
- };
174
- };
175
- docker: {
176
- id: string;
177
- purpose: string;
178
- requiresSudo: true;
179
- detect: (hw: HardwareProfile) => Promise<boolean>;
180
- install: {
181
- apt: {
182
- commands: string[];
183
- };
184
- dnf: {
185
- commands: string[];
186
- };
187
- pacman: {
188
- commands: string[];
189
- };
190
- brew: {
191
- commands: string[];
192
- };
193
- };
194
- };
195
- nvidiaContainerToolkit: {
196
- id: string;
197
- purpose: string;
198
- requiresSudo: true;
199
- detect: (hw: HardwareProfile) => Promise<boolean>;
200
- install: {
201
- apt: {
202
- commands: string[];
203
- };
204
- dnf: {
205
- commands: string[];
206
- };
207
- pacman: {
208
- commands: string[];
209
- };
210
- brew: {
211
- commands: never[];
212
- };
213
- };
214
- };
215
- hfCli: {
216
- id: string;
217
- purpose: string;
218
- requiresSudo: false;
219
- detect: (hw: HardwareProfile) => Promise<boolean>;
220
- install: {
221
- apt: {
222
- commands: string[];
223
- };
224
- dnf: {
225
- commands: string[];
226
- };
227
- pacman: {
228
- commands: string[];
229
- };
230
- brew: {
231
- commands: string[];
232
- };
233
- };
234
- };
235
- };
23
+ export declare function engineLocalDeps(engineId: string, os: 'linux' | 'windows' | 'macos'): readonly SystemDep[];
236
24
  /**
237
25
  * The per-engine dep plans, keyed by engine id. The local NInfer list is the
238
26
  * qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
@@ -243,6 +31,15 @@ export declare const SYSTEM_DEPS: {
243
31
  * cmake-plus-hf list. Strata carries one list per build mode: the source
244
32
  * build needs git and curl, the binary install needs curl, and the docker
245
33
  * mode needs the container runtime plus the GPU toolkit.
34
+ *
35
+ * The local lists ride the plan as a per-OS record (the linux and windows
36
+ * entries), read from the engine OS profile's deps through engineLocalDeps,
37
+ * so the per-platform toolchain (the apt/dnf/pacman/brew route on Linux, the
38
+ * winget/MSVC route on Windows) has one home in the profiles. An engine with
39
+ * no dedicated Windows toolchain (hyperqwen, llamacpp, strata) reads the same
40
+ * list for both entries: its Windows profile reuses the shared Linux profile
41
+ * (hyperqwen, empty for the compose engine) or declares the identical list
42
+ * (llamacpp, strata).
246
43
  */
247
44
  export declare const ENGINE_DEP_PLANS: Record<string, EngineDepPlan>;
248
- //# sourceMappingURL=deps.d.ts.map
45
+ //# sourceMappingURL=deps.d.ts.map
@@ -1,202 +1,30 @@
1
1
  /**
2
- * The per-OS SystemDep install command data. Each dep declares its purpose,
3
- * the which/version probe that reads "already installed", and its install
4
- * block keyed by package manager, mirroring the qwen-ninfer launcher header
5
- * (apt and the CUDA keyring on Debian/Ubuntu, pacman on Arch). The engine
6
- * dep plans map (engine, build mode) to these deps: a local NInfer build
7
- * needs the compile toolchain and the CUDA toolkit, a docker engine needs the
8
- * container runtime, and every engine downloads its model through the hf CLI.
2
+ * The per-engine dep plans, keyed by engine id. The local build-mode lists are
3
+ * sourced from the engine OS profile's deps (the Windows profile carries the
4
+ * winget/MSVC toolchain, the shared Linux profile the apt/dnf/pacman/brew
5
+ * toolchain), so the per-platform local lists have one home in the profiles.
6
+ * The docker and binary lists stay central here: they are build modes, not
7
+ * platform-specific, so they do not ride the OS profiles.
9
8
  *
10
- * The dnf and brew blocks are the plan's "flagged when untested" sets: they
11
- * name the right packages but have not been run on a live host.
9
+ * The shared SystemDep install command catalog (the named host deps every
10
+ * list composes) lives in systemDeps.ts; it is re-exported here so the
11
+ * catalog keeps its public home in this module.
12
12
  * @module dsh-plugin-local-infer/providers/deps
13
13
  */
14
- import { execFile } from 'node:child_process';
14
+ import { engineOsProfile } from "./acquire.js";
15
+ import { SYSTEM_DEPS } from "./systemDeps.js";
16
+ export { SYSTEM_DEPS } from "./systemDeps.js";
15
17
  /**
16
- * The probe timeout. A hung version probe must not hang the panel, so every
17
- * detect command is killed after this many milliseconds and read as missing.
18
+ * engineLocalDeps reads the host build deps an engine's local build needs on
19
+ * an OS, from the engine OS profile's deps (the single home for the
20
+ * per-platform toolchain). A Windows host reads the Windows profile (the
21
+ * winget/MSVC route); every other host reads the shared Linux profile, so a
22
+ * macOS host gets the Linux toolchain list.
18
23
  */
19
- const PROBE_TIMEOUT_MS = 5000;
20
- /**
21
- * probe builds a dep's detect function from a binary and its version args.
22
- * A missing binary, a non-zero exit, and a timeout all read as not installed,
23
- * which the checkDeps rule degrades to the missing status.
24
- */
25
- function probe(binary, args) {
26
- return async (_hw) => {
27
- try {
28
- await execFile(binary, args, { timeout: PROBE_TIMEOUT_MS });
29
- return true;
30
- }
31
- catch {
32
- return false;
33
- }
34
- };
24
+ export function engineLocalDeps(engineId, os) {
25
+ const profile = engineOsProfile(engineId, os === 'windows' ? 'windows' : 'linux');
26
+ return profile?.deps ?? [];
35
27
  }
36
- /**
37
- * The named host deps every engine plan composes. The install blocks are the
38
- * copy/paste commands the user runs; envAfter carries the per-manager export
39
- * lines (the CUDA paths differ between Debian and Arch).
40
- */
41
- export const SYSTEM_DEPS = {
42
- cmake: {
43
- id: 'cmake',
44
- purpose: 'compiles the local engine',
45
- requiresSudo: true,
46
- detect: probe('cmake', ['--version']),
47
- install: {
48
- apt: { commands: ['sudo apt install cmake'] },
49
- dnf: { commands: ['sudo dnf install cmake'] },
50
- pacman: { commands: ['sudo pacman -S --noconfirm cmake'] },
51
- brew: { commands: ['brew install cmake'] },
52
- },
53
- },
54
- ninja: {
55
- id: 'ninja',
56
- purpose: 'drives the cmake build',
57
- requiresSudo: true,
58
- detect: probe('ninja', ['--version']),
59
- install: {
60
- apt: { commands: ['sudo apt install ninja-build'] },
61
- dnf: { commands: ['sudo dnf install ninja'] },
62
- pacman: { commands: ['sudo pacman -S --noconfirm ninja'] },
63
- brew: { commands: ['brew install ninja'] },
64
- },
65
- },
66
- pkgConfig: {
67
- id: 'pkg-config',
68
- purpose: 'links the ffmpeg and curl dev libraries',
69
- requiresSudo: true,
70
- detect: probe('pkg-config', ['--version']),
71
- install: {
72
- apt: { commands: ['sudo apt install pkg-config'] },
73
- dnf: { commands: ['sudo dnf install pkgconf-pkg-config'] },
74
- pacman: { commands: ['sudo pacman -S --noconfirm pkgconf'] },
75
- brew: { commands: ['brew install pkgconf'] },
76
- },
77
- },
78
- ffmpeg: {
79
- id: 'ffmpeg',
80
- purpose: 'links the media codecs the vision tower needs',
81
- requiresSudo: true,
82
- detect: probe('ffmpeg', ['-version']),
83
- install: {
84
- apt: {
85
- commands: ['sudo apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev'],
86
- },
87
- dnf: { commands: ['sudo dnf install ffmpeg-devel'] },
88
- pacman: { commands: ['sudo pacman -S --noconfirm ffmpeg'] },
89
- brew: { commands: ['brew install ffmpeg'] },
90
- },
91
- },
92
- curl: {
93
- id: 'curl',
94
- purpose: 'links the HTTP client dev headers',
95
- requiresSudo: true,
96
- detect: probe('curl', ['--version']),
97
- install: {
98
- apt: { commands: ['sudo apt install libcurl4-openssl-dev'] },
99
- dnf: { commands: ['sudo dnf install libcurl-devel'] },
100
- pacman: { commands: ['sudo pacman -S --noconfirm curl'] },
101
- brew: { commands: ['brew install curl'] },
102
- },
103
- },
104
- cudaToolkit: {
105
- id: 'cuda-toolkit',
106
- purpose: 'compiles the CUDA kernels',
107
- requiresSudo: true,
108
- detect: probe('nvcc', ['--version']),
109
- install: {
110
- // The qwen-ninfer header, verbatim: the ubuntu2604 CUDA keyring plus the
111
- // toolkit, then the nvcc export the build reads.
112
- apt: {
113
- commands: [
114
- 'wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb',
115
- 'sudo dpkg -i cuda-keyring_1.1-1_all.deb',
116
- 'sudo apt-get update',
117
- 'sudo apt-get -y install cuda-toolkit-13-4',
118
- ],
119
- envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
120
- },
121
- dnf: {
122
- commands: ['sudo dnf install cuda-toolkit'],
123
- envAfter: { CUDACXX: '/usr/bin/nvcc' },
124
- },
125
- pacman: {
126
- commands: ['sudo pacman -S --noconfirm cuda'],
127
- envAfter: {
128
- CUDAToolkit_ROOT: '/opt/cuda',
129
- CUDACXX: '/opt/cuda/bin/nvcc',
130
- TORCH_CUDA_ARCH_LIST: '12.0',
131
- },
132
- },
133
- brew: {
134
- commands: ['brew install --cask nvidia-cuda'],
135
- envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
136
- },
137
- },
138
- },
139
- git: {
140
- id: 'git',
141
- purpose: 'clones the engine source',
142
- requiresSudo: true,
143
- detect: probe('git', ['--version']),
144
- install: {
145
- apt: { commands: ['sudo apt install git'] },
146
- dnf: { commands: ['sudo dnf install git'] },
147
- pacman: { commands: ['sudo pacman -S --noconfirm git'] },
148
- brew: { commands: ['brew install git'] },
149
- },
150
- },
151
- docker: {
152
- id: 'docker',
153
- purpose: 'runs the engine in a container',
154
- requiresSudo: true,
155
- detect: probe('docker', ['--version']),
156
- install: {
157
- apt: { commands: ['sudo apt install docker.io'] },
158
- dnf: { commands: ['sudo dnf install docker'] },
159
- pacman: { commands: ['sudo pacman -S --noconfirm docker'] },
160
- brew: { commands: ['brew install --cask docker'] },
161
- },
162
- },
163
- nvidiaContainerToolkit: {
164
- id: 'nvidia-container-toolkit',
165
- purpose: 'lets the container see the GPU',
166
- requiresSudo: true,
167
- detect: probe('nvidia-ctk', ['--version']),
168
- install: {
169
- // The NVIDIA-published apt setup. Untested on a live host, so it rides
170
- // the plan's "flagged when untested" rule.
171
- apt: {
172
- commands: [
173
- 'curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg',
174
- 'curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed \'s#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#\' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list',
175
- 'sudo apt-get update',
176
- 'sudo apt-get install -y nvidia-container-toolkit',
177
- ],
178
- },
179
- dnf: { commands: ['sudo dnf install nvidia-container-toolkit'] },
180
- pacman: { commands: ['sudo pacman -S --noconfirm nvidia-container-toolkit'] },
181
- // macOS has no NVIDIA GPU toolkit; the by-hand note renders instead.
182
- brew: { commands: [] },
183
- },
184
- },
185
- hfCli: {
186
- id: 'hf-cli',
187
- purpose: 'downloads the model artifact',
188
- requiresSudo: false,
189
- detect: probe('hf', ['--version']),
190
- install: {
191
- // The hf CLI installs through its own script, not a package manager, so
192
- // every manager keys the same block.
193
- apt: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
194
- dnf: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
195
- pacman: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
196
- brew: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
197
- },
198
- },
199
- };
200
28
  /**
201
29
  * The per-engine dep plans, keyed by engine id. The local NInfer list is the
202
30
  * qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
@@ -207,38 +35,43 @@ export const SYSTEM_DEPS = {
207
35
  * cmake-plus-hf list. Strata carries one list per build mode: the source
208
36
  * build needs git and curl, the binary install needs curl, and the docker
209
37
  * mode needs the container runtime plus the GPU toolkit.
38
+ *
39
+ * The local lists ride the plan as a per-OS record (the linux and windows
40
+ * entries), read from the engine OS profile's deps through engineLocalDeps,
41
+ * so the per-platform toolchain (the apt/dnf/pacman/brew route on Linux, the
42
+ * winget/MSVC route on Windows) has one home in the profiles. An engine with
43
+ * no dedicated Windows toolchain (hyperqwen, llamacpp, strata) reads the same
44
+ * list for both entries: its Windows profile reuses the shared Linux profile
45
+ * (hyperqwen, empty for the compose engine) or declares the identical list
46
+ * (llamacpp, strata).
210
47
  */
211
48
  export const ENGINE_DEP_PLANS = {
212
49
  ninfer: {
213
- local: [
214
- SYSTEM_DEPS.cmake,
215
- SYSTEM_DEPS.ninja,
216
- SYSTEM_DEPS.pkgConfig,
217
- SYSTEM_DEPS.ffmpeg,
218
- SYSTEM_DEPS.curl,
219
- SYSTEM_DEPS.cudaToolkit,
220
- SYSTEM_DEPS.hfCli,
221
- ],
50
+ local: {
51
+ linux: engineLocalDeps('ninfer', 'linux'),
52
+ windows: engineLocalDeps('ninfer', 'windows'),
53
+ },
222
54
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
223
55
  },
224
56
  hyperqwen: {
225
- local: [],
57
+ local: {
58
+ linux: engineLocalDeps('hyperqwen', 'linux'),
59
+ windows: engineLocalDeps('hyperqwen', 'windows'),
60
+ },
226
61
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
227
62
  },
228
63
  llamacpp: {
229
- local: [SYSTEM_DEPS.cmake, SYSTEM_DEPS.hfCli],
64
+ local: {
65
+ linux: engineLocalDeps('llamacpp', 'linux'),
66
+ windows: engineLocalDeps('llamacpp', 'windows'),
67
+ },
230
68
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.hfCli],
231
69
  },
232
70
  infernix: {
233
- local: [
234
- SYSTEM_DEPS.cmake,
235
- SYSTEM_DEPS.ninja,
236
- SYSTEM_DEPS.pkgConfig,
237
- SYSTEM_DEPS.ffmpeg,
238
- SYSTEM_DEPS.curl,
239
- SYSTEM_DEPS.cudaToolkit,
240
- SYSTEM_DEPS.hfCli,
241
- ],
71
+ local: {
72
+ linux: engineLocalDeps('infernix', 'linux'),
73
+ windows: engineLocalDeps('infernix', 'windows'),
74
+ },
242
75
  docker: [],
243
76
  },
244
77
  strata: {
@@ -246,9 +79,23 @@ export const ENGINE_DEP_PLANS = {
246
79
  // what it needs; the binary install is the one-line curl script; the docker
247
80
  // mode needs the container runtime plus the GPU toolkit (the model downloads
248
81
  // inside the container, so no hf CLI).
249
- local: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
82
+ local: {
83
+ linux: engineLocalDeps('strata', 'linux'),
84
+ windows: engineLocalDeps('strata', 'windows'),
85
+ },
250
86
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit],
251
87
  binary: [SYSTEM_DEPS.curl],
252
88
  },
89
+ basalt: {
90
+ // The CMake source build needs the C++/CUDA toolchain, the Python
91
+ // interpreter plus the serve/ server's pip requirements, and the hf CLI
92
+ // for the model artifact. Basalt ships no container image, so the docker
93
+ // list stays empty.
94
+ local: {
95
+ linux: engineLocalDeps('basalt', 'linux'),
96
+ windows: engineLocalDeps('basalt', 'windows'),
97
+ },
98
+ docker: [],
99
+ },
253
100
  };
254
- //# sourceMappingURL=deps.js.map
101
+ //# sourceMappingURL=deps.js.map