omdsh-dev/dsh-revive

Plugin插件 Native原生 ⭐ 3 BSD-3-Clause Search & Web Access搜索与联网Sessions & Context会话与上下文

DSH 一键复活:重启后给所有被打断的会话自动发送「继续」指令(/revive 命令 + revive_sessions 工具 + 浏览器一键按钮)

Project Overview项目介绍

dsh-revive is a native plugin built exclusively for the DeepSeek Harness (DSH) ecosystem. It solves a common pain point for active DSH users: DSH processes are often killed mid-task by out-of-memory errors, unexpected crashes, or other issues, forcing users to manually reopen and resume each interrupted session one by one after a system or DSH restart. The plugin automates this entire tedious workflow, automatically detecting all interrupted sessions, restoring their original preset configurations and model settings, and sending the required "continue" prompt to let them pick up where they left off.

The plugin offers three different trigger methods to suit different user preferences and workflows. You can click the "⚡ Revive" button in the dock below every session input box, which displays a badge with the current count of interrupted sessions for one-click bulk revival. You can also use slash commands: /revive to revive all interrupted sessions, /revive list to only show a list of interrupted sessions, or /revive <sessionId> to revive a single specific session. Finally, you can trigger revival via natural language instruction to the model, which will automatically call the revive_sessions tool to complete the task. This tool is ideal for DSH users who frequently run long tasks that are prone to unexpected interruptions.

To install dsh-revive, you can run dsh plugin --profile web add dsh-revive@0.1.4 from a DSH deployment machine logged into the official private npm registry, or link it to a local development checkout for local testing. The plugin officially requires DSH version >=0.1.0-rc.3 <0.2.0 and Node.js version 22.19.0 or newer, and currently only supports the web profile. There are a few known limitations: revived sessions retain their original model and will not appear in the web model selector, and only persistence backends that declare supportsRawArtifacts can safely scan cold interrupted sessions. dsh-revive is distributed as open-source software under the permissive BSD-3-Clause license.

这是一款专为DeepSeek Harness(DSH)开发的原生插件,用于自动恢复DSH被意外中断的会话。DSH在运行任务时经常会因为OOM、崩溃等各种原因被杀死,重启后用户需要手动打开每个被打断的会话,再手动发送「继续」指令才能恢复任务。这个插件把整个恢复流程简化为一键操作,自动扫描识别中断会话、恢复原有状态并发送指令。

插件提供三种触发方式供用户选择:浏览器会话输入框下方的「⚡复活」一键按钮,角标会显示当前中断会话数量,点击即可恢复全部中断会话;支持斜杠命令,可恢复全部、列出中断会话,也可恢复指定ID的会话;还支持模型工具调用,用户可用自然语言指令触发恢复。适合经常遇到DSH进程意外中断、需要批量恢复会话的DSH用户使用。

该插件要求DSH版本不低于0.1.0-rc3,Node.js版本不低于22.19.0,仅支持web profile。可通过DSH官方npm源直接一键安装,也支持本地开发的链接安装方式。安装后重启DSH即可看到复活按钮,可配置提示词、启动自动恢复等选项,存在部分已知功能限制,采用BSD-3-Clause开源许可证。

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 dsh-revive@0.1.4

把 omdsh-dev/dsh-revive 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-revive · 一键复活

Author / Maintainer: @Zacklinkk

DSH 进程经常在跑任务时被杀死(自己杀自己、OOM、崩溃……),重启之后每个被打断的会话都要手动点开、手动发一句「继续」。这个插件把这件事变成一键:

  • 扫描全部持久化会话,识别「被打断」的(回合没跑完、消息没处理、上次回合以中止/出错/阻塞/超长收尾的);
  • 按官方 GUI 同款路径冷恢复它们:从持久化日志重建会话、挂回它原来的 preset 组合、沿用上次的模型;
  • 给每个被打断的会话发送「继续」指令,让它们接着干活;
  • 子代理会话不直接复活(它们会随父会话的恢复被自动接管),正在运行的会话不动。

触发方式(三选一,同一套核心逻辑)

入口 用法
浏览器一键按钮 每个会话输入框下方的 dock 区有一个「⚡复活」按钮,角标显示被打断会话数,点一下全部复活
斜杠命令 /revive(复活全部)、/revive list(只列出)、/revive <sessionId>(只复活一个)
模型工具 对任意会话说「把被打断的会话都复活」,模型会调用 revive_sessions 工具

被打断的判定

对每个会话日志折叠出以下结论之一:

结论 含义 是否复活
killed-mid-turn 日志末尾停在未结束的回合里(进程被杀) ✅
pending-user-message 有用户消息从未被处理 ✅
aborted / interrupted / error / max-tokens / blocked 上一回合非正常收尾 ✅
completed 上一回合正常完成 ❌(避免无谓烧 token)
空日志 从未动过的会话 ❌

安装

# 已登录私有 npm registry 的 DSH 部署机
dsh plugin --profile web add dsh-revive@0.1.4

# 本地开发 checkout
dsh plugin --profile web add link:/path/to/dsh-revive

插件自带 Profile Bundle;dsh plugin 会自动维护 profile 依赖和 dsh.profile.bundles。不要手工编辑 profile manifest,也不要再插入同名 revive loader entry,否则会触发 duplicate loader entry id。重启 DSH 后,任意会话输入框 下方出现「⚡复活」按钮即安装成功。

兼容性

组件 支持范围
DSH >=0.1.0-rc.3 <0.2.0
Node.js >=22.19.0
Profile web(宿主命令/工具/RPC + 浏览器 dock)

0.1.4 以 npm DSH 0.1.0-rc.3 的 commands、agent resume、raw session persistence 和 dsh-client-ui-conversation 契约为准。

配置

在 profile 自己的 cordis.patch.yml 中更新插件行;不要修改安装包内的 patch:

- update:
    id: revive
    config:
      resumePrompt: 继续
      autoReviveOnStartup: false
      startupDelayMs: 5000
      scanTtlMs: 120000

所有键均可选:

键 默认 说明
resumePrompt 继续 复活时发给会话的指令文本
autoReviveOnStartup false DSH 启动后自动复活所有被打断会话(崩溃循环风险:若 DSH 反复崩溃会反复拉起任务,按需开启)
startupDelayMs 5000 自动复活的启动延迟
scanTtlMs 120000 快照缓存时间;浏览器角标轮询(60s)与此配合,避免频繁全量扫描

开发

npm install --legacy-peer-deps
DSH_RUNTIME_NODE_MODULES=/path/to/dsh-0.1.0-rc.3/node_modules npm run setup:dsh-workspace
npm run typecheck
npm test
npm run build                 # tsc(host 半部)+ tsdown(浏览器半部 lib/client.js)
npm run test:oom              # 128 MiB V8 heap 下扫描 32 MiB raw JSONL
npm pack                      # prepack 会重跑全部 gate

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-splash-launcher 下一个 Next dsh-comfyui →