Frog755/dsh-client-auto-retry 预览 preview

Frog755/dsh-client-auto-retry

Plugin插件 Native原生 ⭐ 3 MIT Models & Routing模型与路由

DSH client plugin: auto-sends 「继续」 when a turn is interrupted/errored/overlong. No model/provider switching. Ships with a settings card.

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that automatically retries interrupted conversation turns. When a DSH turn stops due to network jitter, provider error, timeout, or hitting the max token limit, the plugin sends a preconfigured "continue" prompt to resume generation without manual intervention. It does not change models or providers, and it comes with a built-in settings panel for users to adjust all retry parameters. The recommended installation method is via npm: users navigate to their DSH profile directory, run pnpm add, add the package to their bundles list, install dependencies, and restart DSH.

The plugin works by listening to the DSH session event stream, identifies turns that ended due to error, interruption, or max tokens, waits a default 5-second grace period, then sends the continue prompt automatically. It includes safety measures like a 20-second cooldown between retries, a maximum of 4 consecutive retries, and a scan for interrupted sessions on startup to avoid infinite retry loops. All configurable settings are available in the DSH settings panel under General > Auto Retry on Disconnect, and all changes take effect immediately without a restart. This plugin is ideal for DSH users who frequently encounter interrupted sessions and want to avoid manually retyping the continue prompt every time.

While built for DSH 0.1.0-rc.7 (web profile and desktop runtime), the core auto-retry logic can be adapted to many other coding agents including Codex CLI, Claude Code, Cline, OpenCode, and Pi. The project includes a compatibility guide that maps required API endpoints for other agents, and notes that adapters for additional agents are planned for future releases. It is distributed under the permissive MIT open source license, so users can modify and reuse the code freely for any purpose. Local development is supported via a link method, so contributors can test changes without rebuilding the entire project.

这是一个为 DeepSeek Harness(DSH)开发的原生客户端插件,核心功能是在DSH会话回合因为网络抖动、服务报错、超时或者输出达到token上限被中断时,自动发送预设的继续指令重试,不需要人工介入,也不会切换模型或服务提供商。插件自带配置设置卡片,支持用户自定义各项重试参数,适配DSH 0.1.0-rc.7版本的web端和桌面端运行环境。

用户可以通过npm在DSH的profile目录下安装,修改package.json将插件加入dsh.profile.bundles后,重新安装依赖并重启DSH即可生效。也支持本地link开发调试,修改代码后刷新页面就能看到客户端侧变更,主机侧变更仅需重启DSH。适合经常遇到会话中断需要手动恢复的DSH用户,能省去重复手动输入继续指令的麻烦。

插件提供多个可配置参数,包括重试宽限期、重试冷却时间、最大连续重试次数、继续指令文本、扫描恢复窗口等,所有配置修改后实时生效。核心逻辑为带安全防护的自动恢复策略,底层也可适配其他Agent框架如Codex CLI、Claude Code、Cline等,项目采用MIT开源许可协议,无使用成本限制。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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:Frog755/dsh-client-auto-retry

把 Frog755/dsh-client-auto-retry 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

@frog755/dsh-client-auto-retry

awesome · DSH plugin npm version

DSH 客户端插件:检测到回合被中断 / 出错 / 超长(max-tokens)时,自动发送「继续」重试。 只做自动重试,不做模型 / provider 切换。自带设置卡片。

English version: README-EN.md

dsh-client-auto-retry 工作流程


📺 视频演示

抖音讲解视频(含 429 报错自动续跑的真实演示 + 一分钟原理讲解):

https://v.douyin.com/FAT_Vlsd_AU/


它能做什么

DeepSeek Harness(DSH)的回合(turn)偶尔会因为网络抖动、provider 报错、超时、 或输出达到 token 上限而中断。大多数情况下模型其实已经跑完大部分内容,只要再发一句 「继续」就能接着完成,完全不需要人工介入、也不需要切换模型。

这个插件就是干这件事的:

  1. 监听会话事件流(api.events.mux);
  2. 发现 turn/end 的 reason.kind 属于 error / interrupted / max-tokens 时, 等一个宽限期(默认 5 秒,给 host 留出重连/恢复的时间);
  3. 宽限期后向该会话自动发送「继续」(可配置文本);
  4. 带冷却期、连续次数上限、启动时扫描最近被中断的会话等防护措施,避免失控循环。

安装

方式 A:通过 npm 安装(推荐)

在 DSH 的 profile 目录(例如 ~/.dsh/profiles/web)里执行:

pnpm add @frog755/dsh-client-auto-retry

然后编辑该目录下的 package.json,把 @frog755/dsh-client-auto-retry 加入 dsh.profile.bundles (插件自带的 cordis.patch.yml 会以 bundle 层的形式把 auto-retry 行插入插件清单):

{
  "dependencies": {
    "@frog755/dsh-client-auto-retry": "^0.4.0"
  },
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        // ... 其他 bundle ...
        "@frog755/dsh-client-auto-retry"
      ]
    }
  }
}

然后:

pnpm install

重启 DeepSeek Harness(Host 侧插件只在进程内加载一次),再刷新浏览器页面即可。

方式 B:本地 link 开发调试

{
  "dependencies": {
    "@frog755/dsh-client-auto-retry": "link:C:/Users/frog/.dsh/projects/dsh-client-auto-retry"
  }
}

改完 lib/ 下的文件后刷新页面即可(Client 侧即时生效);Host 侧 lib/index.js 的改动需要重启。

设置项

设置入口:设置 → 通用 → 断联自动重试。所有项都实时生效(applies: "live")。

字段 默认值 含义
graceMs 5000 宽限期:中断后等多少毫秒再自动发送「继续」
cooldownMs 20000 冷却期:同一会话两次自动继续的最小间隔
maxConsecutive 4 最多连续自动继续次数,超过后停下等人工介入
continueText 继续 自动发送的文本内容
echoWindowMs 30000 自身回显窗口:自动发送「继续」后,此窗口内收到内容相同的消息视为自身回显,不计为人工输入
scanOnBoot true 页面加载时扫描最近被中断的会话并恢复
freshMs 900000 扫描窗口:只恢复此时间段内被中断的会话(毫秒)
verbose true 在浏览器控制台输出 [auto-retry] 调试日志

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-voice-input 下一个 Next dsh-usage-meter-harness →