feat(app): 移除内置agents并添加CORS支持和技能上传优化

移除了agents/registry.json中的所有内置agents配置,将agents数组清空。
为web应用添加了CORS中间件支持,允许指定的前端地址跨域访问。
重构了技能上传功能,增加了LLM重写机制,自动规范化上传的技能格式。
新增了工具名称提取逻辑,从技能正文中自动识别Required Tools段落。
更新了技能学习候选者和草稿的载荷结构,添加评估报告统计信息。
修改了意图路由技能的说明,改进任务状态管理逻辑。
This commit is contained in:
2026-06-12 13:25:20 +08:00
parent fc9fd93c36
commit 8aeb97a5fc
76 changed files with 3382 additions and 553 deletions

View File

@ -9,44 +9,85 @@ tools:
- todo
---
# Utility Tools — 辅助工具集
# Utility Tools
## Overview
辅助工具集包括任务分解Todo、任务委托Delegate、子 Agent 生成Spawn、消息发送和需求澄清。
## When to Use
- Use when the task requires Utility Tools guidance.
## Required Tools
- `clarify`
- `delegate`
- `send_message`
- `spawn`
- `todo`
## Workflow
- Identify whether the user's request matches the skill's trigger conditions.
- Read the relevant source guidance below and apply only the steps that fit the current task.
- Use the required tools deliberately and keep tool output tied to the user's goal.
### Source Guidance
### Utility Tools — 辅助工具集
任务管理、委托和协作的辅助工具。
## 工具说明
#### 工具说明
### todo (TodoWrite)
##### todo (TodoWrite)
创建和管理任务列表,跟踪复杂任务的进度。
- 适合多步骤、复杂任务时使用
- 标记当前正在进行的任务
- 完成后立即更新状态
### delegate (DelegateTool)
##### delegate (DelegateTool)
将任务委托给专门的子 Agent 执行。
- 适合独立、可并行的工作
- 委托时提供清晰的上下文和目标
- 子 Agent 完成后再整合结果
### spawn (SpawnTool)
##### spawn (SpawnTool)
启动新的 Agent 实例执行特定任务。
- 适合需要独立运行的工作
- 支持后台运行(不阻塞主流程)
### send_message (SendMessageTool)
##### send_message (SendMessageTool)
与其他 Agent 或团队成员通信。
- 适合多 Agent 协作场景
- 消息会直接送达目标
### clarify (ClarifyTool)
##### clarify (ClarifyTool)
当需求不明确时向用户提问澄清。
- 提供 2-4 个选项供用户选择
- 附带推荐选项和理由
- 避免模糊提问,给出明确建议
## 使用原则
#### 使用原则
1. 复杂任务先创建 Todo 列表,明确步骤
2. 可并行的工作使用 Delegate/Spawn 分散执行
3. 需求不明确时主动 Clarify不要猜测
4. 多 Agent 协作时保持通信简洁
5. 记得到 todo list 更新进度
## Validation
- Verify the requested outcome with the most direct available check.
- Report any skipped step, unavailable dependency, or remaining uncertainty explicitly.
## Boundaries
- Do not broaden the task beyond the user's request.
- Do not use tools that are not listed or clearly available in the current runtime.
## Anti-Patterns
- Do not summarize the skill instead of applying it.
- Do not claim completion without validation evidence.