dsh-session-superagent 0.9.61 → 0.9.62
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 +17 -0
- package/README.md +2 -2
- package/client.js +1 -1
- package/lib/gh-format.js +2 -1
- package/lib/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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.62] - 2026-11-02 —— 每一类错误都必须给出"下一步"
|
|
6
|
+
|
|
7
|
+
### 发现
|
|
8
|
+
`classifyGhError` 有 6 类,其中 **`other` 的 hint 是空字符串** ——
|
|
9
|
+
客户碰到一条没归类的错误,面板上只有一句看不懂的原文,**没有任何下一步**。
|
|
10
|
+
另外两条内部错误更糟:直接写 `bad json` / `unexpected payload`(内部术语,无动作)。
|
|
11
|
+
|
|
12
|
+
### 改法
|
|
13
|
+
| 位置 | 原 | 现 |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `classifyGhError` 兜底 | hint 为空 | 「已按退避自动重试;持续出现就跑 watch_doctor 看检查清单,或把这行贴给对方」 |
|
|
16
|
+
| 解析失败 | `bad json` | 「返回内容不是合法 JSON(可能是代理干扰)—— 已自动重试;持续出现请跑 watch_doctor」 |
|
|
17
|
+
| 结构不对 | `unexpected payload` | 「返回的数据结构不对(预期是数组)—— 已自动重试;持续出现请跑 watch_doctor」 |
|
|
18
|
+
|
|
19
|
+
### 测试
|
|
20
|
+
- 新增 1 例:7 个样本(含兜底)都必须有非空 hint 与非空 short;兜底要匹配 `watch_doctor|重试`。合计 **190 例**。
|
|
21
|
+
|
|
5
22
|
## [0.9.61] - 2026-11-02 —— 把客户不认识的行业词换掉(3 处)+ 术语表补 3 条
|
|
6
23
|
|
|
7
24
|
### 学到的(知识库第 103 条)
|
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
|
|
|
@@ -121,7 +121,7 @@ dsh plugin install /path/to/dsh-session-superagent
|
|
|
121
121
|
## 开发
|
|
122
122
|
|
|
123
123
|
```sh
|
|
124
|
-
node --test #
|
|
124
|
+
node --test # 190 项单测
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
### 工具输出:文本给人和 agent,JSON 给程序
|
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.62'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/gh-format.js
CHANGED
|
@@ -32,7 +32,8 @@ export function classifyGhError(detail) {
|
|
|
32
32
|
if (/EOF|i\/o timeout|connection reset|dial tcp|TLS handshake|no such host|proxyconnect|timeout|context deadline exceeded|certificate|x509|self.signed|unable to get local issuer/i.test(text)) {
|
|
33
33
|
return { kind: 'network', short, hint: '(网络抖动:这一轮没连上 GitHub,已按退避自动重试,不需要手动处理)' }
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
// 兜底也要给下一步:客户看到一条没归类的错误,最怕「那我该做什么」
|
|
36
|
+
return { kind: 'other', short, hint: '(没归类的错误:已按退避自动重试;持续出现就跑 watch_doctor 看检查清单,或把这行贴给对方)' }
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
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.62'
|
|
44
44
|
export const inject = ['tools', 'agents', 'webServer']
|
|
45
45
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
46
46
|
const DEFAULT_SESSION_WAKES = 12
|
|
@@ -884,8 +884,8 @@ async function pollOnce(ctx, entry, baseMs) {
|
|
|
884
884
|
}
|
|
885
885
|
if (parsed.etag) entry.etag = parsed.etag
|
|
886
886
|
let items
|
|
887
|
-
try { items = JSON.parse(parsed.body) } catch { entry.lastError = '
|
|
888
|
-
if (!Array.isArray(items)) { entry.lastError = '
|
|
887
|
+
try { items = JSON.parse(parsed.body) } catch { entry.lastError = '返回内容不是合法 JSON(可能是代理干扰)—— 已按退避自动重试;持续出现请跑 watch_doctor'; bumpFailure(entry, baseMs); return }
|
|
888
|
+
if (!Array.isArray(items)) { entry.lastError = '返回的数据结构不对(预期是数组)—— 已按退避自动重试;持续出现请跑 watch_doctor'; bumpFailure(entry, baseMs); return }
|
|
889
889
|
|
|
890
890
|
entry.lastError = null
|
|
891
891
|
entry.consecutiveFailures = 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.62",
|
|
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",
|