dsh-crwu-workbench 0.0.11 → 0.0.12

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 CHANGED
@@ -7,6 +7,42 @@
7
7
  `cordis_define` + `cordis_run` 装配,版本号用 DSH 的 `pkg-N`);它已在本仓收尾时删除
8
8
  (见 `0.0.1` 一节),下面 `legacy · pkg-43` 及更早的记录是它的历史。
9
9
 
10
+ ## package · 0.0.12 · 2026-09-28
11
+
12
+ **首个包含自更新能力的正式版本。** 0.0.10 / 0.0.11 用户需要**手动完成一次**引导升级
13
+ (见 README「更新 CRWU」与 `docs/releasing.md` §9);从 0.0.12 起,后续正式版本才能通过界面内
14
+ 的检查与安装升级。
15
+
16
+ - **启动后自动检查更新**:插件装载后按缓存策略做一次后台检查,**静默**完成,不弹窗打扰;
17
+ 发现新版本只把版本徽标变成 `v<当前> · 有更新`。
18
+ - **手动检查**:点徽标打开更新面板,「检查更新」绕过缓存立刻再查一次。
19
+ - **只接受稳定版本**:只认 npm `latest` 指向的**稳定 SemVer**(预发布 / `next` / `beta` 一律不装),
20
+ 并且只认**比当前更高**的版本。
21
+ - **同时读取两个公开源(仅限普通公共源 profile)**:普通公共源 profile 下,检查会查
22
+ npm 官方 registry 与 npmmirror 各一次,取其中**合法的更高稳定版本**;
23
+ 两个源给出**同一版本**时优先展示 **npmmirror**(国内网络下更可能装得上)。
24
+ - **安装交给 DSH Plugin Manager**:安装动作由宿主的 Plugin Manager 执行,本插件不自己下载、
25
+ 不解包、不覆盖插件目录;安装优先使用 `https://registry.npmmirror.com/`,
26
+ **网络失败与回退由 Plugin Manager 负责**。
27
+ - **企业 / 私有 registry profile:不访问那两个公共发现源**:这类 profile 下
28
+ **不会**去查 npm 官方 registry 或 npmmirror,**自更新被明确禁用**(面板说明原因、禁用安装按钮),
29
+ 更新交由企业现有的分发策略管理;插件**不会绕过策略**安装。
30
+ - **不提供错误的"一键升级"承诺**:开发目录安装(dev)、Plugin Manager 不可用、企业源管理等情形
31
+ 会明确说明原因并禁用安装按钮,不假装能升级。
32
+ - **审核占用时禁止安装**:审核任务正在启动或正在运行时禁用安装(不动 profile),
33
+ **但不禁止检查更新**。
34
+ - **安装过程可见、可取消、可恢复**:安装状态以**诚实的离散阶段**展示(连接更新源 / 下载安装包 /
35
+ 写入插件目录 / 取消中),不伪造百分比;安装期间可以取消;安装请求异常(网络中断、响应不认识)
36
+ 会立刻回读宿主事实,不会凭空把安装判定成功或失败;刷新页面后也能从宿主事实恢复安装状态。
37
+ - **更新完成后必须手动重启**:界面提示
38
+ 「CRWU v<版本> 已安装。请完全退出并重新打开 DeepSeek Harness,使新版生效。」
39
+ macOS 明确说明**关闭窗口不等于退出**(从应用菜单选择「退出」或按 **Command-Q**);
40
+ 刷新页面同样不等于重启。
41
+ - **本插件不修改、也不重启 DeepSeek Harness 桌面端**:没有"立即重启"按钮,
42
+ 也不会替用户退出桌面应用。
43
+ - **协议门禁**:宿主与客户端不同代(`WORKBENCH_PROTOCOL` 不一致)时继续拦住发起审核,
44
+ 提示以「完全退出并重新打开 DeepSeek Harness」为准。
45
+
10
46
  ## package · 0.0.11 · 2026-09-28
11
47
 
12
48
  修复「新报告一律发起不了」:审核启动报
