dsh-team-control 0.2.2 → 0.2.3
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/index.js +10 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1682,18 +1682,17 @@ function boardLeadPrompt(task, sameSession) {
|
|
|
1682
1682
|
'2. 调用 team_models 查看可用路由;只能使用以下模型:',
|
|
1683
1683
|
models,
|
|
1684
1684
|
'3. 用 team_task 拆解并派发;用 team_status / team_report 跟踪。不要自己写代码,不要重复成员的工作。',
|
|
1685
|
-
'4.
|
|
1686
|
-
'5.
|
|
1687
|
-
'6.
|
|
1685
|
+
'4. 用户反馈 Bug 时,不要自己去读代码排查:先判断归属成员,用 team_send 把复现步骤与怀疑点派给对应成员定位、修复;你只做分派、汇总与状态汇报。',
|
|
1686
|
+
'5. 每轮结束前必须先调用 board_task_status 对齐状态:全部任务成功→done(附完成摘要),失败→failed(附原因),仍需继续或等待用户→inprogress。不能只在开始时调用一次。',
|
|
1687
|
+
'6. 用户再次发消息时,先调用 board_task_status({ status: "inprogress" }),再继续处理。',
|
|
1688
1688
|
];
|
|
1689
1689
|
const soloRules = [
|
|
1690
1690
|
'本任务不开启团队:由你自己直接完成所有工作,不要调用 team_create / team_spawn / team_task。',
|
|
1691
1691
|
'',
|
|
1692
1692
|
'规则:',
|
|
1693
1693
|
'1. 按任务描述直接修改文件、运行命令并验证结果。',
|
|
1694
|
-
'2.
|
|
1695
|
-
'3.
|
|
1696
|
-
'4. 之后如果用户再次发消息,先调用 board_task_status({ status: "inprogress" }),再继续处理。',
|
|
1694
|
+
'2. 每轮结束前必须先调用 board_task_status 对齐状态:全部完成→done(附完成摘要),失败→failed(附原因),仍需继续或等待用户→inprogress。不能只在开始时调用一次。',
|
|
1695
|
+
'3. 用户再次发消息时,先调用 board_task_status({ status: "inprogress" }),再继续处理。',
|
|
1697
1696
|
];
|
|
1698
1697
|
const rules = useTeam ? teamRules : soloRules;
|
|
1699
1698
|
// 同会话执行:计划已经在同一会话的上文里,不再重复注入任务描述与 plan 全文。
|
|
@@ -3003,7 +3002,7 @@ function buildTools(s, ctx) {
|
|
|
3003
3002
|
|
|
3004
3003
|
tools.push({
|
|
3005
3004
|
name: 'board_task_status',
|
|
3006
|
-
description: 'Report the current workspace-board task status from the Lead session. Call
|
|
3005
|
+
description: 'Report the current workspace-board task status from the Lead session. Call it at the end of EVERY turn: "done" after all team tasks succeed, "failed" when the task cannot be completed, and "inprogress" while work remains or when waiting for the user (also call it when the user sends a new message after a finished task).',
|
|
3007
3006
|
parameters: {
|
|
3008
3007
|
type: 'object',
|
|
3009
3008
|
additionalProperties: false,
|
|
@@ -3599,13 +3598,15 @@ export function apply(ctx, config) {
|
|
|
3599
3598
|
}).catch(() => { /* 非终态时 sidecar 会拒绝,忽略 */ });
|
|
3600
3599
|
});
|
|
3601
3600
|
|
|
3602
|
-
//
|
|
3601
|
+
// 看板会话 idle:规划阶段宽限后仍停在 planning → 判失败,避免永久占着槽位。
|
|
3603
3602
|
ctx.on('agent/status', ({ agent, status } = {}) => {
|
|
3604
3603
|
const sessionId = agent?.id != null ? String(agent.id) : null;
|
|
3605
3604
|
const rec = sessionId ? boardSessions.get(sessionId) : null;
|
|
3606
3605
|
if (!rec) return;
|
|
3607
3606
|
if (status === 'running') { rec.sawRunning = true; return; }
|
|
3608
|
-
if (status !== 'idle' ||
|
|
3607
|
+
if (status !== 'idle' || !rec.sawRunning) return;
|
|
3608
|
+
|
|
3609
|
+
if (rec.phase !== 'planning') return;
|
|
3609
3610
|
const timer = setTimeout(() => {
|
|
3610
3611
|
void (async () => {
|
|
3611
3612
|
if (rec.phase !== 'planning') return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-team-control",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Expose the local dsh-team sidecar as model-facing tools (team_create / team_spawn / team_status / team_task / team_send / team_report_task / team_dispatch / team_control / team_approve / team_report), spawn real DSH sub-agent members with per-member permission presets, forward member approvals to the Lead, and manage the sidecar lifecycle.",
|
|
6
6
|
"icon": "./icon.svg",
|