feat: 将 Agents/Teams 工具纳入 Tool Search 按需发现

将 TeamCreate、TeamDelete、SendMessage 从 CORE_TOOLS 移除,
使其成为 deferred 工具,通过 ToolSearch 按需发现以减少 context token。
swarm 模式下 SendMessage 保持 always loaded,TeamCreate/TeamDelete
在 swarm 未启用时调用返回启用提示。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-05-09 15:45:20 +08:00
parent 3ac866be98
commit af0d7dc851
7 changed files with 36 additions and 18 deletions

View File

@@ -135,10 +135,6 @@ export const CORE_TOOLS = new Set([
// Agent & interaction
AGENT_TOOL_NAME, // 'Agent'
ASK_USER_QUESTION_TOOL_NAME, // 'AskUserQuestion'
SEND_MESSAGE_TOOL_NAME, // 'SendMessage'
// Team (swarm)
TEAM_CREATE_TOOL_NAME, // 'TeamCreate'
TEAM_DELETE_TOOL_NAME, // 'TeamDelete'
// Task management
TASK_OUTPUT_TOOL_NAME, // 'TaskOutput'
TASK_STOP_TOOL_NAME, // 'TaskStop'