chenkai2/dsh-daemon
dsh daemon: register the DeepSeek Harness web server (dsh web) as an auto-start, self-healing background service (LaunchAgent / systemd / cron + watchdog)
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH) that registers DSH’s dsh web service as an auto-starting, self-healing background daemon. To install via the recommended method, you must have DSH v0.1.9 or newer, and pnpm available on your system PATH. It supports automatic startup on user login, automatic restart after system wake from sleep, and 30-second interval health checks that trigger a service restart after 3 consecutive failures. It works across macOS, Linux, and Windows, with platform-specific service registration tailored to each OS’s native manager.
After installation, the plugin registers seven agent-callable tools that let DSH agents handle common daemon tasks: install, uninstall, reinstall, check status, start, stop, and update. It also installs a lightweight dsh-daemon CLI command in your Node.js bin directory, so you can manage the daemon directly from your terminal without opening the DSH GUI. All install and uninstall operations leave currently running DSH sessions untouched, so you will never lose work in progress due to plugin management. Developers can test the plugin dynamically without installing it to their DSH profile, which simplifies development and debugging.
The plugin is released under the open-source MIT license, and requires the danger-full-access permission because it manages user-level system service files and executes system commands. Windows support is fully implemented to match macOS and Linux behavior, but it has not been verified on production Windows machines, so users should note this limitation when installing on Windows. Automatic plugin updates will automatically regenerate the watchdog script and restart the daemon, so users almost never need to manually intervene after initial installation. Node.js 18 or newer is required for the watchdog script to run correctly.
这是一款专为 DeepSeek Harness (DSH) 开发的原生插件,作用是将 DSH 的 dsh web 网络服务注册为可自启动、自愈的后台守护进程。它支持开机登录自动启动、系统睡眠唤醒后自动重启、每30秒(可配置)进行一次健康检查,连续3次检查失败后自动重启服务,适配macOS、Linux、Windows三大主流桌面系统。可通过DSH官方插件管理器安装到web配置文件,要求PATH环境变量中带有pnpm包管理器。
插件提供了7个可供DSH智能体调用的工具,分别实现安装、卸载、重装、状态查询、启动、停止、更新守护进程的功能,同时还在Node的bin目录生成轻量 dsh-daemon 命令行工具,支持不打开GUI即可在终端管理守护进程。安装和卸载过程不会影响当前正在运行的DSH会话,避免了操作中断工作流。面向开发人员还提供了动态调试方式,无需安装即可测试插件功能。
插件采用MIT许可免费开源,使用过程中需要请求 danger-full-access 权限,因为需要管理用户级系统服务和状态文件。Windows平台的功能已经按照同等行为实现,但尚未在真实Windows设备上经过完整验证,使用时需要注意这一点。升级插件后会自动重新生成守护进程脚本,无需用户手动执行重装操作,日常使用基本无需人工干预。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-daemon(chenkai2/dsh-daemon)
仓库:https://github.com/chenkai2/dsh-daemon
本站详情页:https://www.yhbd.top/plugins/chenkai2-dsh-daemon/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-18 · 主语言 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 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 @chenkai114/dsh-daemon
把 chenkai2/dsh-daemon 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-daemon
将 DeepSeek Harness 网络服务(dsh web)注册为自启动、自愈的后台服务。
安装后,dsh web 将:
- 登录时自动启动(LaunchAgent
RunAtLoad/ systemdWantedBy=default.target/ cron@reboot) - 睡眠唤醒后自动重启
- 自愈:watchdog 每 30 秒(可配置)健康检查一次
http://127.0.0.1:<port>/health,连续 3 次失败后重启服务 - 不依赖当前会话:watchdog 是独立生成的脚本,而非内存中的插件
安装/卸载永远不会触碰当前正在运行的会话。
账号对应关系(npm scope / GitHub 账号)见 CONTEXT.md。
使用方式
方式 A —— 用 dsh plugin 安装(v0.1.9+,推荐)
用官方插件管理器将包安装到 web profile(在 profile 目录内运行 pnpm,使 loader 能解析到它;仅全局安装不够——见下):
dsh plugin --profile web add @chenkai114/dsh-daemon(需要 PATH 上有
pnpm——用corepack enable一次性启用。)为什么不能只
npm install -g?loader 以 Node ESM 解析导入name:行,解析锚点是 profile 目录(~/.dsh/profiles/web/);全局node_modules不在该解析链上(NODE_PATH对 ESM 无效)。profile 自己的node_modules——由 pnpm 管理——才是包可达的原因。重启
dsh web。包声明了dsh.bundlemanifest,dsh plugin add会把它自动加入dsh.profile.bundles,启动时作为 bundle 层挂载——不需要(也不应该)再手动往~/.dsh/profiles/web/cordis.patch.yml里 insert 同一行,否则会触发duplicate loader entry id: dsh-daemon启动失败。七个
dsh_daemon_*工具即可供每个 agent 使用——直接让 agent 运行dsh_daemon_install。
以后升级:dsh plugin --profile web update @chenkai114/dsh-daemon(并重启)。
⚠️ 从 v0.1.8 及更早版本升级:如果你之前按旧文档在
~/.dsh/profiles/web/cordis.patch.yml里手动加过- insert: dsh-daemon行,升级后必须删掉那一行(保留文件里其他内容),否则 bundle 层 + 手动层会插入同一个id: dsh-daemon两次,dsh web启动时报duplicate loader entry id。删除后重启即可。
权限说明:daemon 管理用户级系统服务(LaunchAgent plist、
$DSH_HOME下的状态文件),因此插件对其文件与命令操作请求danger-full-access。若部署拒绝提权,工具会以沙箱拒绝失败。
方式 B —— 动态 Cordis 插件(无需安装)
将 lib/index.js 的内容粘贴到 cordis_define 的 code.host 字段并运行。这正是插件在真实会话中开发与验证的方式:沙箱提供 harness 全局,文件以 return plugin; 结尾。
端口
默认端口为当前监听的 webServer 端口(通常 3080),其次 DSH_WEB_PORT,再其次工具显式 port 参数。更换端口后运行 dsh_daemon_reinstall。
架构
守护进程是一个watchdog 监督者,由三部分组成。
1. 平台注册
一个按用户注册的服务,负责在登录时启动 watchdog 并保持其存活:
| 平台 | 机制 |
|---|---|
| macOS | LaunchAgent ~/Library/LaunchAgents/com.deepseek-ai.dsh-watchdog.plist —— ProgramArguments=[node, watchdog.js]、RunAtLoad、KeepAlive{SuccessfulExit:false}、ThrottleInterval=10,环境变量携带 DSH_WEB_PORT 与 DSH_HOME。通过 launchctl load -w 加载。 |
| Linux | systemd 用户单元 ~/.config/systemd/user/dsh-watchdog.service —— Type=simple、Restart=always、RestartSec=10、StartLimitIntervalSec=0;通过 systemctl --user enable --now 启用。systemd 不可用时回退为 cron @reboot 条目。 |
| Windows | VBS 启动器 + 计划任务 —— 任务 DshWatchdog(XML 在 $DSH_HOME/daemon/dsh-watchdog-task.xml,UTF-16LE)在登录时运行 wscript.exe //B dsh-watchdog.vbs;VBS 设置 DSH_WEB_PORT/DSH_HOME 并以隐藏窗口启动 node watchdog.js。RestartOnFailure PT1M/999,MultipleInstancesPolicy=IgnoreNew。通过 schtasks /Create 注册。 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
multica-ai/dsh-multica-runtime
HuanLinOTO/dsh-plugin-interpreters
chipweaver/veripower
esengine/DeepSeek-Reasonix
strukto-ai/mirage
chuspeeism/dashi-taskboard