@suifei/dsh-ai-team 0.3.76 → 0.3.78

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.78 - 2026-11-12
4
+
5
+ - **【关键】成员会话对 Human 只读的根因修复**:宿主 hasApiSessionSubagentOwner 除 origin=subagent 外,对「header 带 parentSession 且 parent 拥有该 agent」的会话同样判定为 subagent-owned 并拒绝 Human 输入。插件 direct 模式创建成员会话时恰好设置了 meta.parentSession,导致所有成员会话被拒。现移除该 header 字段(驱动改用 agents.resume 的 parentAgent,不依赖 header)——新激活/重置后的成员会话可在 DSH 主界面直接输入。
6
+ - 已存在成员需执行一次「重置会话」(reseat)使新 header 生效。
7
+
8
+
9
+ ## 0.3.77 - 2026-11-12
10
+
11
+ - **Human 对话入口直达**:主对话流成员消息头新增「私信」按钮(此前需点名字→资料面板→私信三步);私信直达该成员会话写入通道。
12
+ - **routingHint 文案讲清语义**:原生会话直写被宿主拒绝(非开关问题);私信输入即写入成员会话(与团队指令同一通道),成员下一轮在同一会话可见并回复——对应用户实证的 session/agent-busy 困惑。
13
+
14
+
3
15
  ## 0.3.76 - 2026-11-12
4
16
 
5
17
  - **【致命 UI】项目头按钮嵌套修复(用户实证,0.3.70 遗留)**:Human 对话按钮的闭合括号被挪到行末,三个后续按钮成为它的 children(HTML 禁止 button 嵌套,表现为一个大按钮框住全部)。修正闭合位置。渲染 E2E 新增 **nested-button 守卫**(红绿验证:还原 bug 时精确报错),此类结构错误今后提交前即被拦截。
package/client.js CHANGED
@@ -221,7 +221,7 @@ window.__ModuleLoader__.load({
221
221
  chatGateClosedPlaceholder: '对话通道已关闭',
222
222
  chatGateOpened: 'Human 对话通道已开启:私信将直达成员下一轮。',
223
223
  chatGateClosedShort: 'Human 对话通道已关闭。',
224
- routingHint: '成员的原生会话由团队路由驱动,宿主不接受直接输入;请用下方私信与成员对话(下一轮生效)。',
224
+ routingHint: '原生会话直写被宿主拒绝(不是开关问题);在此输入即写入该成员会话(与团队指令同一通道),成员下一轮在同一会话可见并回复。',
225
225
  runOn: '项目运行 · 开',
226
226
  runOff: '项目运行 · 停止中',
227
227
  runStateHint: '停止:当前子任务完成后停止派发(不再派发新任务/心跳/升级);启动:空项目开始或停止的项目继续开工',
@@ -638,7 +638,7 @@ window.__ModuleLoader__.load({
638
638
  chatGateClosedPlaceholder: 'Chat channel closed',
639
639
  chatGateOpened: 'Human chat channel opened: DMs reach members next round.',
640
640
  chatGateClosedShort: 'Human chat channel closed.',
641
- routingHint: 'Member native sessions are driven by team routing; the host rejects direct input. Use the DM below to talk to a member (effective next round).',
641
+ routingHint: 'Direct input in the native session is rejected by the host (not a switch issue); a DM here is written into that member session through the same channel as team instructions, and the member replies in the same session next round.',
642
642
  runOn: 'Project run · on',
643
643
  runOff: 'Project run · stopping',
644
644
  runStateHint: 'Stop: finish the in-flight subtask then halt dispatch (no new tasks/heartbeats/escalations); Start: kick an empty project or resume a stopped one',
@@ -1559,7 +1559,7 @@ window.__ModuleLoader__.load({
1559
1559
  );
1560
1560
  }
1561
1561
 
1562
- function StreamMessage({ t, item, data, tasks, selected, follows, highlight, onOpenProfile, onOpen, onToggleFollow }) {
1562
+ function StreamMessage({ t, item, data, tasks, selected, follows, highlight, onOpenProfile, onChat, onOpen, onToggleFollow }) {
1563
1563
  const author = item.author ?? {};
1564
1564
  // 结构化判定:kind 是权威字段;显示名回退只兼容旧账本流。
1565
1565
  const human = author.kind === 'human' || (author.kind === undefined && agentFor(data, author.name) === null && author.name === t('you'));
@@ -1574,6 +1574,8 @@ window.__ModuleLoader__.load({
1574
1574
  : h('b', null, author.name ?? '—'),
1575
1575
  agent ? h('span', { className: 'at-role' }, agent.role) : null,
1576
1576
  h('time', { dateTime: iso(item.at) }, fmtTime(item.at)),
1577
+ // 私信直达:Human 的话经同一通道写入该成员会话(原生会话只读)。
1578
+ agent && onChat ? h('button', { className: 'at-workspacebtn', type: 'button', title: t('routingHint'), onClick: () => onChat(agent) }, t('agentChat')) : null,
1577
1579
  ),
1578
1580
  h('div', { className: 'at-msgt' }, item.body),
1579
1581
  cards.length ? h(TaskGroup, { t, cards, tasks, selected, follows, onOpen, onToggleFollow }) : null,
@@ -4047,6 +4049,7 @@ window.__ModuleLoader__.load({
4047
4049
  follows: followingOf,
4048
4050
  highlight: streamHighlight === item.id,
4049
4051
  onOpenProfile: openProfile,
4052
+ onChat: (agent) => { closeMobile(); void openAgentChat(agent); },
4050
4053
  onOpen: openTask,
4051
4054
  onToggleFollow: toggleFollow,
4052
4055
  }))
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.76';
44
+ const VERSION = '0.3.78';
45
45
  const PROJECT_ID = 'prj_main';
46
46
  const HUMAN_ID = 'mem_human';
47
47
 
@@ -184,9 +184,11 @@ export class MemberRuntime {
184
184
  parentAgent: this.parent,
185
185
  meta: {
186
186
  cwd: member.workspace ?? this.cwd,
187
- parentSession: this.parent.id,
188
- // Deliberately NOT origin:'subagent': the archived Team Host
189
- // must not put members under the archived-session pre-step gate.
187
+ // 关键:不设 parentSession——宿主 hasApiSessionSubagentOwner 对
188
+ // 「有 parentSession 且 parent 拥有该 agent」的会话同样判定为
189
+ // subagent-owned 并拒绝 Human 输入(session/agent-busy)。成员
190
+ // 会话必须允许 Human 在 DSH 主界面直接对话,故 header 不带父链
191
+ // (驱动仍靠 agents.resume(parentAgent),不依赖该 header)。
190
192
  delegationDepth: 1,
191
193
  ...(preset ? { agentPreset: preset } : {}),
192
194
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.76",
3
+ "version": "0.3.78",
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",