Zhucy123/dsh-update

Project Overview项目介绍

dsh-update is a Profile Bundle plugin purpose-built for the DeepSeek Harness (DSH) Web GUI, shipping a dsh.bundle manifest in its package.json and a cordis.patch.yml user-patch layer so that dsh plugin add activates it without further wiring. Once installed, it injects a circular "⭯ 更新DSH" button at the bottom of the sidebar directly above the settings entry, opening an in-place update panel that compares the local checkout's tag and commit against the remote dsh-v* release tags via a read-only git ls-remote, caches successful results for sixty seconds, and falls back to gh-proxy.com when GitHub is unreachable. The user-facing panel is fully bilingual and follows the host DSH interface language in real time, presenting local vs remote versions plus release notes before any mutation occurs.

A typical workflow starts by clicking the sidebar button to fetch the status payload, then reviewing the rendered release summary and explicitly pressing "开始更新" to trigger the streaming pipeline. The plugin performs git fetch --tags, automatically stashes any local edits including untracked files via git stash push -u to fix dead-loop conflicts, runs git checkout <tag>, executes pnpm install, pnpm run clean, and pnpm run build with live text/event-stream progress, then re-verifies the resulting commit before scheduling an automatic restart roughly two seconds later or allowing a manual "立即重启" trigger. If install or build fails after the tag switch it rolls back to the original tag or commit so the working tree is never left half-updated, and a 409 conflict guard prevents concurrent update tasks from racing each other.

Dependencies include a local clone of the deepseek-harness git repository containing dsh-v* release tags on its origin, a working git, and pnpm (POSIX hosts without pnpm automatically fall back to corepack pnpm); targets include Windows, Linux, and macOS, with Windows handling pnpm via .cmd shims and PowerShell-hidden restart invocations. All four API routes are loopback-only and enforce sec-fetch-site plus Origin validation, the restart route additionally rejects proxy headers and is auto-disabled under systemd supervision or when allowRestart: false, while rollbacks are restricted to whitelisted dsh-v* tags. The license is MIT, and the repository ships only lib/, package.json, cordis.patch.yml, README.md, CHANGELOG.md, and LICENSE, intentionally containing no user paths or credentials.

dsh-update 是面向 DeepSeek Harness(DSH)Web GUI 的 Profile Bundle 插件,在侧边栏底部"设置"按钮上方注入一个圆形"⭯ 更新DSH"按钮,点击后弹出更新面板,对比本地 checkout 与远程 dsh-v* 发布 tag 的版本差异,展示本次更新内容,并按"git fetch → stash → checkout → pnpm install → clean → build"流水线实时推送进度,完成后约两秒自动重启 dsh,亦支持一键手动重启与历史版本回退。

典型使用流程:启动 dsh web 后点击侧边栏按钮,面板自动调用 /api/dsh-update/status 比对本地与远程版本,发现新版则呈现更新说明摘要,需用户手动点"开始更新"才真正执行流水线,构建阶段页面短暂变白属于正常资源替换现象,完成后面板显示 ✓ 已确认当前版本,并对工作树进行安全暂存、失败自动回滚与并发任务保护,适合需要稳定掌控本地 DSH 源码升级节奏的运维者与开发者日常使用。

依赖方面要求本地已 clone 的 deepseek-harness 仓库、git、pnpm(POSIX 无 pnpm 时回退 corepack),可访问 GitHub 或经 gh-proxy 镜像回退,覆盖 Windows、Linux、macOS;四个 API 路由全部 loopback-only,重启路由额外校验 Origin 与拒绝代理转发,systemd 托管场景下自动禁用自重启,license 为 MIT,源码不包含任何用户本地路径或凭据,可安全开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 @zhucy123/dsh-update

把 Zhucy123/dsh-update 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-update · ⭯ 更新DSH

One-click update for your local DeepSeek Harness (DSH) checkout: compare versions → confirm → pull & rebuild → restart, all from a sidebar panel with live progress.

Version License Platform DSH

dsh-update 是 DSH Web GUI 的 Profile Bundle 插件:在**侧边栏底部(设置按钮上方)**加一个「⭯ 更新DSH」圆形按钮。点击后对比本地 checkout 与远程 dsh-v* 发布 tags;发现新版本时不自动动手,先展示本地/远程版本与本次更新内容,由你点「开始更新」后才执行 git fetch → checkout → pnpm install → clean → build,完成后自动(或一键)重启 dsh。插件界面中英双语,跟随 DSH 界面语言实时切换。

目录

特性 Features

  • 🆚 版本对比 — 读取本地 checkout 的 tag / commit,与 origin 的 dsh-v* tags 对比(git ls-remote,只读)。GitHub 直连超时自动切换 gh-proxy.com 镜像;成功结果缓存 60 秒,重复打开秒回。
  • 🛡️ 更新前先确认 — 检测到新版本只展示对比与更新内容,绝不自动执行;并醒目提示「更新期间整个页面可能突然变空白」的真实原因(构建阶段会替换网页资源文件),由你点击「开始更新」后才真正动手。
  • ⚡ 一条龙更新 — git fetch --tags → 自动暂存本地改动 → git checkout <tag> → pnpm install → pnpm run clean → pnpm run build,以 text/event-stream 流式实时显示每步输出。
  • 🧹 构建前自动 clean — 版本切换后旧版本残留的 gitignore lib/ 产物可能引用新源码中已不存在的导出,导致 MISSING_EXPORT;构建前自动执行 pnpm run clean 清掉过期产物(幂等,clean 失败仅警告)。
  • ✅ 构建后核验 — install + build 都成功才算完成;build 成功后服务端重新读取 git 状态,面板显示 ✓ 已确认当前版本与更新目标一致。
  • 📄 本次更新内容 — 面板内展示该版本的 GitHub Releases 说明,按 DSH 界面语言显示中/英文段(失败降级为「查看 GitHub Releases →」链接)。
  • 🔄 自动重启 + 一键重启 — 更新/回退成功约 2 秒后自动重启 dsh(由服务端定时器驱动,页面已变白/断线也会发生);也可点「重启DSH / 立即重启」手动触发;重启失败(如自动重启未生效)有明确兜底提示。
  • ↩️ 版本回退 — 更新后悔了?在「已是最新」结果视图下拉选择任一历史 dsh-v* tag 回退,流程与更新完全一致(目标 tag 白名单 + git rev-parse --verify 核验)。
  • 💾 本地改动安全 — 更新前自动 git stash push -u(含未跟踪文件,修复死循环冲突),成功后原样恢复;新版本改到同一文件时改动安全保存在 stash 不丢失,并明确提示;冲突视图提供「自动暂存并继续」。
  • 🔙 失败自动回滚 — 已切到新版本后 install/build 失败,自动 git checkout 回原版本(优先原 tag,否则原 commit),绝不把工作树留在半更新状态。
  • 🔒 并发保护 & 安全边界 — 同一时间只允许一个更新任务(重复触发返回 409);4 个 API 路由全部 loopback-only,仅本机浏览器可触发真实安装;重启路由额外拒绝代理转发。
  • 🌍 跨平台 — Windows / Linux / macOS;git / pnpm 缺失时快速失败而非挂到超时,POSIX 无 pnpm 自动回退 corepack pnpm。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev top-dsh-plugins 下一个 Next dsh-git-panel →