Scans the DSH loader tree at startup for plugin conflicts (duplicate mounts, failed or pending plugins, duplicate config row ids), auto-stops or restores the affected plugins, and shows a conflict report popup in the web UI.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:baisama-cloud/dsh-conflict-guardian
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
在 DeepSeek Harness(DSH)每次启动时检测插件冲突、自动停用或恢复冲突插件,并在 Web 界面弹出冲突报告,保证 DSH 稳定运行。
插件激活(即每次 DSH 启动)即扫描一次加载器(loader)中的插件树,发现冲突立即处理,处理结果通过弹窗汇报——哪些插件冲突、在哪里冲突、做了什么处理。
功能
- 重复挂载检测:同一模块以完全相同配置挂载多次视为真正重复,自动停用后加载的实例、保留第一份;同一模块不同配置(如
tool-subagent的 spawn/fork 双实例)是合法的 Cordis 多实例模式,不会误判; - 启动失败检测:激活时抛出错误的插件(fiber 处于 failed,错误信息常直接指明冲突,如
service X has been registered at …),自动停用并报告失败原因; - 依赖缺失检测:因等待无人提供的注入服务而永远无法激活的插件(fiber 挂起),自动停用并列出缺失的服务名;
- 自动恢复:启用但没有运行实例的条目会自动尝试重新启动(覆盖误停、加载失败等场景),恢复成功会明确提示;
- 配置行 id 重复:静态扫描组合文件,发现同一文件内行 id 重复会给出警告(下次启动会导致加载器直接抛错),但不会修改你的配置文件;
- 界面弹窗:检测到冲突后,页面打开时自动弹出报告,逐条显示冲突详情与处理结果,可「重新检测」或「知道了」关闭。
所有停用/恢复都是运行时操作,不修改任何
cordis.yml——重启后仍按原配置加载,扫描会再次运行,正好符合「每次启动都判断、有冲突就关停」的设计。
安装
与 DSH 插件包相同的分发方式(参考 dsh-session-mover / dsh-omni-bridge):
# 克隆到本地后,用 dsh 的 bundle patch 机制挂载
npm pack # 生成 dsh-conflict-guardian-0.1.0.tgz
或在 DSH 配置的插件列表中加入该包,cordis.patch.yml 已声明:
- insert:
- id: dsh-conflict-guardian
name: 'dsh-conflict-guardian'
lib/client.js 是已打包的浏览器 bundle(window.__ModuleLoader__.load 形态,与 dsh-omni-bridge 相同);宿主 lib/index.js 在 webServer 上注册 POST /conflict-guardian/report 与 /conflict-guardian/rescan 路由供客户端调用。若作为动态插件运行,宿主同样提供 harness.handle('conflict-report' / 'conflict-rescan') 配对,并额外注册模型可调用的 conflict_check 工具(两种方式都已内置,逻辑共用)。
使用
- 安装并挂载后,每次 DSH 启动时插件自动扫描加载器;
- 发现冲突立即自动处理(停用冲突实例 / 恢复未运行实例),并生成报告;
- 打开 DSH 页面时,若有冲突即弹出报告弹窗:标题、摘要、每条冲突的位置(插件模块 + 组合条目 + 配置文件)与处理结果;
- 也可随时点「重新检测」获取最新状态;模型可通过
conflict_check工具随时检查。
工作原理
- 通过
ctx.get('loader')枚举加载器树中的真实插件条目(跳过 group/include 容器),读取每个条目的模块名、配置、启用状态与 fiber 状态(pending / active / failed); - R1 重复挂载:按「模块名 + 配置签名(JSON)」分组,同组多于一份即真重复 →
entry._dispose()停用后加载实例(运行时停用,不写配置); - R2 / R3 失败与挂起:failed 的 fiber 先
await()取回原始错误;pending 的 fiber 列出fiber.inject中无人提供的服务名 → 停用; - R4 自动恢复:启用但无 fiber 的条目调用
entry.refresh()重新启动,按恢复后 fiber 是否 active 判定成功与否; - R5 行 id 重复:读取每个组合文件(Include 树)的原始行,统计行 id 出现次数;
- 报告通过 webServer 路由(静态安装)或
harness.handle(动态插件)提供给客户端弹窗。
限制
- 停用/恢复不持久化:重启后按原配置加载并再次检测(符合设计);如需永久禁用某个冲突插件,请在组合文件中为该行设置
disabled: true或删除多余行; - 冲突检测基于加载器运行时状态与组合文件静态分析,不解析插件源码内的服务注册(无法预判尚未加载时的服务冲突);
- 模型工具
conflict_check仅在动态插件运行方式下注册(静态安装不引入额外依赖)。
许可
Links
More in this category
yjh051108/dsh-routing-suite★ 6991
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3674
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 326
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 211
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
Fishquito7/dsh-skill-mcp-panel★ 172
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
lire1131/dsh-undo-savepoint★ 170
Undo/redo & rollback system for DSH: every config change is auto-snapshotted; undo/redo/restore to any version from the WebUI or the offline CLI/GUI tools (works even when DSH fails to boot).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.