dsh-run-guard
Agent run-rhythm guard for DeepSeek Harness: reasoning dead-loop interception (guard) + automatic continuation after premature stops (continue) 适合需要防止智能体陷入推理死循环、并在异常中断后自动续跑的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PrismLean/dsh-run-guardREADME
Read the full README ↗⚙️ 配置
配置由 dsh 的 Cordis Loader 按插件导出的 Config schema 解析 profile patch 里的插件条目;编辑入口在 Plugins 页面(见上文「验证」)。下表是全部字段:
| 配置项 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
guard.enabled | true | 死循环拦截开关 |
guard.windowChars | 2000 | 滑动窗口大小(字符) |
guard.substrLen | 32 | 重复检测子串长度 |
guard.repeatRatio | 0.7 | 窗口重复率阈值(≥ 触发) |
guard.checkEvery | 50 | 每 N 块检测一次(降频) |
guard.maxBlocks | 10000 | 硬闸:单次调用推理块数上限 |
guard.maxChars | 500000 | 硬闸:单次调用推理字符数上限 |
guard.maxGuardRetries | 2 | 中断后每 turn 自动重试次数上限(0 禁用) |
guard.autoRetryErrors | ["PI_AI_ERROR"] | 额外自动重试的错误码白名单(REASONING_GUARD 恒重试);瞬时上游错误可加入 |
continue.enabled | true | 自动继续开关 |
continue.maxAutoFollowups | 3 | 有 todo 场景连续无产出续跑上限 |