@suifei/dsh-ai-team 0.4.68 → 0.4.69
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 +21 -0
- package/index.js +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.69 - 2026-11-12
|
|
4
|
+
|
|
5
|
+
**`NOT_RESUMABLE` 根因确诊:成员会话的写句柄从未释放**
|
|
6
|
+
|
|
7
|
+
用 0.4.66 的 cause 字段抓到了真话:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{"ev":"wake.fail","code":"NOT_RESUMABLE",
|
|
11
|
+
"message":"subagent \"330442f7-…\" is unavailable",
|
|
12
|
+
"cause":"session \"330442f7-…\" is already owned by an active write handle"}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
链路:成员回合结束 → `sessions.get(childId)` 取不到会话 → 走冷恢复 → persistence 发现该会话**仍被一个活跃写句柄占用**,拒绝发放读租约 → 外层折叠成 `subagent "X" is unavailable` → 插件重建。
|
|
16
|
+
|
|
17
|
+
这是 Harness 侧的**句柄泄漏**(会话已从 sessions 服务移除,但 persistence 的写租约没释放),插件无法直接修;但我们能停止把它当成未知故障:
|
|
18
|
+
|
|
19
|
+
- 该原因归类为 `wake.session-busy`(不带 `.fail`,发布默认级别不再刷屏),重建路径与上下文注入不变;
|
|
20
|
+
- 其它原因仍记 `wake.fail`,并保留 `code` / `cause`;
|
|
21
|
+
- 诊断探针结论:`persistence.stat` 本身正常(无 `persistence.stat.fail`、无 `service.missing.fail`),进一步确认问题在**写租约占用**而非读取能力。
|
|
22
|
+
- 测试:`node --test` **270 通过 / 1 跳过**(新增 1 例:句柄占用被识别、其它原因不被误判)。
|
|
23
|
+
|
|
3
24
|
## 0.4.68 - 2026-11-12
|
|
4
25
|
|
|
5
26
|
**决定性探针:boot 后真实 `persistence.stat()` 一次,暴露原始错误码**
|
package/index.js
CHANGED
|
@@ -781,8 +781,15 @@ export function apply(ctx, config = {}) {
|
|
|
781
781
|
});
|
|
782
782
|
} catch (error) {
|
|
783
783
|
wakeKeys.delete(plan.key);
|
|
784
|
+
const causeChain = describeCauseChain(error);
|
|
785
|
+
// 实机根因:成员会话的**写句柄没有释放**——`sessions.get()` 已取不到它,
|
|
786
|
+
// 但 persistence 仍判定它「already owned by an active write handle」,
|
|
787
|
+
// 于是冷恢复必然失败。这是 Harness 侧的句柄泄漏,插件只能重建。
|
|
788
|
+
// 归类成单独事件:不再让这类必然失败每天刷上百条 `wake.fail`,
|
|
789
|
+
// 但仍在 `full` 级别可见,且重建路径不变。
|
|
790
|
+
const busyHandle = typeof causeChain === 'string' && /active write handle/i.test(causeChain);
|
|
784
791
|
diag.append({
|
|
785
|
-
ev: 'wake.fail',
|
|
792
|
+
ev: busyHandle ? 'wake.session-busy' : 'wake.fail',
|
|
786
793
|
projectId: projectRuntime.id,
|
|
787
794
|
memberId: plan.memberId,
|
|
788
795
|
taskId: plan.taskId ?? null,
|
|
@@ -792,7 +799,7 @@ export function apply(ctx, config = {}) {
|
|
|
792
799
|
// 外层错误只写「subagent X is unavailable」,真实原因在 cause 里
|
|
793
800
|
// (persistence 读不出会话 / descriptor 不可续 / 血缘校验失败)。
|
|
794
801
|
// 不把它带出来,每次只能看到同一句无从下手的提示。
|
|
795
|
-
cause:
|
|
802
|
+
cause: causeChain,
|
|
796
803
|
});
|
|
797
804
|
console.warn('[ai-team] wake failed:', plan.memberId, error?.code ?? error?.message ?? error);
|
|
798
805
|
// 一次性迁移自愈:旧形态成员会话(历史上由 agents.create 创建、
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suifei/dsh-ai-team",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "文渊阁 (Wenyuan Pavilion) — AI Team mode for DeepSeek Harness: concurrent projects, owned tasks, threads, inbox and an append-only team ledger",
|
|
6
6
|
"license": "MIT",
|