dsh-session-superagent 0.9.44 → 0.9.45

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
@@ -2,6 +2,28 @@
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.45] - 2026-11-02 —— README 写着 136 项单测,实际 181(现在会自动报错)
6
+
7
+ ### 学到的(知识库第 92 条)
8
+ 散文里的数字最容易过期:结构性内容有人维护,顺带提的数字没人看。
9
+
10
+ ### 发现
11
+ README「开发」小节写着 `node --test # 136 项单测` —— 实际 **181 项**,
12
+ 跨了四十多个版本没人发现(谁加用例都不会想起改 README 注释)。
13
+
14
+ ### 改法
15
+ `preflight` 跑完 `node --test` 后顺手比对 README 里的数字:
16
+ ```
17
+ FAIL README 单测数 README 写 136,实际 181(改 README)
18
+ ```
19
+ 改成 181 后 → `PASS README 单测数 README 写 181,实际 181`。
20
+
21
+ 顺带把这个数字同时当作"用例数只增不减"的哨兵:数字变小也会立刻暴露。
22
+
23
+ ### 顺带补的对外契约
24
+ README 新增「工具输出」小节:三个只读工具的 `format: 'json'` 形态与 `schemaVersion: 1`;
25
+ `docs/规则对照表.md` 加一行(协议类约定也进对照表)。
26
+
5
27
  ## [0.9.44] - 2026-11-02 —— 三个只读工具口径统一:都支持 `format=json` + `schemaVersion`
6
28
 
7
29
  ### 做了什么
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: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Version](https://img.shields.io/badge/version-0.9.44-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.45-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
7
7
  [![npm](https://img.shields.io/npm/v/dsh-session-superagent.svg)](https://www.npmjs.com/package/dsh-session-superagent)
8
8
  [![dsh](https://img.shields.io/badge/DeepSeek%20Harness-plugin-orange.svg)](https://github.com/topics/dsh-plugin)
9
9
 
@@ -121,9 +121,21 @@ dsh plugin install /path/to/dsh-session-superagent
121
121
  ## 开发
122
122
 
123
123
  ```sh
124
- node --test # 136 项单测
124
+ node --test # 181 项单测
125
125
  ```
126
126
 
127
+ ### 工具输出:文本给人和 agent,JSON 给程序
128
+
129
+ 三个只读工具都支持 `format: 'json'`,返回带 `schemaVersion` 的对象:
130
+
131
+ | 工具 | 文本(默认) | `format: 'json'` |
132
+ |---|---|---|
133
+ | `watch_status` | 每条守一行 + 会话用量行 | `{ schemaVersion, session, watchers[] }` |
134
+ | `watch_doctor` | `OK/WARN/FAIL` 检查清单 | `{ schemaVersion, checks[{status,text}] }` |
135
+ | `watch_trace` | 单条条目的追溯文字 | `{ schemaVersion, number, results[] }`(错误时 `{ schemaVersion, error }`) |
136
+
137
+ `schemaVersion` 现在是 `1`;**字段语义一变就会加这个数**,程序可以据此决定要不要重新解析。
138
+
127
139
  版本与发布流程见 [UPDATING.md](UPDATING.md),交付门见 [CHECKLIST.md](CHECKLIST.md),接手台账见 [MAINTENANCE.md](MAINTENANCE.md)。
128
140
 
129
141
  ## 客户(Customer)
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.44'
17
+ const CLIENT_VERSION = '0.9.45'
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.44'
43
+ export const SERVER_VERSION = '0.9.45'
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.44",
3
+ "version": "0.9.45",
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",