@suifei/dsh-ai-team 0.3.48 → 0.3.50

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.50 — 2026-11-10
4
+
5
+ - PMO 自动决策覆盖无结构化问题的 `decision_required`:按当前 Task/Thread 最高价值路径推进并 ack,不再留 unread;
6
+ - 收件箱不再因为 Agent 只发 decision_required、不带 questions 而卡住。
7
+
8
+ ## 0.3.49 — 2026-11-10
9
+
10
+ - PMO 每分钟同步 agent session 标题为 `Agent(角色)`,覆盖历史任务标题;
11
+ - 标题已是目标值时不再写 title 事件,避免重复日志。
12
+
3
13
  ## 0.3.48 — 2026-11-10
4
14
 
5
15
  - 改回“一个 Agent 一个持久 session”:新 Task 复用原 session,不再每任务新开;
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.48';
37
+ const VERSION = '0.3.50';
38
38
  const PROJECT_ID = 'prj_main';
39
39
  const HUMAN_ID = 'mem_human';
40
40
 
@@ -148,8 +148,10 @@ export function apply(ctx) {
148
148
  const titleService = ctx.get('sessionTitle');
149
149
  const session = sessions?.get?.(member.sessionId);
150
150
  if (session === undefined || session === null || typeof titleService?.rename !== 'function') return;
151
+ const title = memberSessionTitle(member);
151
152
  try {
152
- titleService.rename(session, memberSessionTitle(member));
153
+ if (typeof titleService.get === 'function' && titleService.get(session)?.title === title) return;
154
+ titleService.rename(session, title);
153
155
  } catch (error) {
154
156
  console.warn('[ai-team] session title failed:', error?.message ?? error);
155
157
  }
@@ -358,6 +360,11 @@ export function apply(ctx) {
358
360
  const state = projectRuntime.service.state;
359
361
  const project = state.projects?.[projectRuntime.id];
360
362
  if (project === undefined || project.pmoAuto === false || project.status === 'archived') return;
363
+ for (const member of Object.values(state.members ?? {})) {
364
+ if (member.kind === 'agent' && typeof member.sessionId === 'string') {
365
+ await titleMemberSession(projectRuntime, member);
366
+ }
367
+ }
361
368
  const results = await projectRuntime.service.autoAnswerDecisions();
362
369
  for (const result of results) {
363
370
  const taskId = result?.item?.ref?.taskId;
@@ -924,12 +924,11 @@ export class TeamService {
924
924
  const items = Object.values(this.state.inbox ?? {}).filter((item) =>
925
925
  item.memberId === humanId
926
926
  && item.type === 'decision_required'
927
- && item.state === 'unread'
928
- && Array.isArray(item.ref?.questions)
929
- && item.ref.questions.length > 0);
927
+ && item.state === 'unread');
930
928
  const results = [];
931
929
  for (const item of items) {
932
- const answers = chooseDecisionAnswers(item.ref.questions);
930
+ const questions = Array.isArray(item.ref?.questions) ? item.ref.questions : [];
931
+ const answers = chooseDecisionAnswers(questions);
933
932
  results.push(await this.autoAnswerDecision(item, answers));
934
933
  }
935
934
  return results;
@@ -939,7 +938,9 @@ export class TeamService {
939
938
  const taskId = typeof item.ref?.taskId === 'string' ? item.ref.taskId : null;
940
939
  const task = taskId === null ? undefined : this.state.tasks?.[taskId];
941
940
  const questionById = new Map((item.ref?.questions ?? []).map((question) => [question.id, question.text]));
942
- const lines = answers.map((answer) => `- ${questionById.get(answer.id) ?? answer.id}: ${answer.value}`);
941
+ const lines = answers.length > 0
942
+ ? answers.map((answer) => `- ${questionById.get(answer.id) ?? answer.id}: ${answer.value}`)
943
+ : ['- 无结构化问题:按当前 Task/Thread 的最高价值路径推进,不等待 Human。'];
943
944
  const body = `【PMO 自动决策】按最高价值建议执行,不需要 Human 再确认:\n${lines.join('\n')}`;
944
945
  let entry = null;
945
946
  if (task !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.48",
3
+ "version": "0.3.50",
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",