@yeaft/webchat-agent 0.1.461 → 0.1.463
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/crew/role-query.js +6 -6
- package/crew/routing.js +1 -1
- package/crew/session.js +3 -3
- package/crew-i18n.js +14 -12
- package/package.json +1 -1
package/crew/role-query.js
CHANGED
|
@@ -150,7 +150,7 @@ async function _createRoleQueryInner(session, roleName) {
|
|
|
150
150
|
// 继承全局 MCP disallowedTools,避免不必要的 tool schema token 消耗
|
|
151
151
|
const globalDisallowed = ctx.CONFIG?.disallowedTools || [];
|
|
152
152
|
// Developer 角色保留 skills(tdd、commit 等对开发有帮助),
|
|
153
|
-
// 其他角色(pm、reviewer、
|
|
153
|
+
// 其他角色(pm、reviewer、product-reviewer)禁用 skills 以避免和 ROUTE 冲突
|
|
154
154
|
const isDeveloper = role.roleType === 'developer';
|
|
155
155
|
// Crew 角色禁用 Agent 工具:角色间协作必须通过 ROUTE 块,不能自行启动 sub-agent
|
|
156
156
|
// 非 developer 角色额外禁用 Skill 工具:skills 的 trigger 词会和角色职能冲突
|
|
@@ -369,10 +369,10 @@ ${m.contextRestartContent}`;
|
|
|
369
369
|
if (role.groupIndex > 0 && role.roleType === 'developer') {
|
|
370
370
|
const gi = role.groupIndex;
|
|
371
371
|
const rev = allRoles.find(r => r.roleType === 'reviewer' && r.groupIndex === gi);
|
|
372
|
-
const
|
|
373
|
-
if (rev &&
|
|
372
|
+
const prev = allRoles.find(r => r.roleType === 'product-reviewer' && r.groupIndex === gi);
|
|
373
|
+
if (rev && prev) {
|
|
374
374
|
prompt += `\n\n${m.devGroupBinding}
|
|
375
|
-
${m.devGroupBindingContent(gi, roleLabel(rev), rev.name, roleLabel(
|
|
375
|
+
${m.devGroupBindingContent(gi, roleLabel(rev), rev.name, roleLabel(prev), prev.name)}
|
|
376
376
|
|
|
377
377
|
\`\`\`
|
|
378
378
|
---ROUTE---
|
|
@@ -381,8 +381,8 @@ summary: ${m.reviewCode}
|
|
|
381
381
|
---END_ROUTE---
|
|
382
382
|
|
|
383
383
|
---ROUTE---
|
|
384
|
-
to: ${
|
|
385
|
-
summary: ${m.
|
|
384
|
+
to: ${prev.name}
|
|
385
|
+
summary: ${m.productReviewFeature}
|
|
386
386
|
---END_ROUTE---
|
|
387
387
|
\`\`\`
|
|
388
388
|
|
package/crew/routing.js
CHANGED
|
@@ -240,7 +240,7 @@ export async function executeRoute(session, fromRole, route, turnImages = []) {
|
|
|
240
240
|
if (toRoleConfig) {
|
|
241
241
|
switch (toRoleConfig.roleType) {
|
|
242
242
|
case 'reviewer': status = m.kanbanStatusReview; break;
|
|
243
|
-
case '
|
|
243
|
+
case 'product-reviewer': status = m.kanbanStatusProductReview; break;
|
|
244
244
|
default:
|
|
245
245
|
if (toRoleConfig.isDecisionMaker) status = m.kanbanStatusDecision;
|
|
246
246
|
}
|
package/crew/session.js
CHANGED
|
@@ -27,11 +27,11 @@ export const crewSessions = new Map();
|
|
|
27
27
|
|
|
28
28
|
const SHORT_PREFIX = {
|
|
29
29
|
developer: 'dev',
|
|
30
|
-
|
|
31
|
-
reviewer: '
|
|
30
|
+
reviewer: 'rev',
|
|
31
|
+
'product-reviewer': 'prev'
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const EXPANDABLE_ROLES = new Set(['developer', '
|
|
34
|
+
const EXPANDABLE_ROLES = new Set(['developer', 'reviewer', 'product-reviewer']);
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* 展开角色列表:count > 1 的执行者角色展开为多个实例
|
package/crew-i18n.js
CHANGED
|
@@ -154,13 +154,13 @@ UI/交互方案不确定时找设计师确认。需求不明确时找决策者 "
|
|
|
154
154
|
},
|
|
155
155
|
|
|
156
156
|
devGroupBinding: '# 开发组绑定',
|
|
157
|
-
devGroupBindingContent: (gi, revLabel, revName,
|
|
157
|
+
devGroupBindingContent: (gi, revLabel, revName, prevLabel, prevName) =>
|
|
158
158
|
`你属于开发组 ${gi}。你的搭档:
|
|
159
|
-
-
|
|
160
|
-
-
|
|
159
|
+
- 技术审查: ${revLabel} (${revName})
|
|
160
|
+
- 产品审查: ${prevLabel} (${prevName})
|
|
161
161
|
|
|
162
|
-
开发完成后,请同时发两个 ROUTE 块分别给 ${revName} 和 ${
|
|
163
|
-
devGroupBindingNote: '
|
|
162
|
+
开发完成后,请同时发两个 ROUTE 块分别给 ${revName} 和 ${prevName}:`,
|
|
163
|
+
devGroupBindingNote: '技术审查和产品审查并行进行,各自完成后 ROUTE 回 PM。',
|
|
164
164
|
|
|
165
165
|
implLoginPage: '实现登录页面',
|
|
166
166
|
implLoginSummary: '请实现登录页面,包括表单验证和API调用',
|
|
@@ -168,6 +168,7 @@ UI/交互方案不确定时找设计师确认。需求不明确时找决策者 "
|
|
|
168
168
|
implRegisterSummary: '请实现注册页面,包括邮箱验证',
|
|
169
169
|
reviewCode: '请审查代码变更',
|
|
170
170
|
testFeature: '请测试功能',
|
|
171
|
+
productReviewFeature: '请从产品/用户角度审查功能',
|
|
171
172
|
|
|
172
173
|
// writeSharedClaudeMd
|
|
173
174
|
projectGoal: '# 项目目标',
|
|
@@ -257,7 +258,7 @@ UI/交互方案不确定时找设计师确认。需求不明确时找决策者 "
|
|
|
257
258
|
kanbanColSummary: '最新进展',
|
|
258
259
|
kanbanStatusDev: '🔨 开发中',
|
|
259
260
|
kanbanStatusReview: '📝 审查中',
|
|
260
|
-
|
|
261
|
+
kanbanStatusProductReview: '🔍 产品审查中',
|
|
261
262
|
kanbanStatusDecision: '⏳ 待决策',
|
|
262
263
|
kanbanAutoSave: '自动保存 - context 超限前',
|
|
263
264
|
|
|
@@ -413,13 +414,13 @@ Discuss with the decision maker when technical implementation is uncertain.`,
|
|
|
413
414
|
},
|
|
414
415
|
|
|
415
416
|
devGroupBinding: '# Dev Group Binding',
|
|
416
|
-
devGroupBindingContent: (gi, revLabel, revName,
|
|
417
|
+
devGroupBindingContent: (gi, revLabel, revName, prevLabel, prevName) =>
|
|
417
418
|
`You belong to dev group ${gi}. Your partners:
|
|
418
|
-
- Reviewer: ${revLabel} (${revName})
|
|
419
|
-
-
|
|
419
|
+
- Tech Reviewer: ${revLabel} (${revName})
|
|
420
|
+
- Product Reviewer: ${prevLabel} (${prevName})
|
|
420
421
|
|
|
421
|
-
After development is complete, send two ROUTE blocks simultaneously to ${revName} and ${
|
|
422
|
-
devGroupBindingNote: '
|
|
422
|
+
After development is complete, send two ROUTE blocks simultaneously to ${revName} and ${prevName}:`,
|
|
423
|
+
devGroupBindingNote: 'Tech review and product review run in parallel. Each ROUTEs back to PM after completion.',
|
|
423
424
|
|
|
424
425
|
implLoginPage: 'Implement login page',
|
|
425
426
|
implLoginSummary: 'Please implement the login page including form validation and API calls',
|
|
@@ -427,6 +428,7 @@ After development is complete, send two ROUTE blocks simultaneously to ${revName
|
|
|
427
428
|
implRegisterSummary: 'Please implement the registration page including email verification',
|
|
428
429
|
reviewCode: 'Please review code changes',
|
|
429
430
|
testFeature: 'Please test the feature',
|
|
431
|
+
productReviewFeature: 'Please review from product/user perspective',
|
|
430
432
|
|
|
431
433
|
// writeSharedClaudeMd
|
|
432
434
|
projectGoal: '# Project Goal',
|
|
@@ -515,7 +517,7 @@ Roles don't need to manually create or update these files.`,
|
|
|
515
517
|
kanbanColSummary: 'Latest Progress',
|
|
516
518
|
kanbanStatusDev: '🔨 Developing',
|
|
517
519
|
kanbanStatusReview: '📝 Reviewing',
|
|
518
|
-
|
|
520
|
+
kanbanStatusProductReview: '🔍 Product Reviewing',
|
|
519
521
|
kanbanStatusDecision: '⏳ Pending Decision',
|
|
520
522
|
kanbanAutoSave: 'Auto-save — before context limit',
|
|
521
523
|
|