快速了解
它能做什么
通过界面或经明确确认的智能体工具重启 DeepSeek Harness Web 主机,并提供自动重连和启动错误恢复。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
Web Profile
>=0.1.5-rc.1
证据已验证
核对日期 2026/9/13 UTC 14:17
选择前先看
dsh-restart 为 DeepSeek Harness Web 添加重启按钮,并提供 dsh_restart_status 与 dsh_restart。它将重启交给独立辅助进程:等待原端口释放后重新启动主机命令;若检测到 launchd 管理,则改为委派给 launchd。新主机恢复响应后页面会重新加载;若启动失败,可在页面遮罩和本地恢复控制台查看捕获的输出。
适合谁
适合安装或更新主机端插件后,希望无需回到终端、且能观察和恢复重启过程的 DeepSeek Harness Web 用户。
常见任务
- 安装或更新主机端插件后重新加载 DSH Web 主机。
- 重启由 launchd 管理的 DSH Web 主机,避免与其争用端口。
- 替代主机启动失败时查看重启进度和启动错误。
- 让智能体在获得明确确认后请求重启。
权限与数据
控制本地 DSH Web 主机进程,并保存本地重启诊断信息。
权限- 可请求终止并重新启动本地 DSH Web 主机。
- 使用 /api/dsh-restart/ 下的本地回环 HTTP 接口。
- 检测到由 launchd 管理的主机时,可能调用 launchctl kickstart -k。
- 将配置写入 ~/.dsh/dsh-restart.json。
- 将重启历史写入 ~/.dsh/dsh-restart/history.json,并将日志写入 ~/.dsh/dsh-restart/logs/。
- 在重启日志中捕获新主机的 stdout 和 stderr。
- 未描述外部服务;恢复控制台默认位于 http://127.0.0.1:3099。
- 提供的证据未声明需要凭据。
局限
- 重启会中断当前回合和连接。
- 它只负责重启主机,不负责安装插件或修复 profile。
- 仅文档说明已在 macOS 上实际运行;Linux 和 Windows 尚未测试。
- 软件包含有 prepare 生命周期脚本,会在准备阶段构建软件包。
DSHub 已核对
- 已验证固定 Git 提交中的 bundle 结构及其 profile patch。
- 清单声明需要 DSH >=0.1.5-rc.1,以及 Node ^22.19.0 或 >=24.0.0。
- README 报告曾在 macOS、DSH 0.1.5-rc.1 和 Node 25.8.1 上测试。
DSHub 未核对
- 本次整理未安装或运行该插件。
- 未审计 npm tarball 的内容。
- 未验证 Linux 或 Windows 上的运行行为。
固定版本安装
安装 dsh-restart
这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
项目 README
@zhengjunyao/dsh-restart
English | 中文
A restart button for DeepSeek Harness. Installing or updating a plugin changes
host-side code, and only a fresh dsh web process picks it up — that used to
mean going back to a terminal. Now it is one click in the Web GUI: the page
reconnects on its own, and if the new process fails to boot, the error is
shown right there (an in-page overlay, plus a recovery console on its own port
that stays up even when DSH is dead).
Why
A self-restart is the moment things go wrong invisibly: the tab loses its
server, the new process crashes, and the only trace is in a terminal you already
left. dsh-restart handles all three:
- one click from the settings card or the sidebar entry;
- two strategies, auto-detected — when the host is a launchd job
(
com.dsh.web,KeepAlive), the helper delegates withlaunchctl kickstart -kand only observes (spawning our own host would race the job for the port); otherwise it relaunches the exact same command (argv / cwd / env / Node flags) after waiting for the port to be actually released, instead of guessing with a fixed delay; - the new process's stdout+stderr stream into a log, the lines that look like
errors are lifted out, and the helper's recovery console
(
http://127.0.0.1:3099by default, CORS-open) keeps answering after DSH is gone — showing phase, boot log, error lines and exit code, with a one-click retry.
Features
- Settings card 「重启」, sidebar entry next to your other plugin entries, and a full-screen overlay while the handoff happens.
- Auto-reconnect: the page probes
/api/dsh-restart/probeand reloads itself as soon as the new host answers (autoReload, on by default). - Failure handling: error lines are detected (Error / EADDRINUSE /
MODULE_NOT_FOUND / stack frames), the boot log is shown in the overlay, and
maxAttempts(default 2) automatic retries run before giving up. - Readiness is not "the port answers":
dsh webbinds its port before the plugin tree loads, so the helper only reports ready once the port answers, the process is still alive, and the boot output carries no fatal line — held overreadyConfirmMs(4s) first, then watched forbootWatchMs(30s) so a host that reports ready and dies seconds later is reclassified as a failed restart instead of a silent success. - Agent tools:
dsh_restart_status(read-only) anddsh_restart, which demandsconfirm: truebecause the local standing rule is that DSH is never restarted without explicit user consent. - History at
~/.dsh/dsh-restart/history.json; logs under~/.dsh/dsh-restart/logs/; config at~/.dsh/dsh-restart.json(0600).
Install
dsh plugin --profile web add @zhengjunyao/dsh-restart # npm
dsh plugin --profile web add link:/path/to/dsh-restart
# or, from GitHub (repo tagged with the dsh-plugin topic)
dsh plugin --profile web add github:zhengjy01/dsh-restart
Restart dsh web once to load it — the last manual restart you need.
HTTP surface
All loopback-only, same-origin, matching the other dsh-* panels:
GET /status, GET /probe, POST /restart, GET /logs, GET /history,
POST /config, GET /helper, POST /helper/retry — all under
/api/dsh-restart/.
How it works
panel / dsh_restart
│ POST /api/dsh-restart/restart
▼
host (old process) ──writes pending-spec.json──▶ detached helper (zero deps)
│ replies 202, SIGTERMs itself ~0.7s later │
▼ │ waits for the port
process exits ─────────────────────────────────────────────┤
▼
spawns the new host with the same command
(stdout/stderr → logs/<stamp>-<pid>.log)
│
status.json ◀── phase/progress/errors ───┤
http://127.0.0.1:3099 ◀── recovery console┘
│
page polls /probe ──▶ new host answers ──▶ location.reload()┘
Compatibility
- Requires DeepSeek Harness ≥ 0.1.5-rc.1 (declared as
dsh.engines.dsh). - Verified against: 0.1.5-rc.1 on macOS with Node 25.8.1 — host half, browser half and a real restart.
- Platforms: only macOS has actually been exercised. When the host is launchd-managed, the helper delegates with
launchctl kickstart -k; elsewhere it falls back to relaunching the same command itself (the launchd path is platform-guarded; Linux and Windows are untested). - Compatibility is also derived from the union of the
@deepseek-ai/dsh-*peerDependenciesranges, which is what the plugin market displays.
Tests
pnpm test # 168 assertions across five suites
smoke (config/history/log detection/host identity), helper (the real helper
against fake hosts: crash capture + console + manual retry, and a successful
relaunch), routes (synthetic req/res, including the loopback/cross-site/method
guards), handoff (end-to-end on fake ports: restart → old process really exits
→ helper relaunches generation 2 → the port answers with a new pid), launchd
(pid→job matching and observe mode, which must never spawn).
Limits
- Only restarts: it does not install plugins or repair a profile (that is
dsh-doctor's job). - A restart always interrupts the current turn and connection — replacing the host process cannot be invisible. What is guaranteed is that the interruption is observable, recoverable, and its errors readable.
- The helper registers no OS-level service; it lives for one restart and exits after readiness (or stays put on failure until you deal with it).
License
MIT
有意识地管理
安装与管理
前置条件与目标 Profile
目标: Web Profile
交付方式: Git Bundle — zhengjy01/dsh-restart#9854ff8b4db991b5163c6cff912e36432405cf6f。
验证、更新与移除
显示生命周期命令
dsh plugin --profile web list兼容性与访问范围
Requires DeepSeek Harness 0.1.5-rc.1 or later: >=0.1.5-rc.1。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
这是 MIT 许可证的插件 bundle,具有明确的本地进程控制行为;在活动主机上启用前应评估重启造成的影响。
AI 审查于 2026/9/13 UTC 14:18。GitHub 事实核对日期: 2026/9/13 UTC 14:18。
自当前证据基线以来,没有记录到重要源码变化。