@suifei/dsh-ai-team 0.4.148 → 0.4.149
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 +4 -0
- package/README.md +1 -0
- package/client.js +92 -4
- package/index.js +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.149 - 2026-12-01
|
|
4
|
+
|
|
5
|
+
- 文渊阁管理的 PMO 和成员会话在标题栏显示看板图标,点击直达该会话所属项目的看板。会话运行时图标有轻微脉冲,并遵循系统的减少动态效果设置。
|
|
6
|
+
|
|
3
7
|
## 0.4.148 - 2026-12-01
|
|
4
8
|
|
|
5
9
|
- README 快速开始按入口使用内置 profile。桌面应用使用 `desktop`,从终端启动的浏览器界面使用 `web`。宿主连接服务不可用时,中英文 503 提示引导检查插件安装的 profile 和启动入口。感谢 @Arnoldnuo 的反馈(#102),见 #106。
|
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
## 最近更新
|
|
39
39
|
|
|
40
|
+
- **会话标题栏看板入口**(0.4.149)。文渊阁管理的 PMO 和成员会话会显示文渊阁图标,点击直达所属项目的看板。运行时的轻微脉冲遵循系统的减少动态效果设置。
|
|
40
41
|
- **安装指引与 503 提示**(0.4.148)。快速开始按入口使用内置 `desktop` 或 `web`。连接服务不可用时,工作台提示核对插件安装的 profile 和启动入口。感谢 [@Arnoldnuo](https://github.com/Arnoldnuo) 的反馈([#102](https://github.com/suifei/dsh-ai-team/issues/102))。
|
|
41
42
|
- **蓝图试跑与项目总览**(0.4.147)。新建项目可按星门项目的团队架构实践,先用两个岗位、一份真实样本跑通交付。开启 PMO 自动后,插件按实测证据派发、确认草稿和扩编复跑。工作台显示当前阶段和下一步,项目总览可查看验收、AI 协作与原始证据。
|
|
42
43
|
- **归档项目与团队管理**(0.4.146)。人员池只汇总未归档项目的成员与任务,归档任务和会话仍可查阅。侧栏新增「团队管理」,集中管理项目成员和团队预设。感谢 [@qq958691165](https://github.com/qq958691165) 的反馈([#103](https://github.com/suifei/dsh-ai-team/issues/103))。
|
package/client.js
CHANGED
|
@@ -25,6 +25,8 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
|
|
26
26
|
const zh = {
|
|
27
27
|
panel: '文渊阁',
|
|
28
|
+
sessionBoard: '打开文渊阁看板',
|
|
29
|
+
sessionProjectBoard: '打开「{project}」看板',
|
|
28
30
|
back: '项目总览',
|
|
29
31
|
inbox: '收件箱',
|
|
30
32
|
board: '任务看板',
|
|
@@ -525,6 +527,8 @@ window.__ModuleLoader__.load({
|
|
|
525
527
|
};
|
|
526
528
|
const en = {
|
|
527
529
|
panel: 'Wenyuan Pavilion',
|
|
530
|
+
sessionBoard: 'Open Wenyuan Pavilion board',
|
|
531
|
+
sessionProjectBoard: 'Open board for {project}',
|
|
528
532
|
back: 'Overview',
|
|
529
533
|
inbox: 'Inbox',
|
|
530
534
|
board: 'All tasks',
|
|
@@ -1147,6 +1151,31 @@ window.__ModuleLoader__.load({
|
|
|
1147
1151
|
}
|
|
1148
1152
|
|
|
1149
1153
|
const CSS = `
|
|
1154
|
+
.at-session-board {
|
|
1155
|
+
position: relative; flex: 0 0 auto; display: inline-grid; place-items: center;
|
|
1156
|
+
inline-size: 28px; block-size: 28px; padding: 0; border: 0;
|
|
1157
|
+
border-radius: var(--dsw-radius-sm, 6px); background: transparent;
|
|
1158
|
+
color: var(--dsw-alias-label-secondary); cursor: pointer;
|
|
1159
|
+
}
|
|
1160
|
+
.at-session-board:hover, .at-session-board:focus-visible {
|
|
1161
|
+
color: var(--dsw-alias-state-business-primary);
|
|
1162
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
1163
|
+
}
|
|
1164
|
+
.at-session-board:focus-visible {
|
|
1165
|
+
outline: 2px solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: -2px;
|
|
1166
|
+
}
|
|
1167
|
+
.at-session-board svg { animation: at-session-board-in .18s ease-out; transition: transform .15s ease-out; }
|
|
1168
|
+
.at-session-board:hover svg, .at-session-board:focus-visible svg { transform: translateY(-1px); }
|
|
1169
|
+
.at-session-board[data-running]::after {
|
|
1170
|
+
content: ''; position: absolute; inset-block-start: 3px; inset-inline-end: 3px;
|
|
1171
|
+
inline-size: 5px; block-size: 5px; border-radius: 50%; pointer-events: none;
|
|
1172
|
+
background: var(--dsw-alias-state-business-primary); animation: at-session-board-pulse 1.8s ease-out infinite;
|
|
1173
|
+
}
|
|
1174
|
+
@keyframes at-session-board-in { from { opacity: 0; transform: translateY(2px); } }
|
|
1175
|
+
@keyframes at-session-board-pulse {
|
|
1176
|
+
0% { box-shadow: 0 0 0 0 var(--dsw-alias-state-business-primary); }
|
|
1177
|
+
65%, 100% { box-shadow: 0 0 0 4px transparent; }
|
|
1178
|
+
}
|
|
1150
1179
|
.at-root { height: 100%; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-base); font-family: var(--dsw-font-family); font-size: 13px; line-height: 21px; container-type: inline-size; container-name: at-wb; }
|
|
1151
1180
|
.at-root *, .at-root *::before, .at-root *::after { box-sizing: border-box; }
|
|
1152
1181
|
.at-toaststack { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; max-width: min(360px, calc(100vw - 36px)); pointer-events: none; }
|
|
@@ -1715,6 +1744,8 @@ window.__ModuleLoader__.load({
|
|
|
1715
1744
|
.at-send { margin-left: auto; }
|
|
1716
1745
|
}
|
|
1717
1746
|
@media (prefers-reduced-motion: reduce) {
|
|
1747
|
+
.at-session-board svg, .at-session-board[data-running]::after { animation: none; transition: none; }
|
|
1748
|
+
.at-session-board:hover svg, .at-session-board:focus-visible svg { transform: none; }
|
|
1718
1749
|
.at-root *, .at-root *::before, .at-root *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
|
|
1719
1750
|
}
|
|
1720
1751
|
`;
|
|
@@ -3974,13 +4005,13 @@ window.__ModuleLoader__.load({
|
|
|
3974
4005
|
return new Error(label + '. ' + t('bootUnknown503'));
|
|
3975
4006
|
}
|
|
3976
4007
|
|
|
3977
|
-
function Workbench({ t, ctx }) {
|
|
4008
|
+
function Workbench({ t, ctx, initialBoardProject = '' }) {
|
|
3978
4009
|
const [phase, setPhase] = React.useState('loading');
|
|
3979
4010
|
const [data, setData] = React.useState(null);
|
|
3980
4011
|
const [loadError, setLoadError] = React.useState('');
|
|
3981
|
-
const [projectId, setProjectId] = React.useState(
|
|
4012
|
+
const [projectId, setProjectId] = React.useState(initialBoardProject);
|
|
3982
4013
|
const [scope, setScope] = React.useState('project');
|
|
3983
|
-
const [tab, setTab] = React.useState('main');
|
|
4014
|
+
const [tab, setTab] = React.useState(initialBoardProject ? 'board' : 'main');
|
|
3984
4015
|
const [selected, setSelected] = React.useState('');
|
|
3985
4016
|
const [threadOpen, setThreadOpen] = React.useState(false);
|
|
3986
4017
|
const [draftMode, setMode] = React.useState('discuss');
|
|
@@ -4218,6 +4249,9 @@ window.__ModuleLoader__.load({
|
|
|
4218
4249
|
const next = normalizePayload(await response.json());
|
|
4219
4250
|
if (!next) throw new Error('invalid bootstrap payload');
|
|
4220
4251
|
if (!alive || seq !== loadSeqRef.current) return;
|
|
4252
|
+
if (!dataRef.current && initialBoardProject && !next.projects.some((project) => project.id === initialBoardProject)) {
|
|
4253
|
+
throw new Error(t('archivedNote'));
|
|
4254
|
+
}
|
|
4221
4255
|
applyData(next);
|
|
4222
4256
|
setLoadError('');
|
|
4223
4257
|
setPhase('ready');
|
|
@@ -6374,6 +6408,37 @@ window.__ModuleLoader__.load({
|
|
|
6374
6408
|
return h('span', { style: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', color: 'inherit' } }, h(PavilionMark, { size: 18 }));
|
|
6375
6409
|
}
|
|
6376
6410
|
|
|
6411
|
+
function SessionBoardShortcut({ sessionId, useSession, t, openBoard }) {
|
|
6412
|
+
const running = useSession((snapshot) => snapshot.running);
|
|
6413
|
+
const [target, setTarget] = React.useState(null);
|
|
6414
|
+
React.useEffect(() => {
|
|
6415
|
+
if (!sessionId) return;
|
|
6416
|
+
const controller = new AbortController();
|
|
6417
|
+
fetch('/ai-team/api/session-project?session=' + encodeURIComponent(sessionId), {
|
|
6418
|
+
headers: { accept: 'application/json' },
|
|
6419
|
+
signal: controller.signal,
|
|
6420
|
+
})
|
|
6421
|
+
.then((response) => response.ok ? response.json() : null)
|
|
6422
|
+
.then((project) => {
|
|
6423
|
+
if (!controller.signal.aborted) setTarget(project?.projectId ? { ...project, sessionId } : null);
|
|
6424
|
+
})
|
|
6425
|
+
.catch((error) => {
|
|
6426
|
+
if (!controller.signal.aborted) console.error(PKG + ': session board lookup failed', error);
|
|
6427
|
+
});
|
|
6428
|
+
return () => controller.abort();
|
|
6429
|
+
}, [sessionId]);
|
|
6430
|
+
if (!target || target.sessionId !== sessionId) return null;
|
|
6431
|
+
const label = target.projectName ? tf(t, 'sessionProjectBoard', { project: target.projectName }) : t('sessionBoard');
|
|
6432
|
+
return h('button', {
|
|
6433
|
+
className: 'at-session-board',
|
|
6434
|
+
type: 'button',
|
|
6435
|
+
title: label,
|
|
6436
|
+
'aria-label': label,
|
|
6437
|
+
'data-running': running || undefined,
|
|
6438
|
+
onClick: () => openBoard(target.projectId),
|
|
6439
|
+
}, h(PavilionMark, { size: 18 }));
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6377
6442
|
function apply(ctx) {
|
|
6378
6443
|
ctx.effect(() => {
|
|
6379
6444
|
const tag = document.createElement('style');
|
|
@@ -6384,10 +6449,33 @@ window.__ModuleLoader__.load({
|
|
|
6384
6449
|
}, `${PKG}: styles`);
|
|
6385
6450
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), `${PKG}: locale`);
|
|
6386
6451
|
const t = ctx.locale.bind(NS);
|
|
6452
|
+
// 宿主以 main slot 的 key 切换面板,跳转意图在工作台挂载时消费一次。
|
|
6453
|
+
let boardEntry = null;
|
|
6454
|
+
const layout = () => ctx.get?.('layout');
|
|
6455
|
+
const openBoard = (projectId) => {
|
|
6456
|
+
const entry = { projectId };
|
|
6457
|
+
boardEntry = entry;
|
|
6458
|
+
try {
|
|
6459
|
+
layout().selectPanel('ai-team');
|
|
6460
|
+
} catch (error) {
|
|
6461
|
+
if (boardEntry === entry) boardEntry = null;
|
|
6462
|
+
console.error(PKG + ': opening session board failed', error);
|
|
6463
|
+
}
|
|
6464
|
+
};
|
|
6465
|
+
function TeamPanel() {
|
|
6466
|
+
const [entry] = React.useState(() => boardEntry);
|
|
6467
|
+
React.useEffect(() => {
|
|
6468
|
+
if (entry === boardEntry) boardEntry = null;
|
|
6469
|
+
}, [entry]);
|
|
6470
|
+
return h(Boundary, { t }, h(Workbench, { t, ctx, initialBoardProject: entry?.projectId }));
|
|
6471
|
+
}
|
|
6387
6472
|
ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({
|
|
6388
6473
|
name: 'sidebar.panellist', id: 'ai-team', order: 25, label: () => ctx.locale.bind(NS)('panel'),
|
|
6389
6474
|
}, PanelIcon));
|
|
6390
|
-
ctx.slots.inject('main', () => ctx.slots.register({ name: 'main', key: 'ai-team' }, () => h(
|
|
6475
|
+
ctx.slots.inject('main', () => ctx.slots.register({ name: 'main', key: 'ai-team' }, () => h(TeamPanel)));
|
|
6476
|
+
ctx.slots.inject('conversation.session.header.actions', () => ctx.slots.register({
|
|
6477
|
+
name: 'conversation.session.header.actions', id: 'ai-team-board', order: 25,
|
|
6478
|
+
}, (props) => typeof layout()?.selectPanel === 'function' && h(SessionBoardShortcut, { ...props, t, openBoard })));
|
|
6391
6479
|
}
|
|
6392
6480
|
|
|
6393
6481
|
return { inject: ['slots', 'locale'], apply };
|
package/index.js
CHANGED
|
@@ -419,6 +419,7 @@ export function apply(ctx, config = {}) {
|
|
|
419
419
|
};
|
|
420
420
|
/** 会话属于哪个团队(PMO 宿主会话或成员会话):停止守卫与推进纪律共用这一份判定。 */
|
|
421
421
|
const teamProjectOf = (sessionId) => {
|
|
422
|
+
if (typeof sessionId !== 'string' || sessionId === '') return null;
|
|
422
423
|
for (const runtime of booted?.runtimes?.values() ?? []) {
|
|
423
424
|
const state = runtime.service.state;
|
|
424
425
|
const inTeam = state.hostSessionId === sessionId
|
|
@@ -2964,6 +2965,14 @@ export function apply(ctx, config = {}) {
|
|
|
2964
2965
|
},
|
|
2965
2966
|
});
|
|
2966
2967
|
}
|
|
2968
|
+
if (req.method === 'GET' && url.pathname === '/ai-team/api/session-project') {
|
|
2969
|
+
const sessionId = url.searchParams.get('session');
|
|
2970
|
+
const team = teamProjectOf(sessionId);
|
|
2971
|
+
const project = team && projectRuntime(team.projectId)?.service.state.projects?.[team.projectId];
|
|
2972
|
+
if (!project || project.status === 'archived') return send(res, { projectId: null });
|
|
2973
|
+
diag.append({ ev: 'session.board.lookup', sessionId, projectId: team.projectId });
|
|
2974
|
+
return send(res, { projectId: team.projectId, projectName: team.projectName });
|
|
2975
|
+
}
|
|
2967
2976
|
if (req.method === 'GET' && url.pathname === '/ai-team/api/bootstrap') {
|
|
2968
2977
|
const requested = url.searchParams.get('project');
|
|
2969
2978
|
const requestedRuntime = requested === null ? null : projectRuntime(requested);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suifei/dsh-ai-team",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.149",
|
|
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",
|