@suifei/dsh-ai-team 0.4.14 → 0.4.15
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/index.js +8 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -52,7 +52,7 @@ export const name = 'ai-team';
|
|
|
52
52
|
// 实际使用的服务(含可选服务:缺失时 serviceOf 回退 ctx.get 并返回 undefined)。
|
|
53
53
|
export const inject = ['webServer', 'permissionPresets', 'sandboxPolicy', 'tools', 'shell', 'agents', 'subagents', 'sessions'];
|
|
54
54
|
|
|
55
|
-
const VERSION = '0.4.
|
|
55
|
+
const VERSION = '0.4.15';
|
|
56
56
|
const HUMAN_ID = 'mem_human';
|
|
57
57
|
|
|
58
58
|
const SKILLOPT_BACKENDS = ['mock', 'claude', 'codex', 'copilot', 'cursor', 'pi', 'opencode', 'handoff', 'azure_openai'];
|
|
@@ -540,13 +540,14 @@ export function apply(ctx, config = {}) {
|
|
|
540
540
|
});
|
|
541
541
|
console.warn('[ai-team] wake failed:', plan.memberId, error?.code ?? error?.message ?? error);
|
|
542
542
|
// 一次性迁移自愈:旧形态成员会话(历史上由 agents.create 创建、
|
|
543
|
-
// 不在 subagent catalog
|
|
544
|
-
// subagent
|
|
543
|
+
// 不在 subagent catalog)或重启后不可恢复的会话(NOT_RESUMABLE /
|
|
544
|
+
// is unavailable)无法经父→子通道投递。识别该失败后自动以 subagent
|
|
545
|
+
// 形态重建一次(重置会话),避免成员静默不再被唤醒。
|
|
546
|
+
// 注意:member 是 try 块内变量,catch 里必须从 state 取成员。
|
|
547
|
+
const targetMember = projectRuntime.service.state.members?.[plan.memberId];
|
|
545
548
|
const failureText = `${error?.code ?? ''} ${error?.message ?? String(error)}`;
|
|
546
|
-
// 含 NOT_RESUMABLE / is unavailable:DSH 重启后 subagent 会话不可恢复/
|
|
547
|
-
// 不可投递(diag 实测),此时必须重建会话,否则成员永久失联。
|
|
548
549
|
const legacySession = /subagent|not-found|not found|E_SESSION_MISSING|NOT_RESUMABLE|unavailable/i.test(failureText)
|
|
549
|
-
&& typeof
|
|
550
|
+
&& typeof targetMember?.sessionId === 'string' && targetMember.sessionId !== '';
|
|
550
551
|
if (legacySession) {
|
|
551
552
|
try {
|
|
552
553
|
const reseated = await activateMember({
|
|
@@ -560,7 +561,7 @@ export function apply(ctx, config = {}) {
|
|
|
560
561
|
ev: 'member.autoreseat',
|
|
561
562
|
projectId: projectRuntime.id,
|
|
562
563
|
memberId: plan.memberId,
|
|
563
|
-
oldSessionId:
|
|
564
|
+
oldSessionId: targetMember.sessionId,
|
|
564
565
|
newSessionId: reseated?.sessionId ?? null,
|
|
565
566
|
ok: reseated?.error === undefined,
|
|
566
567
|
});
|
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.15",
|
|
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",
|