@suifei/dsh-ai-team 0.3.15 → 0.3.17

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.17 — 2026-11-10
4
+
5
+ - Thread 中 Agent 明确提到 Human / 请你拍板时,自动创建 Human 决策收件箱项;
6
+ - 团队动态计数改为真实状态拆分:进行中 / 待处理 / 待验收,不再把待处理算成“正在推进”;
7
+ - 收件箱的决策项保留 Thread 标题,便于识别。
8
+
9
+ ## 0.3.16 — 2026-11-10
10
+
11
+ - 点击 Agent 列表中的成员名字直接打开真实对话;
12
+ - 没有 session 时先激活,再打开;
13
+ - 打开失败时落到成员资料,资料内提供「直接对话」和「他的任务」按钮。
14
+
3
15
  ## 0.3.15 — 2026-11-10
4
16
 
5
17
  - 成员 Session 自动挂到 Project workspace,不再散落在 DSH「未分组」;
package/README.md CHANGED
@@ -87,9 +87,9 @@ dsh --profile ai-team --no-open --port 33271
87
87
  - **主对话**:Human 的一句话进入 Main stream,Project owner 拆 Task;顶部「团队动态」直接显示正在推进的 Task 和运行中的成员,点击 Task 可打开 Thread。
88
88
  - **看板**:四列;进行中的卡片显示 accountable owner 与执行者;数量只统计 active Task。
89
89
  - **态势**:四象限——需要你、团队在做、等待受阻、最近完成。点击条目打开对应 Task 的 Thread。
90
- - **收件箱**:跨 Project 聚合;失败决策、需要你决定、关注 Task 的完成报告都在这里。
91
- - **成员视图**:点击成员名字,切到他的任务列表与「直接对话」入口。
92
- - **直接对话**:成员视图里点「直接对话」,打开该 Agent 的 DSH 原生 Session;没有 session 会先激活。
90
+ - **收件箱**:跨 Project 聚合;失败、需要你决定、关注 Task 的完成报告,以及 Agent 在 Thread 里明确请你拍板的消息都在这里。
91
+ - **直接对话**:点击成员名字直接打开该 Agent 的 DSH 原生 Session;没有 session 会先激活;打不开时落到成员资料,资料里有「直接对话」按钮。
92
+ - **成员任务**:成员资料里点「他的任务」,查看他 owner/assignee 的 Task。
93
93
  - **成员资料**:点「⋯」改名、职责、personality、provider/model、运行配方、notes、skills、re-distill、离队/人才库。
94
94
 
95
95
  ---
@@ -102,10 +102,10 @@ dsh --profile ai-team --no-open --port 33271
102
102
  | Task | 唯一 accountable owner;pending / in_progress / pending_acceptance / done / cancelled |
103
103
  | Thread | append-only;回复带 `baseSeq`,旧基线会被拒并说明变化 |
104
104
  | 验收 | maker 不能验收;QA 硬门禁;`qaChecklist` 逐项通过 |
105
- | 收件箱 | Human/Agent 各自拉取;跨 Project 聚合与项目内 ack |
105
+ | 收件箱 | Human/Agent 各自拉取;跨 Project 聚合;Thread 中提到 Human 会自动生成决策项 |
106
106
  | 关注 | 关注 Task;完成后收到 `followed_task_update` |
107
107
  | 默认成员 | 新 Project 初始化墨渊 / 青岚 / 白砚;可改名、改职责、改个性、改模型 |
108
- | 成员 | 持久 session;点击名字进入成员视图(任务 + 直接对话);「⋯」编辑资料 |
108
+ | 成员 | 持久 session;点击名字直接对话;「⋯」资料里有任务视图与直接对话 |
109
109
  | 模型 | Provider / Model 下拉读取 DSH `llm` 目录;可跟随系统默认 |
110
110
  | 进化 | `team.evolve` 只改自己的 personality;验收后 reflection wake |
111
111
  | 人才库 | leave/rejoin;遗留 Task 可被接管(taken-over) |
