@suifei/dsh-ai-team 0.3.74 → 0.3.76

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.76 - 2026-11-12
4
+
5
+ - **【致命 UI】项目头按钮嵌套修复(用户实证,0.3.70 遗留)**:Human 对话按钮的闭合括号被挪到行末,三个后续按钮成为它的 children(HTML 禁止 button 嵌套,表现为一个大按钮框住全部)。修正闭合位置。渲染 E2E 新增 **nested-button 守卫**(红绿验证:还原 bug 时精确报错),此类结构错误今后提交前即被拦截。
6
+
7
+
8
+ ## 0.3.75 - 2026-11-12
9
+
10
+ - **P17 人员池同人绑定 UI 恢复**:人员池头部「同人绑定」表单(源名 → 目标人 → 绑定,POST /ai-team/api/people-aliases),跨项目身份合并可配置(host 路由此前已就绪,UI 在历史回退中丢失)。
11
+ - **P5a 取证定论**:direct-subagent address 经源码取证为**读取**子代理会话日志/历史投影的地址通路(kind:subagent 用 childSessionId 校验),非 Human 输入投递通路——原生直聊为宿主硬边界,最终确认不可达;等效通道为私信直通。
12
+ - 渲染 E2E #310 守卫在本次施工中实际拦截了两处新引入的 early-return 后 hooks(已改到 state 区)。
13
+
14
+
3
15
  ## 0.3.74 - 2026-11-12
4
16
 
5
17
  - **P2 人员池统一模型配置**:人员池行级「统一配置模型」入口——选 LLM 端点后对该成员在**所有项目**逐个 member.config.update(跨项目批量),免去逐项目×逐成员修改(NO_ADAPTER / max_tokens 超限场景的根治入口)。
