akira399/dsh-stall-guard
DeepSeek Harness 看门狗插件:检测真正停滞的代理轮次(绝不终止进行中的任务——飞行中的操作不受影响),仅在真正无响应时提醒/终止,并将每个事件记录到 JSONL 中,同时提供回环状态路由。
Project Overview项目介绍
dsh-stall-guard is a purpose-built watchdog plugin exclusively for DeepSeek Harness (DSH), designed to detect stalled tasks and help agents recover without terminating any work. To install the plugin, you can run the one-line command npx -p @deepseek-ai/dsh dsh plugin --profile web add github:akira399/dsh-stall-guard from your terminal, then restart DSH to complete the setup. After installation, the plugin is enabled by default, so you do not need to manually toggle it on to start using its core monitoring features. This plugin follows DSH’s native plugin specification and includes the required bundle manifest.
The plugin periodically checks the status of all running DSH tasks, tracking both the last recorded activity time and any currently in-flight operations for each active session. It only flags a task as actually stalled when it is marked as running, has been idle longer than the user-configured threshold, and has no active in-flight operations that count as progress. It uses a stepped nudging system to guide the agent: first it asks the agent to diagnose the stall, then to fix it, and finally to redirect to an alternative approach. Any new activity on the task automatically resets the nudging back to the first step.
All configurable parameters are stored under the stall-guard namespace in DSH’s main settings.yaml configuration file, and any changes you make take effect immediately without needing to restart DSH. All stall-related events are logged to the local file $DSH_HOME/stall-guard/events.jsonl, and you can retrieve the current real-time status of all sessions via the provided GET API endpoint. The entire project is released under the permissive open-source MIT license, so you can modify, redistribute, or use the code for any purpose under the terms of the license.
dsh-stall-guard 是一款专门为 DeepSeek Harness(DSH)开发的原生任务看门狗插件,核心功能是监控 DSH 任务的执行状态,判断任务是否真的出现无进展卡顿,通过“排查→修复→换方向”的阶梯式引导帮助任务恢复,全程承诺不会终止任何正在执行的任务,符合 DSH 插件打包规范,自带官方要求的 bundle-manifest 清单。
该插件会周期性扫描任务状态,追踪每个会话的最后活动时间和在飞操作,只有当任务处于运行中且静默时长超过配置阈值,同时没有任何在飞操作时,才会判定为真卡顿,之后按阶梯等级注入引导消息,任何新的活动事件都会重置阶梯等级,适合需要避免任务无响应挂死、又不想误杀长任务的 DSH 用户。
用户可以通过 DSH 自带的插件管理命令一键安装,安装后默认启用,支持通过 DSH 的 settings.yaml 配置多个参数,修改后热生效无需重启,所有事件日志会写入指定本地文件,提供 API 接口查询实时状态,项目采用 MIT 许可开源,可免费使用和修改。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-stall-guard(akira399/dsh-stall-guard)
仓库:https://github.com/akira399/dsh-stall-guard
本站详情页:https://www.yhbd.top/plugins/akira399-dsh-stall-guard/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:akira399/dsh-stall-guard
把 akira399/dsh-stall-guard 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-stall-guard
DeepSeek Harness(DSH)任务看门狗插件:监控任务执行状态,判断是否真正卡死,并通过"排查→修复→换方向"的阶梯式引导帮助任务恢复——全程不终止任何任务。
核心流程(监控 → 判断 → 继续 / 修复 / 换方向)
agent/status (running/idle) ─┐
session/event (turn/step/tool/llm) ─┼─→ 追踪每个会话的"最后活动时间"与"在飞操作"
│
周期扫描(checkIntervalMs)──→ 运行中且 静默 > stallThresholdMs ?
│
├─ 有在飞操作(busy>0)或持续有事件 → 判定"推进中" → 继续执行,不干预
│ (超 busyTimeoutMs 仅记一条 LONG_RUNNING 日志)
│
└─ 真静默(无事件 + 无在飞)→ 阶梯式引导(注入提示消息):
第1级 诊断(DIAGNOSED) :请 Agent 排查当前状态、说明卡住原因(附看门狗诊断现场)
第2级 修复(FIXING) :请 Agent 针对卡点重试/完成/修复后继续
第3级+ 换方向(REDIRECTING):请 Agent 放弃当前方法、改用替代方案持续推进
(每级按冷却间隔推进,第3级后循环;任何活动事件都会重置回第1级)
│
事件写入 $DSH_HOME/stall-guard/events.jsonl
状态查询 GET /api/dsh-stall-guard/status
关键承诺:插件永不终止任务。 它只通过注入消息引导 Agent 自己排查、修复、换方向;没有 terminate 选项,也没有任何终止指令。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:akira399/dsh-stall-guard
安装后重启 DSH。插件默认启用。
配置(settings.yaml 的 stall-guard 命名空间)
| 键 | 默认值 | 说明 |
|---|---|---|
enabled |
true |
总开关 |
stallThresholdMs |
120000 |
真静默阈值(毫秒):运行中、无任何事件、且无在飞操作时,静默超过该值判定卡顿 |
checkIntervalMs |
5000 |
扫描间隔(毫秒) |
busyTimeoutMs |
600000 |
在飞操作观察窗口(毫秒):有工具调用 / LLM 请求在飞 = 任务在推进,永不引导;仅静默超过该值后记录一条 LONG_RUNNING;0 关闭该记录 |
stallRecordIntervalMs |
60000 |
STALL 记录节流间隔(毫秒),防止持续卡顿时日志刷屏 |
policy |
"auto" |
auto(诊断→修复→换方向阶梯)/ report(仅记录不引导) |
nudgeCooldownMs |
30000 |
阶梯消息的冷却间隔(毫秒) |
diagnoseMessage |
内置默认 | 第 1 级:排查指令(自动附加诊断现场:最后活动、位置、静默时长) |
fixMessage |
内置默认 | 第 2 级:修复指令 |
redirectMessage |
内置默认 | 第 3 级+:换方向指令 |
示例:
stall-guard:
stallThresholdMs: 60000
checkIntervalMs: 3000
policy: auto
修改后热生效(无需重启)。
防误杀:什么才算"卡住"
| 任务情况 | 判定 | 行为 |
|---|---|---|
| 持续有事件(步骤/工具/LLM 流在动) | 推进中 | 不动(计时持续刷新,任何活动都会把阶梯重置回第 1 级) |
| 单个长操作在飞(如 10 分钟构建、长文本生成) | 推进中(busy > 0) |
不引导、不干预;超过 busyTimeoutMs 仅记一条 LONG_RUNNING |
无任何事件 + 无在飞操作,静默超 stallThresholdMs |
真卡死 | 阶梯式引导(诊断 → 修复 → 换方向循环) |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
jigjoy-ai/baro
PlutoKeating/dsh-lark-bot
zimzaza4/dsh-bash-win
AI-Galaxy-GPU/dsh-sound
HuanLinOTO/dsh-plugin-sleep