dshbase

Plugin directory / UI & Skins / dsh-kill-restart

dsh-kill-restart

Verified · install-tested on dsh mozhi5795

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-15Last push
Cross-platformPlatform

What it does

One-click kill button for the DSH Web GUI – kill the server process without taskkill

✅
Our take
Works — verified, early-stage project

One-click kill button for the DSH Web GUI – kill the server process without taskkill It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-kill-restart ☠

DSH Web GUI 的一键杀死按钮。
无需 taskkill 或翻找 PID,一键终止 DSH 服务器进程,方便重启。

工作原理

  1. 一个 ☠ 骷髅按钮出现在 DSH Web GUI 右下角。
  2. 点击 → 确认弹窗。
  3. 浏览器发送 POST /api/kill-dsh。
  4. 服务器先响应 { "ok": true },等 200 毫秒让浏览器收到确认,然后调用 process.exit(0)。
  5. 页面显示"DSH 服务器进程已终止 — 请重启 DSH"。

安装

从 npm 安装(推荐)

dsh plugin --profile web add dsh-kill-restart

从 GitHub 安装

dsh plugin --profile web add github:mozhi5795/dsh-kill-restart

注意:Git 安装拉取的是源码而非构建产物。你必须:

  • 使用包含预构建 lib/ 文件的 tag,或
  • 在 profile 的 pnpm-workspace.yaml 中允许 prepare 脚本:
    allowBuilds:
      dsh-kill-restart: true
    

从本地目录安装

# 在包含 dsh-kill-restart 的目录中执行
dsh plugin --profile web add ./dsh-kill-restart

使用

  1. 启动包含此组合包的 DSH profile。
  2. 打开 Web GUI(默认 http://127.0.0.1:3080)。
  3. 点击右下角的 ☠ 按钮。
  4. 确认弹窗。
  5. 服务器退出,手动重启 DSH。

项目结构

dsh-kill-restart/
├── package.json          # 组合包清单(dsh.bundle + dsh.client)
├── cordis.patch.yml      # Cordis 补丁层 — 插入插件行
├── README.md             # 本文件
├── .gitignore
└── lib/
    ├── index.js          # 服务端 — POST /api/kill-dsh 路由
    └── client.js         # 客户端 — ☠ 按钮 UI

架构

这是一个 DSH 组合包(bundle) — 一个可安装的 npm 包,附带配置层。

概念 文件 作用
组合包清单 package.json 声明 dsh.bundle.patch(补丁文件)和 dsh.client(客户端模块注入)
补丁层 cordis.patch.yml 当 profile 列出此组合包时被插入;添加 kill-dsh-restart 插件行
服务端插件 lib/index.js 注入 webServer,注册 POST /api/kill-dsh,响应后调用 process.exit(0)
客户端插件 lib/client.js 通过 exports["./client"] 注入浏览器;添加浮动 ☠ 按钮及点击处理器

加载顺序

根据 DSH 插件开发文档,
生效配置在空根之上按以下顺序逐层组合:

  1. profile 的 bundles 列表中的各组合包补丁(按列表顺序)
  2. profile 自己的 cordis.patch.yml
  3. home 级 $DSH_HOME/cordis.patch.yml
  4. 每个 --patch <路径> 覆盖层

此组合包的补丁(cordis.patch.yml)在 profile 列出 dsh-kill-restart 时,于第 1 步被应用。

发布到 npm

此包已准备好发布到 npm:

npm login
npm publish

发布后,用户通过以下命令安装:

dsh plugin --profile web add dsh-kill-restart

开发

这是一个纯 JavaScript(ESM)插件 — 无需构建步骤。
直接在 lib/ 中编辑文件,然后用 --patch 覆盖层或 dsh plugin add ./dsh-kill-restart 本地测试。

许可证

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-kill-restart for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:mozhi5795/dsh-kill-restart

Headless (CLI) profile:

dsh plugin --profile headless add github:mozhi5795/dsh-kill-restart

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in UI & Skins

Browse all 7819 plugins →