package/client.js CHANGED
@@ -392,10 +392,10 @@ window.__ModuleLoader__.load({
392
392
  aliasSaved: '已把「{name}」并到「{person}」。',
393
393
  teamBusyN: '在做 ×{n}',
394
394
  pendingAcceptanceN: '待验收 ×{n}',
395
- archivedCount: '已归档 {n}',
396
- personModelBtn: '统一配置模型',
397
- personModelTitle: '为「{name}」选择 LLM 端点(应用到其所有项目)',
398
- personModelDone: '已把「{name}」配置为 {model}(成功 {done} 处,失败 {failed} 处)。',
395
+ archivedCount: '已归档 {n}',
396
+ personModelBtn: '统一配置模型',
397
+ personModelTitle: '为「{name}」选择 LLM 端点(应用到其所有项目)',
398
+ personModelDone: '已把「{name}」配置为 {model}(成功 {done} 处,失败 {failed} 处)。',
399
399
  modelCatalogEmpty: '模型目录为空:请先在 DSH 设置里配置可用的 LLM 端点。',
400
400
  q1Title: '需要你',
401
401
  q2Title: '团队在做',
@@ -809,10 +809,10 @@ window.__ModuleLoader__.load({
809
809
  aliasSaved: 'Merged "{name}" into "{person}".',
810
810
  teamBusyN: 'in progress ×{n}',
811
811
  pendingAcceptanceN: 'awaiting acceptance ×{n}',
812
- archivedCount: 'Archived {n}',
813
- personModelBtn: 'Set model',
814
- personModelTitle: 'Choose the LLM endpoint for "{name}" (applies to all its projects)',
815
- personModelDone: 'Set "{name}" to {model} ({done} ok, {failed} failed).',
812
+ archivedCount: 'Archived {n}',
813
+ personModelBtn: 'Set model',
814
+ personModelTitle: 'Choose the LLM endpoint for "{name}" (applies to all its projects)',
815
+ personModelDone: 'Set "{name}" to {model} ({done} ok, {failed} failed).',
816
816
  modelCatalogEmpty: 'The model catalog is empty: configure an LLM endpoint in DSH settings first.',
817
817
  q1Title: 'Needs you',
818
818
  q2Title: 'Team is doing',
@@ -1341,6 +1341,9 @@ window.__ModuleLoader__.load({
1341
1341
  .at-obstep.at-obdone .at-obmark { border-color: var(--dsw-alias-state-success-primary); color: var(--dsw-alias-state-success-primary); }
1342
1342
  .at-oblabel { flex: 1 1 auto; min-width: 0; }
1343
1343
  .at-peoplehead { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; }
1344
+ .at-aliasbox { margin: 0 12px 8px; border-bottom: 1px dashed var(--dsw-alias-border-l2); }
1345
+ .at-aliasrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
1346
+ .at-aliasrow .at-decisioninput { flex: 1 1 120px; min-width: 90px; }
1344
1347
  .at-peoplecount { color: var(--dsw-alias-label-caption); font-size: 11px; margin-right: auto; }
1345
1348
  .at-permbadge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-label); font-size: 10.5px; }
1346
1349
  .at-msg-highlight { border-left: 2px solid var(--dsw-alias-state-business-primary); padding-left: 10px; }
@@ -1932,7 +1935,7 @@ window.__ModuleLoader__.load({
1932
1935
  * 人员池总览(全局层,11-管理视角 §2):按"人"聚合各项目身份。
1933
1936
  * 数据 = GET /ai-team/api/people(各项目账本 members/tasks 的只读聚合)。
1934
1937
  */
1935
- function PeoplePage({ t, people, error, loading, onOpenProject, onRefresh, localNames, onOpenPerson, onChatPerson, onConfigModel }) {
1938
+ function PeoplePage({ t, people, error, loading, onOpenProject, onRefresh, localNames, onOpenPerson, onChatPerson, onConfigModel, onBindAlias, aliasDraft }) {
1936
1939
  if (error) return h('div', { className: 'at-stream', role: 'alert' },
1937
1940
  h('div', { className: 'at-streaminner' }, h(EmptyState, { t, icon: 'alert', title: t('peopleTitle'), body: tf(t, 'peopleLoadFailed', { message: error }) })));
1938
1941
  // loading 用中心区域骨架(流内行),不用整页 Skeleton——本组件位于
@@ -1951,6 +1954,14 @@ window.__ModuleLoader__.load({
1951
1954
  h('div', { className: 'at-peoplehead' },
1952
1955
  h('span', { className: 'at-peoplecount' }, loading ? t('loading') : tf(t, 'peopleProjects', { n: people.length })),
1953
1956
  h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: onRefresh, disabled: loading }, t('refresh'))),
1957
+ onBindAlias ? h('details', { className: 'at-aliasbox' },
1958
+ h('summary', { className: 'at-peoplesum' }, h('span', { className: 'at-people-role' }, t('aliasTitle'))),
1959
+ h('div', { className: 'at-aliasrow' },
1960
+ h('input', { className: 'at-decisioninput', value: aliasDraft?.name ?? '', placeholder: t('aliasSourcePlaceholder'), onChange: (event) => aliasDraft.onName(event.target.value) }),
1961
+ h('span', { className: 'at-people-role' }, '→'),
1962
+ h('input', { className: 'at-decisioninput', value: aliasDraft?.target ?? '', placeholder: t('aliasTargetPlaceholder'), onChange: (event) => aliasDraft.onTarget(event.target.value) }),
1963
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onBindAlias(aliasDraft?.target ?? '') }, t('aliasBind'))),
1964
+ h('div', { className: 'at-modalmeta' }, t('aliasHint'))) : null,
1954
1965
  people.map((person) => {
1955
1966
  const badges = [
1956
1967
  tf(t, 'peopleProjects', { n: person.projects.length }),
@@ -2644,6 +2655,9 @@ window.__ModuleLoader__.load({
2644
2655
  // P1b 批量取消的忙碌标志——必须位于 Skeleton early-return 之前
2645
2656
  // (React hooks 数量在渲染间必须恒定,否则 #310)。
2646
2657
  const [cancelAllBusy, setCancelAllBusy] = React.useState(false);
2658
+ // P17 同人绑定输入(同上:hooks 必须在 early-return 之前)。
2659
+ const [aliasName, setAliasName] = React.useState('');
2660
+ const [aliasTarget, setAliasTarget] = React.useState('');
2647
2661
  // 自绘确认/输入对话框(替代原生 prompt/confirm,观感与宿主一致)。
2648
2662
  // dialog: { mode: 'confirm'|'prompt'|'choice', title, body, placeholder,
2649
2663
  // value, options, resolve } — resolve(false|null|字符串)。
@@ -2925,6 +2939,24 @@ window.__ModuleLoader__.load({
2925
2939
  sayRight(tf(t, 'sendFailed', { message: error?.message ?? String(error) }));
2926
2940
  }
2927
2941
  }
2942
+ // P17:人员池同人绑定(把另一个名字并到某人)——host 路由
2943
+ // POST /ai-team/api/people-aliases,绑定后聚合按 personId 合并。
2944
+ function bindAlias(personName) {
2945
+ const other = aliasName.trim();
2946
+ const target = (personName ?? aliasTarget).trim();
2947
+ if (!other || !target || other === target) { say(t('aliasRequired')); return; }
2948
+ fetch('/ai-team/api/people-aliases', {
2949
+ method: 'POST',
2950
+ headers: { 'content-type': 'application/json', accept: 'application/json' },
2951
+ body: JSON.stringify({ name: other, personId: target }),
2952
+ }).then(async (response) => {
2953
+ const payload = await response.json().catch(() => null);
2954
+ if (!response.ok) throw new Error(payload?.error?.message ?? ('HTTP ' + response.status));
2955
+ say(tf(t, 'aliasSaved', { name: other, person: target }));
2956
+ setAliasName('');
2957
+ loadPeople();
2958
+ }).catch((error) => sayRight(tf(t, 'sendFailed', { message: error?.message ?? String(error) })));
2959
+ }
2928
2960
  // P2:人员池统一配置模型——对同名成员在其所有项目逐个
2929
2961
  // member.config.update(跨项目批量,免逐项目进资料面板)。
2930
2962
  async function configPersonModel(person) {
@@ -3880,6 +3912,8 @@ window.__ModuleLoader__.load({
3880
3912
  else say(t('quadrantMissing'));
3881
3913
  },
3882
3914
  onConfigModel: configPersonModel,
3915
+ onBindAlias: bindAlias,
3916
+ aliasDraft: { name: aliasName, target: aliasTarget, onName: setAliasName, onTarget: setAliasTarget },
3883
3917
  })
3884
3918
  : inInbox
3885
3919
  ? h('div', { className: 'at-stream', role: 'region', 'aria-label': t('inboxTitle') },
@@ -4057,26 +4091,26 @@ window.__ModuleLoader__.load({
4057
4091
  title: t('chatGateHint'),
4058
4092
  'aria-pressed': !chatGateClosed,
4059
4093
  onClick: () => { void toggleChatGate(); },
4060
- }, !chatGateClosed ? t('chatGateOn') : t('chatGateOff'),
4061
- h('button', {
4062
- className: cx('at-pmobtn', !runStopped && 'at-pmo-on'),
4063
- type: 'button',
4064
- title: t('runStateHint'),
4065
- 'aria-pressed': !runStopped,
4066
- onClick: () => { void toggleRunState(); },
4067
- }, !runStopped ? t('runOn') : t('runOff')),
4068
- h('button', {
4069
- className: 'at-workspacebtn',
4070
- type: 'button',
4071
- title: t('handoffHint'),
4072
- onClick: () => { void makeHandoff(); },
4073
- }, t('handoffBtn')),
4074
- h('button', {
4075
- className: 'at-workspacebtn',
4076
- type: 'button',
4077
- title: t('archiveHint'),
4078
- onClick: () => { void archiveCurrentProject(); },
4079
- }, t('archiveProject')))) : null,
4094
+ }, !chatGateClosed ? t('chatGateOn') : t('chatGateOff')),
4095
+ h('button', {
4096
+ className: cx('at-pmobtn', !runStopped && 'at-pmo-on'),
4097
+ type: 'button',
4098
+ title: t('runStateHint'),
4099
+ 'aria-pressed': !runStopped,
4100
+ onClick: () => { void toggleRunState(); },
4101
+ }, !runStopped ? t('runOn') : t('runOff')),
4102
+ h('button', {
4103
+ className: 'at-workspacebtn',
4104
+ type: 'button',
4105
+ title: t('handoffHint'),
4106
+ onClick: () => { void makeHandoff(); },
4107
+ }, t('handoffBtn')),
4108
+ h('button', {
4109
+ className: 'at-workspacebtn',
4110
+ type: 'button',
4111
+ title: t('archiveHint'),
4112
+ onClick: () => { void archiveCurrentProject(); },
4113
+ }, t('archiveProject'))) : null,
4080
4114
  inInbox || inPeople ? null : h('div', { className: 'at-tabs', role: 'tablist', 'aria-label': t('tabsAria'), onKeyDown: tabKeyDown },
4081
4115
  h('button', {
4082
4116
  className: cx('at-tab', tab === 'main' && 'at-on'),
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.74';
44
+ const VERSION = '0.3.76';
45
45
  const PROJECT_ID = 'prj_main';
46
46
  const HUMAN_ID = 'mem_human';
47
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.74",
3
+ "version": "0.3.76",
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",