DeepSHPlugins
dsh-updater-npm 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-updater-npm

生態與開發JavaScriptMIT

設定頁內的 DSH 更新器 + 官方文件同步器:一鍵以 npm 全域性更新 @deepseek-ai/dsh 並帶實時進度(npm 輸出流、已執行計時、單調進度條),多副本保護只更新當前執行例項,原始碼樹模式走 git pull;Windows 缺 PowerShell 7 時可一鍵安裝;官方 docs/ 增量同步(按 blob sha 跳過未變檔案)帶進度條,並提供 dsh_docs_search / dsh_docs_read 模型工具。

4 StarsSiriusWJ 更新時間 2026-08-25
訪問 GitHub 倉庫
dsh-updater-npm 專案預覽

專案介紹

中文

設定頁內的 DSH 更新器 + 官方文件同步器:一鍵以 npm 全域性更新 @deepseek-ai/dsh 並帶實時進度(npm 輸出流、已執行計時、單調進度條),多副本保護只更新當前執行例項,原始碼樹模式走 git pull;Windows 缺 PowerShell 7 時可一鍵安裝;官方 docs/ 增量同步(按 blob sha 跳過未變檔案)帶進度條,並提供 dsh_docs_search / dsh_docs_read 模型工具。

English

DSH updater + official docs sync in Settings: one-click npm update of @deepseek-ai/dsh with live progress (npm output stream, elapsed timer, monotonic bar), multi-copy protection that only touches the running instance, source-tree mode via git pull, one-click PowerShell 7 install on Windows, incremental sync of the official docs/ with progress, and the dsh_docs_search / dsh_docs_read model tools.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
SiriusWJ
倉庫
SiriusWJ/dsh-updater-npm
GitHub Stars
4
Forks
0
開發語言
JavaScript
許可證
MIT
最近推送
2026-08-25
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

63/ 100
維護活躍
89
文件與實用資訊
99
生態關注度
20
安裝便捷訊號
100
專案宣告訊號
100

近 17 天仍在更新;README 含完整安裝與使用說明;關注度尚低(4)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:SiriusWJ/dsh-updater-npm

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-updater-npm

DSH 更新器 + 官方文档同步器 for DeepSeek Harness (dsh)。

设置页提供两个卡片:

  • DSH 更新(npm):自动检查 @deepseek-ai/dsh 的 npm 最新版本,一键 npm install -g @deepseek-ai/dsh@latest,带实时进度显示(npm 输出流)。
  • DSH 文档(官方):把 deepseek-ai/deepseek-harness 官方 docs/ 增量同步到本地(按 GitHub blob sha 跳过未变文件),带进度条(下载 i/total + 当前文件);并提供 dsh_docs_search / dsh_docs_read 两个模型工具,开发时可直接在对话中查阅官方文档。

English · 安装 · 使用 · 运行模式 · License

安装

# 从 npm 安装(推荐)
dsh plugin --profile web add dsh-updater-npm

# 或从 GitHub 安装
dsh plugin --profile web add github:SiriusWJ/dsh-updater-npm

安装后重启 dsh web,设置页出现「DSH 更新」和「DSH 文档」两个卡片。

多语言:界面与宿主端消息支持中文 / English,自动跟随系统语言切换
(也可在 设置 → 通用 → Language 手动选择);dsh_docs_search /
dsh_docs_read 工具描述与输出同样跟随系统语言。

使用

DSH 更新

DSH 更新卡片

  • 自动检查每 30 分钟一次(页面每 60 秒刷新缓存结果)。
  • 检测到新版本时,设置页左侧导航「DSH 更新」旁会显示一个红色小圆点(🔴)。
  • 点击「通过 npm 更新」执行 npm install -g @deepseek-ai/dsh@latest,期间显示实时进度(npm 输出尾部),完成后出现「重启 DSH」按钮——点击后按原启动命令自动退出并重新拉起(跨平台:Windows 用 PowerShell,macOS/Linux 用 /bin/sh;源码树更新与部署修复完成后同样提供该按钮)。
  • 版本比较为 semver 风格:本地比远端新(如 rc.7 vs rc.6)时不会误报更新。

DSH 文档

  • 同步开关(默认关闭):设置页「DSH 文档」卡片顶部有「自动同步官方文档」开关。

关闭(默认)时不自动同步、不加载 dsh_docs_search / dsh_docs_read 工具; 开启后才自动同步(首次启动约 217 篇:英文 + 中文 .zh.md,之后每 24 小时静默增量), 并注册文档工具。开关状态保存在 $DSH_HOME/plugin-data/dsh-updater-npm/config.json。

  • 点击「同步官方文档」手动同步(需先开启开关),显示进度条(已下载/总数 + 当前文件名)与阶段(获取清单 → 下载 → 重建索引)。
  • 文档区支持搜索与阅读;对话中也可直接用模型工具:
  • dsh_docs_search —— 搜索本地官方文档索引(中文查询自动优先中文文档)
  • dsh_docs_read —— 读取一篇文档(支持按章节聚焦,80KB 截断,防路径穿越)

