dsh-session-superagent 0.9.48 → 0.9.50
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 +32 -0
- package/README.md +1 -1
- package/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
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.50] - 2026-11-02 —— 验收清单:每项门禁都能解释"防什么"
|
|
6
|
+
|
|
7
|
+
### 学到的(知识库第 96 条)
|
|
8
|
+
不可解释的门禁等于没有门禁 —— 红了没人知道该不该急。
|
|
9
|
+
|
|
10
|
+
### 做了什么
|
|
11
|
+
`scripts/render-acceptance.mjs` 生成 `docs/验收清单.md`(23 行):
|
|
12
|
+
每一项 preflight 检查配一行"防止什么 + 证据(真实事故或 KB 条目)"。
|
|
13
|
+
**每个 `record(...)` 都必须在 `WHY` 表里有解释**,否则 `--check` 直接 FAIL。
|
|
14
|
+
|
|
15
|
+
### 一次自我指涉
|
|
16
|
+
接进 preflight 后它立刻红:`FAIL 这些检查没有解释:验收清单` ——
|
|
17
|
+
**新加的检查自己没写解释**。补上后 21 项全绿。
|
|
18
|
+
判据生效的样子就是这样:任何门禁都不能例外,包括守门禁的那条。
|
|
19
|
+
|
|
20
|
+
## [0.9.49] - 2026-11-02 —— 条件断言普查:15 个测试文件里抓到 1 处真的
|
|
21
|
+
|
|
22
|
+
### 学到的(知识库第 95 条)
|
|
23
|
+
这类 smell 没有可靠静态规则(两分支都断言是正常的),工具只能**列出来给人看**。
|
|
24
|
+
|
|
25
|
+
### 脚本
|
|
26
|
+
`scripts/audit-conditional-asserts.mjs` 扫三类形态:`if(){…assert…}` 多行、`if(…) assert` 单行、
|
|
27
|
+
`if(…)` 换行后无花括号。**故意不接进 preflight** —— 正常分支也会被列出,接成门禁只会制造噪音。
|
|
28
|
+
|
|
29
|
+
### 普查结果(15 个测试文件,2 处)
|
|
30
|
+
| 位置 | 判定 |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `meta.test.mjs:66` | 正常(while 里的转义分支,断言在循环外) |
|
|
33
|
+
| `watch.test.mjs:405` | **真问题**:`if (hintPart) assert…` —— 'other' 那一档等于没检查 |
|
|
34
|
+
|
|
35
|
+
修法:两分支都断言(`hintPart` 为空时断言 hint 必须为空)。77 例仍全过,但那一档从"没检查"变成"必须不给提示"。
|
|
36
|
+
|
|
5
37
|
## [0.9.48] - 2026-11-02 —— 契约从测试目录搬进文档:`docs/json-契约.md`
|
|
6
38
|
|
|
7
39
|
### 学到的(延续知识库第 93 条)
|
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
|
|
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.50'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
|
|
41
41
|
export const name = 'dsh-session-superagent'
|
|
42
42
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
43
|
-
export const SERVER_VERSION = '0.9.
|
|
43
|
+
export const SERVER_VERSION = '0.9.50'
|
|
44
44
|
export const inject = ['tools', 'agents', 'webServer']
|
|
45
45
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
46
46
|
const DEFAULT_SESSION_WAKES = 12
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.50",
|
|
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",
|