@suifei/dsh-ai-team 0.3.71 → 0.3.73
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 +3 -2
- package/index.js +27 -13
- package/lib/host/service.js +4 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.73 - 2026-11-11
|
|
4
|
+
|
|
5
|
+
- **项目头开关失效修复**:bootstrap 的 projects[] 在 registry 重映射时丢弃了 chatGate/runState(按钮状态永远默认「开」,点击后 UI 不更新);归档 409 修复:归档保护在 service 内判定(只见自己账本,恒为最后项目)→ 移到 Host 路由层用 registry 全局清单判定。
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Changelog
|
|
9
|
+
|
|
10
|
+
## 0.3.72 - 2026-11-11
|
|
11
|
+
|
|
12
|
+
- 项目头按钮栏布局修复:路径独占一行、按钮行自动换行并紧凑化(6 控件溢出错位,用户截图实证)。
|
|
13
|
+
|
|
3
14
|
## 0.3.71 — 2026-11-11
|
|
4
15
|
|
|
5
16
|
- **【致命】工作台 #310 崩溃修复(用户实证)**:批量取消的忙碌标志 useState 被放在了 Workbench 的 Skeleton early-return **之后**——loading→ready 重渲染时 hooks 数量增多,触发 React #310 白屏。移到 early-return 之前的 state 区。渲染 E2E 的 React mock 同步加 **#310 守卫**:同一组件跨渲染 hooks 数量增多立即抛错(并在 0.3.69 类改动合入前即拦截)。
|
package/client.js
CHANGED
|
@@ -1089,8 +1089,9 @@ window.__ModuleLoader__.load({
|
|
|
1089
1089
|
.at-chead { flex: 0 0 auto; padding: 14px 18px 0; }
|
|
1090
1090
|
.at-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--dsw-alias-label-primary); font-size: 16px; font-weight: 600; line-height: 22px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1091
1091
|
.at-goal { min-width: 0; margin-top: 2px; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1092
|
-
.at-workspacebar { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 4px; }
|
|
1093
|
-
.at-workspacepath { flex: 1 1
|
|
1092
|
+
.at-workspacebar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; margin-top: 4px; }
|
|
1093
|
+
.at-workspacepath { flex: 1 1 100%; min-width: 0; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1094
|
+
.at-workspacebar .at-btn, .at-workspacebar .at-pmobtn, .at-workspacebar .at-workspacebtn { padding-inline: 8px; font-size: 11px; line-height: 16px; white-space: nowrap; }
|
|
1094
1095
|
.at-workspacebtn { flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--dsw-alias-border-l2); border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 11px; line-height: 16px; cursor: pointer; }
|
|
1095
1096
|
.at-workspacebtn:hover { color: var(--dsw-alias-label-primary); border-color: var(--dsw-alias-label-tertiary); }
|
|
1096
1097
|
.at-pmobtn { flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--dsw-alias-border-l2); border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap; }
|
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.73';
|
|
45
45
|
const PROJECT_ID = 'prj_main';
|
|
46
46
|
const HUMAN_ID = 'mem_human';
|
|
47
47
|
|
|
@@ -1249,18 +1249,24 @@ export function apply(ctx, config = {}) {
|
|
|
1249
1249
|
...bootstrap,
|
|
1250
1250
|
inbox,
|
|
1251
1251
|
inboxUnread: inbox.filter((item) => item.state === 'unread').length,
|
|
1252
|
-
projects: booted.registry.list()
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1252
|
+
projects: booted.registry.list()
|
|
1253
|
+
.filter((project) => project.archived !== true)
|
|
1254
|
+
.map((project) => {
|
|
1255
|
+
const active = bootstrap.projects?.find((entry) => entry.id === project.id);
|
|
1256
|
+
return {
|
|
1257
|
+
...project,
|
|
1258
|
+
owner: active?.owner ?? null,
|
|
1259
|
+
goal: active?.goal ?? '',
|
|
1260
|
+
workspacePath: active?.workspacePath ?? project.workspacePath ?? '',
|
|
1261
|
+
pmoAuto: project.pmoAuto ?? active?.pmoAuto ?? true,
|
|
1262
|
+
// 项目级开关随 bootstrap 下发(此前被 registry 重映射
|
|
1263
|
+
// 丢弃,导致按钮状态永远默认「开」)。
|
|
1264
|
+
chatGate: active?.chatGate ?? 'open',
|
|
1265
|
+
runState: active?.runState ?? 'running',
|
|
1266
|
+
archived: project.archived === true,
|
|
1267
|
+
active: project.id === booted.activeProjectId,
|
|
1268
|
+
};
|
|
1269
|
+
}),
|
|
1264
1270
|
runtime: {
|
|
1265
1271
|
defaultModel: ctx.get('agentDefaultModel')?.currentSelection?.() ?? null,
|
|
1266
1272
|
providers: ctx.get('subagents')?.list?.() ?? [],
|
|
@@ -1346,6 +1352,14 @@ export function apply(ctx, config = {}) {
|
|
|
1346
1352
|
if (typeof body?.type !== 'string' || body.type === '') {
|
|
1347
1353
|
return send(res, { error: { code: 'E_INVALID_ARGUMENT', message: 'command type is required' } }, 400);
|
|
1348
1354
|
}
|
|
1355
|
+
// 归档保护在实际的全局清单上判定(registry 跨项目;service 只见
|
|
1356
|
+
// 自己的账本,旧实现在 service 内判定导致所有归档被误拒)。
|
|
1357
|
+
if (body.type === 'project.archive' && body.payload?.archived !== false) {
|
|
1358
|
+
const others = booted.registry.list().filter((project) => project.archived !== true && project.id !== projectId);
|
|
1359
|
+
if (others.length === 0) {
|
|
1360
|
+
return send(res, { error: { code: 'E_INVALID_STATE', message: 'cannot archive the last active project' } }, 409);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1349
1363
|
if (body.type === 'test.llm.fault') {
|
|
1350
1364
|
if (process.env.DSH_AI_TEAM_TEST !== '1') {
|
|
1351
1365
|
return send(res, { error: { code: 'E_FORBIDDEN', message: 'test hook is disabled' } }, 403);
|
package/lib/host/service.js
CHANGED
|
@@ -95,7 +95,7 @@ function handoffMarkdown(state, project, nowMs) {
|
|
|
95
95
|
out.push('- 成员的 DSH 会话仍在,如需复用团队请保持项目 runState;如改用其他工具,可停止本项目。');
|
|
96
96
|
return out.join('\n') + '\n';
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
export class TeamService {
|
|
100
100
|
/**
|
|
101
101
|
* @param {{ ledger: { state: any, append: (input: any) => Promise<any> }, now?: () => number, diag?: { append: (row: any) => any } }} options
|
|
@@ -505,10 +505,9 @@ export class TeamService {
|
|
|
505
505
|
const archived = payload.archived !== false;
|
|
506
506
|
if (command.actor.kind !== 'human') fail(ERRORS.UNAUTHORIZED, 'only Human may archive a project');
|
|
507
507
|
if (archived === false && project.status === 'archived') fail(ERRORS.INVALID_STATE, 'archived projects cannot be un-archived in this version');
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}
|
|
508
|
+
// 归档许可由 Host 层判定(registry 是全局项目清单;本 service 只持有
|
|
509
|
+
// 自己项目的账本,无法看到其它项目——旧实现的「最后 active 项目」检查
|
|
510
|
+
// 在本账本里恒为 1,导致所有归档都被误拒 409)。
|
|
512
511
|
await this.append(command, 'project/archived', { projectId, archived, reason: payload.reason ?? '' });
|
|
513
512
|
return { project: { ...project, status: archived ? 'archived' : 'active' } };
|
|
514
513
|
}
|
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.73",
|
|
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",
|