@androidsup/dsh-plugin-updates 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # 更新日志
2
+
3
+ 创建于 2026-10-23
4
+
5
+ ## 0.1.1(2026-10-23)
6
+
7
+ - 新增「忽略此版本提醒」:清单逐项忽略 / 恢复,弹窗逐项或批量忽略,按 npm 版本 / GitHub 提交持久化;后续新版本仍提醒。
8
+ - 已忽略项保留在清单并可筛选,不参与全选,仍可手动更新;恢复提醒同时清除该项的旧关闭记录。
9
+ - 忽略与恢复后立即同步当前窗口的清单和弹窗;保存失败不报告成功,拒绝过期目标与正在执行操作时的请求。
10
+ - 顶部产品介绍增加中文 / English 切换,默认中文;包描述改为中文优先的双语文案,并新增英文介绍文档。
11
+ - 配置 GitHub Actions:普通提交和 PR 运行 Node.js 22 / 24 CI,稳定版本标签自动构建、测试、通过 npm OIDC 发布并创建附带安装包的 GitHub Release;支持同内容失败重跑,不保存长期 npm Token。
12
+
13
+ ## 0.1.0
14
+
15
+ - npm 包使用账号作用域 `@androidsup/dsh-plugin-updates`,避免与其他作者同名包混淆;桌面安装走 DSH 官方界面。
16
+ - 从路由插件抽出,拥有独立目录、Git 仓库和 npm 包。
17
+ - 只管理已安装插件:npm 版本与频道、GitHub 提交检查、逐项和批量确认更新、结果核验及脱敏诊断。
18
+ - 每日自动检查、同版提醒去重,保留启用状态,不提供插件市场或新插件安装。
19
+ - 默认遵守新版本等待期;更新管理自身安排在批次最后。
20
+ - 顶部展示 QQ 交流群与独立仓库链接,支持窄窗口换行及键盘聚焦。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DSH Multi Router contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,67 @@
1
+ # DSH Plugin Update Manager
2
+
3
+ Created on 2026-10-23
4
+
5
+ [中文(默认)](README.md) · [English](README.en.md)
6
+
7
+ [Join the QQ group](https://qm.qq.com/q/eQC7OQXQe4) · QQ **1124103038** · [GitHub repository](https://github.com/AndroidSix/dsh-plugin-updates). Find it useful? Give us a Star!
8
+
9
+ **Only installed plugins. Every update checked and accounted for.**
10
+
11
+ `@androidsup/dsh-plugin-updates` is an independent DeepSeek Harness plugin with its own repository, npm package, directory, and lockfile. It does not require `dsh-multi-router` or any account-routing service.
12
+
13
+ ## Not a Marketplace
14
+
15
+ A marketplace helps you choose what to install. This plugin helps you decide whether to update what is already installed, verify the result, and understand failures.
16
+
17
+ - **Keep the source.** Compare npm versions on their original release channel and GitHub commits on their original branch or tag. Keep pinned Git commits pinned.
18
+ - **You decide.** Check daily while DSH is running; install only after explicit confirmation. Preserve enabled and disabled states.
19
+ - **Ignore a specific release.** Since **0.1.1**, ignore one npm version or Git commit from the reminder or installed-plugin list. Ignores survive restarts; newer versions and commits still notify you. Restore notifications or update manually at any time. Bulk selection skips ignored targets.
20
+ - **Verify the result.** Check the installed npm version or locked Git commit instead of trusting a successful command exit. Distinguish installation from activation or a required restart.
21
+ - **Handle failures.** Show per-plugin results and redacted diagnostics. Respect release-age policies and build-script approval; never disable global safeguards.
22
+
23
+ There is no discovery catalog, recommendation feed, ranking, new-plugin installation, uninstall, or enable/disable control. Use the native DSH plugin page for those actions.
24
+
25
+ ## Installation
26
+
27
+ Current stable version: **0.1.1**.
28
+
29
+ In the DSH desktop app, open **Plugins → Add plugin**, enter `@androidsup/dsh-plugin-updates@0.1.1`, choose the official npm registry, install, and enable it. The Electron app exclusively manages the `desktop` profile; do not modify it using the CLI.
30
+
31
+ For non-desktop profiles:
32
+
33
+ ```bash
34
+ dsh plugin --profile web add @androidsup/dsh-plugin-updates@0.1.1
35
+ ```
36
+
37
+ Use the full scoped package name. The unscoped `dsh-plugin-updates` package belongs to another author and is not this project.
38
+
39
+ ## Language and Privacy
40
+
41
+ In 0.1.1, the introduction has a Chinese / English selector, with Chinese as the default. The selector affects the introduction only; management controls remain in Chinese. The npm package description includes Chinese first, followed by English.
42
+
43
+ Check results and notification preferences are stored in the current DSH profile's `.dsh-plugin-updates/state.json`, not synced between profiles. Checks access only the npm registry or GitHub metadata for already installed plugins. There is no marketplace backend or analytics service; router configuration, credentials, and conversations are not uploaded.
44
+
45
+ The GitHub repository is currently private. Viewing it or leaving a Star requires repository access; the npm package is public.
46
+
47
+ ## Development
48
+
49
+ Requires Node.js `^22.19.0 || >=24.0.0`.
50
+
51
+ ```bash
52
+ npm ci
53
+ npm run check
54
+ npm run pack:release
55
+ ```
56
+
57
+ See the [Chinese documentation](README.md) for installation policies, safety boundaries, migration, and limitations. License: MIT.
58
+
59
+ ## Automated Releases
60
+
61
+ Pushes to `main` and pull requests run CI on Node.js 22.19.0 and 24. Only stable `vX.Y.Z` tags trigger `.github/workflows/publish.yml`; ordinary commits do not publish or update users' installations.
62
+
63
+ The release workflow validates the scoped package name and matching tag / package / lockfile versions, builds and tests, packs once, publishes through npm OIDC trusted publishing, verifies the registry integrity, and attaches the same archive to a GitHub Release. It needs no long-lived `NPM_TOKEN`. Official actions are pinned by commit, and release jobs do not use dependency caches.
64
+
65
+ The npm trusted publisher is bound to `AndroidSix/dsh-plugin-updates` and `publish.yml`. The source repository remains private; npm does not generate provenance for private repositories, even for a public npm package. OIDC authentication still applies. See the [official npm documentation](https://docs.npmjs.com/trusted-publishers/).
66
+
67
+ For the next release, update the version with `npm version X.Y.Z --no-git-tag-version`, update the changelog and both READMEs, run `npm run check`, commit all changed sources and build outputs, push `main`, then push `git tag vX.Y.Z`. See the Chinese guide for the full command sequence. Never move an already published tag. Failed workflows can be rerun: an existing npm version is skipped only when its integrity matches exactly; different contents require a new version.
package/README.md CHANGED
@@ -1,3 +1,128 @@
1
- # Temporary Holding Version
1
+ # DSH 插件更新管理
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 创建于 2026-10-23
4
+
5
+ [中文(默认)](README.md) · [English introduction](README.en.md)
6
+
7
+ [加入 QQ 交流群](https://qm.qq.com/q/eQC7OQXQe4) · 群号 **1124103038** · [GitHub 仓库](https://github.com/AndroidSix/dsh-plugin-updates)。觉得好用?点个 **Star** 鼓励一下。插件页面顶部也有入口。
8
+
9
+ **只管已安装插件,让每一次更新有据可查。**
10
+
11
+ `@androidsup/dsh-plugin-updates` 是独立的 DeepSeek Harness 插件,当前版本 **0.1.1**。它从 `dsh-multi-router` 拆出,不依赖路由、账号池、模型供应商、签到或 API 服务。拥有独立目录、Git 仓库、依赖锁文件和 npm 包,不需要 `dsh-multi-router` 源码、依赖或构建脚本。
12
+
13
+ ## 不是插件市场
14
+
15
+ 插件市场解决“装什么”,本插件解决“已经装的插件,该不该更新、更新到了哪里、为什么没成功”。
16
+
17
+ | 核心优势 | 具体实现 |
18
+ | --- | --- |
19
+ | 来源感知,而非只看包版本 | npm 比较 SemVer、沿用 `latest` / `next` 等频道;GitHub 比较原分支或标签的提交,包版本没变也能发现更新。固定 Git 提交不解除。 |
20
+ | 用户决定,而非后台代装 | DSH 运行期间每 24 小时检查;同一目标处理后不重复提醒,更高版本或新提交再次提醒。逐个或批量查看目标、明确确认后才更新。 |
21
+ | 按版本忽略,而非关闭所有提醒 | 清单或弹窗可忽略指定 npm 版本 / GitHub 提交,重启后保留;更高版本 / 新提交仍提醒,可随时恢复或手动更新。 |
22
+ | 核验结果,而非相信成功提示 | 更新后复查实际 npm 版本或锁文件中的 Git 提交。命令退出码为零但版本不符仍判为失败;区分已安装与重启后生效。 |
23
+ | 不扰动现有配置 | 只操作当前 DSH 配置中用户安装的插件,包含停用项;排除内置与受保护组件,保留原启用状态,不自动换源。 |
24
+ | 失败能继续处理 | 逐项显示失败,单项失败不阻断其它项;区分等待期、脚本授权、文件占用、兼容、网络及加载问题,可查看和复制脱敏诊断。 |
25
+
26
+ **明确不做:**插件搜索发现、远端目录、推荐、排行、评分、新插件安装、卸载、启停管理、任意版本降级。页面中的搜索仅筛选已安装清单。首次安装及依赖脚本授权仍使用 DSH 原生插件页。
27
+
28
+ ## 忽略指定版本提醒
29
+
30
+ 以下功能自 **0.1.1** 起提供:
31
+
32
+ - 更新提醒弹窗:单项「忽略此版本」,或「忽略以上版本」批量忽略弹窗中的确切目标。
33
+ - 更新清单:每个可更新项提供「忽略此版本提醒」;已忽略项仍保留,显示标记,可点击「恢复此版本提醒」。
34
+ - 忽略只影响提醒和「选择全部未忽略」,不影响后台检查,也不禁止手动勾选和更新。可通过「已忽略提醒」筛选查看。
35
+ - npm 按确切版本、GitHub 按提交记录;忽略当前版本不会屏蔽后续新版本。记录仅保存在当前 DSH 配置,重启后仍有效,不跨配置同步。
36
+ - 页面顶部的产品介绍提供「中文 / English」切换,首次打开默认中文;切换仅影响介绍区,管理操作界面仍使用中文。npm 包描述为中文在前的双语文案。
37
+
38
+ ## 安装与使用
39
+
40
+ 独立 npm 包 [`@androidsup/dsh-plugin-updates`](https://www.npmjs.com/package/@androidsup/dsh-plugin-updates) 已发布,当前版本为 **0.1.1**。
41
+
42
+ 桌面版:打开 DSH「插件」→「添加插件」,输入 `@androidsup/dsh-plugin-updates@0.1.1`,选择 npm 官方源,安装后点击「立即启用」。`desktop` 配置由 Electron 独占管理,CLI 不可修改。
43
+
44
+ 非桌面配置可使用官方 CLI,例如:
45
+
46
+ ```bash
47
+ dsh plugin --profile web add @androidsup/dsh-plugin-updates@0.1.1
48
+ ```
49
+
50
+ 如需从源码开发或生成本地安装包,要求 Node.js `^22.19.0 || >=24.0.0`:
51
+
52
+ ```bash
53
+ # 克隆独立仓库;私有仓库需要访问权限
54
+ git clone https://github.com/AndroidSix/dsh-plugin-updates.git
55
+ cd dsh-plugin-updates
56
+ npm ci
57
+ npm run check
58
+ npm run pack:release
59
+
60
+ # 将生成的安装包添加到所需 DSH 配置;替换成实际绝对路径
61
+ # 桌面版:在 DSH 插件页「添加插件」输入安装包绝对路径。
62
+ # desktop 配置由 Electron 独占管理,CLI 不可修改。
63
+ # 以下命令仅适用于非桌面配置,例如 web:
64
+ dsh plugin --profile web add /absolute/path/androidsup-dsh-plugin-updates-0.1.1.tgz
65
+ ```
66
+
67
+ 在 DSH 插件页打开本插件配置即可进入「插件更新管理」。支持按名称、来源、可更新状态筛选、单项或批量更新及取消。所有操作作用于当前配置,不跨配置、跨设备同步。
68
+
69
+ - npm 查询沿用 DSH 的 registry、认证及回退设置;可为本次更新选择 npm 官方或 npmmirror。npm 镜像不能解决 GitHub 的网络问题。
70
+ - 固定 npm 版本或范围在明确确认后更新到所查到的 `latest` 版本;显式 dist-tag 保留频道。GitHub 更新继续跟随原分支或标签,并核验已检查的提交;期间远端推进则要求重新检查。
71
+ - 检查结果有效期 10 分钟;安装来源、已安装版本或启用状态发生变化时拒绝旧操作,要求重新检查。
72
+ - **默认遵守新包等待期。**用户主动勾选「允许本次指定版本立即安装」后,才在当前配置的 `pnpm-workspace.yaml` 保存所列确切版本的等待期例外;不关闭全局策略,不放行其它版本、间接依赖或构建脚本。
73
+ - 更新管理插件自身放在批次最后,通过 DSH 官方更新执行器更换文件;不在运行中的更新事务内重载自身。按结果提示完全退出并重开 DSH。其它插件是否即时生效由 DSH 的安装结果决定;不承诺第三方插件无中断热更新。
74
+ - 本地文件或开发链接只标记为「原方式更新」,不猜测来源、不自动改源。GitHub 私有仓库元数据、限流与离线错误明确显示,不当作“已有更新”。
75
+
76
+ 注意:npm 上不带作用域的 `dsh-plugin-updates` 属于其他作者,不是本项目。请使用完整的 `@androidsup/dsh-plugin-updates` 包名。
77
+
78
+ ## 独立发布与 GitHub Actions
79
+
80
+ 源码仓库:<https://github.com/AndroidSix/dsh-plugin-updates>。当前 GitHub 仓库保持私有;面板顶部仓库链接也指向此独立仓库,未获访问权限的用户无法查看或 Star。是否公开仓库与是否发布 npm 是两个独立决定。
81
+
82
+ 普通 `main` 提交和 Pull Request 仅触发 CI,分别在 Node.js 22.19.0 与 24 上构建、测试并检查打包。**只有推送稳定版本标签 `vX.Y.Z` 才自动发布**,不会每次提交都发包,也不会后台更新用户的插件。
83
+
84
+ 发布流程在 `.github/workflows/publish.yml`:校验标签、包名与锁文件版本 → 独立构建和测试 → 打包 → npm OIDC 可信发布 → 核验 registry 完整性 → 创建 GitHub Release,附上同一份 `.tgz`。不需要 `NPM_TOKEN` Secret;Actions 固定到提交 SHA,发布任务不使用依赖缓存。GitHub Release 的写权限与 npm 发布任务隔离。
85
+
86
+ npm 的可信发布绑定 `AndroidSix/dsh-plugin-updates` 仓库和 `publish.yml` 工作流。换仓库或文件名后,需要包维护者重新绑定。当前源码仓库私有,npm 不生成 provenance 声明,但仍通过短期 OIDC 凭证发布;不会因此自动公开仓库。[npm 官方说明](https://docs.npmjs.com/trusted-publishers/)。
87
+
88
+ 后续发布示例(将版本替换为实际的新版本):
89
+
90
+ ```bash
91
+ npm version 0.1.2 --no-git-tag-version
92
+ # 同步 CHANGELOG 和中英文说明
93
+ npm run check
94
+ git add package.json package-lock.json lib cordis.patch.yml CHANGELOG.md README.md README.en.md
95
+ git commit -m "Release 0.1.2"
96
+ git push origin main
97
+ git tag v0.1.2
98
+ git push origin v0.1.2
99
+ ```
100
+
101
+ 标签与 `package.json`、`package-lock.json` 不一致时拒绝发布。版本不可覆盖;若工作流中途失败,可在 GitHub Actions 重跑:只有 npm 中已发布版本的完整性与当前包完全一致才跳过发包,并补齐 Release。内容不同则必须升新版本。不要删除或移动已经发布的标签。
102
+
103
+ 本机仍可运行 `npm publish`,`prepublishOnly` 会先构建并测试,且需自行完成 npm 登录和二次验证;正式发布优先使用上述标签流程。
104
+
105
+ GitHub 仓库单独维护提交和版本,路由项目不再调用本项目的构建或测试。`node_modules/`、本地安装包、认证配置和运行时数据不纳入 Git。
106
+
107
+ ## 数据与安全边界
108
+
109
+ 检查记录、提醒去重和忽略版本保存在当前 DSH 配置目录的 `.dsh-plugin-updates/state.json`,目录 0700、文件 0600;不同配置相互独立。安装与实际文件变更交给 DSH 的插件管理接口及官方执行器,不自建安装器。
110
+
111
+ 本地 HTTP 接口为 `/.well-known/dsh-plugin-updates`:仅允许回环地址和同源请求,写操作要求会话随机密钥,只接受检查、清单刷新、更新、提醒处理及取消操作。后台没有新插件安装接口。浏览器诊断不返回原始安装输出、账号令牌或用户路径。
112
+
113
+ 没有远端插件目录或自建统计服务;检查只访问当前已安装插件对应的 npm registry / GitHub 元数据,更新由 DSH 下载相应包。不会上传路由配置、账号或对话。
114
+
115
+ ## 从路由插件迁移
116
+
117
+ 升级到拆分后的 `dsh-multi-router` 后,旧更新页签、全局提醒和后台扫描移除;新插件需独立安装。旧路由、账号、用量和设置均保持不变。旧 `multi-router/plugin-updates.json` 保留但不再使用,不导入可能来自其它配置的旧检查结果或提醒状态;独立插件首次运行重新检查。若仍启用拆分前的旧路由插件,两套检查和提醒可能并存,应先升级路由插件。
118
+
119
+ ## 验证与限制
120
+
121
+ ```bash
122
+ npm run check # 独立构建与测试
123
+ npm pack --dry-run # 核对发布内容
124
+ ```
125
+
126
+ 测试覆盖来源解析、内置排除、停用项、版本和提交核验、批次隔离、取消、提醒持久化、等待期授权、HTTP 安全边界、前端模块注册及独立宿主生命周期。真实 registry 凭证、私有仓库、下载失败回滚和不同系统下的文件占用仍需在目标 DSH 中验收;不保证任意第三方插件都支持运行中更新。
127
+
128
+ 许可证为 MIT。SemVer 工具的上游来源及许可证见 [第三方声明](THIRD_PARTY_NOTICES.md)。
@@ -0,0 +1,29 @@
1
+ # Third-Party Notices
2
+
3
+ 创建于 2026-10-23
4
+
5
+ `src/version.mjs` adapts only the SemVer parser and comparator from `dsh-workbuddy-connect` (`upstream/workbuddy/src/update.ts`, commit `caad7a9447e9c5c4f09653c6d5c2c34782c9ad81`). Names and errors are generalized; no WorkBuddy runtime or API integration is included.
6
+
7
+ Source: https://github.com/corrinehu/dsh-workbuddy-connect
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2026 Corrine Hu
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: dsh-plugin-updates-0.1.1
3
+ name: ./lib/host-v0.1.1.js