Bundle
dsh-plugin-ctl
Web Settings plugin control: start/stop Cordis Loader plugins from a new 启停控制 tab under Settings → Plugins.
- Source
- LinscStef
- License
- MIT
- Updated
- Updated 19 days ago
Readme
# dsh-plugin-ctl — DSH 插件启停控制
在 DeepSeek Harness Web 的「设置 → 插件」中新增一个 **启停控制** 标签页,让你可以直接点击**启动 / 停止**任意 Cordis Loader 插件(原生的「插件列表」标签页是只读的,只能查看)。
## 功能
- 新增「启停控制」标签页(排在只读「插件列表」之后),列出所有非 group 的 Loader 条目
- 每行显示:模块名、条目 ID、配置状态(已启用 / 已停用)、Cordis 状态(未挂载 / 等待依赖 / 加载中 / 已挂载 / 挂载失败 / 卸载中)
- 「启动」一键启用并挂载;「停止」需二次点击确认,防止误停核心插件
- 启停结果持久化到 Loader 配置,重启 DSH 后依然保持
- 支持搜索、中英文界面跟随系统语言、操作错误内联提示
## 在其他 DSH 安装
前提:目标机器已安装 DSH(`dsh` 命令可用)与 [pnpm](https://pnpm.io/)。
```bash
dsh plugin --profile web add git+https://github.com/LinscStef/dsh-plugin-ctl.git
```
- `--profile web` 换成你的实际 profile 名(`dsh plugin --profile <name> add ...`)
- `dsh plugin` 会自动把带 `dsh.bundle` 声明的包并入 profile 的 bundles 层
- 安装完成后**重启 DSH**,打开 设置 → 插件,即可看到「启停控制」标签页
> 如果 pnpm 提示 git 依赖需要允许 build scripts(`allowBuilds`):本包没有 prepare/build 脚本,忽略即可。
## 卸载
```bash
dsh plugin --profile web remove dsh-plugin-ctl
```
## 架构
| 文件 | 作用 |
| --- | --- |
| `lib/index.js` | Host 半侧:注册 `POST /plugin-ctl/api`,直接读写 `ctx.loader`(枚举 + `tree.update(id, { disabled })` 启停并持久化) |
| `lib/client.js` | 浏览器半侧:在 `settings.plugins.tab` 注册 `control` 标签页,通过 `fetch` 调用 Host 路由 |
| `cordis.patch.yml` | bundle patch 层:声明 `plugin-ctl` 条目(`inject: [loader, webServer]`) |
## 安全提示
列表包含核心系统插件(如 `dsh-web-app`、`dsh-base`)。停用它们会当场卸载对应功能,因此「停止」统一有二次确认;`/plugin-ctl/api` 与其他本地插件一样使用未鉴权路由,仅面向本机 Web 界面。
## License
MIT
Install
dsh plugin --profile web add github:LinscStef/dsh-plugin-ctl
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-plugin-ctl from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.