每次启动 DeepSeek Harness 时检查已安装并启用的插件有没有新版本,在界面上列出并询问,确认后更新到最新版。
安装
# npm 包(预构建)
dsh plugin --profile web add @sueleven/dsh-auto-update
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:1708994293-hue/dsh-auto-update
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
DeepSeek Harness(dsh)插件:每次打开 DSH 时自动检查你已经下载并启用的插件有没有新版本,发现后主动列出并询问是否更新——点确认才更新,更新走 DSH 官方通道,不会覆盖你的 profile 配置。
- 启动约 8 秒后后台检查,不阻塞界面;
- 有新版本时右下角出现提示卡,逐条列出
插件 当前版本 → 最新版本; - 按钮:全部更新 / 稍后提醒;无更新时完全静默;
- 更新完成后提示「重启 DSH 后生效」,与插件市场的更新语义一致。
安装
要求:dsh 0.2.1 及以上(插件声明了 dsh.bundle manifest)。
从 npm 安装(推荐,任意平台)
dsh plugin --profile desktop add @sueleven/dsh-auto-update
npm 上无 scope 的名字
dsh-auto-update被 registry 以「与已有包dsh-autoupdate名称过于相似」拒绝,因此发布名带 scope:@sueleven/dsh-auto-update。
从 GitHub 安装
dsh plugin --profile desktop add github:1708994293-hue/dsh-auto-update
从本地目录安装
# Windows:脚本会复制插件并调用官方 dsh plugin 通道安装
pwsh -NoProfile -File scripts/install.ps1
# 任意平台:
dsh plugin --profile desktop add link:<本仓库绝对路径>
装完完全退出并重启 DSH,侧边栏「插件」页里会出现 dsh-auto-update。
从 1.0.0 升级
1.0.0 的前端模块注册名遗漏了 npm scope,可能导致 Desktop 启动失败并记录 duplicate factory registration for "dsh-auto-update"。1.0.1 修复了这个问题。新版本发布到 npm 后,完全退出 DSH,再安装:
dsh plugin --profile desktop add '@sueleven/dsh-auto-update@1.0.1' --config.minimum-release-age=0
重新打开 DSH;若此前通过恢复操作停用了插件,在插件页重新启用即可。
如何工作
| 部分 | 文件 | 作用 |
|---|---|---|
| Host 半 | lib/index.js |
启动延时检查、状态机、同源 HTTP 路由 `/dsh-auto-update/status |
| Client 半 | lib/client.js |
注册 shell.overlay 提示卡,轮询状态、展示列表与按钮 |
| 检查/更新器 | lib/update.mjs |
读取 profile、查询 npm registry、按需调用官方 dsh plugin ... add |
检查范围:profile package.json 的 dependencies ∩ dsh.profile.bundles(即「已下载且已启用」),并排除市场里被禁用的包、非 registry 依赖(file: / link: / git: 等)以及插件自身。版本比较使用 semver,只在前向升级时列出,不会把插件降级。
更新方式:<DSH exe> --expose-internals <app.asar>/dsh/node_modules/@deepseek-ai/dsh-desktop-host/lib/cli.js plugin --profile <name> add <pkg>@<ver> --config.minimum-release-age=0,即 DSH 插件市场使用的同一个官方通道。
环境变量
| 变量 | 作用 |
|---|---|
DSH_AUTO_UPDATE_DELAY_MS |
启动后延时多久开始检查(默认 8000) |
DSH_AUTO_UPDATE_DISABLE=1 |
本次启动不检查、不显示提示 |
DSH_AUTO_UPDATE_PROFILE |
覆盖 profile 名(默认读 DSH_PROFILE,否则 desktop) |
DSH_AUTO_UPDATE_DATA_DIR |
覆盖日志/状态目录(默认插件包目录) |
日志
<插件目录>/logs/auto-update.log:每次检查与更新的完整记录<插件目录>/logs/plugin.log:插件生命周期(启动、检查结果、用户确认、错误)<插件目录>/state/last-run.json:最近一次检查的结构化结果
插件目录:本地 link: 安装是 ~/.dsh/plugins/dsh-auto-update;npm 安装是 profile 的 node_modules/@sueleven/dsh-auto-update。
手动使用
# 只检查,不做任何修改
node <插件目录>/lib/update.mjs --check
# 列出可更新项(JSON)
node <插件目录>/lib/update.mjs --check --json
update.mjs 支持 --profile、--check、--json、--dry-run、--help。
卸载
dsh plugin --profile desktop remove @sueleven/dsh-auto-update
Windows 本地安装可再用 pwsh -NoProfile -File scripts/uninstall.ps1 删除插件目录。
开发
node --check lib/index.js # package.json 里 type=module
node test/client.test.mjs # 前端模块注册及插槽加载回归测试
node lib/update.mjs --check --dry-run
本地联调可把 profile 依赖换成 link:<仓库路径>,改完代码重启 DSH 即可生效。
发布到插件市场
awesome-dsh-plugin 是 DSH 插件目录(dsh-market 与「插件 → 发现」的索引都来自它)。上架步骤:仓库公开、带 dsh-plugin topic、仓库创建满 1 天,然后向该仓库提 PR,新增单文件 data/plugins/<owner>__dsh-auto-update.yml:
url: https://github.com/<owner>/dsh-auto-update
name: <owner>/dsh-auto-update
category: workflow
description:
en: Checks enabled DSH plugins for new versions at startup and asks before updating them.
zh: 每次打开 DSH 自动检查已启用插件的新版本,列出并询问是否更新。
English
A DeepSeek Harness plugin that checks your installed-and-enabled plugins for newer versions on every DSH launch, lists what it finds, and updates only after you confirm. Updates go through the official dsh plugin add channel and take effect after a restart.
dsh plugin --profile desktop add @sueleven/dsh-auto-update
# or: dsh plugin --profile desktop add github:1708994293-hue/dsh-auto-update
License
MIT
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-plugin-manager★ 9321
设置 → 插件 分区里的插件管理 Tab:从 npm/git 安装带进度、下次启动生效的启停开关、安装冲突对账可撤销、失败一键转交修复会话。
dsh-market/dsh-market★ 8235
在 DeepSeek Harness 设置页内浏览、搜索并安装社区插件,支持分类筛选、一键更新与停用,以及主题切换与配置备份。
kingOfSoySauce/dsh-skin-market★ 246
原生皮肤市场与生命周期管理器,发现社区皮肤、展示预览与兼容状态,并提供已验证的一键安装或手动安装入口。
awesome-dsh-plugin/dsh-find-plugin★ 204
会话内直接找插件:按关键词/分类搜索本精选 registry,返回描述与可直接执行的安装命令。
bradeGithub/DSH-Plugins-Marketplace★ 188
面向 GitHub dsh-plugin 话题的插件与技能市场:设置页内逛自动收录的全量索引(CI 每 2 小时刷新),一键安装带类型识别、安装脚本与宿主依赖遮蔽安全检查、环境变量密钥管理,并附 STANDARD.md 识别层规范。
Sanqi-normal/dsh-webui-market-plugin★ 104
dsh Web GUI 内的社区插件市场:浏览 awesome-dsh-plugin.com 目录,从 设置 → 插件 → 插件市场 安装/卸载插件到 profile。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。