DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Degeneration Guard — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-degeneration-guard

Degeneration Guard

DeepSeek Harness plugin: detects repeated thinking segments and automatically interrupts and resumes execution. General-purpose repetition detection without relying on a whitelist; supports an inline repetition toggle, editable interception prompts, and in-chat notifications.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-degeneration-guard@0.1.1
READMECompatibilityVersions

Compatibility and provenance

Degeneration Guard is published as dsh-degeneration-guard and currently resolves to version 0.1.1. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
10/19/2026

Versions

0.1.1stable
10/19/2026

Related plugins

Loading related plugins…

Latest
0.1.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
46.6 kB
Files
12
Surface
web
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
Last push
10/19/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseExperimental Inspector@deepseek-ai/dsh-experimental-inspectorExperimental cross-realm CDP hub for Host debugging and Client Runtime inspection

README

dsh-degeneration-guard

打断模型的推理复读,并且自动接着干。

DeepSeek Harness 插件。它盯着模型的思考段,一旦发现同一句话在原地打转就截断这次生成, 然后自动把下一步推给模型——不需要你点「继续」。拦截会在聊天里留一条提示,右下角弹一次浮窗。

[深度思考]
  先检查服务器状态和崩溃日志。
  关键:看最新日志和 crash-reports。
  执行。            ← 命中
  好。
  做。
  开始。
  做。              ← 同一行出现三次

[复读打断] 已截断 · 第 3 次 · 已自动继续

为什么不是白名单

白名单查表的做法是:只有整行等于「好。」「Let me go.」这类固定短句才算命中,再要求连续命中 N 次。

于是必然出现两个症状:

  • 阈值设 1:任何一句确认语都算命中,频繁误伤;
  • 阈值设 2 以上:复读串里混进一个表外词(做。、开始。、任意句子),连续计数就清零,几乎永不触发。

而真实复读恰恰不连续——好。做。开始。做。嗯。做。 这种交替碎片才是常态。

本插件换成通用重复检测,不查词表。

判据

只看 reasoning-delta(思考段),正文与工具调用原样透传。

  1. 行重复(始终启用) 最近一个滑动窗口(max(9, 阈值 × 3) 行)里,同一整行出现了 阈值 次即判复读。 看窗口而不是「连续相等」,所以交替复读也拦得住。

  2. 行内重复(可选,默认关闭) 单行内部由同一单元重复而成,如 好。好。好。。 关闭时只认跨换行的重复,也就是只检测独立段落。

明确不参与判定:空行、代码围栏(``` / ~~~)内的行、纯数字或标点组成的装饰行 (1.、---、===)。正常思考、列表、分隔线都不会被误判。

安装

插件市场:在 Harness 的「插件市场」里搜索 dsh-degeneration-guard,一键安装。

命令行(桌面版 PATH 里通常没有 dsh,直接用 npx 跑):

npx -y @deepseek-ai/dsh@latest plugin --profile desktop add dsh-degeneration-guard

--profile 填你的 profile 名,桌面版默认是 desktop(不确定就看 ~/.dsh/profiles/ 下的目录名)。

npx 会取 npm 上最新的 dsh CLI(约 76 KB,拉起很快)。如果它和你的桌面版本不一致、 报 profile 不兼容,改用上面的插件市场安装——插件本身不挑安装方式。

装好后在 设置 → 复读打断 里配置。

要求 dsh 0.1.7 及以上(0.2.x 亦可)。

设置项

项默认说明
累计拦截0自上次清零以来的拦截次数,持久保存,插件加载时不归零
重复次数阈值3同一句在窗口内出现几次才判定复读;2 最敏感,3 最稳
行内重复检测关关闭时只检测独立段落(跨换行的整行重复)
自动继续开打断后自动把下一步推给模型,不需要手动继续
拦截提示词见下推给模型的那一段,支持 {count} / {line}
提示摘要复读已打断(第 {count} 次)· 已自动继续聊天里那条折叠提示的文字,仅用户可见

默认拦截提示词:

[拦截复读]
你上一段思考已经出现推理退化,系统已截断。
请直接继续执行下一步,不要再输出任何确认语、寒暄或空话。

{count} 是累计第几次拦截,{line} 是触发拦截的那一行,两处都可写进提示词与摘要。

拦截之后

  1. 触发命中的那个 delta 照常放行,补一个 block-end 闭合思考块,再补 finish(stop), 对 agent-loop 而言就是一次正常完成;
  2. 在 agent/turn-stopping 里调 agent.steer(...) 推入提示词,本轮自行继续;
  3. 累计计数 +1 写回配置,客户端据此弹浮窗;
  4. 同一段流命中后立即结束,所以一轮内不会反复截断。

与 dsh-repeat-guard 的关系

两者功能重叠,不要同时启用:同时开会双重拦截,而且旧插件每次加载会把计数清零。 建议只装本插件。

开发

npm test          # 检测器 14 组 + 流包装 13 组,无需安装依赖

本地以 link: 方式装进 profile 开发时,Node 从包的真实路径向上找不到 @deepseek-ai/*, 需要在包目录里建一个解析入口,指向 dsh 安装目录的 @deepseek-ai:

# Windows PowerShell
New-Item -ItemType Junction -Path node_modules\@deepseek-ai `
  -Target 'C:\Program Files\DSH NEXT\resources\app\node_modules\@deepseek-ai'

插件对 schemastery 3.18.2 与 3.18.4 都兼容:有 .volatile() 时用它(配置以稳定引用物化), 没有时直接打 meta.volatile 标记(配置按普通值读取,变更重挂载后生效)。所以这个 junction 指向 dsh 安装目录或 profile 共享的 node_modules 都能跑。从 npm 正常安装不需要这一步。

许可证

MIT,见 LICENSE。