dsh-plugin-local-infer 0.1.1 → 0.1.3

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 (108) hide show
  1. package/README.md +14 -3
  2. package/docs/zh/README.md +14 -3
  3. package/dsh/client.js +1214 -242
  4. package/package.json +16 -10
  5. package/packages/core/lib/adapter.d.ts +119 -6
  6. package/packages/core/lib/deps.d.ts +4 -3
  7. package/packages/core/lib/index.d.ts +2 -1
  8. package/packages/core/lib/index.js +1 -0
  9. package/packages/core/lib/launch-command.d.ts +13 -0
  10. package/packages/core/lib/launch-command.js +64 -0
  11. package/packages/core/lib/models.d.ts +2 -1
  12. package/packages/core/lib/models.js +10 -1
  13. package/packages/core/lib/registrar.d.ts +5 -5
  14. package/packages/core/lib/registrar.js +3 -3
  15. package/packages/core/lib/status.d.ts +9 -1
  16. package/packages/core/lib/status.js +6 -1
  17. package/packages/core/package.json +1 -1
  18. package/packages/providers/lib/acquire.d.ts +127 -0
  19. package/packages/providers/lib/acquire.js +346 -0
  20. package/packages/providers/lib/adapters.d.ts +19 -172
  21. package/packages/providers/lib/adapters.js +114 -659
  22. package/packages/providers/lib/deps.d.ts +26 -2
  23. package/packages/providers/lib/deps.js +37 -4
  24. package/packages/providers/lib/engines/hyperqwenAdapter.d.ts +38 -0
  25. package/packages/providers/lib/engines/hyperqwenAdapter.js +105 -0
  26. package/packages/providers/lib/engines/infernix.d.ts +170 -0
  27. package/packages/providers/lib/engines/infernix.js +671 -0
  28. package/packages/providers/lib/engines/infernixAdapter.d.ts +53 -0
  29. package/packages/providers/lib/engines/infernixAdapter.js +202 -0
  30. package/packages/providers/lib/engines/llamacppAdapter.d.ts +51 -0
  31. package/packages/providers/lib/engines/llamacppAdapter.js +232 -0
  32. package/packages/providers/lib/{ninfer.d.ts → engines/ninfer.d.ts} +7 -0
  33. package/packages/providers/lib/{ninfer.js → engines/ninfer.js} +8 -1
  34. package/packages/providers/lib/engines/ninferAdapter.d.ts +82 -0
  35. package/packages/providers/lib/engines/ninferAdapter.js +324 -0
  36. package/packages/providers/lib/engines/strata.d.ts +53 -0
  37. package/packages/providers/lib/engines/strata.js +197 -0
  38. package/packages/providers/lib/engines/strataAdapter.d.ts +98 -0
  39. package/packages/providers/lib/engines/strataAdapter.js +427 -0
  40. package/packages/providers/lib/engines.d.ts +5 -3
  41. package/packages/providers/lib/engines.js +16 -8
  42. package/packages/providers/lib/guidelines.js +16 -0
  43. package/packages/providers/lib/index.d.ts +21 -10
  44. package/packages/providers/lib/index.js +23 -9
  45. package/packages/providers/lib/model-defaults.d.ts +8 -5
  46. package/packages/providers/lib/model-defaults.js +47 -5
  47. package/packages/providers/lib/platform.d.ts +31 -0
  48. package/packages/providers/lib/platform.js +64 -0
  49. package/packages/providers/package.json +1 -1
  50. package/packages/service/lib/index.d.ts +74 -22
  51. package/packages/service/lib/index.js +354 -44
  52. package/packages/service/lib/types.d.ts +48 -5
  53. package/packages/service/package.json +1 -1
  54. package/packages/tool/package.json +1 -1
  55. package/packages/ui/lib/config.d.ts +79 -0
  56. package/packages/ui/lib/config.js +235 -0
  57. package/packages/ui/lib/deps.d.ts +3 -3
  58. package/packages/ui/lib/ops/engine.d.ts +108 -0
  59. package/packages/ui/lib/ops/engine.js +493 -0
  60. package/packages/ui/lib/ops/hf.d.ts +27 -0
  61. package/packages/ui/lib/ops/hf.js +60 -0
  62. package/packages/ui/lib/ops/logs.d.ts +23 -0
  63. package/packages/ui/lib/ops/logs.js +58 -0
  64. package/packages/ui/lib/ops/model.d.ts +79 -0
  65. package/packages/ui/lib/ops/model.js +130 -0
  66. package/packages/ui/lib/request.d.ts +106 -0
  67. package/packages/ui/lib/request.js +80 -0
  68. package/packages/ui/lib/route.d.ts +96 -357
  69. package/packages/ui/lib/route.js +123 -1415
  70. package/packages/ui/lib/routes/chat-template.d.ts +14 -0
  71. package/packages/ui/lib/routes/chat-template.js +37 -0
  72. package/packages/ui/lib/routes/deps.d.ts +16 -0
  73. package/packages/ui/lib/routes/deps.js +27 -0
  74. package/packages/ui/lib/routes/download.d.ts +16 -0
  75. package/packages/ui/lib/routes/download.js +48 -0
  76. package/packages/ui/lib/routes/get.d.ts +18 -0
  77. package/packages/ui/lib/routes/get.js +57 -0
  78. package/packages/ui/lib/routes/install.d.ts +16 -0
  79. package/packages/ui/lib/routes/install.js +36 -0
  80. package/packages/ui/lib/routes/launch.d.ts +18 -0
  81. package/packages/ui/lib/routes/launch.js +50 -0
  82. package/packages/ui/lib/routes/provider-delete.d.ts +15 -0
  83. package/packages/ui/lib/routes/provider-delete.js +37 -0
  84. package/packages/ui/lib/routes/register.d.ts +16 -0
  85. package/packages/ui/lib/routes/register.js +28 -0
  86. package/packages/ui/lib/routes/save.d.ts +18 -0
  87. package/packages/ui/lib/routes/save.js +139 -0
  88. package/packages/ui/lib/routes/stop.d.ts +16 -0
  89. package/packages/ui/lib/routes/stop.js +29 -0
  90. package/packages/ui/lib/routes/summary.d.ts +15 -0
  91. package/packages/ui/lib/routes/summary.js +26 -0
  92. package/packages/ui/lib/routes/unregister.d.ts +14 -0
  93. package/packages/ui/lib/routes/unregister.js +26 -0
  94. package/packages/ui/lib/viewmodels/deps.d.ts +31 -0
  95. package/packages/ui/lib/viewmodels/deps.js +89 -0
  96. package/packages/ui/lib/viewmodels/depsHelpers.d.ts +28 -0
  97. package/packages/ui/lib/viewmodels/depsHelpers.js +33 -0
  98. package/packages/ui/lib/viewmodels/summary.d.ts +140 -0
  99. package/packages/ui/lib/viewmodels/summary.js +225 -0
  100. package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
  101. package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
  102. package/packages/ui/package.json +1 -1
  103. package/packages/providers/lib/strata.d.ts +0 -15
  104. package/packages/providers/lib/strata.js +0 -14
  105. /package/packages/providers/lib/{hyperqwen.d.ts → engines/hyperqwen.d.ts} +0 -0
  106. /package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen.js} +0 -0
  107. /package/packages/providers/lib/{llamacpp.d.ts → engines/llamacpp.d.ts} +0 -0
  108. /package/packages/providers/lib/{llamacpp.js → engines/llamacpp.js} +0 -0
