DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Self Update — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-self-update

Self Update

DeepSeek Harness git-source 安装的应用内自更新(检查 / 一键更新 / 回滚 / 重启),可选原生 macOS shell。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Shane-Jay/dsh-self-update#a6fdfc8eda68103573e75a9106fa52cda2f40636
README兼容性版本

兼容性与来源证明

Self Update 以 dsh-self-update 发布,当前版本为 0.4.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.4.0stable
2026/9/5
0.3.0stable
2026/8/28
0.2.0stable
2026/8/20

README

dsh-self-update

English | 简体中文

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

Update panel: current vs. new version, the 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 commands about to run;
  • installs in one click: git pull --ff-only → pnpm install → pnpm clean → pnpm build:official (official branding build), with live per-step progress — the clean step drops stale gitignored build output that would otherwise poison a large version jump (skipped gracefully on harness versions without a clean script);
  • refuses to touch a dirty working tree — it will never discard your local changes;
  • turns a diverged checkout into a guided exit instead of a dead end: the panel lists your local-only commits and offers one-click "back up & realign" — your commits are saved to a local-backup-<timestamp> branch, the tree is hard-reset to the remote, and the update continues (refused while the tree is dirty);
  • rolls back in one click if a step fails (and ships a CLI fallback for when the UI itself is down);
  • notices a stale running process: it records the checkout's HEAD at startup, so once the code on disk moves ahead — its own install, your manual git pull, any other tool — the UI says "Restart needed" instead of quietly serving new frontend on top of an old host;
  • restarts the service through a simple contract: the process exits with code 75 for your supervisor (systemd, PM2, the bundled macOS shell) — and with no supervisor at all it respawns itself on macOS/Linux, so Restart now works even for a bare pnpm dsh web in a terminal.

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:

RunnerConfig
systemdRestartForceExitStatus=75
PM2autorestart: true (the default)
macOS shell (below)built in
bare terminal / no supervisorbuilt in (self-respawn on macOS/Linux; manual on Windows)

When no supervisor is detected, the plugin spawns a detached /bin/sh helper that waits for the old pid to die (freeing the port) and then re-execs the identical node command line — a bare pnpm dsh web, or an orphaned process, restarts itself. On Windows there is no such path: the button reads Stop service and you run pnpm dsh web again by hand. The panel always states which of the three will happen.

Detection reads DSH_SELF_UPDATE_SUPERVISOR first, then systemd's INVOCATION_ID, then PM2's pm_id/PM2_HOME. Set DSH_SELF_UPDATE_SUPERVISOR to any value (e.g. custom) when your supervisor already honors exit code 75 — otherwise the plugin self-respawns behind its back. none/0/false declare the opposite: nobody will restart me.

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 (and marks it DSH_SELF_UPDATE_SUPERVISOR=macapp so the plugin leaves the restart to the shell). A server it merely adopted — one already listening on the port that the shell did not start — is now watched too: if it goes away, the shell waits up to 45 s for it to come back on its own and otherwise starts and owns a fresh one. Works with the browser-auth introduced in harness 0.1.2: the shell picks up the tokened URL the server prints at startup, so the embedded page signs in by itself.

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

UpdatesPlatformsAuto-restart
dsh-update-checkernpm packagesrestart is Windows-only✅ (Win)
dsh-update-copilotplugins; core is report-onlyall❌
dsh-self-updatethe harness git checkout itselfall (restart incl. macOS/Linux)✅ (exit-code 75; no supervisor needed on macOS/Linux)

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,realign,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.
  • Runtime — GET /update/status carries runtime: { pid, startedAt, sha, shortSha, stale, supervisor, restartMode }. stale = the HEAD on disk is no longer the one this process booted from (the UI treats it exactly like "installed, restart pending"); supervisor is macapp | systemd | pm2 | custom | none; restartMode is supervisor | self-respawn | manual.
  • Restart — POST /update/restart answers { ok, mode, exitCode } and exits ~300 ms later; mode is the restartMode above. Exit code 75 means "restart requested" — anything else is a crash. The browser then polls status and reloads only once a different pid answers (up to 120 s).
  • State — persisted at ~/.dsh-self-update/update-state.json; the self-respawn helper's output at ~/.dsh-self-update/respawn.log.

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


查看其余 1 个版本收起版本
0.1.0stable
2026/8/20

相关插件

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

Better Sidebardsh-better-sidebarDSH web 插件:类似 VSCode 的右侧边栏(资源管理器 / 编辑器 / 终端 / git / 浏览器),按对话会话隔离。提供服务,供其他插件注册侧边栏标签页和文件查看器。Find Plugindsh-find-plugin在代理中查找 DeepSeek Harness 插件——实时搜索 GitHub 上的 dsh-plugin 主题,并按星标数排序。DSCODE@toddzheng024/dscode-bundle完整的 DeepSeek 编码代理,支持持久化 shell、Ultra 协作和自动权限审查。Plugindsh-pluginDeepSeek Harness 社区插件市场,遵循官方插件规范——无需离开应用即可浏览、搜索并安装 9000+ 个由人工精选的社区插件。· DeepSeek Harness 社区插件市场(遵循官方开发规范):9000+ 人工精选社区插件,每日更新。
最新版
0.4.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
71
最近提交
2026/9/5
查看源码 ↗项目主页 ↗
README Badge

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

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

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

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