dshbase

插件目录 / Developer / dsh-self-update

dsh-self-update

未验证 Shane-Jay

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
语言
2026-08-24最近推送
跨平台平台

功能简介

In-app self-update for DeepSeek Harness git-source installs + optional native macOS shell

我们的评价
未验证 — 尚未实测

In-app self-update for DeepSeek Harness git-source installs + optional native macOS shell 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-self-update

English | 简体中文

In-app self-update for DeepSeek Harness git-source installs — with an optional native macOS shell.

npm version
License: MIT
DSH core

Update panel: current vs. new version, the three steps about to run, and a one-click Update button

What is this?

If you run DeepSeek Harness from a git checkout (git clone + pnpm dsh web) — the way most self-hosted setups do — there is no built-in way to update it. Every release means manually running git pull, pnpm install, pnpm build, then restarting the service, and if anything breaks you dig out the old commit by hand.

dsh-self-update turns that whole cycle into a button. It is a harness plugin that:

  • checks quietly in the background (every 6 h by default) and on demand, from the settings page or the macOS menu bar;
  • shows a "new version" entry in the sidebar when there is something to install — clicking it opens an update panel with a version comparison and exactly the three commands about to run;
  • installs in one click: git pull --ff-onlypnpm installpnpm build:official (official branding build), with live per-step progress;
  • refuses to touch a dirty or diverged working tree — it will never discard your local changes;
  • rolls back in one click if a step fails (and ships a CLI fallback for when the UI itself is down);
  • restarts the service through a simple contract: the process exits with code 75, and your supervisor — systemd, PM2, or the bundled macOS shell — brings it back up.

Not for you if you installed dsh via npm i -g @deepseek-ai/dsh: there is no git working copy to update, so this plugin hides itself entirely. Use an npm-based updater such as dsh-update-checker instead.

Install (any platform)

cd <your-deepseek-harness-checkout>
pnpm dsh plugin --profile web add dsh-self-update

Restart the dsh service once and you are done. No configuration needed — the plugin uses the process working directory as the harness checkout (override with the plugin config repoRoot if yours differs).

Closing the restart loop

The Restart now button makes the process exit with code 75 ("please restart me"). Teach your supervisor to honor it:

Runner Config
systemd RestartForceExitStatus=75
PM2 autorestart: true (the default)
macOS shell (below) built in
bare terminal just run pnpm dsh web again

macOS shell (optional)

A native Swift + WKWebView app (no Electron) that owns the dsh service: click the icon to open the UI, closing the window keeps the service running, ⌘Q stops it. It adds a "Check for Updates…" menu item that opens the in-app update panel, and it automatically relaunches the service when it exits with code 75.

node macapp/build-mac-app.mjs        # requires Xcode command line tools
# outputs ~/Applications/DSH.app

First launch: right-click → Open (the app is ad-hoc signed, not notarized).

How it compares

Updates Platforms Auto-restart
dsh-update-checker npm packages restart is Windows-only ✅ (Win)
dsh-update-copilot plugins; core is report-only all
dsh-self-update the harness git checkout itself all (restart incl. macOS/Linux) ✅ (exit-code 75 contract)

The exit-code-75 restart contract is the piece the community has been asking the harness core for (see upstream discussions #1231 and #2717) — this plugin is a working implementation of it.

Interface contract

  • HTTP/self-update/api/update/{status,check,install,rollback,restart}. Write routes require Content-Type: application/json and a local Origin (CSRF line of defense).
  • Panel event — dispatch dsh-self-update:open on window (detail: { check: true } to check immediately). This is exactly what the macOS menu item does via evaluateJavaScript.
  • Restart — process exit code 75 means "restart requested". Anything else is a crash.
  • State — persisted at ~/.dsh-self-update/update-state.json.

When the UI is gone

If an update leaves dsh unable to boot (plugin/core seam breakage), the Web UI — rollback button included — is gone with it. Fall back to the CLI:

node scripts/rollback-harness.mjs          # target = previousSha from the state file
node scripts/rollback-harness.mjs --sha <commit>   # or pick a commit yourself

The updater records previousSha before every install precisely for this moment.

Development

Sibling layout, same as the rest of the dsh plugin ecosystem: this repo must be checked out next to deepseek-harness — the @deepseek-ai/* dev dependencies are link:../deepseek-harness/....

pnpm install
pnpm typecheck && pnpm test && pnpm build

The updater test suite runs against real (offline) git repositories; only the install/build commands are stubbed.

License

MIT


安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-self-update」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Shane-Jay/dsh-self-update

Headless(CLI)profile:

dsh plugin --profile headless add github:Shane-Jay/dsh-self-update

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-25
备注:验证: runtime-fail 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7789 个插件 →