package/README.md CHANGED
@@ -13,10 +13,11 @@ A DeepSeek Harness plugin that manages local inference engines:
13
13
  - llama.cpp
14
14
  - NInfer
15
15
  - Hyper-Qwen (vLLM)
16
+ - Infernix
16
17
  - Strata
17
18
  - ...with more coming soon.
18
19
 
19
- ![Plugin Screenshot](docs/screenshot-20261014.png)
20
+ ![Plugin Screenshot](https://raw.githubusercontent.com/cybtachyon/dsh-plugin-local-infer/refs/heads/main/docs/screenshot-20261014.png)
20
21
 
21
22
  Pick a model and an engine, tune the parameters, watch a live **VRAM Est.** meter, see **hardware warnings** the moment a value (or a parameter itself) is unsafe for the detected hardware, then the plugin manages **build, deploy, and health-check** for each engine and **automatically register it as a DSH model** once it is confirmed working. No hand-editing of finicky yaml or launchers.
22
23
 
@@ -25,10 +26,18 @@ Pick a model and an engine, tune the parameters, watch a live **VRAM Est.** mete
25
26
  Command line:
26
27
 
27
28
  ```bash
29
+ # Latest NPM package.
30
+ dsh plugin --profile web add dsh-plugin-local-infer
31
+ ```
32
+
33
+ ```bash
34
+ # From source.
28
35
  dsh plugin --profile web add https://github.com/cybtachyon/dsh-plugin-local-infer
29
36
  ```
30
37
 
31
- Web UI: click **Plugins** → **Add Plugin** → paste `https://github.com/cybtachyon/dsh-plugin-local-infer`.
38
+ Web UI: click **Plugins** → **Add Plugin** → paste `dsh-plugin-local-infer`.
39
+
40
+ Or add from the DSH Plugin Marketplace.
32
41
 
33
42
  ## Using the plugin
34
43
 
@@ -38,7 +47,8 @@ The **Engine settings** card mounts on the Plugins page (older hosts: the Settin
38
47
  - **Watch the VRAM Est. meter.** It prices weights, KV cache, overhead, and workspace against your card as you adjust values, and shows the verdict (`fits` / `tight` / `over`) and the largest context that fits.
39
48
  - **Read the warnings.** Red banners and inline field warnings fire when a parameter value, or the presence of a parameter, is unsafe for your detected hardware.
40
49
  - **Satisfy the system dependencies.** The panel lists each missing host dependency (docker, CUDA toolkit, ffmpeg, hf CLI, ...) with its purpose, a copy/paste install string for your OS, and an optional one-click **Run** (sudo). The **Get** button stays disabled until every dependency reports satisfied.
41
- - **Launch / Stop.** `Launch` clones or pulls the engine, downloads the model, starts it, and polls its health endpoint. `Stop` shuts it down.
50
+ - **Get.** With the dependencies satisfied, `Get` syncs the engine's source: it clones the engine's git repo (or the **Engine Fork** you provided) into the **Engine Directory** override, defaulting to the model directory under the engine name. An existing checkout with local changes aborts with an alert in **Logs**; a clean one fetches the listed fork (added as its own remote) and rebases onto the upstream branch. It then runs the system dependencies and the engine's build steps. Every line streams into the **Logs** section as it lands. `Launch` stays disabled while a Get runs and re-enables when the build finishes, errors, or falls silent for 2 minutes.
51
+ - **Launch / Stop.** `Launch` deploys the engine (builds the checkout, or pulls the image in docker mode), downloads the model, starts it, and polls its health endpoint. `Stop` shuts it down.
42
52
  - **Register / Remove.** `Register` publishes the confirmed-working engine to DSH as a model (optionally as the agent default model) through the settings service, so the change is revision-tracked and undoable. `Remove` pulls the entry back.
43
53
 
44
54
  All values persist to `~/.dsh/local-infer/config.json`; the browser never sees a value it did not store.
@@ -64,6 +74,7 @@ All values persist to `~/.dsh/local-infer/config.json`; the browser never sees a
64
74
  | Hyper-Qwen (vLLM) | Yes (compose) | No | `.env`-driven docker-compose profiles. |
65
75
  | vLLM | No | No | Work-in-progress. |
66
76
  | llama.cpp | Yes | Yes | Specified, not verified until the binary is available. |
77
+ | Infernix | No | Yes (cmake + CUDA) | C++/CUDA fork of NInfer tuned for Qwen models on a single RTX 50-series GPU. Local build only. |
67
78
  | Strata | Yes | No | Placeholder engine; its parameter surface is empty until the flag set lands. |
68
79
 
69
80
  Runtime requirements: Node `^22.19.0 || >=24.0.0`, pnpm 12.11.2 (pinned by `mise.toml`), and the `@deepseek-ai/cordis >= 4.0.1` peer dependency.
package/docs/zh/README.md CHANGED
@@ -13,10 +13,11 @@
13
13
  - llama.cpp
14
14
  - NInfer
15
15
  - Hyper-Qwen (vLLM)
16
+ - Infernix
16
17
  - Strata
17
18
  - ...更多即将推出。
18
19
 
19
- ![插件截图](../screenshot-20261014.png)
20
+ ![插件截图](https://raw.githubusercontent.com/cybtachyon/dsh-plugin-local-infer/refs/heads/main/docs/screenshot-20261014.png)
20
21
 
21
22
  选择一个模型和引擎,调节参数,实时观察 **VRAM 估算** 仪表,当某个值(或参数本身)对检测到的硬件不安全时立即看到 **硬件警告**,随后该插件会管理每个引擎的 **构建、部署和健康检查**,并在确认其正常工作后 **自动将其注册为 DSH 模型**。无需手动编辑易出错的 yaml 或启动器。
22
23
 
@@ -25,10 +26,18 @@
25
26
  命令行:
26
27
 
27
28
  ```bash
29
+ # 最新 NPM 包。
30
+ dsh plugin --profile web add dsh-plugin-local-infer
31
+ ```
32
+
33
+ ```bash
34
+ # 从源码。
28
35
  dsh plugin --profile web add https://github.com/cybtachyon/dsh-plugin-local-infer
29
36
  ```
30
37
 
31
- Web UI:点击 **插件** → **添加插件** → 粘贴 `https://github.com/cybtachyon/dsh-plugin-local-infer`。
38
+ Web UI:点击 **插件** → **添加插件** → 粘贴 `dsh-plugin-local-infer`。
39
+
40
+ 或从 DSH 插件市场添加。
32
41
 
33
42
  ## 使用插件
34
43
 
@@ -38,7 +47,8 @@ Web UI:点击 **插件** → **添加插件** → 粘贴 `https://github.com/c
38
47
  - **观察 VRAM 估算仪表。** 当你调整值时,它根据你的显卡对权重、KV 缓存、开销和工作区进行估算,并显示判定结果(`fits` / `tight` / `over`)以及能容纳的最大上下文。
39
48
  - **阅读警告。** 当某个参数值,或某个参数的存在,对你的检测到的硬件不安全时,红色横幅和内联字段警告会触发。
40
49
  - **满足系统依赖项。** 面板列出每个缺失的主机依赖项(docker、CUDA toolkit、ffmpeg、hf CLI、...),并附有其用途、针对你操作系统的复制粘贴安装字符串,以及可选的一键 **运行**(sudo)。**获取** 按钮在所有依赖项报告满足之前保持禁用状态。
41
- - **启动 / 停止。** `启动` 克隆或拉取引擎、下载模型、启动它,并轮询其健康端点。`停止` 将其关闭。
50
+ - **获取。** 依赖项满足后,`获取` 会同步引擎源码:将引擎的 git 仓库(或你提供的 **引擎 Fork**)克隆到 **引擎目录** 覆盖项中;未覆盖时默认落在模型目录下以引擎命名的子目录。存在本地改动的已有检出会在 **日志** 中发出警告并中止;干净的检出会拉取所列的 fork(作为独立远程添加)并向上游分支 rebase。随后它会运行系统依赖项和引擎的构建步骤,每一行输出都会实时流入 **日志** 区。Get 运行期间 `启动` 保持禁用,并在构建完成、出错或 2 分钟无输出时重新启用。
51
+ - **启动 / 停止。** `启动` 部署引擎(构建检出,或在 docker 模式下拉取镜像)、下载模型、启动它,并轮询其健康端点。`停止` 将其关闭。
42
52
  - **注册 / 移除。** `注册` 通过设置服务将确认工作正常的引擎作为模型发布到 DSH(可选地作为代理默认模型),因此该变更可被修订跟踪并可撤销。`移除` 将该条目拉回。
43
53
 
44
54
  所有值都持久化到 `~/.dsh/local-infer/config.json`;浏览器永远不会看到它未存储的值。
@@ -64,6 +74,7 @@ Web UI:点击 **插件** → **添加插件** → 粘贴 `https://github.com/c
64
74
  | Hyper-Qwen (vLLM) | 是 (compose) | 否 | 由 `.env` 驱动的 docker-compose 配置。 |
65
75
  | vLLM | 否 | 否 | 进行中。 |
66
76
  | llama.cpp | 是 | 是 | 已指定,在二进制可用之前未验证。 |
77
+ | Infernix | 否 | 是 (cmake + CUDA) | NInfer 的 C++/CUDA 分支,针对单张 RTX 50 系 GPU 的 Qwen 模型调优;仅本地构建。 |
67
78
  | Strata | 是 | 否 | 占位符引擎;在其标志集落地之前,其参数表面为空。 |
68
79
 
69
80
  运行时要求:Node `^22.19.0 || >=24.0.0`、pnpm 12.11.2(由 `mise.toml` 固定),以及 `@deepseek-ai/cordis >= 4.0.1` 同级依赖。