dsh-session-superagent 0.9.209 → 0.9.210

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,48 @@
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.210] - 2026-11-05 —— 知识库一致性审计:8 篇「还没做的」早就做完了
6
+
7
+ ### ① 知识库条目过期(T21 报的 8 条「必须改」)
8
+
9
+ `docs/kb/` 有 182 篇,**从来没有被整体复查过**。门禁只查「索引篇数对不对得上」这类结构问题,
10
+ 于是出现了这种情况:条目里写着「还没做的:xxx」,而 xxx 在后续版本里已经做掉了 —— **没人回头删**。
11
+
12
+ | 条目 | 它说 | 代码实际 |
13
+ |---|---|---|
14
+ | `github-conditional-requests` | `x-poll-interval` 还没读 | 已读(`gh-format.js:225`) |
15
+ | `measure-before-trimming` | `/state` 没有 ETag/304 | 有(`index.js:1772`) |
16
+ | `triage-signal-table` | `stale` 权重 0 | `weight: 2` + `score += 2` |
17
+ | `show-saturation` | `capped` 靠匹配文案 | 用原因码 |
18
+ | `repo-permissions` / `repo-structure` | 还没有能力徽章 | `client.js:1258` 已渲染 |
19
+ | `archived-repo` | 徽章只读不可点 | 可点筛选 |
20
+ | `pr-blocked-state` | 没取 CI 状态 | 已取 |
21
+
22
+ **这不是文档小毛病**:一个「还没做」会让下一个接手的人重做一遍已经做过的事。
23
+
24
+ ### ② 数字漂移 17 行
25
+
26
+ 最严重的几处:`why-not-split-index` 说 index.js **1795 行**(实际 2877);
27
+ 对比度基线 **34/32**(实际 16/13);单行长度 **102**(实际 108);`preflight`「第 N 项」**20 处全部失效**
28
+ (脚本不打印序号,插入即错位)。
29
+
30
+ ### ③ 顺带清掉两处代码粗糙
31
+
32
+ - `lib/index.js` 里一个**从没用过**的 `const limit`(死代码);
33
+ - 紧邻的 `splitBatch(..., || 3, ...)` 兜底值与创建时的 `batchLimit=5` **口径分裂** —— 统一成 5。
34
+
35
+ ### ④ CI 红了一条:GBK 用例在无 ICU 的 Node 上会挂
36
+
37
+ `new TextDecoder('gbk')` 在 small-icu 构建里**不支持**(CI 的 Linux Node 就是)。
38
+ `decodeBody` 的回退分支按设计会退回 UTF-8,于是那条断言在 CI 上必红。
39
+ 现在按环境跳过(`skip` 带原因),本机(有 gbk)仍然真跑。
40
+
41
+ ### 证据
42
+
43
+ ```
44
+ node --test → 363/363
45
+ ```
46
+
5
47
  ## [0.9.209] - 2026-11-05 —— 把「最会丢消息」的那段抽成纯函数并钉上测试
6
48
 
7
49
  ### ① 那段代码恰好是 171 行、0 覆盖里最危险的 40 行
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.209-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.210-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
 
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.209'
17
+ const CLIENT_VERSION = '0.9.210'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
package/lib/index.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
 
44
44
  export const name = 'dsh-session-superagent'
45
45
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
46
- export const SERVER_VERSION = '0.9.209'
46
+ export const SERVER_VERSION = '0.9.210'
47
47
  export const inject = ['tools', 'agents', 'webServer']
48
48
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
49
49
  // 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
@@ -1350,8 +1350,10 @@ async function pollWithItems(ctx, entry, baseMs, parsed) {
1350
1350
  }
1351
1351
 
1352
1352
  // 条目不丢:水位照常全部前移,消息里只铺开前 N 条,其余给编号
1353
- const limit = Math.max(1, Number(entry.batchLimit) || 5)
1354
- const { listed, rest } = splitBatch(fresh, Number(entry.batchLimit) || 3, entry.priorityOrder || entry.priority)
1353
+ // 审核 T21:这里原来有个从没用过的 const limit(死代码),且兜底值写成 || 3,
1354
+ // 与创建时的 batchLimit=5 口径分裂。统一成 5,并删掉死变量。
1355
+ const batchLimit = Math.max(1, Number(entry.batchLimit) || 5)
1356
+ const { listed, rest } = splitBatch(fresh, batchLimit, entry.priorityOrder || entry.priority)
1355
1357
  // 暂停/删除可能发生在这一轮轮询期间:以盘上为准
1356
1358
  const liveEntry = (readState().watchers || {})[entry.id]
1357
1359
  if (!liveEntry || !isEnabled(liveEntry)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.209",
3
+ "version": "0.9.210",
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",