DeepSeek Harness 插件

aaayeaaa-P1WS/dsh-plugin-auto-update

Star 数 ★ 0 下载量(近 30 天) 431 分类 插件市场与管理 收录于 2026-11-16 npm @aaayeaaa-p1ws/dsh-plugin-auto-update

自动帮你更新插件:每次打开 DSH 就在后台检查市场里的新版本并安装,装完弹窗说清楚更新了什么、哪几个失败了;设置里能改检查时机、看更新日志;插件被占用装不上时,一键停用、更新并重启 DSH。它的 HTTP 路由没有 DSH 的访问检查,浏览器里打开的网页可以调用它们。

安装

# npm 包(预构建)

dsh plugin --profile web add @aaayeaaa-p1ws/dsh-plugin-auto-update

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:aaayeaaa-P1WS/dsh-plugin-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

插件装多了,更新就成了琐事:市场里隔几天就有新版本,你得自己去翻、去点。

这个插件替你盯着。每次打开 DSH,它在后台查一轮已安装插件的更新,有就装上;装完给你一张小卡片,说清楚这次更新了什么、哪几个没装上、卡在哪里。

它做什么

  • 开机自动检查 — DSH 启动十几秒后在后台跑一轮,查完就装,你照常干活。
  • 结果弹窗 — 当天第一次打开 DSH 时,把结果摆在你面前:更新了哪几个(旧版本 → 新版本)、失败的是哪几个、原因是什么。点「稍后」当天不再打扰。
  • 失败能一键处理 — 插件正在使用的时候,DSH 不允许直接替换(bundle-in-use)。弹窗里会给一个按钮:停用 → 更新 → 装回 → 重启 DSH,一口气做完。
  • 设置页 — 设置里的独立一页:检查时机(每次打开 / 每天定时 / 每隔 N 小时)、自动安装、开机弹窗三个开关,外加一份最近的更新日志,也可以手动「立即检查」。

安装

dsh plugin add @aaayeaaa-p1ws/dsh-plugin-auto-update

从 GitHub 装:

dsh plugin add github:aaayeaaa-P1WS/dsh-plugin-auto-update

装好后重启一次 DSH,在「设置 → 插件自动更新」里能看到它。

它怎么工作

只走插件市场公开的 UPDATE-API v1:updates/summary?force=1 拿可更新列表 → POST /updates 发起安装 → 轮询操作状态。不读 profile 文件、不调 pnpm、不碰你的配置,安装全部交给市场自己做。

市场同一时刻只允许一个操作,所以这里是串行安装,市场自己也排在最后。遇到「市场正忙」就推迟几分钟再来,不算失败。

关于冷静期

插件市场对刚发布的版本有一段冷静期(pnpm 默认 24 小时,本机 profile 里设成了 6 小时)。冷静期内的版本市场不会让人安装,插件会等它成熟后再试——所以「市场里显示有更新」和「这里稍晚一点才装上」是正常的,不是出错。

失败原因对照

提示 含义 怎么办
bundle-in-use 插件正在运行,桌面端不允许移除 用弹窗里的「关闭插件并更新,然后重启 DSH」
等待期(held) 新版本还没过冷静期 等几小时,插件自己会重试
市场正忙 / 超时 别的安装或更新占着市场 几分钟后自动重试

配置

设置页会写进 ~/.dsh/auto-update/config.json,也可以直接改:

键 含义 默认
mode startup 每次打开 / daily 每天定时 / interval 每隔 N 小时 startup
dailyAt daily 模式的时间,HH:MM 09:30
intervalHours interval 模式的间隔小时数(1–48) 6
enabled 是否自动检查 true
autoApply 发现更新就安装(关掉则只检查) true
popupEnabled 当天首次打开时弹窗 true

兼容性

  • 宿主机逻辑跨平台;「停用 → 重启」依赖桌面端,Web 端只会提示无法重启。
  • 需要 DSH >= 0.2.2-rc.1。

开发

git clone https://github.com/aaayeaaa-P1WS/dsh-plugin-auto-update.git
cd dsh-plugin-auto-update
dsh plugin add link:$(pwd)

代码不多:index.js 负责检查和安装、暴露 /dsh-auto-update/* 路由与 dsh_auto_update_status 工具;client.js 是弹窗和设置页;lib/ 里是配置归一化和桌面端重启。

English

dsh-plugin-auto-update keeps your DSH plugins current without you thinking about it.

On every DSH launch it checks the plugin market for updates to your installed plugins and installs them in the background. A popup on your first launch of the day tells you what was updated (old version → new version) and what failed, and why. If a plugin couldn't be replaced because it is currently in use (bundle-in-use), the popup offers a one-click fix: disable it, update, restore, and restart DSH.

A settings page adds the schedule (on launch / daily at a time / every N hours), switches for auto-install and the popup, a recent update log, and a manual "check now".

It talks only to the market's public UPDATE-API v1 — no profile edits, no pnpm, no changes to your configuration.

Install: dsh plugin add @aaayeaaa-p1ws/dsh-plugin-auto-update (or dsh plugin add github:aaayeaaa-P1WS/dsh-plugin-auto-update).

Note: the market holds back freshly published versions for a release-age window (24h by default, 6h in this setup), so a version can show as available a few hours before it is actually installable.

License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。