dsh-session-superagent 0.9.18 → 0.9.19
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 +26 -0
- package/README.md +3 -2
- package/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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.19] - 2026-11-02 —— 离线跑一小时:限流/合并/去重没有互相打架
|
|
6
|
+
|
|
7
|
+
### 学到的(知识库第 68 条)
|
|
8
|
+
单点行为能单测,**时间维度**(滑动窗口、冷却、合并、节流)只能压缩时间模拟。
|
|
9
|
+
新增 `scripts/simulate-hour.mjs`,用**真实的纯函数**跑事件序列。
|
|
10
|
+
|
|
11
|
+
### 实测(3 仓库 / 30 秒一轮 / 每仓库每小时 10 条 / 上限 6+12)
|
|
12
|
+
```
|
|
13
|
+
轮询次数 361
|
|
14
|
+
实际唤醒次数 12
|
|
15
|
+
被单守上限挡住 0 次
|
|
16
|
+
被会话上限挡住 241 次
|
|
17
|
+
合并成消息 6 条(含 12 份唤醒)
|
|
18
|
+
上报条目数 12 / 共 30
|
|
19
|
+
PASS 限流/合并/去重没有互相打架
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
三点被证实:① 会话上限精确压住 12 次,无超额;② 合并真的生效(12 次唤醒 → 6 条消息);
|
|
23
|
+
③ **默认上限对 3 个活跃仓库偏紧** —— 一小时能处理 12 条,剩 18 条等下一小时。
|
|
24
|
+
第 3 点不是 bug,但以前没有数字,现在有了,已写进 README「已知限制」。
|
|
25
|
+
|
|
26
|
+
### 模拟器自身的坑(值得记)
|
|
27
|
+
第一版用"相位取模"决定谁轮询:相位 7 秒、间隔 30 秒时**永远不会命中** ——
|
|
28
|
+
只有第一个仓库在跑,指标全错。改成"三个守的时刻合并成一条事件序列"才对。
|
|
29
|
+
**模拟器本身也是被测对象**:现在脚本会打印每次唤醒(`SIM_DEBUG=1`)。
|
|
30
|
+
|
|
5
31
|
## [0.9.18] - 2026-11-02 —— 知识库索引重排:66 行扁平表 → 9 个板块
|
|
6
32
|
|
|
7
33
|
### 学到的(知识库第 67 条)
|
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
|
|
|
@@ -104,7 +104,8 @@ dsh plugin install /path/to/dsh-session-superagent
|
|
|
104
104
|
- **服务端改动要重启宿主才生效**(客户端热重载会生效,别被"界面上有新功能"骗了;
|
|
105
105
|
面板顶部会在版本不一致时直接提示)。
|
|
106
106
|
- 每小时唤醒上限是**滑动窗口**:6 次若集中在开头几分钟,下一次要等约 1 小时
|
|
107
|
-
(面板会写「约 X
|
|
107
|
+
(面板会写「约 X 分钟后可再唤醒」)。默认上限下,**会话级 12 次/小时**:
|
|
108
|
+
守 3 个活跃仓库时约能处理 12 条/小时,其余攒到下一小时(离线模拟实测,见 docs/kb)。
|
|
108
109
|
- 隔离执行会在仓库下留 `.dsh-zhuli/` 副本:默认**最多 5 个**、超 3 天回收;
|
|
109
110
|
副本体积≈该仓库工作树大小。
|
|
110
111
|
|
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.19'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
|
|
33
33
|
export const name = 'dsh-session-superagent'
|
|
34
34
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
35
|
-
export const SERVER_VERSION = '0.9.
|
|
35
|
+
export const SERVER_VERSION = '0.9.19'
|
|
36
36
|
export const inject = ['tools', 'agents', 'webServer']
|
|
37
37
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
38
38
|
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.19",
|
|
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",
|