文档存储于 $DSH_HOME/docs-sync/,索引为 $DSH_HOME/docs-sync/.index.json。

运行模式

Windows + 缺 PowerShell 7:DSH 的 shell 工具依赖 pwsh(PowerShell 7)。
若检测到 Windows 上未安装 pwsh,「DSH 更新」卡片会显示提示和「一键安装 PowerShell 7」按钮
(优先 winget install Microsoft.PowerShell,不可用时自动改走官方 win-x64 MSI 静默安装,
带实时进度;完成后重启 DSH 生效)。

插件会自动识别当前 dsh 的运行模式并诚实处理:

模式识别依据更新方式说明
npm-globalargv[1] 为 <install>/lib/bin.jsWindows:staged 更新(新版本装入独立暂存目录 → 点击「重启 DSH」时无锁原子替换并重启,失败自动回滚旧版);非 Windows:原地 npm install -g,完成后点「重启 DSH」正常部署场景;Windows 上更新目标即运行实例自身(含 native 依赖),原地 npm install 会撞 EBUSY 导致半拆半装——staged 流程全程不触碰运行中的部署目录,替换时旧目录先改名备份(.old-*),新包校验失败自动恢复当前版本;重启脚本会先校验暂存新包(不通过则放弃整个操作、进程不退出);每次启动检测部署目录完整性,损坏时提示「修复部署」一键重装当前版本(同样手动重启)
source(源码树)argv[1] 含 bin.ts / tsx / apps/源码树更新:git fetch → git pull --ff-only → 安装依赖(pnpm/npm)源码树运行(如 pnpm dsh web)时 npm -g 不影响运行实例;设置页显示分支/本地与远端提交/落后数,一键更新;工作区有未提交修改或未安装 git 时会明确提示并禁用按钮
多副本保护:环境里可能有多个 dsh 副本(多个 Node 安装的全局目录、DSH profiles 等)。
插件只更新当前运行的这个:优先用当前实例所属 Node 安装自带的 npm 执行(避免 PATH
上的 npm 属于别的 Node 而把更新写到别处);/check 会列出检测到的其他副本并显示警告;
若 npm 执行成功但当前副本版本没变(更新落空),会明确报错而不是假成功。
副本检测按 realpath 去重:指向运行实例的 junction/符号链接(如
$DSH_HOME/profiles/node_modules 里的依赖镜像)不会误报为独立副本。
版本回退排查:若"更新后显示一致、重启后回到旧版",说明运行的是源码树而 npm 更新只改了全局安装。切换为 npm-global 启动(如桌面快捷方式指向 D:\tools\node22\dsh.cmd web)后更新即生效。

路由

  • GET /dsh-updater-npm/check —— 更新检查(10 分钟缓存)
  • POST /dsh-updater-npm/update —— 执行 npm 更新(同源保护)
  • POST /dsh-updater-npm/restart —— 重启当前 DSH 实例(同源保护;若有待交换暂存包则先原子替换部署再重启,支持 Windows/macOS/Linux)
  • GET /dsh-updater-npm/progress —— 更新/同步实时进度(轮询)
  • GET /dsh-updater-npm/docs/status —— 文档同步状态
  • POST /dsh-updater-npm/docs/sync —— 触发文档同步(同源保护)
  • GET /dsh-updater-npm/docs/search?q=&lang=&limit= —— 本地索引搜索
  • GET /dsh-updater-npm/docs/read?path=&section= —— 读取文档

License

MIT


English

dsh-updater-npm is a DSH updater + official docs sync plugin for DeepSeek Harness:

  • DSH Update (npm): check the latest @deepseek-ai/dsh on npm, one-click

npm install -g @deepseek-ai/dsh@latest, with live progress (npm output stream); after the update a "Restart DSH" button appears — it exits the current process and relaunches with the original command line (PowerShell on Windows, /bin/sh on macOS/Linux; also shown after source-tree updates and deployment repair).

  • DSH Docs (official): incrementally sync deepseek-ai/deepseek-harness docs/

to $DSH_HOME/docs-sync/ (skips unchanged files by GitHub blob sha) with a progress bar, plus dsh_docs_search / dsh_docs_read model tools for in-conversation doc lookup.

The plugin detects the run mode: npm-global (normal; npm update applies directly) or source (source-tree, e.g. pnpm dsh web; npm update is refused with a warning because it does not affect the running instance — use git pull instead).

i18n: UI and host messages support Chinese / English, following the system language automatically (or the manual choice in Settings → General → Language); the dsh_docs_search / dsh_docs_read tool descriptions and outputs follow the system language too.

Install:

dsh plugin --profile web add dsh-updater-npm
# or
dsh plugin --profile web add github:SiriusWJ/dsh-updater-npm

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案