package/README.en.md CHANGED
@@ -92,6 +92,46 @@ Building the tarball yourself (from the `crwu-ai` repository): `make plugin-pack
92
92
  > commands that genuinely read local credentials ask for unconfined execution; everything else stays in
93
93
  > the profile's default sandbox.
94
94
 
95
+ ### Updating CRWU (self-update, from 0.0.12)
96
+
97
+ **Where to look:** the version badge in the sidebar card header and in the panel header (`dev` / `v0.0.12`)
98
+ is the update entry point. The plugin runs one **silent** background check after it loads; when a newer
99
+ stable version exists the badge becomes `v0.0.12 · 有更新`. Click the badge to open the update panel and use
100
+ 「检查更新」 to force another check that bypasses the cache.
101
+
102
+ **How to install:** click 「安装更新」 in the panel. Installation is performed by the DSH Plugin Manager —
103
+ this plugin never downloads packages or overwrites its own directory. During installation the panel shows
104
+ **honest discrete stages** (connecting / downloading / writing the plugin directory / cancelling) and
105
+ **no percentage**; you can cancel at any time. Installation is **disabled while an audit is starting or
106
+ running** (it must not touch the profile), but **checking is still allowed**.
107
+
108
+ **You must restart manually:** when the install finishes the panel says
109
+
110
+ > CRWU v0.0.12 已安装。请完全退出并重新打开 DeepSeek Harness,使新版生效。
111
+
112
+ **macOS:** closing the window does **not** quit the app — choose Quit from the application menu or press
113
+ **Command-Q**. Reloading the page is not a restart either. This plugin never modifies or restarts the
114
+ DeepSeek Harness desktop app (no "restart now" button, no silent updates).
115
+
116
+ **Users on 0.0.10 / 0.0.11:** those releases do **not** contain the updater, so they cannot discover
117
+ 0.0.12 by themselves. Install 0.0.12 once by hand, then later stable versions can be checked and installed
118
+ from the UI:
119
+
120
+ ```bash
121
+ # replace <profile> with the DeepSeek Harness profile you actually use
122
+ dsh plugin --profile <profile> add dsh-crwu-workbench@0.0.12
123
+ ```
124
+
125
+ Then **fully quit and reopen** DeepSeek Harness.
126
+
127
+ **Mainland-China network policy:** the check queries **both** the official npm registry and npmmirror and
128
+ picks the valid higher stable version; when both report the same version npmmirror is preferred
129
+ (it is more likely to be reachable). Installation prefers `https://registry.npmmirror.com/`;
130
+ **failures and fallbacks are the Plugin Manager's responsibility**. Mirror sync can lag behind the official
131
+ registry — that is not "no new version", just re-check later; once the official registry has a higher
132
+ version it will be found even if the mirror lags. Enterprise/private registry policies still apply and are
133
+ never bypassed.
134
+
95
135
  ### Updating and removing
96
136
 
97
137
  ```bash
@@ -128,6 +168,11 @@ and the installed Host automatically reads that packaged copy. Distribution need
128
168
 
129
169
  ## Releasing
130
170
 
171
+ **Current workflow (still used for 0.0.12):** `.github/workflows/release.yml` uses the GitHub secret
172
+ `NPM_TOKEN` (as `NODE_AUTH_TOKEN`) and runs `npm publish --provenance` on the `plugin-v<version>` tag —
173
+ provenance comes from GitHub Actions OIDC in CI, not from a local publish. **Trusted Publishing is not
174
+ enabled today**; it is only a *future migration option* documented in `docs/releasing.md` §3.3.
175
+
131
176
  The complete operator procedure, including authentication setup, failure recovery, and rollback, is in
132
177
  [`docs/releasing.md`](https://github.com/mmungdong/crwu-ai/blob/main/plugins/dsh-crwu-workbench/docs/releasing.md).
133
178
  Never run a real `npm publish` by hand. The release path is tag-driven and gated:
package/README.md CHANGED
@@ -240,6 +240,41 @@ dsh plugin --profile web add dsh-crwu-workbench@<version>
240
240
  > **版本号只发一次**:分发走 npm,已发布的版本号不能覆盖 —— 改了内容就要**升版本号**再发,
241
241
  > 否则早装和重装的员工会拿到「同一个版本、两份内容」。
242
242
 
243
+ ### 更新 CRWU(自助更新,0.0.12 起)
244
+
245
+ **在哪看、怎么查**:侧栏底部工作台卡头右侧与面板头部都有那枚**版本徽标**(`dev` / `v0.0.12`);
246
+ 它本身就是更新入口。插件装载后会**静默**做一次后台检查,发现新版本时徽标变成
247
+ `v0.0.12 · 有更新`。点徽标打开更新面板,「检查更新」可以立刻再查一次(绕过缓存)。
248
+
249
+ **怎么装**:面板里点「安装更新」。安装由 DSH 的 Plugin Manager 执行,本插件不自己下载或覆盖插件目录。
250
+ 安装期间面板显示**诚实的离散阶段**(正在连接更新源 / 正在下载安装包 / 正在写入插件目录 / 正在取消…),
251
+ **不显示百分比**;可以随时「取消安装」。**审核任务正在启动或运行时禁止安装**(不动 profile),
252
+ 但**不禁止检查更新**。
253
+
254
+ **装完必须手动重启**:安装完成后界面会说
255
+
256
+ > CRWU v0.0.12 已安装。请完全退出并重新打开 DeepSeek Harness,使新版生效。
257
+
258
+ **macOS 注意**:关闭窗口**不等于**退出应用,请从应用菜单选择「退出」,或按 **Command-Q**;
259
+ 刷新页面同样不等于重启。本插件**不会**修改、也不会替你重启 DeepSeek Harness 桌面端
260
+ (没有"立即重启"按钮,也没有静默更新)。
261
+
262
+ **0.0.10 / 0.0.11 用户(重要)**:那两个版本里**没有**这段自更新代码,所以它们**不会**自动发现
263
+ 0.0.12。请先按下面这条手动装一次,之后(0.0.12 起)的稳定版本才能在界面内检查与安装:
264
+
265
+ ```bash
266
+ # <profile> 换成你实际在用的 DeepSeek Harness profile 名(不要照抄)
267
+ dsh plugin --profile <profile> add dsh-crwu-workbench@0.0.12
268
+ ```
269
+
270
+ 装完**完全退出并重新打开** DeepSeek Harness。
271
+
272
+ **国内网络策略**:检查更新会**同时**查询 npm 官方 registry 与 npmmirror,取合法的更高稳定版本;
273
+ 两个源同版本时优先展示 npmmirror(国内更可能装得上)。安装优先使用 `https://registry.npmmirror.com/`,
274
+ **镜像失败与回退由 Plugin Manager 负责**。镜像与官方 npm 之间**可能存在同步延迟** ——
275
+ 这不是"没有新版本",稍后重新检查即可;官方源已经出现更高版本时,即使镜像暂时落后也能被发现。
276
+ 企业 / 私有 registry 策略照旧生效,本插件**不会**绕过它。
277
+
243
278
  ### 卸载
