@suifei/dsh-ai-team 0.3.44 → 0.3.46

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.46 — 2026-11-10
4
+
5
+ - 验收催办时钟改用 Task 提交时间,assignee 在 Thread 继续发言不会再掩盖 QA 静默;
6
+ - 修复 Task 长期 pending_acceptance 但 QA 未收到催办的问题。
7
+
8
+ ## 0.3.45 — 2026-11-10
9
+
10
+ - PMO 新增验收催办:QA Task 进入 pending_acceptance 超过 10 分钟仍无验收时,自动唤醒所有 QA 成员,要求独立复跑并验收/退回;
11
+ - 覆盖“执行者已提交、QA 静默”的卡点,不把验收推回 Human。
12
+
3
13
  ## 0.3.44 — 2026-11-10
4
14
 
5
15
  - PMO 新增 60 分钟升级:Task 超过 60 分钟仍未完成时唤醒 owner,要求评估拆分/补人/缩小范围/重定验收,不只催进度;
package/index.js CHANGED
@@ -34,7 +34,7 @@ export const name = 'ai-team';
34
34
  /** The workbench only makes sense where the Web carrier exists. */
35
35
  export const inject = ['webServer', 'permissionPresets', 'sandboxPolicy'];
36
36
 
37
- const VERSION = '0.3.44';
37
+ const VERSION = '0.3.46';
38
38
  const PROJECT_ID = 'prj_main';
39
39
  const HUMAN_ID = 'mem_human';
40
40
 
@@ -281,6 +281,7 @@ export function apply(ctx) {
281
281
  const pmoLastStall = new Map();
282
282
  const pmoLastHeartbeat = new Map();
283
283
  const pmoLastEscalate = new Map();
284
+ const pmoLastReview = new Map();
284
285
  let pmoTimer = null;
285
286
  const projectCwd = (projectRuntime, member) => member?.workspace
286
287
  || projectRuntime?.service?.state?.projects?.[projectRuntime.id]?.workspacePath
@@ -401,12 +402,24 @@ export function apply(ctx) {
401
402
  for (const task of active) {
402
403
  const thread = state.threads?.[task.id];
403
404
  const threadAt = thread?.entries?.at(-1)?.at;
404
- const updatedAt = Math.max(
405
- Number.isFinite(task.updatedAt) ? task.updatedAt : 0,
406
- Number.isFinite(threadAt) ? threadAt : 0,
407
- );
405
+ const taskAt = Number.isFinite(task.updatedAt) ? task.updatedAt : 0;
406
+ // For acceptance, assignee Thread chatter must not mask a silent QA.
407
+ // Use the submission timestamp (task.updatedAt) as the review clock.
408
+ const updatedAt = task.status === 'pending_acceptance'
409
+ ? taskAt
410
+ : Math.max(taskAt, Number.isFinite(threadAt) ? threadAt : 0);
408
411
  if (updatedAt === 0) continue;
409
412
  const idleFor = now - updatedAt;
413
+ if (task.status === 'pending_acceptance' && task.qaRequired === true && idleFor >= 10 * 60_000) {
414
+ const lastReview = pmoLastReview.get(task.id) ?? 0;
415
+ if (now - lastReview >= 10 * 60_000) {
416
+ pmoLastReview.set(task.id, now);
417
+ await wakeFromResult(projectRuntime, {
418
+ event: { type: 'pmo/review', payload: { taskId: task.id, bucket: Math.floor(now / 600_000) } },
419
+ }, {});
420
+ }
421
+ continue;
422
+ }
410
423
  if (idleFor >= 10 * 60_000 && idleFor < 30 * 60_000) {
411
424
  const lastHeartbeat = pmoLastHeartbeat.get(task.id) ?? 0;
412
425
  if (now - lastHeartbeat >= 10 * 60_000) {
package/lib/host/waker.js CHANGED
@@ -62,6 +62,9 @@ function promptFor(reason, state, taskId) {
62
62
  if (reason === 'inbox') {
63
63
  return 'Team event: 你的收件箱有新条目。调用 team 工具查看 inbox,处理与你有关的事项。';
64
64
  }
65
+ if (reason === 'pmo_review') {
66
+ return `PMO 验收提醒:${title} 仍处于 pending_acceptance,QA checklist 还没有完成记录。请独立复跑并按 resultDefinition 验收或退回;不要静默等待,也不要把验收推回 Human。`;
67
+ }
65
68
  if (reason === 'pmo_escalate') {
66
69
  return `PMO 升级:${title} 已超过 60 分钟仍在进行。请 owner 评估是否需要拆分 Task、补充人手、缩小首版范围或重定验收标准;不要只催进度,给出可执行决定。`;
67
70
  }
@@ -180,6 +183,17 @@ export function planWakes(state, result, actor = {}) {
180
183
  `你是 Project owner。Human 在 Main stream 说:“${body}”。本轮必须先用 team action=members 查看成员,再用 action=create 创建至少一个 Task;ownerId 必须使用成员 id,写明可验证的 resultDefinition。可用成员:${roster || '无'}。如果需求很大或外部链接只是参考,先创建“调研/澄清/拆解”Task,不要直接开始实现。先做复盘/头脑风暴/深度研究,再产出验收标准;不要等 Human、不要把决策推回 Human。需要记录决策时调用 team action=askHuman,PMO 会自动按最高价值建议处理;不要只写“见报告/§6/已提交 Human”。resultDefinition 只写验收标准,不要写“等待 Human 验收”;不要只读文件或只回一段话结束。`,
181
184
  );
182
185
  }
186
+ if (event?.type === 'pmo/review') {
187
+ const task = state.tasks?.[event.payload?.taskId];
188
+ if (task !== undefined) {
189
+ const bucket = event.payload?.bucket ?? Math.floor(Date.now() / 600_000);
190
+ for (const member of Object.values(state.members ?? {})) {
191
+ if (member.kind === 'agent' && member.qa === true && member.status !== 'retired') {
192
+ add(member.id, task.id, 'pmo_review', `pmo_review:${task.id}:${member.id}:${bucket}`);
193
+ }
194
+ }
195
+ }
196
+ }
183
197
  if (event?.type === 'pmo/escalate') {
184
198
  const task = state.tasks?.[event.payload?.taskId];
185
199
  if (task !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.44",
3
+ "version": "0.3.46",
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",