PPsz-qqq/dsh-restart-button 预览 preview

PPsz-qqq/dsh-restart-button

DeepSeek Harness plugin: one-click restart button in the top-right of the session header (Windows desktop + dsh web). 一键重启 DeepSeek Harness 客户端。

Project Overview项目介绍

dsh-restart-button is a native plugin built specifically for DeepSeek Harness (DSH), shipping a bundle-manifest package whose entire purpose is to add a single restart button (↻) at the far right of the conversation header utility area (conversation.session.header.utilities, order 1000). It is installed from inside DSH itself: open the Plugins page, pick a source such as the dshmarket listing "dsh-restart-button" by PPsz-qqq, paste a GitHub Release .tgz URL (releases/latest/download/dsh-restart-button.tgz for the floating latest, or releases/download/v0.2.0/dsh-restart-button-0.2.0.tgz for a pinned version), use the shorthand github:PPsz-qqq/dsh-restart-button#v0.2.0, point at a local .tgz, or have an Agent call plugin_manager install_bundle. The first install takes effect immediately without a restart, while any later upgrade does require a single restart because Node caches loaded modules in-process.

When the button is clicked, the client POSTs to api/restart-button.restart through DSH's standard Host/Origin and browser-side authentication, and the Host records currently open and in-flight sessions to ~/.dsh/restart-button/last-restart.json so the next Host can resume them. A detached helper (detach.mjs invoking restart-desktop.ps1 on Windows) then verifies the Electron main process and Host by executable path and parent/child relationship, suspends the main process so it never notices the Host exiting — preventing crash dialogs and crash dumps — and finally re-launches DeepSeek Harness.exe with the original arguments once port 19387 is free. A second mode, "restart when idle," polls every second and fires the same pipeline only after three consecutive seconds with no running agent turn, queued message, or background job, followed by a 1.5-second grace period so the page can render a "restarting" state.

The desktop one-click path is currently Windows-only; on macOS and Linux desktop builds the button hides itself automatically, while dsh web restarts its service process and redirects logs to ~/.dsh/logs/restart-button-web-server.log. The confirm policy is tunable through cordis.patch.yml with values when-busy (default), always, or never, and the button surfaces runtime duration, memory footprint, busy session count, scheduled restart state, and pending plugin updates on hover, plus an orange dot and a "plugin update pending" card after in-place upgrades. The recovery banner is only valid for ten minutes after restart, scheduled restarts live only inside the current Host process, and all failures are written to ~/.dsh/logs/restart-button.log under an MIT license.

dsh-restart-button 是一款面向 DeepSeek Harness(DSH)的原生插件,专门在会话标题栏最右端添加一个「重启」按钮(↻)。安装方式包括:在 DSH「插件」页搜索 dshmarket 条目、填写 GitHub Release 的 .tgz 链接(latest/download/dsh-restart-button.tgz 或带版本的 dsh-restart-button-0.2.0.tgz)、填写 github:PPsz-qqq/dsh-restart-button#v0.2.0,或让 Agent 调用 plugin_manager install_bundle。第一次安装立即生效,无需重启;之后升级则必须重启一次,以让 Node 重新加载新模块。

点击按钮会调用 POST api/restart-button.restart,经过 DSH 自带的 Host/Origin 与浏览器鉴权,写入 ~/.dsh/restart-button/last-restart.json,再启动脱离进程树的辅助脚本(detach.mjs → restart-desktop.ps1)。辅助脚本核对 Electron 主进程与 Host 的可执行路径和父子关系,挂起主进程使它不感知 Host 退出,最后用原参数重启 DeepSeek Harness.exe。忙碌时支持「跑完后重启」(每秒检查,连续 3 秒无 Agent 回合、排队消息或后台作业后再等 1.5 秒便触发)。重启后自动恢复原会话,可一键「全部继续」。

平台限制:桌面版一键重启仅支持 Windows,macOS / Linux 桌面版按钮自动隐藏;dsh web 模式下日志写入 ~/.dsh/logs/restart-button-web-server.log。按 confirm 配置项(when-busy / always / never)控制确认策略。悬停按钮可查看运行时长、内存、活跃会话数、已安排重启和待生效插件更新;升级时按钮显示橙色小点并弹出更新卡片。日志位于 ~/.dsh/logs/restart-button.log。许可证:MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
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:PPsz-qqq/dsh-restart-button

把 PPsz-qqq/dsh-restart-button 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-restart-button

在 DeepSeek Harness 会话标题栏的右上角加一个「重启」按钮(↻),点一下就能安全地重启整个客户端。

