dsh-plugin-local-infer 0.1.2 → 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 (251) hide show
  1. package/README.md +32 -6
  2. package/cordis.patch.yml +7 -0
  3. package/docs/zh/README.md +24 -4
  4. package/dsh/client.js +4200 -4049
  5. package/package.json +33 -11
  6. package/packages/core/lib/adapter.d.ts +177 -11
  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 +48 -20
  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 +25 -14
  41. package/packages/core/lib/registrar.js +30 -10
  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 +95 -15
  59. package/packages/providers/lib/acquire.js +239 -40
  60. package/packages/providers/lib/adapters.d.ts +155 -221
  61. package/packages/providers/lib/adapters.js +589 -935
  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 +31 -212
  65. package/packages/providers/lib/deps.js +71 -205
  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/{hyperqwen.d.ts → engines/hyperqwen/hyperqwen.d.ts} +2 -2
  79. package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen/hyperqwen.js} +14 -2
  80. package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.d.ts +38 -0
  81. package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.js +115 -0
  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/{infernix.d.ts → engines/infernix/infernix.d.ts} +7 -4
  95. package/packages/providers/lib/{infernix.js → engines/infernix/infernix.js} +53 -8
  96. package/packages/providers/lib/engines/infernix/infernixAdapter.d.ts +52 -0
  97. package/packages/providers/lib/engines/infernix/infernixAdapter.js +235 -0
  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/{llamacpp.d.ts → engines/llamacpp/llamacpp.d.ts} +2 -2
  111. package/packages/providers/lib/{llamacpp.js → engines/llamacpp/llamacpp.js} +12 -2
  112. package/packages/providers/lib/engines/llamacpp/llamacppAdapter.d.ts +50 -0
  113. package/packages/providers/lib/engines/llamacpp/llamacppAdapter.js +274 -0
  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/{ninfer.d.ts → engines/ninfer/ninfer.d.ts} +2 -2
  127. package/packages/providers/lib/{ninfer.js → engines/ninfer/ninfer.js} +25 -3
  128. package/packages/providers/lib/engines/ninfer/ninferAdapter.d.ts +81 -0
  129. package/packages/providers/lib/engines/ninfer/ninferAdapter.js +392 -0
  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/strata.js +264 -0
  144. package/packages/providers/lib/engines/strata/strataAdapter.d.ts +97 -0
  145. package/packages/providers/lib/engines/strata/strataAdapter.js +463 -0
  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 +8 -5
  159. package/packages/providers/lib/engines.js +22 -11
  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 -24
  163. package/packages/providers/lib/index.js +46 -24
  164. package/packages/providers/lib/model-defaults.d.ts +10 -5
  165. package/packages/providers/lib/model-defaults.js +47 -5
  166. package/packages/providers/lib/platform.d.ts +8 -5
  167. package/packages/providers/lib/platform.js +27 -7
  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 +187 -23
  176. package/packages/service/lib/index.js +667 -90
  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 +166 -8
  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 +89 -0
  188. package/packages/ui/lib/config.js +251 -0
  189. package/packages/ui/lib/deps.d.ts +4 -4
  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 +216 -0
  198. package/packages/ui/lib/ops/engine.js +697 -0
  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 +42 -0
  202. package/packages/ui/lib/ops/hf.js +150 -0
  203. package/packages/ui/lib/ops/logs.d.ts +78 -0
  204. package/packages/ui/lib/ops/logs.js +119 -0
  205. package/packages/ui/lib/ops/model.d.ts +71 -0
  206. package/packages/ui/lib/ops/model.js +123 -0
  207. package/packages/ui/lib/request.d.ts +106 -0
  208. package/packages/ui/lib/request.js +80 -0
  209. package/packages/ui/lib/route.d.ts +106 -422
  210. package/packages/ui/lib/route.js +136 -1845
  211. package/packages/ui/lib/routes/chat-template.d.ts +1 -0
  212. package/packages/ui/lib/routes/chat-template.js +1 -0
  213. package/packages/ui/lib/routes/deps.d.ts +1 -0
  214. package/packages/ui/lib/routes/deps.js +1 -0
  215. package/packages/ui/lib/routes/download.d.ts +1 -0
  216. package/packages/ui/lib/routes/download.js +1 -0
  217. package/packages/ui/lib/routes/get.d.ts +1 -0
  218. package/packages/ui/lib/routes/get.js +106 -0
  219. package/packages/ui/lib/routes/install.d.ts +16 -0
  220. package/packages/ui/lib/routes/install.js +36 -0
  221. package/packages/ui/lib/routes/launch.d.ts +24 -0
  222. package/packages/ui/lib/routes/launch.js +74 -0
  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 +15 -0
  226. package/packages/ui/lib/routes/provider-delete.js +37 -0
  227. package/packages/ui/lib/routes/register.d.ts +16 -0
  228. package/packages/ui/lib/routes/register.js +28 -0
  229. package/packages/ui/lib/routes/save.d.ts +18 -0
  230. package/packages/ui/lib/routes/save.js +159 -0
  231. package/packages/ui/lib/routes/stop.d.ts +19 -0
  232. package/packages/ui/lib/routes/stop.js +32 -0
  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 +15 -0
  236. package/packages/ui/lib/routes/summary.js +26 -0
  237. package/packages/ui/lib/routes/unregister.d.ts +14 -0
  238. package/packages/ui/lib/routes/unregister.js +26 -0
  239. package/packages/ui/lib/viewmodels/deps.d.ts +1 -0
  240. package/packages/ui/lib/viewmodels/deps.js +1 -0
  241. package/packages/ui/lib/viewmodels/depsHelpers.d.ts +1 -0
  242. package/packages/ui/lib/viewmodels/depsHelpers.js +94 -0
  243. package/packages/ui/lib/viewmodels/summary.d.ts +145 -0
  244. package/packages/ui/lib/viewmodels/summary.js +245 -0
  245. package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
  246. package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
  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/strata.d.ts +0 -15
  251. package/packages/providers/lib/strata.js +0 -14
