返回目录
模型与 MCP 插件

dsh-loop-rescue

citydirector/dsh-loop-rescue

DSH plugin that cuts model repetition loops mid-stream, prunes them from the session log, and resumes automatically.

Stars
0
Forks
0
Issues
0
更新
22 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:citydirector/dsh-loop-rescue

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-loop-rescue

English · 简体中文

npm License: MIT DSH plugin

Stop repetitive DSH model output, prune the repetition from the committed message, and resume automatically. It catches recurring short phrases, reasoning and repeated passages of text.

Requires DSH >=0.2.1-rc.2 <0.3.0 and Node.js 24.9+. Coverage includes 0.2.1-rc.3; installation does not require an alpha DSH release.

Quick start

  1. Enter dsh-loop-rescue in Plugins → Add plugin, then enable it.
  2. Use this or @mrweicodes/dsh-loop-guard, so both do not cut the same stream.
  3. The default mode rescues automatically. Use mode: observe to inspect detection before allowing cuts.

For a Web profile:

dsh plugin --profile web add dsh-loop-rescue

Stop the corresponding DSH instance before CLI changes and restart afterwards. Prefer the Plugins page on Desktop; CLI management of its desktop profile requires that installation's own CLI and the same DSH_HOME.

Configuration

The profile's cordis.patch.yml stores settings under row ID loop-rescue:

- set:
    - id: loop-rescue
      config:
        mode: rescue
        watch: both
        maxConsecutiveRescues: 3
        language: auto
Setting Default Meaning
mode rescue Prune and resume; cut prunes only, observe logs only
watch both Watch reasoning, text or both
marker true Leave a marker at the cut
maxConsecutiveRescues 3 Consecutive rescue cap; normal calls reset it
stallCalls 3 Nudge after reasoning-only calls; 0 disables
stallMinReasoningChars 1024 Minimum reasoning length counted as a stall
retryTemperature / retryReasoningEffort Unset Optional sampling overrides after rescue
retryRequests 1 Number of requests using those overrides
language auto auto, zh or en

The detector object adjusts thresholds; defaults usually suffice. See advanced documentation for full examples, detection rules and offline tools.

Updating

Install by npm name. Use DSH's version list when available. Otherwise, stop DSH and run:

dsh plugin --profile web add dsh-loop-rescue@latest

To migrate a GitHub dependency, back up the profile's cordis.patch.yml, remove the old package, add the npm name, and verify saved settings. Maintainer publishing instructions are in PUBLISHING.md.

Known limitations

  • The committed message contains the pruned content; redrawing already streamed output depends on the DSH front end.
  • Open tool calls prevent a cut, keeping incomplete arguments from executing.
  • Repeated tool use across separate steps is outside the detector's scope.
  • Saved history is not rewritten automatically. Close DSH and retain backups before offline cleaning.
  • Sampling overrides require support from the model adapter.

Development

npm ci --ignore-scripts --legacy-peer-deps
npm test

CI covers DSH 0.2.1-rc.3 and an alpha runtime. Entry point: src/index.js; detector: src/detector.js.

Related projects

More DeepSeek Harness (DSH) projects from @citydirector:

Project Kind What it does
DSH-build Build Portable and desktop Windows builds of DSH, patched, smoke-tested and released daily
dsh-remote-access-proxy Plugin Use the DSH Web GUI from your phone, tablet, or another computer
deepinfra-fusion-proxy Plugin DeepInfra Standard / Flex switching with automatic fallback, per session
dsh-pwsh-plugin Plugin Persistent pwsh session tool (pwsh_run), plus a WSL write boundary for bash
ui-locate-mcp MCP plugin Pixel-exact coordinates for on-screen text and icons, for desktop automation
dsh-session-manager Offline tool Upgrade, archive, trash, loop cleanup and repair for DSH sessions

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。