DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Smart Restart — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@goodandready/dsh-smart-restart

Smart Restart

已验证 DeepSeek Harness 的重启:无需特权即可重启,检查 Harness 是否确实恢复运行,将结果报告给发起请求的会话,并交接剩余待办事项。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @goodandready/dsh-smart-restart@0.1.9
README兼容性版本

兼容性与来源证明

Smart Restart 以 @goodandready/dsh-smart-restart 发布,当前版本为 0.1.9。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/10/15

版本

0.1.9stable
2026/10/15
0.1.8stable
2026/10/7
0.1.7stable
2026/10/7
查看其余 2 个版本收起版本
0.1.6stable
2026/10/7
0.1.1stable
2026/9/26

相关插件

正在加载相关插件…

最新版
0.1.9
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
85.7 kB
文件数
10
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/10/15
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

@goodandready/dsh-smart-restart

A restart that is verified, not announced.

npm · MIT · DSH plugin

DSH Hub — goodandready.app

English • 中文 • Русский

⭐ If you like this plugin, please star it on GitHub — it shows that the plugin is useful and supports continued development.

🐛 If you find a bug or want to request a feature, open a GitHub issue in any language.

A restart that is verified, not announced. The agent restarts DeepSeek Harness, and when the process comes back this plugin checks that everything is really up, reports the verdict into the session that asked for the restart, and hands back what that session was doing.

Why

A restart is the only operation that destroys the thing performing it. The existing answer to that is a notice: "the service restarted at …". It leaves the two questions that matter open — is the harness actually healthy now, and what was I in the middle of — and on a system unit it needs either root or a polkit rule, because it calls systemctl restart from a detached shell whose errors go to /dev/null: a refused restart looks exactly like a successful one.

This plugin closes both gaps and needs no privileges.

Architecture

graph LR
  A[DSH web profile] --> B[Host plugin]
  B --> C[Restart intent and guard]
  C --> D[Service manager restarts DSH]
  D --> E[Next-process health checks]
  E --> F[Report to requesting session]
  A --> G[Client module loader]
  G --> H[Settings card]
  H --> B

The browser half is registered as a lazy CommonJS factory with the DSH client loader. The factory returns its apply and inject exports; the host half owns restart tools, health checks, and the report.

Features

  • Restart without privileges. The default mode terminates the harness process and lets systemd start it again (Restart=always). Nothing is called, nothing is spawned detached, no sudo, no polkit. systemctl restart <unit> remains as an alternative mode for deployments that already grant the right.
  • A health check after every boot. The plugin inspects the composed services, the number of registered tools, the unit's ActiveState/MainPID/NRestarts, whether the listening port is owned by a process inside the unit's cgroup, and the versions of the plugin and the core. The outcome is a verdict — ok, or degraded with the list of checks that failed.
  • A report in the session that asked. Before restarting, the plugin records an intent: which session, why, and what to continue. After the boot the intent and the verdict travel back to that session as a message, so the work resumes with the facts in hand instead of a guess. A session that comes up late is waited for, with a bound.
  • A loop guard. More than three restarts inside ten minutes is refused with the reason, so a boot that keeps failing cannot be papered over by an agent restarting it forever.
  • Settings card in the plugin list, with English and Chinese strings (Russian comes from dsh-russian-lang).

Module breakdown

  • lib/index.js is the Cordis host entry: settings, restart/status tools, boot checks, and delivery of the post-restart report.
  • lib/boot.js contains pure restart detection, loop guard, cgroup/port checks, verdict composition, and report formatting.
  • lib/client.js registers the browser settings card through DSH's lazy client-module loader; its factory returns the CommonJS export object.
  • cordis.patch.yml inserts the package into the selected web profile.

Install

dsh plugin --profile <profile> add @goodandready/dsh-smart-restart

Requires a systemd-managed harness (dsh-web.service or any unit with Restart=always) for the default mode; the unit is detected from the process cgroup, and can be set explicitly.

Settings

SettingTypeDefaultMeaning
enabledbooleantrueWhether the plugin registers its tools and checks a boot at all.
restartModestringkillkill ends the process and lets systemd restart it (no privileges); systemctl runs systemctl restart <unit>.
unitstringempty (auto)The systemd unit to inspect and restart. Empty detects it from /proc/self/cgroup.
delayMsnumber3000How long to wait before the process ends, so the tool's answer reaches the caller.
targetstringrequesterWhere the report goes: requester (the session that asked), primary, or a session id.
stateDirstring.restart-guardState directory under $DSH_HOME: boot marker, intent, last report, and history.
maxRestartsnumber3Refuse a restart after this many inside the window.
windowMsnumber600000The loop-guard window in milliseconds.
timeoutMsnumber5000Timeout for each individual health probe.
expectToolsstring[][]Tool names that must be registered after a boot, otherwise the verdict is degraded.
toolEnabledbooleantrueRegister dsh_restart / dsh_restart_status.

Tools

  • dsh_restart — parameters reason, resume, confirm, delayMs. Records the intent, checks the loop guard, schedules the restart and returns a receipt. The session that called it is the one that receives the verdict afterwards.
  • dsh_restart_status — last boot and downtime, the last health report, the pending intent, and how many restarts happened inside the window.

What the report looks like

smart-restart: the harness restarted and the boot check passed.
- boot: <boot timestamp> (was down 6.2s, pid 12345)
- ok services: webServer, tools, agents, settings
- ok tools: 61 registered
- ok unit: active/running, NRestarts 0
- ok port: 127.0.0.1:<port> owned by pid in system.slice/dsh-web.service
- ok versions: plugin 0.1.0, core <core-version>
verdict: ok
resume: continue the recorded task and report the result

Limits

  • The default mode relies on the service manager restarting the process (Restart=always); on a bare process started by hand there is nothing to bring it back, and the plugin says so instead of pretending.
  • The kill mode loses the in-flight turn by design; the intent file is what makes the next turn meaningful.
  • The port and cgroup checks are Linux-specific and degrade to "not checked" elsewhere.
  • The plugin is managed via the DSH package manager (CLI/pnpm); a standalone /api/dsh/update route is intentionally not hosted, and updates are verified by post-boot health checks upon restart.
  • For systemd user units, the --user flag is automatically applied to both status inspection and systemctl restart.

Troubleshooting

  • If DSH reports that the plugin client failed to import with module is not defined, use a release whose lazy client factory defines and returns its CommonJS exports, then reload the DSH web profile.
  • Host-side tools may load while the browser settings card fails; check client-module boot errors separately.

Development

npm test

License

MIT © GooDAnDReaDY

相关插件

继续浏览 security-access 分类下经过校验的插件。

Experimental Auto Review@deepseek-ai/dsh-experimental-auto-review针对每个工具的 LLM 授权审查,适用于 DeepSeek Harness Auto 权限预设Cc Safety Netcc-safety-net编码代理 CLI 钩子——阻止破坏性命令和访问机密文件Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。