@@ -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,226 +1,45 @@
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
- docker: {
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
- nvidiaContainerToolkit: {
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: never[];
192
- };
193
- };
194
- };
195
- hfCli: {
196
- id: string;
197
- purpose: string;
198
- requiresSudo: false;
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: string[];
212
- };
213
- };
214
- };
215
- };
23
+ export declare function engineLocalDeps(engineId: string, os: 'linux' | 'windows' | 'macos'): readonly SystemDep[];
216
24
  /**
217
25
  * The per-engine dep plans, keyed by engine id. The local NInfer list is the
218
26
  * qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
219
27
  * docker lists are the container runtime plus the GPU toolkit plus the hf
220
28
  * CLI. Infernix builds through the engine's own cmake preset, so its local
221
29
  * list is the same toolchain as NInfer's, and its docker list stays empty
222
- * because the engine ships no container image. llama.cpp and Strata carry
223
- * the specified-not-verified lists until their adapters land in Phase 5.
30
+ * because the engine ships no container image. llama.cpp carries a thin
31
+ * cmake-plus-hf list. Strata carries one list per build mode: the source
32
+ * build needs git and curl, the binary install needs curl, and the docker
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).
224
43
  */
225
44
  export declare const ENGINE_DEP_PLANS: Record<string, EngineDepPlan>;
