DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Simple Restart — DeepSeek Harness 插件(DSH Plugin)
← Plugins
S

dsh-simple-restart

Simple Restart

DeepSeek Harness 插件:无需 market 插件,即可从 General 设置行重启正在运行的 `dsh web` 进程。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:yizhixiaokong/dsh-simple-restart#b90c2f3ba11099df076aef6a7f5c1d7d34818c6b
README兼容性版本

兼容性与来源证明

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

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

版本

0.1.0stable
2026/9/15

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

dsh-simple-restart

English | 中文

A DeepSeek Harness plugin that adds one row to Settings → General: a button that restarts the running dsh web process with the same invocation it was started with.

It exists because a plugin change to a client bundle only takes effect after the host restarts, and doing that from a terminal means finding the terminal again. This package owns its own route and its own restart logic — no other plugin is involved.

What it does

  1. The row asks this package's own host route for a restart (a second click confirms; the armed state expires after 5s).
  2. The host checks its own safety rules, then spawns a detached helper and hands it the exact boot invocation — executable, argv, working directory.
  3. The helper waits until the listening port is free, starts the replacement, and then watches for up to 20s to confirm it bound the port.
  4. The host exits 500ms after the handoff. The browser page disconnects briefly and reconnects when the new process is up.

If anything goes wrong after the handoff, the helper writes a diagnosis to $TMPDIR/dsh-simple-restart-<timestamp>.err.log (the replacement's own stdout/stderr go to the .out.log beside it). The process that would otherwise log the failure is the one that just exited — that is why the helper is a separate program rather than a setTimeout in the host.

Why a helper at all

A process cannot replace itself: it can only stop, and something has to start the successor after the listening port is free. Starting it earlier dies with EADDRINUSE. So the restart is a handshake between two processes, and the second one has to be detached — it must outlive the first.

"free" is tested by connecting to the port, never by binding it: a test bind would itself hold the port at the exact moment the replacement needs it.

Requirements

RequirementNotes
DSH, web profileThe route is served by webServer; the settings row is a client-half slot.
Same-origin loopback callerThe route refuses anything else (see below).
Not supervised by systemd — or allowRestart: truesystemd's default KillMode=control-group kills the helper together with the unit, so a restart there would leave nothing running.
Not under a debuggerA debugger attached to this process cannot follow it across an exec-less restart.

Install

Straight from GitHub — nothing to clone (pin a tag if you want a fixed release):

dsh plugin --profile web add "github:yizhixiaokong/dsh-simple-restart"
# pinned: dsh plugin --profile web add "github:yizhixiaokong/dsh-simple-restart#v0.1.0"

From a clone, when you want to edit the code:

git clone https://github.com/yizhixiaokong/dsh-simple-restart.git
cd dsh-simple-restart
dsh plugin --profile web add "$PWD"

From npm, once it is published:

dsh plugin --profile web add dsh-simple-restart

All three end the same way, and none of them needs a manual registration step: dsh plugin runs pnpm, then reads each installed dependency's package.json; a package that declares dsh.bundle has its name appended to dsh.profile.bundles, which is what mounts the cordis.patch.yml beside it.

Now restart dsh web once from a terminal — the client bundle is baselined at boot, so the button appears only after the next start. After that, the button can do it.

To remove it:

dsh plugin --profile web remove dsh-simple-restart

Usage

Settings → 通用 / General → 重启 dsh web:

  • first click arms the button (确认重启?), a second click within 5s performs it;
  • the hint line then shows the host pid that is stepping aside and the helper's pid, plus the diagnostics path;
  • the page reconnects on its own once the replacement is listening.

Configuration

The row's config is passed to the host apply:

# in the profile's cordis.patch.yml, on the row this package contributes
- insert:
    - id: simple-restart
      name: dsh-simple-restart
      config:
        allowRestart: true   # restart even when a systemd supervisor is detected
KeyTypeDefaultMeaning
allowRestartbooleanfalse under a detected systemd supervisor, true otherwiseWhether a restart is permitted where supervision was detected. Only set this where the unit is known to survive it (KillMode=process, or a supervisor that restarts the unit).

HTTP API

One exact route, POST /dsh-simple-restart/api/restart. It is fenced before anything is spawned:

CheckRefusal
Method other than POST405 with Allow: POST
Socket peer that is not 127.0.0.1, ::1 or ::ffff:127.0.0.1403
Any forwarding header (forwarded, x-forwarded-for, x-real-ip)403
Missing Origin, or an Origin whose host is not Host403
systemd supervisor detected and allowRestart not true403
Debugger detected in process.execArgv403
A restart is already scheduled409
// 202 Accepted
{
  "ok": true,
  "pid": 12345,          // the host that is stepping aside
  "helperPid": 12350,    // the detached helper
  "logOut": "/tmp/dsh-simple-restart-2026-09-15T10-00-00.out.log",
  "logErr": "/tmp/dsh-simple-restart-2026-09-15T10-00-00.err.log"
}

Failures answer {"ok":false,"error":"…"} with the status from the table above.

The helper is spawned as node -e <program>, detached with stdio: "ignore" and unref()ed, so it is out of this process's lifetime from the moment it exists. It is given the boot invocation as data ({ file, args, cwd }), never by re-running a shell command line: when the host was started as node …/bin.js the absolute entry and its original execArgv/argv are reused; otherwise it falls back to the dsh executable on PATH with the original arguments.

Limits and known behaviour

  • Detached, not supervised. Once the helper is running, this package has no further control over it. A restart of a process started with unusual wrapper arguments (a shell function, a container entrypoint) falls back to running dsh with the same argv — which is right for dsh web, not for every possible wrapper.
  • No port to wait for. If Host carries no port, the helper simply waits 1.5s before starting the replacement.
  • Environment is inherited, including the current working directory.
  • Diagnostics live in the temp directory and are never cleaned up; they are small, and finding them is the point.

Development

lib/index.js        host half — route, guards, launch description, detached helper
lib/client.js       client bundle — one General-settings row
cordis.patch.yml    the single host row this package contributes
scripts/smoke.mjs   offline checks (no harness, no restart)
npm test          # node scripts/smoke.mjs

The smoke test materializes the client bundle against stub globals and applies the host half to a stub context. It never restarts anything. It checks that the client half fills exactly one settings seat, that the host registers exactly one route, and that both halves agree on that route's path — a mismatch shows up in the browser as a row that always says "请求失败" while the host log stays empty.

Repository notes

Versions are tagged to match package.json — this tree is v0.1.0.

The yizhixiaokong placeholder in package.json, CHANGELOG.md, the badges and the install commands above stands for the GitHub account this repository is pushed to; replace it before publishing. The commits here were authored under a neutral dsh-plugins <noreply@example.com> identity so that no personal address ends up in the published history; if you want your own name on them, set git config user.name / user.email and run git commit --amend --reset-author before pushing.

About the name

This plugin was developed under the working name dsh-restart-button. That name is not available: it is published on npm by jiqiu0709/dsh-restart-button and used by several other GitHub repositories, so the package ships as dsh-simple-restart. Renaming also removed a real collision — the route is now this package's own /dsh-simple-restart/api/restart, instead of the /dsh-restart/api/restart that other restart plugins register.

Getting listed in the marketplace

The plugin list at awesome-dsh-plugin is generated from one YAML file per plugin, and its CI checks a submission's shape against this repository. The mechanical part is already satisfied here: dsh.bundle is declared in package.json beside cordis.patch.yml, the official @deepseek-ai/* packages are declared as peerDependencies, there are no dependencies to install and no build step.

Mind what this plugin shares with entries already on that list: several of them restart dsh web from inside the GUI. This one adds two things they do not state — it refuses to restart under a detected systemd supervisor, whose default KillMode=control-group would kill the helper along with the unit, and it tests whether the port is free by connecting to it rather than binding it, so the replacement never races the old process for the port.

Owner steps:

  1. add the dsh-plugin topic — gh repo edit yizhixiaokong/dsh-simple-restart --add-topic dsh-plugin;

  2. let the repository age past 1 day (the list's CI rejects younger ones);

  3. open one PR adding data/plugins/yizhixiaokong__dsh-simple-restart.yml:

    url: https://github.com/yizhixiaokong/dsh-simple-restart
    name: yizhixiaokong/dsh-simple-restart
    category: dev
    description:
      en: 'Adds a restart row to Settings → General that relaunches dsh web with the same invocation through a detached helper, refuses under a detected systemd supervisor unless allowRestart is true, and tests whether the listening port is free by connecting to it rather than binding it.'
      zh: '在「设置 → 通用」增加一行重启按钮:用相同启动参数、经分离的 helper 重新拉起 dsh web;检测到 systemd 监管时默认拒绝(除非 allowRestart 为 true);判断端口是否空闲用连接探测而非绑定。'
    

The storefront reads a screenshots.json next to package.json for its screenshot strip; this repository declares assets/01-settings-row.png and assets/02-confirm.png, in that order.

Publishing to npm

npm login --registry=https://registry.npmjs.org   # a mirror accepts neither a login nor a publish
npm publish --registry=https://registry.npmjs.org

npm publish --dry-run prints the tarball contents without uploading anything, and prepublishOnly runs npm test before either. The published package's repository field points back here; that is what lets the plugin list link the two and then offer the registry install form instead of the GitHub one.

License

MIT