@suifei/dsh-ai-team 0.3.42 → 0.3.43

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.43 — 2026-11-10
4
+
5
+ - PMO 进度判断使用 Task 最后活动与 Thread 最后回复的较大值,Agent 在 Thread 有进展时不会被误判停滞;
6
+ - 10 分钟心跳与 30 分钟 stall 互斥,不再同一 tick 重复唤醒两条;
7
+ - 心跳/停滞仍完全由插件算法执行。
8
+
3
9
  ## 0.3.42 — 2026-11-10
4
10
 
5
11
  - 把「PMO 只能由插件算法执行,禁止人工/外部脚本指挥」写入内置 ai-team-core skill 并加测试;
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.42';
37
+ const VERSION = '0.3.43';
38
38
  const PROJECT_ID = 'prj_main';
39
39
  const HUMAN_ID = 'mem_human';
40
40
 
@@ -398,9 +398,15 @@ export function apply(ctx) {
398
398
  task.tombstone !== true && ['pending', 'in_progress', 'pending_acceptance'].includes(task.status));
399
399
  const now = Date.now();
400
400
  for (const task of active) {
401
- const updatedAt = Number.isFinite(task.updatedAt) ? task.updatedAt : 0;
401
+ const thread = state.threads?.[task.id];
402
+ const threadAt = thread?.entries?.at(-1)?.at;
403
+ const updatedAt = Math.max(
404
+ Number.isFinite(task.updatedAt) ? task.updatedAt : 0,
405
+ Number.isFinite(threadAt) ? threadAt : 0,
406
+ );
402
407
  if (updatedAt === 0) continue;
403
- if (now - updatedAt >= 10 * 60_000) {
408
+ const idleFor = now - updatedAt;
409
+ if (idleFor >= 10 * 60_000 && idleFor < 30 * 60_000) {
404
410
  const lastHeartbeat = pmoLastHeartbeat.get(task.id) ?? 0;
405
411
  if (now - lastHeartbeat >= 10 * 60_000) {
406
412
  pmoLastHeartbeat.set(task.id, now);
@@ -412,7 +418,7 @@ export function apply(ctx) {
412
418
  }, {});
413
419
  }
414
420
  }
415
- if (now - updatedAt < 30 * 60_000) continue;
421
+ if (idleFor < 30 * 60_000) continue;
416
422
  const lastPing = pmoLastStall.get(task.id) ?? 0;
417
423
  if (now - lastPing < 30 * 60_000) continue;
418
424
  pmoLastStall.set(task.id, now);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
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",
@@ -17,7 +17,7 @@ whenToUse: 所有 Agent(PMO/主理人/执行/验收)在规划、实现、验
17
17
  - **能不写就不写。** 每一行新代码都是维护负债;写代码是最后手段,不是第一反应。
18
18
  - **能复用就不重造。** 已有且经过验证的实现优先;能扩展现有实现,就不另起一套。
19
19
  - **系统原生能解决就不引入新依赖。** 在目标平台与架构允许的边界内,优先使用标准库、运行时与操作系统已有能力。
20
- - 必须实现日志埋点,记录关键操作和流程,用于 debug 分析插件工作状态。
20
+ - **必须实现日志埋点**,记录关键操作和流程,用于 debug 分析插件工作状态。
21
21
 
22
22
  ## PMO 自主性(硬规则)
23
23