dsh-smart-restart

DSH PLUGIN工具与能力

仓库 goodandready/dsh-smart-restart · npm @goodandready/dsh-smart-restart

工具与能力 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件
安装这个插件

为 DeepSeek Harness 提供可验证的重启:进程回归后自动做健康检查,把结论和中断前的会话上下文回传到发起重启的会话。

一句话选型结论

按资料字段整理

dsh-smart-restart 是工具与能力类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类工具与能力 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-07 创建于 2026-09-24
README 8.0 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add @goodandready/dsh-smart-restart
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名@goodandready/dsh-smart-restart可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-smart-restart:为 DeepSeek Harness 提供可核验的重启与会话交还

  • 免特权重启,无需 sudo
  • 每次启动后自动健康检查
  • 重启结论回传原会话
  • 十分钟内三次重启熔断
  • 插件列表内设置卡片

上游标签

deepseek-harnessdshdsh-plugin

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在工具与能力场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-smart-restart当前 未做沙盒验证 未标注 0 未标注 有
loopx 未做沙盒验证 未标注 6,233 未标注 无
dsh-startup-screen 未做沙盒验证 未标注 633 未标注 有
minara-skills L4 · 沙盒安装通过 中风险 360 未标注 有
dsh-blender-plugin 未做沙盒验证 未标注 211 未标注 无
tokenledger L5 · 运行验证通过 低风险 204 0.2.0-rc.2 等 11 个 有

仓库档案

工具与能力
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方goodandready仓库 dsh-smart-restart · 默认分支 main
分类工具与能力tools
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-09-24 · 2026-10-07最后推送 2026-10-07
本站收录2026-09-27首次进入本站目录的时间

README 全文

8.0 KB
作者原文,中文版优先;只做安全转义,不改内容

@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 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  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

Setting Type Default Meaning
enabled boolean true Whether the plugin registers its tools and checks a boot at all.
restartMode string kill kill ends the process and lets systemd restart it (no privileges); systemctl runs systemctl restart.
unit string empty (auto) The systemd unit to inspect and restart. Empty detects it from /proc/self/cgroup.
delayMs number 3000 How long to wait before the process ends, so the tool's answer reaches the caller.
target string requester Where the report goes: requester (the session that asked), primary, or a session id.
stateDir string .restart-guard State directory under $DSH_HOME: boot marker, intent, last report, and history.
maxRestarts number 3 Refuse a restart after this many inside the window.
windowMs number 600000 The loop-guard window in milliseconds.
timeoutMs number 5000 Timeout for each individual health probe.
expectTools string[] [] Tool names that must be registered after a boot, otherwise the verdict is degraded.
toolEnabled boolean true Register 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:  (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: owned by pid in system.slice/dsh-web.service
- ok versions: plugin 0.1.0, core
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

Chat Command

You can restart DeepSeek Harness directly from any chat conversation without opening terminal or SSH:

  • — safely restart with preflight validation (prompts to confirm if is on);
  • (or ) — restart immediately with confirmation;
  • — simulate restart and verify preflight checks without restarting;
  • — set custom grace period delay;
  • — specify custom restart reason;
  • — abort a scheduled restart before the delay timer expires;
  • — inspect live health verdict, unit, port, and restart budget.

The post-restart health verdict and package diff report are delivered right back into the same chat conversation.

License

MIT © GooDAnDReaDY

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-smart-restart 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add @goodandready/dsh-smart-restart` 即可。对应的 npm 包名是 `@goodandready/dsh-smart-restart`。

dsh-smart-restart 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-smart-restart 安全吗?

未标注。

dsh-smart-restart 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-smart-restart 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-smart-restart 有哪些功能?

免特权重启,无需 sudo、每次启动后自动健康检查、重启结论回传原会话、十分钟内三次重启熔断、插件列表内设置卡片。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

同名或近似条目

1 条
不同作者的仓库分开列,请确认你要装的是哪一个
工具与能力
按星标排序,可作替代方案

loopx

loopx

LoopX 是面向长周期 Agent 的本地优先控制平面,作为 DSH plugin 为 DeepSeek Harness 提供持久目标、证

未标注验证等级 6,233 星

dsh-startup-screen

dsh-startup-screen

DeepSeek Harness 的启动界面与启动动画插件。

未标注验证等级 633 星

dsh-blender-plugin

dsh-blender-plugin

让 AI 模型通过直连 TCP 通道实时驱动 Blender 的 DSH plugin:15 个工具覆盖视口取帧、任意角度渲染、内循环搜索、

未标注验证等级 211 星

tokenledger

TokenLedger

TokenLedger 为 DeepSeek Harness 提供零配置的 Token 用量记账,自动归属到实际服务请求的中转站,无需凭据即

L5 · 运行验证通过 204 星

deepseek-harness-jev

deepseek-harness-jev

把 TypeSafe Jev 接入 DeepSeek Harness 作为 System One 决策层,为技能与文件选择、任务监督、纠偏和

未标注验证等级 203 星

goodandready 的其它插件

4 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。