@yeaft/webchat-agent 0.1.399 → 0.1.409

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.
@@ -149,12 +149,13 @@ async function _createRoleQueryInner(session, roleName) {
149
149
 
150
150
  // 继承全局 MCP disallowedTools,避免不必要的 tool schema token 消耗
151
151
  const globalDisallowed = ctx.CONFIG?.disallowedTools || [];
152
- // Crew 角色禁用 Agent 和 Skill 工具:
153
- // - Agent: 角色间协作必须通过 ROUTE 块,不能自行启动 sub-agent
154
- // - Skill: skills trigger 词会和角色职能冲突(如 review-code、commit),
155
- // 导致 Claude 调用 Skill 而不是输出 ROUTE 块。从 schema 层面移除比
156
- // canCallTool throw 更可靠(完全不消耗 tool schema token)
157
- const crewDisallowed = ['Agent', 'Skill'];
152
+ // Developer 角色保留 skills(tdd、commit 等对开发有帮助),
153
+ // 其他角色(pm、reviewer、tester)禁用 skills 以避免和 ROUTE 冲突
154
+ const isDeveloper = role.roleType === 'developer';
155
+ // Crew 角色禁用 Agent 工具:角色间协作必须通过 ROUTE 块,不能自行启动 sub-agent
156
+ // developer 角色额外禁用 Skill 工具:skills 的 trigger 词会和角色职能冲突
157
+ // (如 review-code、commit),导致 Claude 调用 Skill 而不是输出 ROUTE 块
158
+ const crewDisallowed = isDeveloper ? ['Agent'] : ['Agent', 'Skill'];
158
159
  const effectiveDisallowed = [...globalDisallowed, ...crewDisallowed];
159
160
 
160
161
  const queryOptions = {
@@ -163,6 +164,9 @@ async function _createRoleQueryInner(session, roleName) {
163
164
  abort: abortController.signal,
164
165
  model: role.model || undefined,
165
166
  appendSystemPrompt: systemPrompt,
167
+ // 非 developer 角色禁用 skills(--disable-slash-commands),
168
+ // 从 CLI 层面阻止 skills 系统 prompt 注入,避免和 ROUTE 冲突
169
+ ...(!isDeveloper && { disableSlashCommands: true }),
166
170
  ...(effectiveDisallowed.length > 0 && { disallowedTools: effectiveDisallowed })
167
171
  };
168
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.399",
3
+ "version": "0.1.409",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -52,9 +52,11 @@
52
52
  "ext": "js"
53
53
  },
54
54
  "dependencies": {
55
+ "better-sqlite3": "^11.0.0",
55
56
  "dotenv": "^16.3.1",
56
57
  "tweetnacl": "^1.0.3",
57
58
  "tweetnacl-util": "^0.15.1",
59
+ "uuid": "^11.1.0",
58
60
  "ws": "^8.16.0"
59
61
  },
60
62
  "optionalDependencies": {
package/sdk/query.js CHANGED
@@ -350,7 +350,8 @@ export function query(config) {
350
350
  model,
351
351
  canCallTool,
352
352
  abort,
353
- noSessionPersistence
353
+ noSessionPersistence,
354
+ disableSlashCommands
354
355
  } = {}
355
356
  } = config;
356
357
 
@@ -374,6 +375,7 @@ export function query(config) {
374
375
  if (disallowedTools.length > 0) args.push('--disallowedTools', ...disallowedTools);
375
376
  if (permissionMode) args.push('--permission-mode', permissionMode);
376
377
  if (noSessionPersistence) args.push('--no-session-persistence');
378
+ if (disableSlashCommands) args.push('--disable-slash-commands');
377
379
 
378
380
  // Handle prompt input
379
381
  if (typeof prompt === 'string') {