knlght/DSH-shutdown
One-click shutdown of DeepSeek Harness service: Settings shutdown page + secondary confirmation + graceful exit, no background processes left behind when closing the browser.
Project Overview项目介绍
This repository is a native plugin built exclusively for DeepSeek Harness (DSH), designed to solve the common problem that closing the browser does not terminate DSH's background process, which continues to consume system memory and hold network ports. It adds a visual control entry directly in DSH's settings page, so users do not need to use command line tools to shut down or restart the DSH service. To install the plugin, you can run the DSH CLI command dsh plugin --profile web add <this repository or npm package name>, then restart the DSH web service to activate it.
After installation, the plugin adds a new "Service Control" tab at the bottom of the DSH settings sidebar. When you click the shut down or restart button, a confirmation prompt will pop up to prevent accidental misoperation. After you confirm the operation, the page will display a clear success message and automatically try to close the current tab. The plugin follows DSH's native design system, uses DSH theme tokens for all buttons and colors, and adapts automatically to both light and dark mode. For restart requests, the DSH launcher script will catch the special exit code and automatically relaunch the DSH web service.
The plugin includes built-in CSRF protection to prevent malicious websites from forcibly shutting down your local DSH service. It checks the Origin header for browser requests, blocks all cross-origin requests with a 403 error, and allows requests from localhost, matching Origin/Host for custom hosts, and non-browser requests like curl. It is released under the open-source MIT license, so anyone can use, modify, or contribute to the project without any cost or restriction. Users are reminded to wait for any ongoing conversation to finish before shutting down or restarting the service to avoid data issues.
knlght/DSH-shutdown 是一款专门为 DeepSeek Harness (DSH) 开发的原生插件,核心功能是为 DSH 提供一键关闭和重启后台服务的能力。默认情况下,关闭浏览器不会终止 DSH 后台进程,导致进程持续占用端口和内存,本插件在 DSH 的设置页面新增了可视化操作入口,用户无需使用命令行即可完成服务管控操作。
安装完成后,插件会在 DSH 设置页面侧栏最底部新增「服务开关」标签页,用户点击关闭或重启按钮后会弹出二次确认窗口,防止误触操作。操作完成后页面会给出清晰的成功反馈,还会自动尝试关闭当前标签页,重启操作会被 DSH 的启动脚本捕获并自动重新拉起 DSH 服务,整个流程无需手动干预。
本插件使用 MIT 许可免费开源,自带 CSRF 防护功能,针对浏览器跨源请求和同源请求分别设置了校验规则,防止恶意网站非法关闭本地 DSH 服务。安装可以通过 DSH 命令行工具完成,执行 dsh plugin --profile web add 本仓库 后重启 DSH web 即可生效。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:DSH-shutdown(knlght/DSH-shutdown)
仓库:https://github.com/knlght/DSH-shutdown
本站详情页:https://www.yhbd.top/plugins/knlght-dsh-shutdown/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-10 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:knlght/DSH-shutdown
把 knlght/DSH-shutdown 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-shutdown
Settings「服务开关」页 · 二次确认 · 优雅退出 / 自动重启
关掉浏览器不再留下后台进程,也能一键重启服务。
✨ 为什么需要
关闭浏览器不会结束 dsh 的后台服务进程——服务继续占用端口与内存。本插件在页面内提供一键关机/重启入口,无需命令行。
✨ 功能一览
- 🖥️ Settings「服务开关」页:侧栏最底部新增「服务开关」页签
- 🛡️ 二次确认:点「关闭 DSH 服务」或「重启 DSH 服务」→ 出现「确认 / 取消」双按钮,防误触
- ✅ 成功反馈:确认后页面立即显示绿色「关闭成功 / 重启中」面板(并尝试自动关闭标签页)
- 🔁 自动重启:重启请求会让宿主进程以特殊退出码退出,由
launcher/dsh-web.ps1启动脚本捕获后自动重新拉起(根目录dsh-web.cmd/dsh-web.ps1为快捷入口) - 🎨 原生风格:按钮与配色全部引用 DSH 主题 token(
--dsw-alias-*),明暗自适应
📦 安装
dsh plugin --profile web add <本仓库 / npm 包名>
# 重启 dsh web 生效
🧠 设计要点
- 关机端点:
/_dsh/shutdown(仅 POST)——服务先返回「正在关闭」响应,500ms 后process.exit(0)优雅退出 - 重启端点:
/_dsh/restart(仅 POST)——服务先返回「正在重启」响应,500ms 后以退出码 42 退出;dsh-web.ps1检测到该退出码会自动重新启动dsh web - 会话日志为逐事件落盘,空闲时退出安全;正在进行的对话请等待其完成后再操作
- 浏览器安全策略下脚本只能关闭自己打开的窗口——手动打开的标签页会保留成功面板,两种情况下你都能确认结果
🧩 生态
打上 dsh-shutdown topic 的插件可接入同一生态。欢迎通过 PR 改进本插件。
📄 许可
🔒 安全说明
关机端点会终止整个服务,是破坏性最强的操作,因此端点自身带有跨站请求(CSRF)防护:
- 浏览器发起的请求:校验
Origin头。来自外部站点的一律返回403,防止任意网页在后台关闭你本机的 DSH——浏览器不会为这类跨源简单 POST 做预检,所以端点必须自己把关 - 同源访问:
127.0.0.1/localhost/::1直接放行;通过局域网 IP 或自定义主机名访问(dsh web --host 0.0.0.0)时,要求Origin与Host一致 - 无
Origin的请求:curl、启动脚本等非浏览器客户端放行,不影响脚本化使用
📝 更新日志
v0.2.0
- 新增 CSRF 防护(详见上方安全说明)
- 修复 前端在端点返回 500 等错误时仍显示「关闭成功」——此前只要
fetch未抛异常就当作成功,现在区分网络层失败、响应解析失败与 HTTP 错误三类情况 - 修复 插件卸载 / 热重载时未撤销
slots.inject注册,可能导致设置页残留重复条目 - 新增 17 个行为测试(host 10 + client 7),覆盖 CSRF 守卫、退出码语义、卸载清理与响应判定
Tencent/BrowserSkill
YaoApp/yao
anbeime/skill
Jesseovo/last30days-skill-cn
bowenliang123/dsh-context
platonai/Browser4
liustack/modsearch