前言¶
在 DSH web profile 里装插件多了之后,「有没有新版本」往往靠 npm 名字或随手 pnpm update 判断。两类问题很常见:同名 npm 包与本地 link:、github: 安装撞名,检查器会报假更新;插件最新版要求的 DSH core 比你正在跑的新,装上去可能直接把 Web UI 打空白。下面介绍社区插件 @lucagiftzek/dsh-plugin-updates(loader 行 id 为 plugin-updates):只做通知,不安装、不改 profile、不拉起子进程,并按依赖 specifier 与当前运行中的 DSH 版本筛出真正可考虑的 release。
这是什么¶
维护者 lucagiftzek 在 GitHub 开源的 dsh-plugin-updates,npm 包名为 @lucagiftzek/dsh-plugin-updates(裸名 dsh-plugin-updates 在 npm 上已被无关数据包占用)。分类上属于 DSH 社区目录中的联网工具;当前 package 版本为 0.1.2,许可证 MIT。
一句话定位:DeepSeek Harness web profile 插件,告诉你已安装插件里哪些有更新,且该更新当前 DSH core 实际能加载;分类依据是 package.json 里的 specifier(^1.2.0、link:、github:、release tarball URL 等),不是裸包名。
核心功能¶
只通知、不代劳¶
插件不会替你执行安装,不会编辑 profile,也不会运行子进程。发现可更新项后,界面提供 Copy command(带内存上限的 apply 命令,避免在繁忙机器上裸跑 pnpm add 吃光内存);是否执行由你决定。
按 specifier 分类,避免同名误报¶
- registry(semver range、dist-tag、
npm:别名):走配置的 npm registry(默认https://registry.npmjs.org,须在 host allowlist 内)。 - github: / git+https://github.com/…:对照 GitHub tags 与默认分支 HEAD,pinned commit 从
pnpm-lock.yaml读取。 - https://github.com/…/releases/download/…tgz:对照 GitHub releases。
- link:、file:、workspace::本地项;仅在
upstream映射或开启checkOwnRemotes时与远端比较。 - 其他 git 主机或 tarball 主机:标为 manual,需人工处理。
与运行中 DSH core 的兼容门控¶
对每个候选版本:若声明了 engines.dsh,以该 range 为准;否则检查所有 @deepseek-ai/dsh 与 @deepseek-ai/dsh-* 的 peer range 是否满足当前 core(semver.satisfies,含 prerelease 规则,与 DSH 0.2.1 loader 一致)。通过门控的最新稳定版才会作为「可安装更新」提供;需要更高 core 的版本会并列展示说明(例如「0.28.2 needs a newer core」),不会当作可应用项。若你声明的 range(如 ^0.7.4)重新 resolve 会落到 core 吃不住的版本,会单独标记,避免误跑裸 pnpm update。
界面与辅助能力¶
- 侧栏 Updates 标签页(依赖 tab 宿主
dsh-better-sidebar,未装可先装;README 示例里将其列为可选前置)。分组结果、npm/releases/changelog/compare 链接,以及 Check now、Ignore this version、Snooze、Copy command;可选角标计数(默认只计update-compatible)。 - Settings 中可配检查间隔、registry、holds、upstream、notes、snooze 等(见下节)。
- 只读 agent 工具:
plugin_updates、plugin_updates_doctor。 - HTTP:
GET /dsh-plugin-updates/api/doctor,以及 bundled doctor skill。 - 默认零配置即可工作。
状态与策略¶
每个包会有明确状态,例如 up-to-date、update-compatible、update-needs-newer-core、held、snoozed、unreachable 等;查询失败为 unreachable,不会误报为已最新。支持 holds(按包 semver 范围跳过某版本,可带 when dsh <range>)、per-package notes、安装后提醒(afterInstall)。
安装与启用¶
环境要求(来自 package.json):Node >= 22.5,DSH >= 0.1.5-rc.1 且 < 0.3.0。浏览器端可热更新;服务端半部分仅在启动时加载,改插件后需重启 dsh web。
README 给出的安装顺序示例:若尚未安装侧栏 tab 宿主,可先装 dsh-better-sidebar,再装本插件。
dsh plugin --profile web add dsh-better-sidebar # the tab host, skip if installed
dsh plugin --profile web add @lucagiftzek/dsh-plugin-updates
# or from GitHub: dsh plugin --profile web add github:lucagiftzek/dsh-plugin-updates
# restart dsh web, then open the Updates tab
也可仅用 npm 或 GitHub 其一:
dsh plugin --profile web add @lucagiftzek/dsh-plugin-updates
# or from GitHub: dsh plugin --profile web add github:lucagiftzek/dsh-plugin-updates
# then restart dsh web: the server half loads at start only
包声明了 dsh.bundle,dsh plugin add 后会出现在 dsh.profile.bundles。本地开发可用 link:/absolute/path/to/dsh-plugin-updates(需在该目录 npm install --omit=dev)。
不卸载即可关闭:在 profile 的 cordis.patch.yml 中对 - id: plugin-updates 设 disabled: true,或设置环境变量 DSH_PLUGIN_UPDATES_DISABLE=1。
典型用法¶
- 按上文命令安装并重启 dsh web。
- 打开侧栏 Updates 标签,查看分组列表与角标(若启用
badge)。 - 点击 Check now 立即拉取;对暂不处理的版本用 Snooze 或 Ignore this version。
- 对标记为
update-compatible的项,用 Copy command 复制建议命令,在终端自行执行(插件不会代装)。 - 在 Settings(DSH 0.1.5 为
settings.yaml的dsh-plugin-updates命名空间;0.2.x 为 profilecordis.patch.yml里plugin-updates行)按需调整间隔、registry、GitHub token 环境变量名等。
常用配置项(节选,默认值以 README 为准):
| Key | Default | 含义 |
|---|---|---|
enabled |
true |
总开关 |
intervalHours |
12 |
自动检查间隔(小时,最小 1) |
initialDelaySeconds |
60 |
启动后首次检查延迟 |
registry |
https://registry.npmjs.org |
registry 基址 |
githubTokenEnv |
"" |
存放 GitHub token 的环境变量名(非 token 本身,仅用于 api.github.com) |
holds / upstream / notes |
seeded | 跳过版本、link 插件对应 upstream、结果旁备注 |
checkOwnRemotes |
false |
是否用 plain local 插件的 github.com origin 比较 |
snoozeDays |
7 |
默认 snooze 天数 |
Agent 或运维侧可调用只读工具 plugin_updates、plugin_updates_doctor,或访问 GET /dsh-plugin-updates/api/doctor 做自检。
适用场景与注意¶
适合谁:长期在 web profile 里维护较多 DSH 插件、安装来源混用 npm / GitHub / link:,又希望更新前知道「是不是同名包」「当前 core 能不能吃」的开发者。
权限与安全:插件以当前 dsh 进程权限运行,会按配置访问 registry 与 api.github.com(可选 token 仅经环境变量名注入)。安装前应阅读 源码与 LICENSE,确认符合你的环境与合规要求。社区目录 SkillHub 插件页 与 GitHub 仓库由社区维护,与 DeepSeek / 幻方无官方从属关系。
局限:仅通知;不兼容 core 的版本只作说明;部分来源标为 manual 需人工核对;DSH 0.1.5 core 无独立门控时,兼容结果为「declared compatible」而非「verified」。
结尾¶
dsh-plugin-updates 把插件更新检查从「按名字搜 npm」改成「按 specifier 追真实来源」,并用与 loader 一致的规则过滤掉当前 core 无法加载的版本,适合作为 web profile 里的只读更新雷达。详情与变更见 GitHub 仓库,目录入口见 SkillHub:lucagiftzek/dsh-plugin-updates。