@suifei/dsh-ai-team 0.3.82 → 0.3.84
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 +11 -0
- package/client.js +20 -12
- package/index.js +33 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.84 - 2026-11-12
|
|
4
|
+
|
|
5
|
+
- **旧会话自动迁移(review 修复)**:唤醒失败且错误表明 subagent 不可用时(旧形态成员会话由 agents.create 创建、不在 subagent catalog),自动以 subagent 形态重建一次(重置会话)并记录 member.autoreseat 诊断——避免成员在重构后静默不再被唤醒,用户无需手动迁移。
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 0.3.83 - 2026-11-12
|
|
9
|
+
|
|
10
|
+
- **人员池模型下拉 [object Object] 修复**:modelCatalog 的 providers[].models 元素是 {id,name} 对象,P2 之前按字符串拼接。改为按 {id,name} 取值,并用索引映射代替字符串拆解(模型显示名可能含分隔符)。
|
|
11
|
+
- 渲染 E2E:bootstrap fixture 的 models 改为真实 {id,name} 形状;新增 **[object Object] 守卫**(任何对象被当字符串拼进 UI 文本即失败)——同类数据形状错误今后提交前被拦截。
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
## 0.3.82 - 2026-11-12
|
|
4
15
|
|
|
5
16
|
- **成员会话形态修正(取代 0.3.78–0.3.81 的 header 门方案)**:成员改回由 DSH **子智能体**管理(subagents.startActivation,label/cwd/parent/delivery)——成员会话登记 subagent catalog,从 DSH「管理的子智能体」面板进入即可直接对话、**保留上下文**(宿主父→子投递),且不再出现在工作区会话列表(与真实 subagent 一致)。
|
package/client.js
CHANGED
|
@@ -2947,23 +2947,31 @@ window.__ModuleLoader__.load({
|
|
|
2947
2947
|
}
|
|
2948
2948
|
// P2:人员池统一配置模型——对同名成员在其所有项目逐个
|
|
2949
2949
|
// member.config.update(跨项目批量,免逐项目进资料面板)。
|
|
2950
|
+
// catalog 形状:providers[] = { id, name, models: [{ id, name }] }。
|
|
2950
2951
|
async function configPersonModel(person) {
|
|
2951
2952
|
const providers = modelCatalog?.providers ?? [];
|
|
2952
|
-
const
|
|
2953
|
+
const labels = [];
|
|
2954
|
+
const values = [];
|
|
2953
2955
|
for (const provider of providers) {
|
|
2954
|
-
for (const
|
|
2955
|
-
|
|
2956
|
-
|
|
2956
|
+
for (const entry of provider.models ?? []) {
|
|
2957
|
+
// 兼容历史上可能出现的字符串模型项。
|
|
2958
|
+
const modelId = typeof entry === 'string' ? entry : entry?.id;
|
|
2959
|
+
const modelName = typeof entry === 'string' ? entry : (entry?.name ?? entry?.id);
|
|
2960
|
+
if (typeof modelId !== 'string' || modelId === '') continue;
|
|
2961
|
+
labels.push(provider.name + ' / ' + modelName);
|
|
2962
|
+
values.push({ providerId: provider.id, providerName: provider.name, model: modelId, modelName });
|
|
2963
|
+
if (labels.length >= 60) break;
|
|
2957
2964
|
}
|
|
2958
|
-
if (
|
|
2965
|
+
if (labels.length >= 60) break;
|
|
2959
2966
|
}
|
|
2960
|
-
if (
|
|
2961
|
-
const picked = await askPrompt(tf(t, 'personModelTitle', { name: person.name }), { options });
|
|
2967
|
+
if (labels.length === 0) { say(t('modelCatalogEmpty')); return; }
|
|
2968
|
+
const picked = await askPrompt(tf(t, 'personModelTitle', { name: person.name }), { options: labels });
|
|
2962
2969
|
if (picked === null) return;
|
|
2963
|
-
|
|
2964
|
-
const
|
|
2965
|
-
const
|
|
2966
|
-
|
|
2970
|
+
// 用索引映射取值:模型显示名可能含分隔符,不能按字符串拆解。
|
|
2971
|
+
const pickedIndex = labels.indexOf(picked);
|
|
2972
|
+
const target = values[pickedIndex >= 0 ? pickedIndex : 0];
|
|
2973
|
+
if (target === undefined) return;
|
|
2974
|
+
const patch = { provider: target.providerId, model: target.model };
|
|
2967
2975
|
let done = 0; let failed = 0;
|
|
2968
2976
|
for (const row of person.projects ?? []) {
|
|
2969
2977
|
const memberIds = Array.isArray(row.memberIds) ? row.memberIds : [];
|
|
@@ -2976,7 +2984,7 @@ window.__ModuleLoader__.load({
|
|
|
2976
2984
|
}
|
|
2977
2985
|
}
|
|
2978
2986
|
}
|
|
2979
|
-
sayRight(tf(t, 'personModelDone', { name: person.name, model, done, failed }));
|
|
2987
|
+
sayRight(tf(t, 'personModelDone', { name: person.name, model: target.modelName ?? target.model, done, failed }));
|
|
2980
2988
|
await reloadData();
|
|
2981
2989
|
loadPeople();
|
|
2982
2990
|
}
|
package/index.js
CHANGED
|
@@ -41,7 +41,7 @@ export const name = 'ai-team';
|
|
|
41
41
|
/** The workbench only makes sense where the Web carrier exists. */
|
|
42
42
|
export const inject = ['webServer', 'permissionPresets', 'sandboxPolicy'];
|
|
43
43
|
|
|
44
|
-
const VERSION = '0.3.
|
|
44
|
+
const VERSION = '0.3.84';
|
|
45
45
|
const HUMAN_ID = 'mem_human';
|
|
46
46
|
|
|
47
47
|
const SKILLOPT_BACKENDS = ['mock', 'claude', 'codex', 'copilot', 'cursor', 'pi', 'opencode', 'handoff', 'azure_openai'];
|
|
@@ -490,6 +490,38 @@ export function apply(ctx, config = {}) {
|
|
|
490
490
|
message: error?.message ?? String(error),
|
|
491
491
|
});
|
|
492
492
|
console.warn('[ai-team] wake failed:', plan.memberId, error?.code ?? error?.message ?? error);
|
|
493
|
+
// 一次性迁移自愈:旧形态成员会话(历史上由 agents.create 创建、
|
|
494
|
+
// 不在 subagent catalog)无法经父→子通道投递。识别该失败后自动以
|
|
495
|
+
// subagent 形态重建一次(重置会话),避免成员静默不再被唤醒。
|
|
496
|
+
const failureText = `${error?.code ?? ''} ${error?.message ?? String(error)}`;
|
|
497
|
+
const legacySession = /subagent|not-found|not found|E_SESSION_MISSING/i.test(failureText)
|
|
498
|
+
&& typeof member?.sessionId === 'string' && member.sessionId !== '';
|
|
499
|
+
if (legacySession) {
|
|
500
|
+
try {
|
|
501
|
+
const reseated = await activateMember({
|
|
502
|
+
payload: {
|
|
503
|
+
memberId: plan.memberId,
|
|
504
|
+
force: true,
|
|
505
|
+
prompt: '会话已升级为团队子智能体形态(历史会话迁移)。先读 tasks/thread 当前状态,继续推进;不要重复已完成的工作。',
|
|
506
|
+
},
|
|
507
|
+
}, projectRuntime);
|
|
508
|
+
diag.append({
|
|
509
|
+
ev: 'member.autoreseat',
|
|
510
|
+
projectId: projectRuntime.id,
|
|
511
|
+
memberId: plan.memberId,
|
|
512
|
+
oldSessionId: member.sessionId,
|
|
513
|
+
newSessionId: reseated?.sessionId ?? null,
|
|
514
|
+
ok: reseated?.error === undefined,
|
|
515
|
+
});
|
|
516
|
+
} catch (reseatError) {
|
|
517
|
+
diag.append({
|
|
518
|
+
ev: 'member.autoreseat.fail',
|
|
519
|
+
projectId: projectRuntime.id,
|
|
520
|
+
memberId: plan.memberId,
|
|
521
|
+
message: reseatError?.message ?? String(reseatError),
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
}
|
|
493
525
|
try {
|
|
494
526
|
await projectRuntime.service.recordWake(plan.memberId, {
|
|
495
527
|
ok: false, taskId: plan.taskId, reason: plan.reason, error: error?.code ?? error?.message ?? String(error),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suifei/dsh-ai-team",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.84",
|
|
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",
|