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

@ -5,9 +5,16 @@
"display_name": "cron-scheduler",
"lineage": [],
"name": "cron-scheduler",
"owners": ["system"],
"owners": [
"system"
],
"source_kind": "initial",
"status": "active",
"tags": ["cron", "scheduler", "timer", "periodic"],
"tags": [
"cron",
"scheduler",
"timer",
"periodic"
],
"updated_at": "2026-05-26T00:00:00.000000+00:00"
}
}

View File

@ -5,13 +5,35 @@ tools:
- cron
---
# Cron Scheduler — 定时任务调度
# Cron Scheduler
## Overview
定时任务和周期性调度。支持标准 cron 表达式、一次性提醒和持久化任务。
## When to Use
- Use when the task requires Cron Scheduler guidance.
## Required Tools
- `cron`
## 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
### Cron Scheduler — 定时任务调度
基于 cron 表达式的定时任务和一次性提醒。
## 工具说明
#### 工具说明
### cron
##### cron
创建和管理 Beaver 定时通知或 Task。
- `action` (str): `add` | `list` | `remove` | `toggle` | `run`
- `message` (str): 触发时执行的任务说明,`add` 时必填
@ -25,10 +47,25 @@ tools:
- `mode` (str | None): `notification``task`
- `requires_followup` (bool | None): task 模式下是否需要用户跟进
## 使用原则
#### 使用原则
1. 避开 :00 和 :30 整点分钟,分散负载
2. 一次性提醒优先使用 `at_iso` 或清晰的 `schedule`
3. 需要持续提醒时使用 `mode="notification"`,需要 Task 跟踪时才用 `mode="task"`
4. 定期用 `action="list"` 确认任务是否按预期调度
5. 任务触发时 `message` 会完整执行,确保内容自包含
## 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.

View File

@ -1,12 +1,14 @@
{
"change_reason": "Initial skill for cron scheduling",
"content_hash": "placeholder",
"content_hash": "1826b1b2921197045bccce45b4e1997ee212d10cc28b3ea5f42bf7b1982beacc",
"created_at": "2026-05-26T00:00:00.000000+00:00",
"created_by": "system",
"frontmatter": {
"description": "定时任务和周期性调度。支持标准 cron 表达式、一次性提醒和持久化任务。",
"name": "cron-scheduler",
"tools": ["cron"]
"tools": [
"cron"
]
},
"parent_version": null,
"provenance": {
@ -15,8 +17,10 @@
},
"review_state": "published",
"skill_name": "cron-scheduler",
"summary": "Cron Scheduler — 基于 cron 表达式的定时任务和一次性提醒",
"summary_hash": "placeholder",
"tool_hints": ["cron"],
"summary": "# Cron Scheduler ## Overview 定时任务和周期性调度。支持标准 cron 表达式、一次性提醒和持久化任务。",
"summary_hash": "66b35720f0eb98008c5e53408bb8f13961f7e733deb5e01409f7cb6d017ba002",
"tool_hints": [
"cron"
],
"version": "v0001"
}