package/client.js CHANGED
@@ -1581,10 +1581,17 @@ window.__ModuleLoader__.load({
1581
1581
  const running = agents.filter((agent) => agent.status === 'running');
1582
1582
  const starting = active.length === 0 && tasks.length === 0 && running.length > 0;
1583
1583
  if (active.length === 0 && !starting) return null;
1584
+ const counts = { in_progress: 0, pending: 0, pending_acceptance: 0 };
1585
+ for (const task of active) counts[task.status] += 1;
1586
+ const summary = [
1587
+ counts.in_progress ? `${counts.in_progress} ${t('stInProgress')}` : '',
1588
+ counts.pending ? `${counts.pending} ${t('stPending')}` : '',
1589
+ counts.pending_acceptance ? `${counts.pending_acceptance} ${t('stPendingAcceptance')}` : '',
1590
+ ].filter(Boolean).join(' · ');
1584
1591
  return h('section', { className: 'at-teampulse', 'aria-label': t('teamPulseTitle') },
1585
1592
  h('div', { className: 'at-teampulsehead' },
1586
1593
  h('span', { className: 'at-teampulsetitle' }, t('teamPulseTitle')),
1587
- h('span', { className: 'at-teampulsecount' }, active.length ? t('teamPulseCount').replace('{n}', String(active.length)) : t('teamPulseWorking'))),
1594
+ h('span', { className: 'at-teampulsecount' }, summary || t('teamPulseWorking'))),
1588
1595
  active.length
1589
1596
  ? h('div', { className: 'at-teampulselist' }, active.map((task) => h('button', {
1590
1597
  key: task.id,
@@ -2532,7 +2539,12 @@ window.__ModuleLoader__.load({
2532
2539
  return;
2533
2540
  }
2534
2541
  if (agent.sessionId) {
2535
- service.openSession(agent.sessionId);
2542
+ try {
2543
+ service.openSession(agent.sessionId);
2544
+ } catch (error) {
2545
+ say(tf(t, 'sendFailed', { message: error?.message ?? String(error) }));
2546
+ openProfile(agent);
2547
+ }
2536
2548
  return;
2537
2549
  }
2538
2550
  try {
@@ -2923,7 +2935,7 @@ window.__ModuleLoader__.load({
2923
2935
  onBoard: switchBoard,
2924
2936
  onProject: switchProject,
2925
2937
  onNewProject: () => { closeMobile(); openNewProject(); },
2926
- onAgent: (agent) => { closeMobile(); openMemberView(agent); },
2938
+ onAgent: (agent) => { closeMobile(); void openAgentChat(agent); },
2927
2939
  onAgentMore: (agent) => { closeMobile(); openProfile(agent); },
2928
2940
  onAgentChat: (agent) => { closeMobile(); void openAgentChat(agent); },
2929
2941
  onAddAgent: () => { closeMobile(); openAddAgent(); },
@@ -3214,6 +3226,7 @@ window.__ModuleLoader__.load({
3214
3226
  pError ? h('div', { className: 'at-modalerror', role: 'alert' }, pError) : null,
3215
3227
  h('div', { className: 'at-modalactions' },
3216
3228
  h('button', { className: 'at-btn', type: 'button', onClick: () => setProfileAgent(null), disabled: pBusy }, t('cancel')),
3229
+ h('button', { className: 'at-btn', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); openMemberView(target); } }, t('memberTasks')),
3217
3230
  h('button', { className: 'at-btn', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); void openAgentChat(target); } }, t('agentChat')),
3218
3231
  h('button', { className: 'at-btn', type: 'button', onClick: leaveProfile, disabled: pBusy }, t('leaveTeam')),
3219
3232
  profileAgent.status === 'failed' ? h('button', { className: 'at-btn', type: 'button', onClick: retryProfile, disabled: pBusy }, t('retry')) : null,
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.15';
37
+ const VERSION = '0.3.17';
38
38
  const PROJECT_ID = 'prj_main';
39
39
  const HUMAN_ID = 'mem_human';
40
40
 
@@ -796,6 +796,43 @@ export class TeamService {
796
796
  projectId: command.projectId,
797
797
  at: this.now(),
798
798
  });
799
+ // A Thread message that explicitly asks Human to decide must land in the
800
+ // Human inbox; otherwise the board looks busy while the Human never sees
801
+ // the question (the exact failure mode behind “对话面板没有反馈”).
802
+ const body = typeof payload.body === 'string' ? payload.body : '';
803
+ const mentionsHuman = actorKind === 'agent'
804
+ && /(^|[^A-Za-z])(human|@你|待你|需要你|请你|等你|你拍板)([^A-Za-z]|$)/i.test(body);
805
+ if (mentionsHuman) {
806
+ const humanId = this.state.humanMemberId
807
+ ?? Object.values(this.state.members ?? {}).find((candidate) => candidate.kind === 'human')?.id
808
+ ?? null;
809
+ const duplicate = humanId === null ? undefined : Object.values(this.state.inbox ?? {}).find((item) =>
810
+ item.memberId === humanId
811
+ && item.ref?.taskId === taskId
812
+ && item.ref?.entrySeq === outcome.entry.seq
813
+ && !['resolved', 'dismissed', 'superseded'].includes(item.state));
814
+ if (humanId !== null && duplicate === undefined) {
815
+ const item = createInboxItem({
816
+ memberId: humanId,
817
+ type: 'decision_required',
818
+ ref: {
819
+ taskId,
820
+ entrySeq: outcome.entry.seq,
821
+ memberId: authorId,
822
+ category: 'thread_mention',
823
+ title: String(body).slice(0, 180),
824
+ },
825
+ requiresDecision: true,
826
+ }, { at: this.now() });
827
+ await this.ledger.append({
828
+ type: 'inbox/item-created',
829
+ payload: { itemId: item.id, ...item },
830
+ actor: { kind: 'system' },
831
+ projectId: command.projectId,
832
+ at: this.now(),
833
+ });
834
+ }
835
+ }
799
836
  return { thread: outcome.thread, entry: outcome.entry };
800
837
  }
801
838
 
package/lib/host/views.js CHANGED
@@ -151,7 +151,7 @@ export function quadrantsView(state, options = {}) {
151
151
  id: item.id,
152
152
  kind: 'inbox',
153
153
  category: 'decision',
154
- title: item.type ?? 'decision_required',
154
+ title: item.ref?.title ?? item.type ?? 'decision_required',
155
155
  taskId: item.ref?.taskId ?? null,
156
156
  taskNumber: null,
157
157
  ownerName: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
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",