226
- //# sourceMappingURL=deps.d.ts.map
45
+ //# sourceMappingURL=deps.d.ts.map
@@ -1,235 +1,101 @@
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
- docker: {
140
- id: 'docker',
141
- purpose: 'runs the engine in a container',
142
- requiresSudo: true,
143
- detect: probe('docker', ['--version']),
144
- install: {
145
- apt: { commands: ['sudo apt install docker.io'] },
146
- dnf: { commands: ['sudo dnf install docker'] },
147
- pacman: { commands: ['sudo pacman -S --noconfirm docker'] },
148
- brew: { commands: ['brew install --cask docker'] },
149
- },
150
- },
151
- nvidiaContainerToolkit: {
152
- id: 'nvidia-container-toolkit',
153
- purpose: 'lets the container see the GPU',
154
- requiresSudo: true,
155
- detect: probe('nvidia-ctk', ['--version']),
156
- install: {
157
- // The NVIDIA-published apt setup. Untested on a live host, so it rides
158
- // the plan's "flagged when untested" rule.
159
- apt: {
160
- commands: [
161
- 'curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg',
162
- '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',
163
- 'sudo apt-get update',
164
- 'sudo apt-get install -y nvidia-container-toolkit',
165
- ],
166
- },
167
- dnf: { commands: ['sudo dnf install nvidia-container-toolkit'] },
168
- pacman: { commands: ['sudo pacman -S --noconfirm nvidia-container-toolkit'] },
169
- // macOS has no NVIDIA GPU toolkit; the by-hand note renders instead.
170
- brew: { commands: [] },
171
- },
172
- },
173
- hfCli: {
174
- id: 'hf-cli',
175
- purpose: 'downloads the model artifact',
176
- requiresSudo: false,
177
- detect: probe('hf', ['--version']),
178
- install: {
179
- // The hf CLI installs through its own script, not a package manager, so
180
- // every manager keys the same block.
181
- apt: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
182
- dnf: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
183
- pacman: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
184
- brew: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
185
- },
186
- },
187
- };
188
28
  /**
189
29
  * The per-engine dep plans, keyed by engine id. The local NInfer list is the
190
30
  * qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
191
31
  * docker lists are the container runtime plus the GPU toolkit plus the hf
192
32
  * CLI. Infernix builds through the engine's own cmake preset, so its local
193
33
  * list is the same toolchain as NInfer's, and its docker list stays empty
194
- * because the engine ships no container image. llama.cpp and Strata carry
195
- * the specified-not-verified lists until their adapters land in Phase 5.
34
+ * because the engine ships no container image. llama.cpp carries a thin
35
+ * cmake-plus-hf list. Strata carries one list per build mode: the source
36
+ * build needs git and curl, the binary install needs curl, and the docker
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).
196
47
  */
197
48
  export const ENGINE_DEP_PLANS = {
198
49
  ninfer: {
199
- local: [
200
- SYSTEM_DEPS.cmake,
201
- SYSTEM_DEPS.ninja,
202
- SYSTEM_DEPS.pkgConfig,
203
- SYSTEM_DEPS.ffmpeg,
204
- SYSTEM_DEPS.curl,
205
- SYSTEM_DEPS.cudaToolkit,
206
- SYSTEM_DEPS.hfCli,
207
- ],
50
+ local: {
51
+ linux: engineLocalDeps('ninfer', 'linux'),
52
+ windows: engineLocalDeps('ninfer', 'windows'),
53
+ },
208
54
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
209
55
  },
210
56
  hyperqwen: {
211
- local: [],
57
+ local: {
58
+ linux: engineLocalDeps('hyperqwen', 'linux'),
59
+ windows: engineLocalDeps('hyperqwen', 'windows'),
60
+ },
212
61
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
213
62
  },
214
63
  llamacpp: {
215
- local: [SYSTEM_DEPS.cmake, SYSTEM_DEPS.hfCli],
64
+ local: {
65
+ linux: engineLocalDeps('llamacpp', 'linux'),
66
+ windows: engineLocalDeps('llamacpp', 'windows'),
67
+ },
216
68
  docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.hfCli],
217
69
  },
218
70
  infernix: {
219
- local: [
220
- SYSTEM_DEPS.cmake,
221
- SYSTEM_DEPS.ninja,
222
- SYSTEM_DEPS.pkgConfig,
223
- SYSTEM_DEPS.ffmpeg,
224
- SYSTEM_DEPS.curl,
225
- SYSTEM_DEPS.cudaToolkit,
226
- SYSTEM_DEPS.hfCli,
227
- ],
71
+ local: {
72
+ linux: engineLocalDeps('infernix', 'linux'),
73
+ windows: engineLocalDeps('infernix', 'windows'),
74
+ },
228
75
  docker: [],
229
76
  },
230
77
  strata: {
231
- local: [],
232
- docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.hfCli],
78
+ // The source build git-clones the repo and runs setup.sh, which downloads
79
+ // what it needs; the binary install is the one-line curl script; the docker
80
+ // mode needs the container runtime plus the GPU toolkit (the model downloads
81
+ // inside the container, so no hf CLI).
82
+ local: {
83
+ linux: engineLocalDeps('strata', 'linux'),
84
+ windows: engineLocalDeps('strata', 'windows'),
85
+ },
86
+ docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit],
87
+ binary: [SYSTEM_DEPS.curl],
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: [],
233
99
  },
234
100
  };
235
- //# sourceMappingURL=deps.js.map
101
+ //# sourceMappingURL=deps.js.map