Skip to content
dsh.fish
Bundle

dsh-plugin-conflict-checker

DeepSeek Harness plugin conflict checker: pre-flight duplicate-id detection and optional real startup smoke test.

Source
kid-tea
Updated
Updated 19 days ago

Readme

# dsh-plugin-conflict-checker

DeepSeek Harness 插件冲突检测器(host + client bundle plugin)。

安装后:

- host 侧注册工具 `check_plugin_conflicts`
- Web 设置 → 插件 里新增「冲突检测」标签页,点击按钮即可检测,结果直接显示在页面里

## 功能

- 静态检查当前 profile 的插件 patch 合成结果:
  - 重复 loader entry id(会导致 `duplicate loader entry id` 启动崩溃)
  - patch 目标不存在 / name mismatch / insert 非 group
- 可选 smoke:
  - 用 OS 分配的空闲端口真实拉起一次 `dsh web`
  - 等待 `dsh web: http://...` 就绪输出
  - 超时或提前退出则判定启动失败/卡死

## 安装

如果路径含空格,pnpm 的 `dsh plugin add` 可能把路径拆开;建议先用无空格 junction 再安装:

```cmd
mklink /J D:\cfchk-plugin "D:\deepseek harness\plugin\dsh-plugin-conflict-checker"
dsh plugin --profile web add D:\cfchk-plugin
```

然后重启对应 profile。

## 使用

### GUI 按钮

1. 打开 Web 设置
2. 进入「插件」
3. 找到「冲突检测」标签页
4. 勾选“同时进行真实启动测试(smoke)”可选
5. 点击「检测插件冲突」
6. 结果直接显示在下方

### Agent 工具

在 DSH 会话中让 Agent 调用:

```json
{
  "profile": "web",
  "smoke": true,
  "smokeTimeout": 60000
}
```

返回 JSON:

```jsonc
{
  "ok": true,
  "fatal": [],
  "warnings": [],
  "entryCount": 146,
  "smoke": { "ok": true, "url": "http://127.0.0.1:30706" }
}
```


## 局限性 / Limitations

- 静态检查只覆盖已知的启动失败模式:重复 loader entry id、patch 目标不存在、name mismatch、insert 非 group、bundle 缺失/无 `dsh.bundle` 声明。它不能保证覆盖所有未知插件冲突。
- `smoke` 模式会真实拉起一次 `dsh web`,但只验证“能输出就绪 URL、不会在超时时间内卡死”;无法覆盖所有运行时问题(外部服务不可用、网络、浏览器端报错、端口被占用等)。
- 当前检测逻辑通过子进程运行 bundled checker,而不是在 host 进程内直接合成;这样实现简单,但会额外启动一个 Node 子进程。
- 当前 GUI 标签页默认检测 `web` profile,可在页面里手动改成其他 profile。
- Windows 下 `dsh plugin add` 对含空格路径支持不好,安装时建议使用无空格 junction。
- 本项目仍属早期工具,DSH 的 slot/版本契约可能随版本变化;如果遇到新版不兼容,请以当前已安装的 `@deepseek-ai/*` 包类型和实际行为为准。

## 开发

```bash
npm run typecheck
npm run build
npm run verify
```

## 说明

当前实现:

- host 注册工具 + HTTP 路由 `/dsh-plugin-conflict-checker/check`
- client 注册 `settings.plugins.tab`,渲染检测按钮和结果
- 检测逻辑仍由 bundled checker 子进程执行,避免在 host 进程里重复实现一整套合成器

Install

dsh plugin --profile web add github:kid-tea/dsh-plugin-conflict-checker

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source