dsh-session-superagent 0.9.241 → 0.9.242
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 +52 -0
- package/README.md +37 -3
- package/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.9.242] - 2026-11-05 —— 全新客户的第一个 5 分钟
|
|
6
|
+
|
|
7
|
+
T35 走了一遍「从零装这个插件」:**没有任何代码缺陷会挡住安装**,3 条必须修全是文档与可发现性。
|
|
8
|
+
|
|
9
|
+
### ① README 让客户跑一个客户机上不存在的命令
|
|
10
|
+
|
|
11
|
+
`README.md:214` 的症状是「面板空白、`watch_*` 消失」—— 而这正是最需要帮助的时候。
|
|
12
|
+
它给的解法是 `pnpm run sync:profile`,可 `scripts/` **不随 npm 包发布**,客户跑只会得到
|
|
13
|
+
`Cannot find module`。
|
|
14
|
+
|
|
15
|
+
已改成按身份分开:
|
|
16
|
+
|
|
17
|
+
| 你是谁 | 怎么办 |
|
|
18
|
+
|---|---|
|
|
19
|
+
| **客户**(npm 装的) | 重新 `dsh plugin --profile <p> add dsh-session-superagent` 一次(幂等,会补全所有文件) |
|
|
20
|
+
| **开发者**(`file:` 装的本仓库) | `pnpm run sync:profile` |
|
|
21
|
+
|
|
22
|
+
「验收」那一节也加了同样说明 —— 那 11 条 `npm run *` 都是开发者脚本。
|
|
23
|
+
|
|
24
|
+
### ② 全文没有卸载 / 回滚
|
|
25
|
+
|
|
26
|
+
补了「卸载与回滚」一节,含**残留物清单**:
|
|
27
|
+
|
|
28
|
+
| 残留 | 位置 | 要不要删 |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| 状态与凭证 | `~/.dsh/state/session-superagent/`(**含明文 `secrets.json`**) | **要删** |
|
|
31
|
+
| 隔离工作区 | 各仓库 `.dsh-zhuli/` | 确认无未提交内容后删 |
|
|
32
|
+
| git 排除项 | `.git/info/exclude` 一行 | 可留 |
|
|
33
|
+
| 仓库标签 | `主理鱼:已处理` | 可留 |
|
|
34
|
+
|
|
35
|
+
以及回滚命令和一句要紧的话:**回滚不会回滚状态文件**。
|
|
36
|
+
|
|
37
|
+
### ③ 装完没有客户能跑的自检命令
|
|
38
|
+
|
|
39
|
+
`watch_doctor` 是模型工具 —— 只有插件**已经挂载**时才存在,拿它证明「装好了」是循环论证。
|
|
40
|
+
|
|
41
|
+
报告里这条列为「必须修」,但真正的解法是**加一个 `bin`**,那要改包结构、要想清楚它在没装宿主时的行为,
|
|
42
|
+
不是一轮能安全做完的 —— **登记为下一轮**。README 里先给了三条客户真能用的自查路径。
|
|
43
|
+
|
|
44
|
+
### ④ 顺带
|
|
45
|
+
|
|
46
|
+
- 仓库根上两个垃圾文件(`--help` 214KB、`--only=设置(来源)` 53KB,`08caeb8` 误提交)已删 —— 它们没进 npm 包,但在 git 里;
|
|
47
|
+
- `scripts/audit-pack.mjs` 的必需清单里 `'LICENSE',,` 双逗号造了个数组空洞,已修。
|
|
48
|
+
|
|
49
|
+
### 证据
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
npm test → 381/381
|
|
53
|
+
check-docs → 5 项 PASS
|
|
54
|
+
audit-pack → 12 个文件 PASS
|
|
55
|
+
```
|
|
56
|
+
|
|
5
57
|
## [0.9.241] - 2026-11-05 —— 知识库里会过期的数字
|
|
6
58
|
|
|
7
59
|
### 问题
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="assets/icon-180.png" width="88" height="88" alt="">
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
[](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|
|
@@ -197,6 +197,14 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
|
|
|
197
197
|
|
|
198
198
|
## 验收(不用装宿主也能跑)
|
|
199
199
|
|
|
200
|
+
> **这一节是给开发者的。** 下面这些脚本在 `scripts/` 里,**npm 包不包含它们** ——
|
|
201
|
+
> 从 npm 装插件的客户跑不了(会得到 `Cannot find module`)。客户自查请用:
|
|
202
|
+
> 面板顶部是否出现「主理鱼」、`/state` 是否 200、或让 agent 调 `watch_doctor`。
|
|
203
|
+
>
|
|
204
|
+
> 想跑这些:克隆仓库后 `pnpm install`。
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
200
208
|
```bash
|
|
201
209
|
npm test # 381 项单测(带离线开关,约 1.6 秒)
|
|
202
210
|
node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
|
|
@@ -211,8 +219,8 @@ node scripts/render-preview.mjs preview.html # 双主题静态预览,直接
|
|
|
211
219
|
|
|
212
220
|
| 症状 | 原因 | 处理 |
|
|
213
221
|
|---|---|---|
|
|
214
|
-
| 面板空白、`watch_*` 工具消失、`/session-superagent/*` 全 404 |
|
|
215
|
-
| 改了代码但线上行为没变 | 硬链接断了 —— **原子写、`git checkout/restore`、某些编辑器的保存**都会换 inode,profile 里还是旧文件 |
|
|
222
|
+
| 面板空白、`watch_*` 工具消失、`/session-superagent/*` 全 404 | 插件没被宿主加载(最常见是 npm 安装的副本损坏,或 `file:` 安装后仓库里新增的 `lib/*.js` 没进 profile) | **客户**:重新 `dsh plugin --profile <p> add dsh-session-superagent` 一次(幂等,会补全所有文件),然后重载。**开发者**(`file:` 装的本仓库):跑 `pnpm run sync:profile` |
|
|
223
|
+
| 改了代码但线上行为没变 | 硬链接断了 —— **原子写、`git checkout/restore`、某些编辑器的保存**都会换 inode,profile 里还是旧文件 | **开发者**:`pnpm run sync:profile:check` 看漂移、`sync:profile:repair` 修。**客户**(npm 装的):重新 `add` 一次 |
|
|
216
224
|
| 轮询报 `cannot get required service "agents" in inactive context` | 0.8.21 之前的 bug:定时器里直接读 `ctx.agents` | 升级到 ≥0.8.21 |
|
|
217
225
|
| 绑定的会话已删除,watcher 还在打 GitHub | 0.8.14 之前的 bug:该类失败没进退避 | 升级到 ≥0.8.14(0.8.22 起未预期异常也会退避) |
|
|
218
226
|
| `npm i dsh-session-superagent@<新版本>` 报 `ETARGET` | 刚发布,npm 客户端元数据缓存还没刷新 | 等 1-2 分钟,或 `npm i <tarball URL>` / `--prefer-online` |
|
|
@@ -228,6 +236,32 @@ node scripts/render-preview.mjs preview.html # 双主题静态预览,直接
|
|
|
228
236
|
|
|
229
237
|
`pnpm run preflight` 一条命令可自查:单测、语法、profile 一致性、版本一致、路由面、包内容、冒烟。
|
|
230
238
|
|
|
239
|
+
## 卸载与回滚
|
|
240
|
+
|
|
241
|
+
**卸插件**(一条命令):
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
dsh plugin --profile <p> remove dsh-session-superagent
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**插件留下的东西**(卸插件**不会**自动清,想彻底干净就照下面逐项删):
|
|
248
|
+
|
|
249
|
+
| 残留 | 位置 | 里面有什么 | 要不要删 |
|
|
250
|
+
|---|---|---|---|
|
|
251
|
+
| 状态与凭证 | `~/.dsh/state/session-superagent/` | `watchers.json`(你配的每条主理鱼)、**`secrets.json`(面板里填的 token / Gitee 令牌 / gh 目录)** | **要删** —— 里面是明文凭证 |
|
|
252
|
+
| 隔离工作区 | 各仓库下的 `.dsh-zhuli/` | 每次唤醒开的 worktree(用完该自己回收,异常时可能留下) | 确认没有未提交内容后删 |
|
|
253
|
+
| git 排除项 | 各仓库 `.git/info/exclude` 里的一行 `.dsh-zhuli/` | 我们加的一条忽略规则 | 可留可删(不影响功能) |
|
|
254
|
+
| 仓库标签 | 被主理过的 GitHub 仓库上的 `主理鱼:已处理` | 我们打的 ack 标签 | 可留(就是普通标签) |
|
|
255
|
+
|
|
256
|
+
**回滚到旧版本**:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
dsh plugin --profile <p> add dsh-session-superagent@0.9.160 # 换成你要的版本
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
回滚**不会**回滚状态文件 —— 新版本写过的字段旧版本可能不认(会当未知字段忽略,一般不致命)。
|
|
263
|
+
真出问题就删掉 `~/.dsh/state/session-superagent/watchers.json` 重新配(**删之前先抄一份**)。
|
|
264
|
+
|
|
231
265
|
## 许可
|
|
232
266
|
|
|
233
267
|
MIT,见 [LICENSE](LICENSE)。
|
package/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
const { useCallback, useEffect, useRef, useState } = React
|
|
15
15
|
|
|
16
16
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
17
|
-
const CLIENT_VERSION = '0.9.
|
|
17
|
+
const CLIENT_VERSION = '0.9.242'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
|
|
45
45
|
export const name = 'dsh-session-superagent'
|
|
46
46
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
47
|
-
export const SERVER_VERSION = '0.9.
|
|
47
|
+
export const SERVER_VERSION = '0.9.242'
|
|
48
48
|
export const inject = ['tools', 'agents', 'webServer']
|
|
49
49
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
50
50
|
// 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.242",
|
|
4
4
|
"description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|