Adds a restart button (↻) to the top-right of the DeepSeek Harness session header. One click restarts the whole client safely.

重启按钮位于会话标题栏右上角,右侧边栏开关左边

功能

  • 位置:会话标题栏右侧工具区的最右端(conversation.session.header.utilities,order 1000),紧挨右侧边栏开关。
  • 一键重启:没有任务在运行时直接重启。
  • 跑完后再重启:有会话正在运行或后台作业未结束时,确认框里多一个「跑完后重启」。选它之后按钮变成蓝色并带一个闪烁的小点,所有任务结束后自动重启;再点按钮可以「取消安排」或「立即重启」。
  • 重启后接着干:重启前会记下你当前打开的会话和被中断的会话。重启完成后自动回到原来的会话,并弹出卡片「重启前有 N 个会话正在运行」,点「全部继续」就向这些会话发送"继续",也可以逐个点开。
  • 插件更新提醒:插件被原地更新(升级或重装)后,新代码要重启才会加载。插件会发现这种情况,在按钮上显示一个橙色小点,并弹出卡片「插件更新待生效:名称 旧版本 → 新版本」,可以「立即重启」或「稍后」。
  • 悬停查看运行状态:鼠标放在按钮上会显示 Host 已运行多久、占用多少内存、几个会话正在运行、是否已安排重启、有几个插件更新等待生效。
  • 桌面版(Windows):重启 Electron 外壳和后台 Host,新窗口自动打开,参数与原来一致。
  • dsh web:重启服务进程,页面在服务恢复后自动刷新。
  • 失败时弹窗说明原因,并给出日志路径 ~/.dsh/logs/restart-button.log。

工作原理(桌面版)

DeepSeek Harness 桌面版由 Electron 主进程启动一个 Node 模式的 Host 子进程(它跑插件、会话和 Web 服务)。 点击按钮后:

  1. 浏览器端向 POST api/restart-button.restart 发请求(走 DSH 自带的 Host/Origin 校验和浏览器鉴权)。
  2. Host 把当前会话和正在运行的会话写进 ~/.dsh/restart-button/last-restart.json,供重启后的 Host 读取。
  3. Host 启动一个脱离进程树的辅助程序(detach.mjs → restart-desktop.ps1),由它核对 Electron 主进程和 Host 的身份(可执行文件路径、父子关系)。
  4. 辅助程序挂起 Electron 主进程,使它察觉不到 Host 退出(不会弹出崩溃对话框、不会写崩溃报告)。
  5. Host 断开与主进程的 IPC,走的正是桌面版退出时的同一条优雅关闭路径:会话落盘、插件逐个释放。
  6. Host 退出后,辅助程序结束被冻结的主进程及其残留子进程,等端口 19387 释放后,用原来的参数重新启动 DeepSeek Harness.exe。

任何一步出错都会记录到日志;若在挂起后失败,辅助程序会恢复主进程,不会留下卡死的窗口。

「跑完后重启」由 Host 每秒检查一次:连续 3 秒没有运行中的 Agent 回合、排队消息或后台作业,就按上面的流程重启(会先留 1.5 秒让页面显示"正在重启")。

「插件更新提醒」的判断方法:Host 记下本进程加载过的每个插件的版本和来源。Node 会缓存已加载的模块,所以之后磁盘上的版本或来源一旦变化(原地更新,或先移除再安装),都算待生效;本进程从未加载过的新插件会直接热加载,不算。

配置

可在 profile 的 cordis.patch.yml 中调整确认策略:

- id: restart-button
  config:
    confirm: when-busy   # when-busy(默认,仅在有任务运行时确认)| always(总是确认)| never(从不确认)

安装

在 DeepSeek Harness 的「插件」页面点「安装」,填入下面任意一种来源(也可以让 Agent 用 plugin_manager install_bundle 安装同样的来源):

来源 填写内容
插件市场 dshmarket 搜索 dsh-restart-button(作者 PPsz-qqq),一键安装
GitHub Release 打包文件(推荐) 最新版:https://github.com/PPsz-qqq/dsh-restart-button/releases/latest/download/dsh-restart-button.tgz;指定版本:https://github.com/PPsz-qqq/dsh-restart-button/releases/download/v0.2.0/dsh-restart-button-0.2.0.tgz
GitHub 仓库 github:PPsz-qqq/dsh-restart-button#v0.2.0
本地打包文件 .tgz 的绝对路径,例如 C:\Users\<you>\.dsh\plugins\dsh-restart-button-0.2.0.tgz

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-dpx 下一个 Next dsh-plugin-local-model →