DSH self-updater in the settings page: one-click check/pull (`git pull --ff-only`), auto background checks, version diff and changelog preview with a red-dot reminder.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xingyingyuzhui/dsh-updater-ui
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness(DSH)官方更新插件:在设置 → DSH 更新页一键检查并更新官方 DSH。自动后台检查 + 导航红点提醒。
它看的是当前正在跑的那个 DSH 进程怎么安装的,而不是磁盘上碰巧有没有一份源码:
| 当前进程 | 检查 | 一键更新 |
|---|---|---|
npx @deepseek-ai/dsh web |
npm registry 上的 @deepseek-ai/dsh |
更新 npx 缓存里的官方包,然后重启 |
npm i -g @deepseek-ai/dsh / 全局 dsh web |
同上 | npm install -g @deepseek-ai/dsh@<官方版本>,然后重启 |
git clone 后 pnpm dsh web |
git fetch 对比官方远端 |
git pull --ff-only |
Mac / Windows 同一套逻辑。本机另有一份 ~/deepseek-harness 但进程其实是 npx/全局 npm 时,不会去 git pull 那份源码。
功能
- 识别安装方式:源码仓库 / npm 全局 / npx
- 一键检查:源码
git fetch;npm 查询官方 registry(失败则试 npmmirror) - 版本对比:本地 vs 官方
package.json版本号 - 更新说明:源码可折叠列出官方新提交(短哈希 + 标题,前 15 条)
- 一键更新:源码只允许快进;npm 只安装官方包名
@deepseek-ai/dsh和已校验的版本号 - 自动检查:Host 每 30 分钟后台检查(防重入),页面每 60 秒轮询缓存
- 红点提醒:有官方更新时设置页导航显示「DSH 更新 ●」
- 安全拒绝:源码本地存在未推送提交、分叉或冲突改动时拒绝覆盖;npm 安装失败时给出可复制命令
安装
前置:已安装 DSH(dsh web 或 npx @deepseek-ai/dsh web 可运行)。npm 通道需要能访问 npm registry;源码通道需要本机 git 和官方 clone。
# 从 GitHub 安装
dsh plugin --profile web add github:xingyingyuzhui/dsh-updater-ui
装完重启 DSH,然后打开 设置 → DSH 更新。
使用
打开 设置 → DSH 更新:
- 页面显示当前安装方式和官方更新状态(✅ 已是最新 / ⚠️ 有官方更新)
- 点击 一键更新官方 npm 包 或 一键拉取官方更新
- 更新成功后重启 DSH 才会加载新代码
- 若 npm 安装被运行中的进程锁住(常见于 Windows),页面会给出对应命令,停掉 DSH 后再跑
npx 用户也可直接:
npx --yes @deepseek-ai/dsh@latest web
源码仓库定位
仅当当前进程来自官方源码 clone时才会用 git。查找顺序:
- 正在运行的
@deepseek-ai/dsh-root目录 - 配置
repo/ 环境变量DSH_REPO ~/deepseek-harness~/.dsh/deepseek-harness
~/.dsh 是设置、插件和会话数据,不能 git pull 当官方源码。
插件会校验该目录:
- 必须是 git 仓库
origin必须是deepseek-ai/deepseek-harness- 必须能读取当前分支和上游分支
校验不通过会拒绝操作,避免误 pull 到 /opt/homebrew 等无关仓库。
npm 通道
- 查询
https://registry.npmjs.org/@deepseek-ai/dsh/latest,失败则试https://registry.npmmirror.com - 可用
DSH_NPM_REGISTRY或npm_config_registry指定 registry - 全局安装按正在运行的包路径推导
--prefix(Homebrewnode@24的 Cellar 和npm prefix -g不是同一处)。装完会回读该路径的package.json,版本没变则报失败,不假装成功 - Windows 下用当前
node.exe直接跑同目录的node_modules/npm/bin/npm-cli.js,不 spawnnpm.cmd。找不到 JS 入口时才退回cmd.exe:整条命令外层再包一层引号,并用windowsVerbatimArguments,避免 Node 把引号转成\" - 不会对
~/.dsh做 npm install,也不会安装官方包以外的任何名字
安全设计
- 路由仅接受 POST
- 必须带自定义请求头
X-DSH-Updater: 1(跨站表单/图片无法触发) - 如果带
Origin,只允许http://127.0.0.1/http://localhost - 源码拉取使用
--ff-only - npm 安装包名写死为
@deepseek-ai/dsh,版本号须匹配安全字符集 - 所有外部命令带超时与输出上限;错误一律返回结构化 JSON
- 无第三方依赖、无遥测
卸载
dsh plugin --profile web remove dsh-updater-ui
开发
pnpm install # 无依赖,仅占位
pnpm test # 基础契约测试
# 本地验证:dsh plugin --profile web add link:/path/to/dsh-updater-ui
License
MIT
Links
More in this category
yjh051108/dsh-routing-suite★ 7000
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3663
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 325
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 206
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
lire1131/dsh-undo-savepoint★ 165
Undo/redo & rollback system for DSH: every config change is auto-snapshotted; undo/redo/restore to any version from the WebUI or the offline CLI/GUI tools (works even when DSH fails to boot).
Fishquito7/dsh-skill-mcp-panel★ 152
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.