@suifei/dsh-ai-team 0.4.158 → 0.4.159
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 +5 -2
- package/lib/host/session-team-command.js +32 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.159 - 2026-12-04
|
|
4
|
+
|
|
5
|
+
- 在 DSH 会话建队目标末尾可用「配 6 个人」指定人数。草稿显示目标人数、预设人数和岗位,人数不一致时先提示调整预设。感谢 @buger-gif 的会话组队与指定人数反馈(#121)。
|
|
6
|
+
|
|
3
7
|
## 0.4.158 - 2026-12-04
|
|
4
8
|
|
|
5
9
|
- 编制巡检从支持 `capacityOf` 的 DSH 读取当前代理树的已占用与剩余槽位,加人建议会标明采样时的并发余量。旧宿主沿用容量回执或默认估计。感谢 @buger-gif 提供编制巡检和并发边界的案例(#116)。
|
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
## 最近更新
|
|
39
39
|
|
|
40
|
+
- **会话建队人数核对**(0.4.159)。目标可用「配 6 个人」指定人数,草稿列出目标人数和预设编制,人数不一致时先提示调整预设。感谢 [@buger-gif](https://github.com/buger-gif),[#121](https://github.com/suifei/dsh-ai-team/issues/121)。
|
|
40
41
|
- **实时代理树槽位**(0.4.158)。支持 `capacityOf` 的宿主会在编制巡检中报告已占用和剩余槽位,建议新增成员时可看出同时启动是否需要排队。感谢 [@buger-gif](https://github.com/buger-gif),[#116](https://github.com/suifei/dsh-ai-team/issues/116)。
|
|
41
42
|
- **DSH 0.2.3 Alpha 看板兼容**(0.4.158)。工作台沿用宿主 Web 路由的会话认证,修复已登录时看板仍加载失败的问题。感谢 [@Estelle00](https://github.com/Estelle00),[#122](https://github.com/suifei/dsh-ai-team/issues/122)。
|
|
42
43
|
- **会话建队建议与一句话调整编制**(0.4.157)。根据目标匹配团队预设并显示依据。可用一句话准备增员、改岗位或离队交接的草稿。感谢 [@buger-gif](https://github.com/buger-gif),[#121](https://github.com/suifei/dsh-ai-team/issues/121)。
|
|
@@ -143,7 +144,9 @@ const svg = HashAvatar.svg('墨渊', { gender: 'male', age: 'middle', race: 'asi
|
|
|
143
144
|
|
|
144
145
|
可用 `/ai-team 建队 --recommend 整理接口文档` 根据目标匹配文档、内容、教育、视频或游戏预设。唯一候选会随匹配依据进入草稿。有多个候选或线索不足时,用 `--team` 指定预设。省略这两个选项时使用设置中的团队。
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
若有明确人数,可用 `/ai-team 建队 --recommend 编写培训教材,配 6 个人`。预设需要达到目标人数才能生成草稿。人数不一致时,可以用 `--team` 选择其他预设或在文渊阁调整预设。
|
|
148
|
+
|
|
149
|
+
会话会显示工作目录、目标、团队预设、人数与岗位。输入草稿末尾的 `/ai-team 确认 草稿ID` 创建项目,或用对应的取消命令丢弃草稿。草稿跟随当前会话,宿主重启后可以重新生成。
|
|
147
150
|
|
|
148
151
|
新项目会出现在文渊阁,PMO 自动初始关闭。团队准备好后,可以在项目页开启 PMO 自动。
|
|
149
152
|
|
|
@@ -430,7 +433,7 @@ round-19 DeepSeek + Zhipu 双 provider
|
|
|
430
433
|
| 贡献者 | 贡献 | 带来的进展 |
|
|
431
434
|
|---|---|---|
|
|
432
435
|
| [@idontlikefruit](https://github.com/idontlikefruit) | 受阻状态的三组复现输入 [#115](https://github.com/suifei/dsh-ai-team/issues/115) | 统一看板徽标、读屏和分组统计的受阻判定,保留历史依赖 |
|
|
433
|
-
| [@buger-gif](https://github.com/buger-gif) | 编制巡检、离队交接案例 [#116](https://github.com/suifei/dsh-ai-team/issues/116)、[#117](https://github.com/suifei/dsh-ai-team/issues/117),派发空转记录 [#120](https://github.com/suifei/dsh-ai-team/issues/120)
|
|
436
|
+
| [@buger-gif](https://github.com/buger-gif) | 编制巡检、离队交接案例 [#116](https://github.com/suifei/dsh-ai-team/issues/116)、[#117](https://github.com/suifei/dsh-ai-team/issues/117),派发空转记录 [#120](https://github.com/suifei/dsh-ai-team/issues/120),会话建队、指定人数与调整编制场景 [#121](https://github.com/suifei/dsh-ai-team/issues/121) | 统一认领与离队顺序,减少派发空转,记录验收缺口与代理树的实时槽位。在 DSH 会话按目标建议预设并核对人数,确认一句话编制草稿及原任务交接 |
|
|
434
437
|
| [@Estelle00](https://github.com/Estelle00) | DSH 0.2.3 启动 503 的复现和桌面验证 [#122](https://github.com/suifei/dsh-ai-team/issues/122) | 接入新版会话鉴权接口,恢复工作台初始化,并在 Alpha 宿主验证看板登录 |
|
|
435
438
|
| [@phm101299-ui](https://github.com/phm101299-ui) | PMO 冷恢复的复现、根因和桌面验证 [#112](https://github.com/suifei/dsh-ai-team/issues/112) | 让原 PMO 在宿主重启后带着模型路由继续工作,保留成员关系和任务 |
|
|
436
439
|
| [@godfay-g](https://github.com/godfay-g) | 技能目录和 ZIP 的导入建议 [#109](https://github.com/suifei/dsh-ai-team/issues/109) | 成员与自定义人才可在文渊阁选择已安装的技能或导入完整技能包。0.4.151 统一新建人才的导入入口,并由文渊阁直接安装整包 |
|
|
@@ -5,7 +5,7 @@ import { ids, newId } from '../domain/ids.js';
|
|
|
5
5
|
import { isRosterAction, rosterHelp } from './session-roster.js';
|
|
6
6
|
import { requireWorkspaceDirectory } from './workspace-path.js';
|
|
7
7
|
|
|
8
|
-
const HELP = `用 /ai-team 建队 目标 生成草稿。可在目标前加 --team 预设ID 或 --recommend
|
|
8
|
+
const HELP = `用 /ai-team 建队 目标 生成草稿。可在目标前加 --team 预设ID 或 --recommend,或在目标末尾加「,配 6 个人」核对编制。按草稿中的命令确认或取消。\n${rosterHelp}`;
|
|
9
9
|
|
|
10
10
|
function sessionWorkspace(session) {
|
|
11
11
|
const path = session?.header?.cwd;
|
|
@@ -17,6 +17,21 @@ function sessionWorkspace(session) {
|
|
|
17
17
|
|
|
18
18
|
const presetSignature = (preset) => JSON.stringify([preset.id, preset.source, preset.dir, preset.team]);
|
|
19
19
|
|
|
20
|
+
function requestedRosterSize(goal) {
|
|
21
|
+
const count = /(?:^|[,;。\r\n])\s*配\s*([+-]?\d+(?:\.\d+)?|[零〇一二两三四五六七八九十]+)\s*(?:[个名位]\s*)?(?:人|成员)\s*[。.!]?$/u.exec(goal.normalize('NFKC'))?.[1];
|
|
22
|
+
if (count === undefined) return null;
|
|
23
|
+
const digits = '零一二三四五六七八九';
|
|
24
|
+
const chinese = /^(?:([一二三四五六七八九]?)十)?([零一二三四五六七八九]?)$/u.exec(count.replaceAll('两', '二').replaceAll('〇', '零'));
|
|
25
|
+
let size = Number(count);
|
|
26
|
+
if (chinese) {
|
|
27
|
+
const [, tens, ones] = chinese;
|
|
28
|
+
const tensDigit = tens === '' ? 1 : digits.indexOf(tens ?? '零');
|
|
29
|
+
size = 10 * tensDigit + digits.indexOf(ones || '零');
|
|
30
|
+
}
|
|
31
|
+
if (!Number.isSafeInteger(size) || size < 1) fail(ERRORS.INVALID_ARGUMENT, '请填写正整数人数,例如「,配 6 个人」。');
|
|
32
|
+
return size;
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
/** 只有当前用户会话能确认它的草稿。建队和编制共用同一确认流程。 */
|
|
21
36
|
export function sessionTeamCommand({ prepare, create, prepareRoster, diag }) {
|
|
22
37
|
const drafts = new WeakMap();
|
|
@@ -52,25 +67,37 @@ export function sessionTeamCommand({ prepare, create, prepareRoster, diag }) {
|
|
|
52
67
|
const goal = (recommend ? argument.slice('--recommend'.length) : selected?.[2] ?? argument).trim();
|
|
53
68
|
if (goal === '' || (!selected && argument.startsWith('--team'))) return { kind: 'error', text: HELP };
|
|
54
69
|
const input = { name: goal.split(/\r?\n/, 1)[0], goal, workspacePath, team: selected?.[1] ?? '', recommend };
|
|
55
|
-
const
|
|
70
|
+
const requestedMembers = requestedRosterSize(goal);
|
|
71
|
+
const prepareDraft = () => {
|
|
72
|
+
const project = prepare(input);
|
|
73
|
+
const count = project.teamPreset.team.members.length;
|
|
74
|
+
if (requestedMembers !== null && count !== requestedMembers) {
|
|
75
|
+
const { id, team } = project.teamPreset;
|
|
76
|
+
fail(ERRORS.INVALID_ARGUMENT, `目标要求 ${requestedMembers} 人,${team.name}(${id})有 ${count} 人。请用 --team 选择匹配人数的预设,或在文渊阁调整预设后重新建队。`);
|
|
77
|
+
}
|
|
78
|
+
return project;
|
|
79
|
+
};
|
|
80
|
+
const proposed = prepareDraft();
|
|
81
|
+
const members = proposed.teamPreset.team.members;
|
|
56
82
|
const id = ids.project();
|
|
57
83
|
const signature = presetSignature(proposed.teamPreset);
|
|
58
84
|
return preview(session, workspacePath, {
|
|
59
85
|
id, action,
|
|
60
|
-
details: { preset: proposed.teamPreset.id, members:
|
|
86
|
+
details: { preset: proposed.teamPreset.id, members: members.length, requestedMembers },
|
|
61
87
|
lines: [
|
|
62
88
|
`建队草稿 ${input.name}`,
|
|
63
89
|
`目标 ${goal}`,
|
|
64
90
|
`工作目录 ${workspacePath}`,
|
|
65
91
|
`预设 ${proposed.teamPreset.team.name}(${proposed.teamPreset.id})`,
|
|
66
92
|
...(proposed.matchedTerms ? [`匹配依据 ${proposed.matchedTerms.join('、')}`] : []),
|
|
67
|
-
|
|
93
|
+
`编制 ${members.length} 人${requestedMembers !== null ? `(目标 ${requestedMembers} 人)` : ''}`,
|
|
94
|
+
...members.map((member) => `- ${member.name} · ${member.role}`),
|
|
68
95
|
'确认后创建项目,PMO 自动为关闭状态。',
|
|
69
96
|
],
|
|
70
97
|
async apply() {
|
|
71
98
|
let approved;
|
|
72
99
|
try {
|
|
73
|
-
approved =
|
|
100
|
+
approved = prepareDraft();
|
|
74
101
|
} catch (error) {
|
|
75
102
|
if (error instanceof DomainError) fail(ERRORS.REVISION, '团队预设已更新,请重新生成草稿后再确认。');
|
|
76
103
|
throw error;
|
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.159",
|
|
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",
|