自动检查 DeepSeek Harness 与第三方插件在 npm 上的最新版本,GUI 顶部横幅跟随系统语言提示,支持一键更新并重启服务。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-update-checker
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Airmetro/dsh-update-checker
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
A permanent Cordis plugin for the DeepSeek Harness Web GUI that auto-checks for new DeepSeek Harness releases AND installed third-party plugin updates (the former standalone dsh-plugin-checker was merged in v1.1.0), asks the user, and one-click updates with success/failure feedback.
Features
Full update lifecycle — check, backup, update, and restart, all in one plugin.
Main program check — compares the installed
@deepseek-ai/dshversion against the npm latest (semver-aware, pre-release handled).Third-party plugin check — scans installed non-official plugins (composition rows +
dshmanifest, layout-agnostic) and compares each against npm latest.In-GUI banner — locale-aware (zh/en follows the DSH UI language), states update / up-to-date / failure, with a "don't remind me" suppression flag.
One-click update with safety — backs up the deployment lockfile +
@deepseek-aiversion manifests before installing, so a failed upgrade can be rolled back; plugin updates install in a temp dir and copy in (never touches unrelated packages inprofiles/node_modules).Restart with watchdog — restarts the dsh web service via a detached watchdog script (kills the port listener, relaunches the launcher, retries until the port recovers).
Zero-config portability — profile dir /
$DSH_HOME/ composition file are derived from the plugin's own install location; the deployment root is resolved via junctionrealpathwithDSH_DEPLOY_ROOT/process.cwd()fallback. Works on any machine without editing code.Host half (
lib/index.js) registers HTTP routes:GET /dsh-update-checker/status.json— fetches the latest@deepseek-ai/dshversion from the npm registry, reads the locally installed version (from the deployment'snode_modules), compares them with semver semantics, and returns a JSON status (including the persistedsuppressUpToDateflag).POST /dsh-update-checker/suppress— persists the "don't remind me again" flag for the up-to-date banner (requires{ "confirm": true }).POST /dsh-update-checker/update— complete update: backs up the deployment lockfile + @deepseek-ai version manifests, runsnpm install @deepseek-ai/dsh@latestin the deployment root, then defensively syncs changed @deepseek-ai packages into$DSH_HOME/profiles/node_modules(skipped for junction-linked packages, which the running Web app resolves through). Requires{ "confirm": true }; supports{ "dry": true }to preview without executing.POST /dsh-update-checker/restart— restarts the dsh web service (spawns a PowerShell helper that kills the port listener and relaunches<deploy-root>/start-dsh.cmd; the port and launcher path are derived at runtime). Requires{ "confirm": true }.GET /dsh-update-checker/plugins.json— scans installed third-party (non-builtin) plugins (composition rows +dshfield, layout-agnostic), compares each against npm latest (semver), returns update status.POST /dsh-update-checker/plugin-update— updates one plugin via temp-dirnpm install+ copy (never touches other packages inprofiles/node_modules, junction-aware, backs up the old version first). Requires{ "confirm": true, "name" }.
Client half (
lib/client.js) is a web module (ModuleLoader format) that registers two cells in the root-scopedshell.overlayslot:- the core banner (top): update / up-to-date / failure states for the main program (立即更新 / 重新检查 / 知道了; 不再提示 persists suppression),
- the plugin banner (below, offset): lists updatable plugins (
installed → latest) with single / update-all buttons and per-plugin success/failure feedback. On page load both check once, then re-check every 6 hours.
Localization
The banner follows the DSH UI language through the client locale service (@deepseek-ai/dsh-client-locale): zh → 中文, en → English, and only those two are shipped — any other locale falls back to Chinese. Switching DSH's language (Settings → General → Language) updates the banner text instantly without a reload. If the locale service is absent from the composition, the client falls back to the Chinese dictionary.
Install & mount
The package is a profile bundle (its manifest declares dsh.bundle.patch).
# 1) install the package where the profile can resolve it
# (the flat $DSH_HOME/profiles/node_modules fallback)
npm i dsh-update-checker # in the profile, or copy the package directory manually
# 2) add the row to $DSH_HOME/profiles/web/cordis.patch.yml
# $DSH_HOME/profiles/web/cordis.patch.yml
- insert:
- id: dsh-update-checker
name: 'dsh-update-checker'
Then let patch HMR apply it (or restart dsh web) and reload the page.
Configuration & portability
All paths are auto-detected at runtime — nothing is hardcoded, so the same package works on any machine:
- Plugin / profile directory (
$DSH_HOME/profiles/node_modules): derived from the plugin's own install location (import.meta.url), walking up to the enclosingnode_modules. No configuration needed. $DSH_HOME: derived as the parent of theprofilesroot (state file, backups, and restart log all live there).- Composition file (
cordis.patch.yml): defaults to$DSH_HOME/profiles/web/cordis.patch.yml; if absent, any othercordis.patch.ymlunder$DSH_HOME/profiles/containing the plugin id is used. - Deployment root: detected in two strategies, in order:
- Junction resolution — on machines where
profiles/node_modules/@deepseek-ai/dshis a junction (the common "save C-drive" setup),realpath()yields<deploy-root>/node_modules/@deepseek-ai/dsh, so the deployment root is derived automatically. - Fallback candidates — environment variable
DSH_DEPLOY_ROOT, thenprocess.cwd()(launchers usuallycdinto the deployment directory). To point elsewhere, setDSH_DEPLOY_ROOTor append toDEPLOY_ROOT_CANDIDATESat the top oflib/index.js.
- Junction resolution — on machines where
- Restart launcher: self-adapting — probes common names (
start-dsh.cmd,启动 dsh.bat,start-dsh.bat, …) under the detected deployment root; the web port is read from the runningwebServer.port. No machine-specific paths are hardcoded in the restart flow. - Persisted state (suppression flag, backups) lives under the detected
$DSH_HOME— machine-independent.
Notes
- Host code changes require a service restart to take effect (the loader caches imported modules); client code changes are picked up by the client-modules HMR watch and apply on the next page refresh.
- The update/restart/suppress POST routes are guarded by
{ "confirm": true }so a stray request cannot trigger an install or a restart. - Update safety: a backup (deployment
package-lock.json+ both @deepseek-ai version manifests) is written to$DSH_HOME/dsh-update-checker-backups/<timestamp>/beforenpm installruns, so a failed upgrade can be rolled back.
Development
lib/index.js— Host half: plain ESM, depends only on Node built-ins. No build step.lib/client.js— Client half: plain JS,window.__ModuleLoader__format, requires onlyreact. No build step.scripts/test-host-apply.mjs— isolation test that drivesapply()with a fake context.scripts/restart-service.ps1— manual service restart helper (run with-ExecutionPolicy Bypass).
License
MIT
链接
同类插件
strukto-ai/mirage#dsh★ 3443
把文件系统与 bash 提供者换成 mirage 虚拟工作区:文件工具与 shell 命令作用于挂载的资源(RAM、S3、Redis、Slack、Gmail、Notion、Postgres)而非宿主磁盘,支持按挂载点设置读/写/执行模式、按命令选择沙箱(进程内 monty、pyodide、quickjs;远程 docker、e2b、daytona),并可在虚拟终端中安装 CLI(git、gh、slack、linear、ntn、gws,或自行注册的程序树)作为命令头词。
hust-open-atom-club/oh-dsh★ 189
社区发行版:TUI、桌面端与 Web UI 统一体验,分层安装、一步到位。
Jayden-X-L/forkprobe★ 66
同一任务并行试跑多个技能,对比结果选出最优。
vlln/plugin-registry★ 43
插件生态基建:浏览器面板管理官方 repository 插件(0 patch)+ make-dsh-plugin 插件开发引导技能。
forrestchang/dsh-multica-runtime★ 37
让 dsh 运行时跑在 Multica 上。
omdsh-dev/dsh-plugin-check★ 18
插件健康检查:扫描清单协议/patch 格式/构建陷阱,零依赖只读。