dsh-sweeper 1.4.0 → 1.4.2

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.
Files changed (2) hide show
  1. package/README.md +36 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,15 +12,15 @@
12
12
 
13
13
  **扫描结果**:两档分开,无脑删一键清理,其余逐项勾选。
14
14
 
15
- ![扫描结果:两档候选、真实路径与模型给出的原因](docs/store/scan.png)
15
+ ![扫描结果:两档候选、真实路径与模型给出的原因](https://raw.githubusercontent.com/Dushiqi1987/dsh-sweeper/HEAD/docs/store/scan.png)
16
16
 
17
17
  **模型复核**:一次调用给整份清单评档,清单外还发现的新候选也在这里。
18
18
 
19
- ![模型复核:模型逐条给判定,有疑问的直接反问你](docs/store/model-review.png)
19
+ ![模型复核:模型逐条给判定,有疑问的直接反问你](https://raw.githubusercontent.com/Dushiqi1987/dsh-sweeper/HEAD/docs/store/model-review.png)
20
20
 
21
21
  **深度清理**:把某段对话的摘要发给你的模型,让它按上下文判断哪些文件已经没用了。
22
22
 
23
- ![深度清理:按对话问模型,谁先返回先显示](docs/store/deep-sweep.png)
23
+ ![深度清理:按对话问模型,谁先返回先显示](https://raw.githubusercontent.com/Dushiqi1987/dsh-sweeper/HEAD/docs/store/deep-sweep.png)
24
24
 
25
25
  这三张由 `test/browser/` 的回放页在无头 Chrome 里渲染真实抓包得到;
26
26
  `test/screenshots.mjs` 保证 `screenshots.json` 里的路径都存在、都是横版 PNG —— 商店那排图是它读的。
@@ -32,8 +32,39 @@
32
32
  dsh plugin add https://github.com/Dushiqi1987/dsh-sweeper/releases/latest/download/dsh-sweeper.tgz
33
33
  ```
34
34
 
35
- 发布到 npm 之后也可以直接 `dsh plugin add dsh-sweeper`(npm 包同时喂给官方
36
- `dsh-plugin-catalog` 索引,插件商店里搜得到、显示版本号)。
35
+ 也可以直接从 npm 装:
36
+
37
+ ```bash
38
+ dsh plugin add dsh-sweeper
39
+ ```
40
+
41
+ npm 上这个包喂给官方 `dsh-plugin-catalog` 索引,插件商店里因此能显示版本号;
42
+ Release 与 npm 的内容一致,选哪条都行。
43
+
44
+ ### 发版
45
+
46
+ 发版是自动的:在 Actions 里跑 **release**(`gh workflow run release -f bump=patch`),
47
+ 它会跑完整测试、bump 版本、打 tag、发 GitHub Release,随后 **publish** 把这一版
48
+ 送到 npm。想先确认会发生什么,加 `-f dry_run=true`:只跑测试并打印新版本号,
49
+ 不打 tag、不发 Release。
50
+
51
+ npm 那边用**受信任发布(trusted publishing)**,不需要在仓库里存 token,也不
52
+ 需要每次人工批准:发布时 GitHub Actions 用 OIDC 向 npm 换一张短期凭证,npm 据此
53
+ 签发 provenance。一次性配置在 npmjs.com:**package → Settings → Trusted
54
+ publishing → Add publisher → GitHub Actions**,填
55
+
56
+ | 字段 | 值 |
57
+ | --- | --- |
58
+ | Organization or user | `Dushiqi1987` |
59
+ | Repository | `dsh-sweeper` |
60
+ | Workflow filename | `publish.yml` |
61
+ | Environment | 留空 |
62
+ | Allowed actions | `npm publish` |
63
+
64
+ 配好之后每次 Release 都直接进 npm。没配也不要紧:`publish` 会先看仓库里有没有
65
+ `NPM_TOKEN` secret,有就用 token 发,没有就走 OIDC,两者都不可用时这一步**故意
66
+ 失败**——一个悄悄没进 npm 的 Release 比一条红色流水线更难发现。
67
+
37
68
 
38
69
  ## 怎么用
39
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sweeper",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "description": "清理对话留下的临时文件与垃圾,释放磁盘空间;只报告,清理进回收站可恢复 (cleanup junk files conversations leave on disk, free up space)",
6
6
  "keywords": [