dsh-session-superagent 0.8.86 → 0.8.88
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 +44 -0
- package/MAINTENANCE.md +1 -1
- package/README.md +3 -3
- package/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,50 @@
|
|
|
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.8.88] - 2026-11-02 —— 契约快照:数量对,形状也要对
|
|
6
|
+
|
|
7
|
+
### 学到的(知识库第 37 条)
|
|
8
|
+
Node 有 Snapshot testing 一节,但本机 `assert.snapshot` 是 `undefined`(`t.assert.snapshot` 属实验 API),
|
|
9
|
+
**所以没用它** —— 改用最朴素的「JSON fixture + deepEqual」,即 approval testing。
|
|
10
|
+
|
|
11
|
+
### 为什么需要
|
|
12
|
+
0.8.87 的挂载冒烟只验**数量**(8 路由 / 7 工具)。路由改名、工具少一个参数时,数量仍可能是 8/7,
|
|
13
|
+
但客户调用会**全废**。数量和形状是两件事。
|
|
14
|
+
|
|
15
|
+
### 改了什么
|
|
16
|
+
- `scripts/contract.mjs`:假 ctx → 真 `apply()` → 抽出 `{version, inject, tools[{name,params,required}], routes}`;
|
|
17
|
+
- `test/fixtures/contract.json` 存快照;`test/contract-shape.test.mjs` 每次 deepEqual;
|
|
18
|
+
- 只记**参数名**不记描述文案 —— 改文案不该红。
|
|
19
|
+
- 改形状必须 `node scripts/contract.mjs --update` 并在 CHANGELOG 说明。
|
|
20
|
+
|
|
21
|
+
### 负例验证(重要)
|
|
22
|
+
故意把 `github` 的 params 改成只剩 `path` → 测试**立刻红**;`--update` 后恢复绿。
|
|
23
|
+
|
|
24
|
+
### 当轮修正的一处设计错误
|
|
25
|
+
第一版把 `version` 也写进快照 —— 结果每次发版都必须手工 `--update`,纯摩擦。
|
|
26
|
+
已移除(版本由 meta 测试守)。**"测试不该逼人做无意义的操作"** 也是设计标准之一。
|
|
27
|
+
|
|
28
|
+
### 测试
|
|
29
|
+
- 新增 1 例,合计 **135 例**。
|
|
30
|
+
|
|
31
|
+
## [0.8.87] - 2026-11-02 —— 离线挂载冒烟:下次重启前先证明"挂得上去"
|
|
32
|
+
|
|
33
|
+
### 为什么这轮做这个(知识库第 36 条)
|
|
34
|
+
线上 `/state` 的 `serverVersion` 还是 **0.8.38**,仓库已 0.8.87 —— 下次重启会一口气跳 49 个版本。
|
|
35
|
+
一次性跨越这么多改动,最该担心的不是某条逻辑,而是**能不能挂上去**:
|
|
36
|
+
新增文件没同步进 profile、路由撞车、import 写错,任何一种都会让整块功能消失,
|
|
37
|
+
而真机上只表现为「面板空白 / 工具不见了」。
|
|
38
|
+
|
|
39
|
+
### 改了什么
|
|
40
|
+
`scripts/smoke-mount.mjs`:造假 ctx → 真 `import` + `apply(ctx)` → 断言 8 条路由一条不少、工具 > 0、无异常。
|
|
41
|
+
```
|
|
42
|
+
挂载冒烟 OK:0.8.87,工具 7 个(watch_ack,watch_doctor,github,repo_here,watch_start,watch_status,watch_stop),路由 8 条
|
|
43
|
+
```
|
|
44
|
+
已接入 `preflight`(第 9 项检查),每次推送前都会守一次。
|
|
45
|
+
|
|
46
|
+
### 测试
|
|
47
|
+
- `preflight --fast` 现在 9 项检查,全绿;单测仍 134 例。
|
|
48
|
+
|
|
5
49
|
## [0.8.86] - 2026-11-02 —— SSE 可行性量完了:不改(并发现线上落后 47 个版本)
|
|
6
50
|
|
|
7
51
|
### 学到的(知识库第 35 条)
|
package/MAINTENANCE.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## 二、当前状态(2026-11-01)
|
|
11
11
|
|
|
12
|
-
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test`
|
|
12
|
+
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test` 135/135 通过
|
|
13
13
|
- [x] 自回声抑制(逐条水位)
|
|
14
14
|
- [x] 仅空闲注入(避免草稿回放)
|
|
15
15
|
- [x] 唤醒失败不推进水位
|
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
|
|
|
@@ -99,7 +99,7 @@ dsh plugin install /path/to/dsh-session-superagent
|
|
|
99
99
|
## 开发
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
|
-
node --test #
|
|
102
|
+
node --test # 135 项单测
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
版本与发布流程见 [UPDATING.md](UPDATING.md),交付门见 [CHECKLIST.md](CHECKLIST.md),接手台账见 [MAINTENANCE.md](MAINTENANCE.md)。
|
|
@@ -138,7 +138,7 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
|
|
|
138
138
|
```bash
|
|
139
139
|
node --test # 103 例单测
|
|
140
140
|
node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
|
|
141
|
-
node scripts/preflight.mjs #
|
|
141
|
+
node scripts/preflight.mjs # 9 项门禁(含上面两条,外加 profile 一致性、路由面、包内容)
|
|
142
142
|
node scripts/render-preview.mjs preview.html # 双主题静态预览,直接浏览器打开
|
|
143
143
|
```
|
|
144
144
|
|
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.8.
|
|
17
|
+
const CLIENT_VERSION = '0.8.88'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
|
|
31
31
|
export const name = 'dsh-session-superagent'
|
|
32
32
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
33
|
-
export const SERVER_VERSION = '0.8.
|
|
33
|
+
export const SERVER_VERSION = '0.8.88'
|
|
34
34
|
export const inject = ['tools', 'agents', 'webServer']
|
|
35
35
|
|
|
36
36
|
/** 仅供测试:读写状态文件(生产代码不要用)。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.88",
|
|
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",
|