QQQW114/dsh-safe

QQQW114★ 0PowerShellLast synced: 2026-08-14

Open on GitHub

README excerpt

dsh-safe 让 DeepSeek Harness (DSH) 在 插件加载失败时自动禁用坏插件并继续启动 的 PowerShell 守护脚本。 面向的场景:DSH 升级后,某些第三方插件与新版不兼容,导致启动直接 fatal load failure 退出。 dsh-safe 包在 dsh 外面,识别启动错误、自动禁用问题插件(或移除坏 bundle)、重试启动,让 DSH 正常跑起来。 解决的问题 DSH 的启动审计( dsh-app-boot 的 assertEntriesActivated / assertEntriesLoaded )会在以下任一情况让整个进程失败退出, 没有"跳过坏插件"的兜底 : 报错 含义 dsh-safe 的动作 cannot resolve profile bundle "X" bundle 包解析不到 从 dsh.profile.bundles 移除 X profile bundle "X" declares no dsh.bundle 包不是合法 bundle 从 dsh.profile.bundles 移除 X plugin(s) failed to load: X 条目包导入失败 在 cordis.patch.yml 中 disabled 该条目 N entries did not activate 激活抛错 / 注入服务缺失 在 cordis.patch.yml 中 disabled 该条目 为什么是"进程外的程序"而不是插件 坏插件把启动搞崩后,管理类插件自己也起不来(鸡生蛋)。"自动禁用"必须发生在 DSH 进程之外,所以这是包装 dsh 的脚本,不是一个 Cordis 插件。 安装 / 使用 方式 A:直接运行脚本 方式 B:安装为 npm 包(可被 dshmarket 识别) 安装后 dsh-safe bin 会出现在 profile 的 node modules/.bin 下;也可从源码目录直接运行 bin/dsh-safe.js (自动调用同目录的 dsh-safe.ps1 )。 依赖:Windows 上的 PowerShell(pwsh)、Node.js( dsh 本身就需要)、 dsh 与 pnpm 已在 PATH。 安全设计 - 只在确认是启动失败时才动手 :仅当输出命中 fatal load failure / did not activate / failed to load / cannot resolve profile bundle / declares no dsh.bundle 时才改文件;普通 Ctrl+C 退出、运行期崩溃一律不碰。 - 改前先备份 : package.json 与 cordis.patch.yml 改动前各自备份为同目录下 .dsh-safe.bak 。 …

View full README on GitHub →
Terminal / TUIdsh-plugin

Category