@yeaft/webchat-agent 0.1.378 → 0.1.379

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,8 +149,12 @@ async function _createRoleQueryInner(session, roleName) {
149
149
 
150
150
  // 继承全局 MCP disallowedTools,避免不必要的 tool schema token 消耗
151
151
  const globalDisallowed = ctx.CONFIG?.disallowedTools || [];
152
- // Crew 角色禁用 Agent 工具,强制通过 ROUTE 块协作
153
- const crewDisallowed = ['Agent'];
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'];
154
158
  const effectiveDisallowed = [...globalDisallowed, ...crewDisallowed];
155
159
 
156
160
  const queryOptions = {
@@ -164,14 +168,11 @@ async function _createRoleQueryInner(session, roleName) {
164
168
 
165
169
  // Intercept AskUserQuestion for all roles — forward to Web UI for interactive answering.
166
170
  // Without this, non-DM roles' AskCard buttons stay disabled (no askRequestId).
167
- // Also block yeaft-skills in crew mode they inject personas/workflows that interfere with role behavior.
171
+ // Note: Skill tool is fully disallowed via disallowedTools above, so no canCallTool guard needed.
168
172
  queryOptions.canCallTool = async (toolName, input, toolCtx) => {
169
173
  if (toolName === 'AskUserQuestion') {
170
174
  return await handleAskUserQuestion(session.id, input, toolCtx);
171
175
  }
172
- if (toolName === 'Skill' && input?.skill && input.skill.startsWith('yeaft')) {
173
- throw new Error('yeaft-skills are disabled in crew mode — crew roles use ROUTE protocol instead');
174
- }
175
176
  return input;
176
177
  };
177
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.378",
3
+ "version": "0.1.379",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",