dsh-plugin-local-infer 0.1.0 → 0.1.1
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.
- package/LICENSE +7 -0
- package/README.md +4 -0
- package/cordis.patch.yml +6 -6
- package/docs/screenshot-20261014.png +0 -0
- package/docs/zh/README.md +97 -0
- package/dsh/client.js +21 -14
- package/dsh/host.js +1 -1
- package/package.json +4 -2
- package/packages/core/lib/debug.d.ts +1 -1
- package/packages/core/lib/debug.js +1 -1
- package/packages/core/lib/index.d.ts +1 -1
- package/packages/core/lib/index.js +1 -1
- package/packages/core/package.json +1 -1
- package/packages/providers/lib/adapters.d.ts +1 -1
- package/packages/providers/lib/adapters.js +1 -1
- package/packages/providers/lib/debug.d.ts +1 -1
- package/packages/providers/lib/debug.js +1 -1
- package/packages/providers/lib/deps.d.ts +2 -2
- package/packages/providers/lib/deps.js +1 -1
- package/packages/providers/lib/engines.d.ts +2 -2
- package/packages/providers/lib/engines.js +1 -1
- package/packages/providers/lib/guidelines.d.ts +2 -2
- package/packages/providers/lib/guidelines.js +1 -1
- package/packages/providers/lib/hyperqwen.d.ts +2 -2
- package/packages/providers/lib/hyperqwen.js +1 -1
- package/packages/providers/lib/index.d.ts +1 -1
- package/packages/providers/lib/index.js +1 -1
- package/packages/providers/lib/llamacpp.d.ts +2 -2
- package/packages/providers/lib/llamacpp.js +1 -1
- package/packages/providers/lib/model-defaults.d.ts +2 -2
- package/packages/providers/lib/model-defaults.js +1 -1
- package/packages/providers/lib/ninfer.d.ts +2 -2
- package/packages/providers/lib/ninfer.js +1 -1
- package/packages/providers/lib/presets.d.ts +2 -2
- package/packages/providers/lib/presets.js +1 -1
- package/packages/providers/lib/strata.d.ts +2 -2
- package/packages/providers/lib/strata.js +1 -1
- package/packages/providers/lib/vram.d.ts +2 -2
- package/packages/providers/lib/vram.js +1 -1
- package/packages/providers/package.json +3 -3
- package/packages/service/lib/index.d.ts +2 -2
- package/packages/service/lib/index.js +1 -1
- package/packages/service/lib/types.d.ts +1 -1
- package/packages/service/package.json +2 -2
- package/packages/tool/lib/index.d.ts +1 -1
- package/packages/tool/lib/index.js +1 -1
- package/packages/tool/package.json +3 -3
- package/packages/ui/lib/deps.d.ts +2 -2
- package/packages/ui/lib/deps.js +1 -1
- package/packages/ui/lib/form.d.ts +2 -2
- package/packages/ui/lib/form.js +1 -1
- package/packages/ui/lib/index.d.ts +1 -1
- package/packages/ui/lib/index.js +1 -1
- package/packages/ui/lib/meter.d.ts +2 -2
- package/packages/ui/lib/meter.js +1 -1
- package/packages/ui/lib/route.d.ts +3 -3
- package/packages/ui/lib/route.js +1 -1
- package/packages/ui/lib/warnings.d.ts +2 -2
- package/packages/ui/lib/warnings.js +1 -1
- package/packages/ui/package.json +5 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright Derek "cybtachyon" Reese
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
> For those who want more performance out of their specific hardware than what Unsloth gives out of the box.
|
|
6
6
|
|
|
7
|
+
[](https://github.com/cybtachyon/dsh-plugin-local-infer/blob/main/LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/@deepseek-ai/dsh)
|
|
9
|
+
[](https://github.com/topics/dsh-plugin)
|
|
10
|
+
|
|
7
11
|
A DeepSeek Harness plugin that manages local inference engines:
|
|
8
12
|
|
|
9
13
|
- llama.cpp
|
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# The
|
|
1
|
+
# The dsh-plugin-local-infer bundle patch: mounts the whole local-inference
|
|
2
2
|
# capability as ONE layer over an existing dsh profile.
|
|
3
3
|
#
|
|
4
4
|
# Row order carries no load semantics — activation is service-availability
|
|
@@ -14,29 +14,29 @@
|
|
|
14
14
|
# this row is what makes the client half reachable. The host module is a
|
|
15
15
|
# no-op; the capability lives in the four subpath rows below.
|
|
16
16
|
- id: local-infer
|
|
17
|
-
name: '
|
|
17
|
+
name: 'dsh-plugin-local-infer'
|
|
18
18
|
|
|
19
19
|
# Service Definition: publishes ctx.localInfer, the engine/preset/guideline
|
|
20
20
|
# registries, and the orchestration entry points (estimate, guidelines,
|
|
21
21
|
# deps, installString, runInstall, launch, registerModel). Carries no store
|
|
22
22
|
# of its own.
|
|
23
23
|
- id: local-infer-service
|
|
24
|
-
name: '
|
|
24
|
+
name: 'dsh-plugin-local-infer/service'
|
|
25
25
|
|
|
26
26
|
# Service Providers: the concrete engine adapters (ninfer, hyperqwen,
|
|
27
27
|
# llamacpp, strata), the NInfer VramModel, the built-in presets, the
|
|
28
28
|
# built-in guidelines, and the per-OS SystemDep install command data. Each
|
|
29
29
|
# registers itself with ctx.localInfer.
|
|
30
30
|
- id: local-infer-providers
|
|
31
|
-
name: '
|
|
31
|
+
name: 'dsh-plugin-local-infer/providers'
|
|
32
32
|
|
|
33
33
|
# Consumer: the model-facing local_infer_* tools (estimate, launch, status,
|
|
34
34
|
# register), their system-prompt section, and their per-tool timeout budgets.
|
|
35
35
|
- id: local-infer-tool
|
|
36
|
-
name: '
|
|
36
|
+
name: 'dsh-plugin-local-infer/tool'
|
|
37
37
|
|
|
38
38
|
# Web UI: the parameter form (form-type aware), the VRAM meter, the
|
|
39
39
|
# red-warning banner, the engine lifecycle controls, and the register-as-
|
|
40
40
|
# model confirmation.
|
|
41
41
|
- id: local-infer-ui
|
|
42
|
-
name: '
|
|
42
|
+
name: 'dsh-plugin-local-infer/ui'
|
|
Binary file
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# dsh-plugin-local-infer
|
|
2
|
+
|
|
3
|
+
> 本中文翻译由 Qwen3.8-27B 生成。欢迎提交 Pull Request 改进翻译。
|
|
4
|
+
|
|
5
|
+
> 面向那些希望从特定硬件中获得比 Unsloth 开箱即用更高性能的用户。
|
|
6
|
+
|
|
7
|
+
[](https://github.com/cybtachyon/dsh-plugin-local-infer/blob/main/LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/@deepseek-ai/dsh)
|
|
9
|
+
[](https://github.com/topics/dsh-plugin)
|
|
10
|
+
|
|
11
|
+
一个 DeepSeek Harness 插件,用于管理本地推理引擎:
|
|
12
|
+
|
|
13
|
+
- llama.cpp
|
|
14
|
+
- NInfer
|
|
15
|
+
- Hyper-Qwen (vLLM)
|
|
16
|
+
- Strata
|
|
17
|
+
- ...更多即将推出。
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
选择一个模型和引擎,调节参数,实时观察 **VRAM 估算** 仪表,当某个值(或参数本身)对检测到的硬件不安全时立即看到 **硬件警告**,随后该插件会管理每个引擎的 **构建、部署和健康检查**,并在确认其正常工作后 **自动将其注册为 DSH 模型**。无需手动编辑易出错的 yaml 或启动器。
|
|
22
|
+
|
|
23
|
+
## 安装
|
|
24
|
+
|
|
25
|
+
命令行:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
dsh plugin --profile web add https://github.com/cybtachyon/dsh-plugin-local-infer
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Web UI:点击 **插件** → **添加插件** → 粘贴 `https://github.com/cybtachyon/dsh-plugin-local-infer`。
|
|
32
|
+
|
|
33
|
+
## 使用插件
|
|
34
|
+
|
|
35
|
+
**引擎设置** 卡片挂载在插件页面(旧版本主机:设置页面)。
|
|
36
|
+
|
|
37
|
+
- **选择引擎和模型**,然后调节参数。每个字段根据其类型渲染:复选框、下拉框、滑块、文本、目录选择器,以及一个聊天模板组合框(已知模板加上自由文本)。
|
|
38
|
+
- **观察 VRAM 估算仪表。** 当你调整值时,它根据你的显卡对权重、KV 缓存、开销和工作区进行估算,并显示判定结果(`fits` / `tight` / `over`)以及能容纳的最大上下文。
|
|
39
|
+
- **阅读警告。** 当某个参数值,或某个参数的存在,对你的检测到的硬件不安全时,红色横幅和内联字段警告会触发。
|
|
40
|
+
- **满足系统依赖项。** 面板列出每个缺失的主机依赖项(docker、CUDA toolkit、ffmpeg、hf CLI、...),并附有其用途、针对你操作系统的复制粘贴安装字符串,以及可选的一键 **运行**(sudo)。**获取** 按钮在所有依赖项报告满足之前保持禁用状态。
|
|
41
|
+
- **启动 / 停止。** `启动` 克隆或拉取引擎、下载模型、启动它,并轮询其健康端点。`停止` 将其关闭。
|
|
42
|
+
- **注册 / 移除。** `注册` 通过设置服务将确认工作正常的引擎作为模型发布到 DSH(可选地作为代理默认模型),因此该变更可被修订跟踪并可撤销。`移除` 将该条目拉回。
|
|
43
|
+
|
|
44
|
+
所有值都持久化到 `~/.dsh/local-infer/config.json`;浏览器永远不会看到它未存储的值。
|
|
45
|
+
|
|
46
|
+
## 支持的平台
|
|
47
|
+
|
|
48
|
+
### 操作系统
|
|
49
|
+
|
|
50
|
+
| 操作系统 | 状态 | 说明 |
|
|
51
|
+
| ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| Linux (Debian/Ubuntu, `apt`) | 已支持 | 安装块镜像可用的 NInfer 启动器:CUDA keyring 序列加上编译工具链。 |
|
|
53
|
+
| Linux (Arch, `pacman`) | 已支持 | `pacman` 块加上 `/opt/cuda` 导出行。 |
|
|
54
|
+
| Linux (Fedora, `dnf`) | 未测试 | 命令集已存在,在实时主机上标记为未测试。 |
|
|
55
|
+
| macOS (`brew`) | 部分支持 | CPU/docker 路径(llama.cpp)。macOS 上没有 NVIDIA Container Toolkit,因此 CUDA 引擎的 docker 路径不可用。 |
|
|
56
|
+
| Windows (WSL2) | 未测试 | WSL2 被检测,dflash2 固定内存规则触发;命令集标记为未测试。 |
|
|
57
|
+
| Windows | 部分支持 | 代码路径仅部分编写;需要进一步开发。 |
|
|
58
|
+
|
|
59
|
+
### 引擎
|
|
60
|
+
|
|
61
|
+
| 引擎 | Docker | 本地构建 | 状态 |
|
|
62
|
+
| ----------------- | ------------ | ----------------- | -------------------------------------------------- |
|
|
63
|
+
| NInfer | 是 | 是 (cmake + CUDA) | 参考引擎。针对 Qwen 27B/35B 制品的实测 VRAM 模型。 |
|
|
64
|
+
| Hyper-Qwen (vLLM) | 是 (compose) | 否 | 由 `.env` 驱动的 docker-compose 配置。 |
|
|
65
|
+
| vLLM | 否 | 否 | 进行中。 |
|
|
66
|
+
| llama.cpp | 是 | 是 | 已指定,在二进制可用之前未验证。 |
|
|
67
|
+
| Strata | 是 | 否 | 占位符引擎;在其标志集落地之前,其参数表面为空。 |
|
|
68
|
+
|
|
69
|
+
运行时要求:Node `^22.19.0 || >=24.0.0`、pnpm 12.11.2(由 `mise.toml` 固定),以及 `@deepseek-ai/cordis >= 4.0.1` 同级依赖。
|
|
70
|
+
|
|
71
|
+
## 硬件指南
|
|
72
|
+
|
|
73
|
+
每台常见机器在实际中能为你带来什么。能力印象来源于 [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/) 用户帖子。"共享" 指统一内存(模型和操作系统共享内存池)。
|
|
74
|
+
|
|
75
|
+
| 硬件 | 内存 | 你能得到的 |
|
|
76
|
+
| ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
77
|
+
| NVIDIA RTX 5090 | 32 GB VRAM | 可靠地容纳最多 23 GB 的模型权重,支持 240k+ 上下文和视觉。能处理复杂的编码和视觉任务,但需要特殊工具来处理非常长或复杂的任务。 |
|
|
78
|
+
| NVIDIA RTX 4090 | 24 GB VRAM | 社区主力。Q4 量化下可容纳 30B 级模型并驱动编码代理;70B 需要缓慢的 CPU 卸载。性价比最高的单卡。 |
|
|
79
|
+
| NVIDIA RTX 3090 | 24 GB VRAM | 二手卡的性价比之王。与 4090 相同的 24 GB,但属于较旧的世代:Q4 量化下 32B 及适度的上下文,不支持 FP8。单卡有限制;常见建议是配两张。 |
|
|
80
|
+
| NVIDIA RTX PRO 6000 | 96 GB VRAM | 接近前沿的稠密模型(70B–80B)可完全装入内存并支持长上下文,32B 模型甚至可以进行微调(LoRA、全量 FT)。消费级上限。 |
|
|
81
|
+
| NVIDIA RTX PRO 5500 | 84 GB VRAM | 面向机架的 84 GB 级别:70B 级模型有余量,价格更低且接近 PRO 6000。 |
|
|
82
|
+
| NVIDIA Tesla V100 | 32 GB VRAM | 便宜的二手 HBM2 服务器卡。Q4/Q8 量化下 30B 级模型,速度可观(带宽对推理而言才是关键);不支持 FP8,功耗高。预算型家庭实验室之选。 |
|
|
83
|
+
| NVIDIA Tesla V100 | 16 GB VRAM | 预算入门。Q8 量化下 13B–14B,或带卸载的 30B。NVLink 双卡翻倍容量。以现代标准来看较慢,但对推理而言出乎意料地扎实。 |
|
|
84
|
+
| NVIDIA RTX 5090 Laptop | 24 GB VRAM | 移动端 4090。Q4 量化下 32B 勉强容纳;扣除上下文后现实上约为 Q4 的 ~17B。 |
|
|
85
|
+
| NVIDIA RTX 4090 Laptop | 16 GB VRAM | GPU 对 LLM 而言过剩,而 VRAM 却不足:Q4/Q5 量化下 8B–14B,上下文较小。 |
|
|
86
|
+
| NVIDIA GB10 (DGX Spark) | 128 GB 共享 | 桌面 AI 开发机。35B MoE 以 ~100 tok/s 运行;120B+ MoE 可容纳但较慢。容量优先于速度。 |
|
|
87
|
+
| NVIDIA GB10 (DGX Spark) | 64 GB 共享 | 一半内存池:带上下文的 32B–35B MoE;70B 较为紧张。 |
|
|
88
|
+
| NVIDIA RTX N1X | 128 GB 共享 | 下一代 GB10 级笔记本:笔记本中的 DGX Spark 级容量。非常新,几乎没有真实世界数据。 |
|
|
89
|
+
| NVIDIA RTX N1X | 64 GB 共享 | 64 GB 级别:带上下文的 32B 级。 |
|
|
90
|
+
| Apple M4 Ultra | 256 GB 共享 | 容量之王。200B+ MoE 和 128K 上下文的 70B 均可容纳;70B 预期 ~5 tok/s。单 token 较慢,容量无出其右。 |
|
|
91
|
+
| Apple M4 Ultra | 128 GB 共享 | 70B–120B 级可容纳且有余量;~5 tok/s。容量出色,速度较慢。 |
|
|
92
|
+
| AMD Radeon AI PRO R9700 | 32 GB VRAM | AMD 的 32 GB Vulkan 卡。Q8 量化下 32B 约 $1,300,性价比较高;`radv` 驱动并非符合规范的 Vulkan 实现。 |
|
|
93
|
+
| AMD Ryzen AI Max+ PRO 495 | 160 GB 共享 | UMA 怪兽。120B+ MoE 可容纳,编码代理运行良好(Qwen3-Coder 级模型针对 UMA 调优);$7k+ 系统,速度慢于独立 GPU。 |
|
|
94
|
+
| 2x NVIDIA RTX 3090 | 48 GB VRAM | 社区的"可用作本地 LLM 的最低配置":Q4/Q5 量化下的 70B。 |
|
|
95
|
+
| 2x NVIDIA RTX 4090 | 48 GB VRAM | 带上下文的 Q4 量化 70B;exllama2 量化运行快速。 |
|
|
96
|
+
| 2x NVIDIA RTX 5090 | 64 GB VRAM | 带卸载的 ~10 tok/s,支持 128k 上下文的 120B MoE(GPT-OSS-120B)。 |
|
|
97
|
+
| 2x NVIDIA Tesla V100 (NVLink) | 64 GB VRAM | 预算型 64 GB:NVLink 带宽下低量化的 70B;较旧的架构,不支持 FP8。 |
|
package/dsh/client.js
CHANGED
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
// table predates the primitives seed keep the native controls through the
|
|
21
21
|
// require fallback in mountCard.
|
|
22
22
|
window.__ModuleLoader__.load({
|
|
23
|
-
id: '
|
|
23
|
+
id: 'dsh-plugin-local-infer',
|
|
24
24
|
factory: (require) => {
|
|
25
25
|
var module = { exports: {} };
|
|
26
26
|
var exports = module.exports;
|
|
27
27
|
|
|
28
|
-
// The Plugins page dispatches a bundle's configuration by
|
|
29
|
-
|
|
28
|
+
// The Plugins page dispatches a bundle's configuration by the bundle's
|
|
29
|
+
// manifest name (the root package.json "name" field, unscoped for git-URL
|
|
30
|
+
// installs), which is the key the package inventory uses for the
|
|
31
|
+
// plugins.bundle.config slot.
|
|
32
|
+
var PACKAGE_NAME = 'dsh-plugin-local-infer';
|
|
30
33
|
|
|
31
34
|
// The card's copy. Two short label sets rather than a locale bundle: the
|
|
32
35
|
// card has a couple of dozen strings, and a bundle would be more machinery
|
|
@@ -816,7 +819,7 @@ window.__ModuleLoader__.load({
|
|
|
816
819
|
// The per-entry Launch control: a card entry's own lifecycle button, shown
|
|
817
820
|
// alongside its Edit and Delete controls. Idle reads as a Launch button
|
|
818
821
|
// that starts the entry's engine; a launch in flight shows a disabled
|
|
819
|
-
// control with the
|
|
822
|
+
// control with the spinner inside; a healthy engine reads as an enabled
|
|
820
823
|
// Stop; a launch that timed out reads as a red Logs control that opens the
|
|
821
824
|
// entry for editing, the same action as Edit.
|
|
822
825
|
function renderEntryLaunchButton(react, primitives, provider, opts) {
|
|
@@ -1011,12 +1014,16 @@ window.__ModuleLoader__.load({
|
|
|
1011
1014
|
);
|
|
1012
1015
|
}
|
|
1013
1016
|
|
|
1014
|
-
// The DSH
|
|
1015
|
-
// launch is in flight
|
|
1016
|
-
//
|
|
1017
|
+
// The DSH loading indicator the per-entry Launch button shows while a
|
|
1018
|
+
// launch is in flight: the StateDot ongoing spinner (the primitives'
|
|
1019
|
+
// shared loader) with a CSS border-spin as the fallback a host without the
|
|
1020
|
+
// seed keeps.
|
|
1017
1021
|
function renderThrobber(react, primitives) {
|
|
1018
|
-
if (primitives && typeof primitives.
|
|
1019
|
-
return react.createElement(primitives.
|
|
1022
|
+
if (primitives && typeof primitives.StateDot === 'function') {
|
|
1023
|
+
return react.createElement(primitives.StateDot, {
|
|
1024
|
+
state: 'ongoing',
|
|
1025
|
+
size: 12,
|
|
1026
|
+
});
|
|
1020
1027
|
}
|
|
1021
1028
|
return react.createElement('span', {
|
|
1022
1029
|
style: {
|
|
@@ -1810,7 +1817,7 @@ window.__ModuleLoader__.load({
|
|
|
1810
1817
|
var logPathState = react.useState('');
|
|
1811
1818
|
// The per-entry launch state: a map from provider id to the entry's
|
|
1812
1819
|
// lifecycle ('launching', 'running', 'failed') and the start time a
|
|
1813
|
-
// launch began, so a card entry can show its
|
|
1820
|
+
// launch began, so a card entry can show its spinner, Stop, or red
|
|
1814
1821
|
// Logs control. Absent entries read as idle (a plain Launch button).
|
|
1815
1822
|
var entryLaunchState = react.useState({});
|
|
1816
1823
|
var data = dataState[0];
|
|
@@ -2753,7 +2760,7 @@ window.__ModuleLoader__.load({
|
|
|
2753
2760
|
|
|
2754
2761
|
// The per-entry launch: a card entry's own Launch control drives its
|
|
2755
2762
|
// own engine, not the form's draft. It records a start time and the
|
|
2756
|
-
// 'launching' state (the
|
|
2763
|
+
// 'launching' state (the spinner), then reads the launch result's
|
|
2757
2764
|
// healthy flag: a 200 before the route's health-poll timeout reads as
|
|
2758
2765
|
// 'running' (the control becomes Stop), a timeout reads as 'failed'
|
|
2759
2766
|
// (the control becomes a red Logs that opens the entry for editing).
|
|
@@ -2770,7 +2777,7 @@ window.__ModuleLoader__.load({
|
|
|
2770
2777
|
);
|
|
2771
2778
|
// The route's health-poll can run up to two minutes, and a build
|
|
2772
2779
|
// step before it can run longer still, so a slow or hung route
|
|
2773
|
-
// would leave the control on the
|
|
2780
|
+
// would leave the control on the spinner forever. A client-side
|
|
2774
2781
|
// deadline just past the route's cap forces the control to the red
|
|
2775
2782
|
// Logs state so the entry can be opened and fixed.
|
|
2776
2783
|
var settled = false;
|
|
@@ -2893,7 +2900,7 @@ window.__ModuleLoader__.load({
|
|
|
2893
2900
|
return react.createElement(
|
|
2894
2901
|
'div',
|
|
2895
2902
|
{ style: CARD_STYLE },
|
|
2896
|
-
// The keyframes the
|
|
2903
|
+
// The keyframes the fallback spinner animates with. Injected
|
|
2897
2904
|
// once per card so a host without the DSH seed still shows a spin.
|
|
2898
2905
|
react.createElement(
|
|
2899
2906
|
'style',
|
|
@@ -3446,7 +3453,7 @@ window.__ModuleLoader__.load({
|
|
|
3446
3453
|
// The engine lifecycle row: a single Launch/Stop control that
|
|
3447
3454
|
// toggles like the per-entry control. It reads as Launch while the
|
|
3448
3455
|
// draft's engine is down, Stop while a healthy launch set draftRunning,
|
|
3449
|
-
// and an in-flight
|
|
3456
|
+
// and an in-flight spinner (disabled) while a launch or stop is in
|
|
3450
3457
|
// flight. Launch stays disabled while the deps panel reports a
|
|
3451
3458
|
// missing host dependency, the same gate the panel's "Get" button
|
|
3452
3459
|
// reads. The note reports the answer the route returned.
|
package/dsh/host.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Host carrier for the
|
|
1
|
+
// Host carrier for the dsh-plugin-local-infer client half.
|
|
2
2
|
//
|
|
3
3
|
// The bare package has no host logic of its own; its four host entries are the
|
|
4
4
|
// /service, /providers, /tool, and /ui subpaths. This no-op module exists so
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-local-infer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"cordis.patch.yml",
|
|
65
|
+
"docs/zh/README.md",
|
|
66
|
+
"docs/screenshot-20261014.png",
|
|
65
67
|
"dsh/client.js",
|
|
66
68
|
"dsh/host.js",
|
|
67
69
|
"packages/core/package.json",
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
"packages/ui/lib/**/*.d.ts"
|
|
82
84
|
],
|
|
83
85
|
"peerDependencies": {
|
|
84
|
-
"@deepseek-ai/cordis": ">=4.0.
|
|
86
|
+
"@deepseek-ai/cordis": ">=4.0.5-alpha.2"
|
|
85
87
|
},
|
|
86
88
|
"devDependencies": {
|
|
87
89
|
"@eslint/js": "^10.0.1",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* DSH logger level config (`logger: { levels: { default: 3 } }`) that a DSH
|
|
7
7
|
* `--patch` overlay applies. The logger is a no-op outside debug mode, so the
|
|
8
8
|
* command path stays allocation-free in normal operation.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/core/debug
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* DebugLogger reports one engine command the plugin issued. The host calls it
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* DSH logger level config (`logger: { levels: { default: 3 } }`) that a DSH
|
|
7
7
|
* `--patch` overlay applies. The logger is a no-op outside debug mode, so the
|
|
8
8
|
* command path stays allocation-free in normal operation.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/core/debug
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* NOOP_DEBUG_LOGGER is the debug logger returned outside debug mode. It
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Every engine and model composes these same primitives; the estimator and the
|
|
4
4
|
* guideline engine consume the declarations a ParameterSpec carries, so a new
|
|
5
5
|
* engine, model, or rule is data and a thin subclass, never a core rewire.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/core
|
|
7
7
|
*/
|
|
8
8
|
export type { Config, CustomArg } from './config.ts';
|
|
9
9
|
export { detectHardware, parseNvidiaSmiGpu, } from './hardware.ts';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Every engine and model composes these same primitives; the estimator and the
|
|
4
4
|
* guideline engine consume the declarations a ParameterSpec carries, so a new
|
|
5
5
|
* engine, model, or rule is data and a thin subclass, never a core rewire.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/core
|
|
7
7
|
*/
|
|
8
8
|
export { detectHardware, parseNvidiaSmiGpu, } from "./hardware.js";
|
|
9
9
|
export { DEFAULT_OS_RESERVE_MIB, estimateVram, KV_PAGE_TOKENS, pageRoundUp, TIGHT_HEADROOM_BYTES, } from "./estimator.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "dsh-plugin-local-infer-core",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Pure, framework-free domain model for the dsh local-inference plugin: ParameterSpec, HardwareProfile, EngineAdapter, VramEstimator, GuidelineEngine, DefaultsResolver, DshModelRegistrar, and SystemDepProvisioner primitives shared by every engine and model",
|
|
5
5
|
"keywords": [
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* injectable `LifecycleHost`, so the tests stub the host and never run a real
|
|
6
6
|
* build, docker, or network in CI. The node implementation
|
|
7
7
|
* (`nodeLifecycleHost`) is what the service wires in on a live host.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/providers/adapters
|
|
9
9
|
*/
|
|
10
10
|
import { EngineAdapter } from '../../core/lib/index.js';
|
|
11
11
|
import type { Config, DebugLogger, DeployResult, EngineLaunchSignature, EnginePlatformConfig, HealthCheckOptions, HealthResult, HardwareProfile, LaunchPlan, LifecycleHost, ParameterSpec } from '../../core/lib/index.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* injectable `LifecycleHost`, so the tests stub the host and never run a real
|
|
6
6
|
* build, docker, or network in CI. The node implementation
|
|
7
7
|
* (`nodeLifecycleHost`) is what the service wires in on a live host.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/providers/adapters
|
|
9
9
|
*/
|
|
10
10
|
import { exec, spawn as nodeSpawn } from 'node:child_process';
|
|
11
11
|
import { basename, dirname, join } from 'node:path';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the two ways DSH enables debug mode (the HARNESS_LOG_LEVEL environment
|
|
4
4
|
* variable and the DSH logger level config) into a single DebugLogger the
|
|
5
5
|
* engine adapters use to capture the full build-to-launch command sequence.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/debug
|
|
7
7
|
*/
|
|
8
8
|
import { Context } from '@deepseek-ai/cordis';
|
|
9
9
|
import { type DebugLogger } from '../../core/lib/index.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the two ways DSH enables debug mode (the HARNESS_LOG_LEVEL environment
|
|
4
4
|
* variable and the DSH logger level config) into a single DebugLogger the
|
|
5
5
|
* engine adapters use to capture the full build-to-launch command sequence.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/debug
|
|
7
7
|
*/
|
|
8
8
|
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
9
9
|
import { homedir } from 'node:os';
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* The dnf and brew blocks are the plan's "flagged when untested" sets: they
|
|
11
11
|
* name the right packages but have not been run on a live host.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/deps
|
|
13
13
|
*/
|
|
14
|
-
import type { EngineDepPlan, HardwareProfile } from '
|
|
14
|
+
import type { EngineDepPlan, HardwareProfile } from 'dsh-plugin-local-infer/core';
|
|
15
15
|
/**
|
|
16
16
|
* The named host deps every engine plan composes. The install blocks are the
|
|
17
17
|
* copy/paste commands the user runs; envAfter carries the per-manager export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* The dnf and brew blocks are the plan's "flagged when untested" sets: they
|
|
11
11
|
* name the right packages but have not been run on a live host.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/deps
|
|
13
13
|
*/
|
|
14
14
|
import { execFile } from 'node:child_process';
|
|
15
15
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* concrete EngineAdapter (Phase 5) composes it into a LaunchPlan. The registry
|
|
6
6
|
* is the single list the Web card offers, so adding an engine is a data edit
|
|
7
7
|
* here, never a rewire of the card.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/providers/engines
|
|
9
9
|
*/
|
|
10
|
-
import type { ParameterSpec } from '
|
|
10
|
+
import type { ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
11
11
|
export interface EngineInfo {
|
|
12
12
|
id: string;
|
|
13
13
|
label: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* concrete EngineAdapter (Phase 5) composes it into a LaunchPlan. The registry
|
|
6
6
|
* is the single list the Web card offers, so adding an engine is a data edit
|
|
7
7
|
* here, never a rewire of the card.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/providers/engines
|
|
9
9
|
*/
|
|
10
10
|
import { HYPERQWEN_PARAMETERS } from "./hyperqwen.js";
|
|
11
11
|
import { LLAMACPP_PARAMETERS } from "./llamacpp.js";
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* "exceeds usable VRAM" and "spec needs draft weights" rules) live in the
|
|
10
10
|
* core `modelGuidelines` and run in the service, because they price against
|
|
11
11
|
* a model, not against the hardware alone.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/guidelines
|
|
13
13
|
*/
|
|
14
|
-
import type { Guideline } from '
|
|
14
|
+
import type { Guideline } from 'dsh-plugin-local-infer/core';
|
|
15
15
|
/**
|
|
16
16
|
* One pinned Host StateImage, in bytes. The NInfer measured figure for the
|
|
17
17
|
* 27B artifact (195,897,344 B, the README's Host StateImage size), used as
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* "exceeds usable VRAM" and "spec needs draft weights" rules) live in the
|
|
10
10
|
* core `modelGuidelines` and run in the service, because they price against
|
|
11
11
|
* a model, not against the hardware alone.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/guidelines
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* One pinned Host StateImage, in bytes. The NInfer measured figure for the
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* `docker-compose.yml`, and the `single-user`/`batch` start scripts. The
|
|
5
5
|
* concepts mirror the NInfer surface; the spelling is a `.env` key the
|
|
6
6
|
* `HyperQwenAdapter` (Phase 5) writes into the compose environment.
|
|
7
|
-
* @module
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/hyperqwen
|
|
8
8
|
*/
|
|
9
|
-
import type { EnumOption, ParameterSpec } from '
|
|
9
|
+
import type { EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
10
10
|
/**
|
|
11
11
|
* The speculative-decoding backends Hyper-Qwen serves. The launcher's own
|
|
12
12
|
* default is `mtp`; the single-user speed profile sets `dflash2`.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `docker-compose.yml`, and the `single-user`/`batch` start scripts. The
|
|
5
5
|
* concepts mirror the NInfer surface; the spelling is a `.env` key the
|
|
6
6
|
* `HyperQwenAdapter` (Phase 5) writes into the compose environment.
|
|
7
|
-
* @module
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/hyperqwen
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The speculative-decoding backends Hyper-Qwen serves. The launcher's own
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* guidelines. The engine adapters land in Phase 5. Phase 7 registers the
|
|
9
9
|
* built-in preset data (the NInfer measured and Hyper-Qwen profile presets)
|
|
10
10
|
* that the defaults resolver resolves against.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/providers
|
|
12
12
|
*/
|
|
13
13
|
import type { Context } from '@deepseek-ai/cordis';
|
|
14
14
|
export declare const name = "local-infer-providers";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* guidelines. The engine adapters land in Phase 5. Phase 7 registers the
|
|
9
9
|
* built-in preset data (the NInfer measured and Hyper-Qwen profile presets)
|
|
10
10
|
* that the defaults resolver resolves against.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/providers
|
|
12
12
|
*/
|
|
13
13
|
import { createNodeLifecycleHost, HyperQwenAdapter, LlamaCppAdapter, NInferAdapter, StrataAdapter, } from "./adapters.js";
|
|
14
14
|
import { createDshDebugLogger } from "./debug.js";
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire. The
|
|
10
10
|
* engine is not present on the reference host, so the surface is the
|
|
11
11
|
* specified set the plan names, verified when the binary lands.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/llamacpp
|
|
13
13
|
*/
|
|
14
|
-
import type { Config, EnumOption, ParameterSpec } from '
|
|
14
|
+
import type { Config, EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
15
15
|
/**
|
|
16
16
|
* The KV cache quantization formats llama.cpp serves. `f16` is the full-
|
|
17
17
|
* precision default; the smaller tiers trade a little quality for a longer
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire. The
|
|
10
10
|
* engine is not present on the reference host, so the surface is the
|
|
11
11
|
* specified set the plan names, verified when the binary lands.
|
|
12
|
-
* @module
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/llamacpp
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* The KV cache quantization formats llama.cpp serves. `f16` is the full-
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* The list is the single source the card's Model dropdown, the model
|
|
9
9
|
* presence check, and the hf CLI download route read. Adding a model is a
|
|
10
10
|
* data edit here, never a route or card rewire.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/providers/model-defaults
|
|
12
12
|
*/
|
|
13
|
-
import type { DefaultModel } from '
|
|
13
|
+
import type { DefaultModel } from 'dsh-plugin-local-infer/core';
|
|
14
14
|
/**
|
|
15
15
|
* DEFAULT_MODELS is the default model list, in the order the card lists them.
|
|
16
16
|
* The 27B keys reuse the VramModel registry ids; the 35B-A3B entries use the
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* The list is the single source the card's Model dropdown, the model
|
|
9
9
|
* presence check, and the hf CLI download route read. Adding a model is a
|
|
10
10
|
* data edit here, never a route or card rewire.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/providers/model-defaults
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* DEFAULT_MODELS is the default model list, in the order the card lists them.
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The data is the surface; the `NInferAdapter` (Phase 5) composes it into a
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire.
|
|
10
|
-
* @module
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/ninfer
|
|
11
11
|
*/
|
|
12
|
-
import type { ComboOption, EnumOption, ParameterSpec } from '
|
|
12
|
+
import type { ComboOption, EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
13
13
|
/**
|
|
14
14
|
* The KV cache quantization formats NInfer serves, in the order the form
|
|
15
15
|
* dropdown lists them. `note` carries the tradeoff text the dropdown shows
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The data is the surface; the `NInferAdapter` (Phase 5) composes it into a
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire.
|
|
10
|
-
* @module
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/ninfer
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* The KV cache quantization formats NInfer serves, in the order the form
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* bridge pulls and the pure extractor that turns the fetched page into a
|
|
12
12
|
* preset. The service runs the fetch and tags the result with the URL and the
|
|
13
13
|
* fetch date.
|
|
14
|
-
* @module
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/presets
|
|
15
15
|
*/
|
|
16
|
-
import type { Config, Preset, PresetSource } from '
|
|
16
|
+
import type { Config, Preset, PresetSource } from 'dsh-plugin-local-infer/core';
|
|
17
17
|
/**
|
|
18
18
|
* BUILTIN_PRESETS is the combined preset list the providers register with the
|
|
19
19
|
* seam. Adding a preset is a data edit here, never a resolver change.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* bridge pulls and the pure extractor that turns the fetched page into a
|
|
12
12
|
* preset. The service runs the fetch and tags the result with the URL and the
|
|
13
13
|
* fetch date.
|
|
14
|
-
* @module
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/presets
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
17
|
* The hardware class every built-in preset is sourced for: a 24 GiB Ampere
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* available. The surface is empty until then, so the form renders no fields
|
|
5
5
|
* and the adapter renders a bare docker plan; adding a spec here is a data
|
|
6
6
|
* edit, never an adapter rewire.
|
|
7
|
-
* @module
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/strata
|
|
8
8
|
*/
|
|
9
|
-
import type { ParameterSpec } from '
|
|
9
|
+
import type { ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
10
10
|
/**
|
|
11
11
|
* The Strata `ParameterSpec` surface, empty until the engine's flag set lands.
|
|
12
12
|
* The `StrataAdapter` composes this (currently nothing) into a docker plan.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* available. The surface is empty until then, so the form renders no fields
|
|
5
5
|
* and the adapter renders a bare docker plan; adding a spec here is a data
|
|
6
6
|
* edit, never an adapter rewire.
|
|
7
|
-
* @module
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/strata
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The Strata `ParameterSpec` surface, empty until the engine's flag set lands.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* parameter counts. The provenance note on each model names the exact weight
|
|
7
7
|
* artifact the figures apply to, because the runtime also recognizes other
|
|
8
8
|
* weight profiles with different resident sizes.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/providers/vram
|
|
10
10
|
*/
|
|
11
|
-
import type { VramModel } from '
|
|
11
|
+
import type { VramModel } from 'dsh-plugin-local-infer/core';
|
|
12
12
|
/**
|
|
13
13
|
* The NInfer measured VramModels, one per model artifact. The top-level
|
|
14
14
|
* `seqFixedBytes`/`seqPerToken` are the no-speculation baseline; the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* parameter counts. The provenance note on each model names the exact weight
|
|
7
7
|
* artifact the figures apply to, because the runtime also recognizes other
|
|
8
8
|
* weight profiles with different resident sizes.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/providers/vram
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* DFlash2's CUDA-graph allowance is a step in context, measured at 8,192 /
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "dsh-plugin-local-infer-providers",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Concrete providers for the dsh local-inference plugin: the ninfer, hyperqwen, llamacpp, and strata engine adapters, the NInfer VramModel, the built-in presets, the built-in guidelines, and the per-OS SystemDep install command data. Each registers itself with ctx.localInfer.",
|
|
5
5
|
"keywords": [
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"dsh-plugin-local-infer-core": "workspace:^",
|
|
35
|
+
"dsh-plugin-local-infer-service": "workspace:^"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": ">=4.0.1"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* Phase 6 over the dsh settings seam, and `resolveDefaults` and
|
|
16
16
|
* `fetchPreset` by Phase 7 over the core defaults resolver and the
|
|
17
17
|
* mod-search bridge.
|
|
18
|
-
* @module
|
|
18
|
+
* @module dsh-plugin-local-infer/service
|
|
19
19
|
*/
|
|
20
20
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
21
|
-
import type { Config, DefaultModel, ModelDirectoryEntry, EngineAdapter, EngineDepPlan, EnginePlatformConfig, GpuUsageProbe, Guideline, GuidelineResult, HardwareProfile, HardwareProbes, InstallResult, LaunchPlan, ModelRow, Preset, PresetSource, ProcessLine, ProviderLaunchRecord, ProviderRef, ProviderStatus, ReLinkOutcome, RegisterResult, ReserveResolution, ResolvedDefaults, SystemDep, VramModel } from '
|
|
21
|
+
import type { Config, DefaultModel, ModelDirectoryEntry, EngineAdapter, EngineDepPlan, EnginePlatformConfig, GpuUsageProbe, Guideline, GuidelineResult, HardwareProfile, HardwareProbes, InstallResult, LaunchPlan, ModelRow, Preset, PresetSource, ProcessLine, ProviderLaunchRecord, ProviderRef, ProviderStatus, ReLinkOutcome, RegisterResult, ReserveResolution, ResolvedDefaults, SystemDep, VramModel } from 'dsh-plugin-local-infer/core';
|
|
22
22
|
import type { DetectOsReserveOptions, DownloadModelOptions, DownloadResult, EstimateResult, FetchPresetOptions, FetchPresetResult, HfCliOptions, LaunchOptions, LaunchResult, LocalInferService, RegisterModelOptions } from './types.ts';
|
|
23
23
|
export type { DetectOsReserveOptions, DownloadModelOptions, DownloadResult, EstimateResult, FetchPresetOptions, FetchPresetResult, HfCliOptions, LaunchOptions, LaunchResult, LocalInferService, ProviderStatusOptions, RegisterModelOptions, SettingsDescribeResult, SettingsForms, SettingsNamespaceDescriptor, } from './types.ts';
|
|
24
24
|
declare module '@deepseek-ai/cordis' {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Phase 6 over the dsh settings seam, and `resolveDefaults` and
|
|
16
16
|
* `fetchPreset` by Phase 7 over the core defaults resolver and the
|
|
17
17
|
* mod-search bridge.
|
|
18
|
-
* @module
|
|
18
|
+
* @module dsh-plugin-local-infer/service
|
|
19
19
|
*/
|
|
20
20
|
import { exec, execFile, spawn } from 'node:child_process';
|
|
21
21
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandOutcome, Config, DefaultModel, ModelDirectoryEntry, EngineAdapter, EngineDepPlan, EnginePlatformConfig, Guideline, GuidelineResult, GpuUsageProbe, HardwareProfile, InstallResult, LaunchPlan, ModelRow, Preset, PresetSource, ProcessLine, ProviderLaunchRecord, ProviderRef, ProviderStatus, ReLinkOutcome, RegisterResult, ReserveResolution, ReserveSource, ResolvedDefaults, SettingsOp, SystemDep, VramBreakdown, VramModel, VramVerdict } from '
|
|
1
|
+
import type { CommandOutcome, Config, DefaultModel, ModelDirectoryEntry, EngineAdapter, EngineDepPlan, EnginePlatformConfig, Guideline, GuidelineResult, GpuUsageProbe, HardwareProfile, InstallResult, LaunchPlan, ModelRow, Preset, PresetSource, ProcessLine, ProviderLaunchRecord, ProviderRef, ProviderStatus, ReLinkOutcome, RegisterResult, ReserveResolution, ReserveSource, ResolvedDefaults, SettingsOp, SystemDep, VramBreakdown, VramModel, VramVerdict } from 'dsh-plugin-local-infer/core';
|
|
2
2
|
/**
|
|
3
3
|
* EstimateResult is the answer to an estimate call: the full VRAM breakdown,
|
|
4
4
|
* the one-word verdict the meter renders, the source the numbers came from,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "dsh-plugin-local-infer-service",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Service Definition for the dsh local-inference capability seam (ctx.localInfer): the engine, preset, and guideline registries plus the orchestration entry points (estimate, guidelines, deps, installString, runInstall, launch, registerModel). Carries no store of its own.",
|
|
5
5
|
"keywords": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"
|
|
33
|
+
"dsh-plugin-local-infer-core": "workspace:^"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": ">=4.0.1"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* In the scaffold this plugin is a no-op placeholder that injects the seam so
|
|
9
9
|
* the bundle loads with zero tools. Phase 8 registers the four tools and the
|
|
10
10
|
* prompt section.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/tool
|
|
12
12
|
*/
|
|
13
13
|
import type { Context } from '@deepseek-ai/cordis';
|
|
14
14
|
export declare const name = "local-infer-tool";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* In the scaffold this plugin is a no-op placeholder that injects the seam so
|
|
9
9
|
* the bundle loads with zero tools. Phase 8 registers the four tools and the
|
|
10
10
|
* prompt section.
|
|
11
|
-
* @module
|
|
11
|
+
* @module dsh-plugin-local-infer/tool
|
|
12
12
|
*/
|
|
13
13
|
export const name = 'local-infer-tool';
|
|
14
14
|
export const inject = ['localInfer'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "dsh-plugin-local-infer-tool",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Model-facing tools for the dsh local-inference plugin: local_infer_estimate, local_infer_launch, local_infer_status, and local_infer_register, each on its own timeout budget, plus the system-prompt section that tells the agent when to use them",
|
|
5
5
|
"keywords": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"dsh-plugin-local-infer-core": "workspace:^",
|
|
33
|
+
"dsh-plugin-local-infer-service": "workspace:^"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": ">=4.0.1"
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* "Get" gate the plan names (disabled until every dep reports satisfied).
|
|
6
6
|
* The model is pure data the card draws, so the mapping stays unit-testable
|
|
7
7
|
* here.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/ui/deps
|
|
9
9
|
*/
|
|
10
|
-
import type { DepCheck, DepStatus } from '
|
|
10
|
+
import type { DepCheck, DepStatus } from 'dsh-plugin-local-infer/core';
|
|
11
11
|
/**
|
|
12
12
|
* DepItemModel is one row of the panel's dep list: the dep id, the purpose
|
|
13
13
|
* the user reads, the current status, and whether installing it needs sudo.
|
package/packages/ui/lib/deps.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* "Get" gate the plan names (disabled until every dep reports satisfied).
|
|
6
6
|
* The model is pure data the card draws, so the mapping stays unit-testable
|
|
7
7
|
* here.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/ui/deps
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* renderDeps maps the checkDeps results and the rendered install string to
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* `group`, and a field per `ParameterSpec`. The model is pure data, so the
|
|
4
4
|
* panel (Phase 8) renders it without touching the domain model, and the
|
|
5
5
|
* mapping from `form` kind to control kind stays unit-testable here.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/ui/form
|
|
7
7
|
*/
|
|
8
|
-
import type { ComboOption, Config, EnumOption, HardwareProfile, ParameterForm, ParameterSpec } from '
|
|
8
|
+
import type { ComboOption, Config, EnumOption, HardwareProfile, ParameterForm, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
9
9
|
/**
|
|
10
10
|
* The control kinds the panel switches on: checkbox, dropdown, slider plus
|
|
11
11
|
* number input, text, a directory/file picker, and a dropdown plus free-text
|
package/packages/ui/lib/form.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `group`, and a field per `ParameterSpec`. The model is pure data, so the
|
|
4
4
|
* panel (Phase 8) renders it without touching the domain model, and the
|
|
5
5
|
* mapping from `form` kind to control kind stays unit-testable here.
|
|
6
|
-
* @module
|
|
6
|
+
* @module dsh-plugin-local-infer/ui/form
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* The group label a spec without a `group` renders under.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The render models (form, meter, warnings) are pure data the panel draws
|
|
9
9
|
* from; Phase 8 wires them into one panel with the lifecycle controls.
|
|
10
|
-
* @module
|
|
10
|
+
* @module dsh-plugin-local-infer/ui
|
|
11
11
|
*/
|
|
12
12
|
import type { Context } from '@deepseek-ai/cordis';
|
|
13
13
|
export declare const name = "local-infer-ui";
|
package/packages/ui/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The render models (form, meter, warnings) are pure data the panel draws
|
|
9
9
|
* from; Phase 8 wires them into one panel with the lifecycle controls.
|
|
10
|
-
* @module
|
|
10
|
+
* @module dsh-plugin-local-infer/ui
|
|
11
11
|
*/
|
|
12
12
|
import { registerLocalInferRoute } from "./route.js";
|
|
13
13
|
export const name = 'local-infer-ui';
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* as authoritative. The model is pure data, so the panel (Phase 8) renders
|
|
7
7
|
* it without touching the domain model, and the mapping stays unit-testable
|
|
8
8
|
* here.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/ui/meter
|
|
10
10
|
*/
|
|
11
|
-
import type { ReserveSource, VramBreakdown, VramVerdict } from '
|
|
11
|
+
import type { ReserveSource, VramBreakdown, VramVerdict } from 'dsh-plugin-local-infer/core';
|
|
12
12
|
/**
|
|
13
13
|
* MeterSegment is one segment of the to-scale bar. `percent` is the share of
|
|
14
14
|
* the full card the segment occupies, so the bar reads against the card the
|
package/packages/ui/lib/meter.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* as authoritative. The model is pure data, so the panel (Phase 8) renders
|
|
7
7
|
* it without touching the domain model, and the mapping stays unit-testable
|
|
8
8
|
* here.
|
|
9
|
-
* @module
|
|
9
|
+
* @module dsh-plugin-local-infer/ui/meter
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* renderMeter builds the render model for a VRAM estimate. The segments are
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* ~/.dsh/local-infer/config.json, shared with the CLI, so the browser never
|
|
13
13
|
* sees a secret it did not store. The routes are held by an effect, so they
|
|
14
14
|
* go when the plugin does.
|
|
15
|
-
* @module
|
|
15
|
+
* @module dsh-plugin-local-infer/ui/route
|
|
16
16
|
*/
|
|
17
17
|
import type { Context } from '@deepseek-ai/cordis';
|
|
18
|
-
import type { Config, DefaultProvenance, HardwareProfile, InstallResult, ProviderLaunchRecord, ProviderStatus, RegisterResult, VramModel, VramVerdict } from '
|
|
19
|
-
import type { DownloadResult, LaunchResult, LocalInferService } from '
|
|
18
|
+
import type { Config, DefaultProvenance, HardwareProfile, InstallResult, ProviderLaunchRecord, ProviderStatus, RegisterResult, VramModel, VramVerdict } from 'dsh-plugin-local-infer/core';
|
|
19
|
+
import type { DownloadResult, LaunchResult, LocalInferService } from 'dsh-plugin-local-infer/service';
|
|
20
20
|
import type { EngineInfo } from '../../providers/lib/index.js';
|
|
21
21
|
import type { DepsModel } from './deps.ts';
|
|
22
22
|
import type { FormModel } from './form.ts';
|
package/packages/ui/lib/route.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* ~/.dsh/local-infer/config.json, shared with the CLI, so the browser never
|
|
13
13
|
* sees a secret it did not store. The routes are held by an effect, so they
|
|
14
14
|
* go when the plugin does.
|
|
15
|
-
* @module
|
|
15
|
+
* @module dsh-plugin-local-infer/ui/route
|
|
16
16
|
*/
|
|
17
17
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
18
18
|
import { homedir } from 'node:os';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* panel (Phase 8) renders it without touching the domain model, and the
|
|
6
6
|
* level-to-tone mapping stays unit-testable here. An `error` result renders
|
|
7
7
|
* red; `warn` renders amber; `info` renders neutral.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/ui/warnings
|
|
9
9
|
*/
|
|
10
|
-
import type { GuidelineLevel, GuidelineResult } from '
|
|
10
|
+
import type { GuidelineLevel, GuidelineResult } from 'dsh-plugin-local-infer/core';
|
|
11
11
|
/**
|
|
12
12
|
* WarningTone is the panel's color class for a fired guideline: red for an
|
|
13
13
|
* error, amber for a warning, neutral for an info.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* panel (Phase 8) renders it without touching the domain model, and the
|
|
6
6
|
* level-to-tone mapping stays unit-testable here. An `error` result renders
|
|
7
7
|
* red; `warn` renders amber; `info` renders neutral.
|
|
8
|
-
* @module
|
|
8
|
+
* @module dsh-plugin-local-infer/ui/warnings
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* toneFor maps a guideline level to the panel's color class.
|
package/packages/ui/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "0.1.
|
|
2
|
+
"name": "dsh-plugin-local-infer-ui",
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Web UI for the dsh local-inference plugin: the form-type-aware parameter form, the live VRAM Est. meter, the red hardware-warning banner, the engine lifecycle controls (build / deploy / stop), and the register-as-model confirmation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
32
|
+
"dsh-plugin-local-infer-core": "workspace:^",
|
|
33
|
+
"dsh-plugin-local-infer-service": "workspace:^",
|
|
34
|
+
"dsh-plugin-local-infer-providers": "workspace:^"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": ">=4.0.1"
|