244
279
 
245
280
  ```bash
@@ -388,6 +423,15 @@ git tag plugin-v0.0.2 && git push origin plugin-v0.0.2
388
423
  (`v*` 留给仓里的 Go CLI,两条发布线分开):先断言
389
424
  **tag 与 `package.json` / `VERSION` 一致**,再跑完整门禁与产物自检,最后发布。
390
425
 
426
+ **当前发布方式(0.0.12 及以后):只走 tag → GitHub Actions → CI 发布,禁止在本机手工 `npm publish`。**
427
+ 推 `plugin-v0.0.12` 这类 tag 时,`release.yml` 会校验 tag 与 `package.json` / `VERSION` 一致,
428
+ 再由 CI 用仓库 Secret `NPM_TOKEN` 执行 `npm publish --provenance`(provenance 来自 GitHub Actions OIDC);
429
+ **Trusted Publishing 尚未启用**,它只是 `docs/releasing.md` §3.3 记录的未来迁移方案。
430
+ 本机只允许 `npm publish --dry-run`(dry-run 不是发布)。
431
+
432
+ 下面这段是 **0.0.10 初次建包时的历史记录**,只用于解释 provenance 的本机限制,
433
+ **不得**照它去发 0.0.12 或任何后续版本(那时包还不存在,才必须在本机建包):
434
+
391
435
  **首次发布(引导)必须在本机做,而且不能带 `--provenance`**(2026-09-28 实测):
392
436
  `--provenance` 只在受支持的 CI(GitHub Actions 的 OIDC)里成立,本机 provider 是 `null`,
393
437
  npm 会直接以 `EUSAGE: Automatic provenance generation not supported for provider: null` 拒绝发布。
@@ -399,7 +443,13 @@ npm run build && npm run check && npm run pack:assert:strict
399
443
  npm publish # 不带 --provenance
400
444
  ```
401
445
 
402
- 首发成功后包就存在了,再到 npm 网页给这个包配 **Trusted Publisher**(repo `mmungdong/crwu-ai`
446
+ **当前真实工作流(0.0.12 仍在用)**:`.github/workflows/release.yml` 读 GitHub Secret
447
+ `NPM_TOKEN`(`NODE_AUTH_TOKEN`),在 tag `plugin-v<版本>` 上执行 `npm publish --provenance` ——
448
+ provenance(构建来源证明)由 GitHub Actions 的 OIDC 在 CI 里产生,**不是**本机发布。
449
+ **Trusted Publishing 目前没有启用**:它只是 `docs/releasing.md` §3.3 记录的**未来可迁移方案**,
450
+ 在真的改完工作流之前,不要把"已采用无 token 发布"当成当前事实。
451
+
452
+ 未来若迁移到 Trusted Publisher(npm 网页给这个包配 repo `mmungdong/crwu-ai`
403
453
  + workflow `release.yml`);之后的版本由 CI 用 **OIDC** 发布 —— 不需要任何长期 token,
404
454
  npm 会**自动**附带 provenance attestation,`NPM_TOKEN` secret 也可以删掉。
405
455
  也可以在 Actions 里用 `workflow_dispatch` 跑一次 dry-run:只打包与校验,不发。