dsh-session-superagent 0.8.72 → 0.8.73

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,31 @@
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.73] - 2026-11-02 —— 主轮询要不要换 GraphQL:测完结论是**不换**(并留下基准脚本)
6
+
7
+ ### 学到/测到的(知识库第 22 条)
8
+ 新增可复现基准 `node scripts/bench-api.mjs owner/name`,实测:
9
+
10
+ | 场景 | REST(我们现在的) | GraphQL |
11
+ |---|---|---|
12
+ | 小仓库 20 条 | 769ms / 13.9 KB | 709ms / 1.0 KB |
13
+ | 大仓库 20 条 | 1418ms / 113 KB | 1067ms / 6.9 KB |
14
+ | 取 3 条最后评论 | 逐条 1786ms | 批量 439ms |
15
+
16
+ ### 为什么**不**换主路径
17
+ 1. 我们已经用 **ETag**:没变化时整轮 304,**零解析零传输**。GraphQL 没有等价用法,
18
+ 换过去等于把"大多数轮次几乎免费"变成"每轮都拉一遍"——净亏。
19
+ 2. GraphQL 的优势只在"确实有变化"时兑现,而那时我们的评论请求已在 0.8.72 批量化了(快 4 倍)。
20
+ 3. 主路径是核心,收益要靠侧证;**侧证不支持就不动**。
21
+
22
+ ### 顺带证伪一个"想当然"
23
+ "用 `state=open` 代替 `state=all` 能减小响应" —— 实测同仓库同 20 条:
24
+ `all` **113,895 字节** vs `open` **130,274 字节**(反而更大)。所以这条优化不做。
25
+
26
+ ### 本版改动
27
+ - 新增 `scripts/bench-api.mjs`(这只是量具,不改变运行时行为);
28
+ - 版本号/文档同步。**没有改主轮询逻辑 —— 这是有意识的选择。**
29
+
5
30
  ## [0.8.72] - 2026-11-02 —— 取「最后评论」改成一次 GraphQL 批量
6
31
 
7
32
  ### 学到的(知识库第 21 条)
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.8.72-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.8.73-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.8.72'
17
+ const CLIENT_VERSION = '0.8.73'
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.72'
33
+ export const SERVER_VERSION = '0.8.73'
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.72",
3
+ "version": "0.8.73",
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",