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

@ -18,4 +18,3 @@
],
"updated_at": "2026-05-27T00:00:00.000000+00:00"
}

View File

@ -1,7 +1,6 @@
---
name: officebench-mcp
description: Guidance for OfficeBench evaluation tasks. Use the registered mcp_officebench_* tools to inspect and edit OfficeBench files, spreadsheets, documents, emails, calendars, PDFs, and answer files.
always: true
tools:
- mcp_officebench_excel_read_file
- mcp_officebench_excel_set_cell
@ -30,13 +29,62 @@ tools:
- mcp_officebench_system_finish_task
- mcp_officebench_system_get_status
- mcp_officebench_image_convert_to_pdf
always: True
---
# OfficeBench MCP Skill
# Officebench Mcp
## Overview
Guidance for OfficeBench evaluation tasks. Use the registered mcp_officebench_* tools to inspect and edit OfficeBench files, spreadsheets, documents, emails, calendars, PDFs, and answer files.
## When to Use
- Use when the task requires Officebench Mcp guidance.
## Required Tools
- `mcp_officebench_excel_read_file`
- `mcp_officebench_excel_set_cell`
- `mcp_officebench_excel_delete_cell`
- `mcp_officebench_excel_create_new_file`
- `mcp_officebench_excel_convert_to_pdf`
- `mcp_officebench_word_read_file`
- `mcp_officebench_word_write_to_file`
- `mcp_officebench_word_create_new_file`
- `mcp_officebench_word_convert_to_pdf`
- `mcp_officebench_email_list_emails`
- `mcp_officebench_email_read_email`
- `mcp_officebench_email_send_email`
- `mcp_officebench_calendar_create_event`
- `mcp_officebench_calendar_list_events`
- `mcp_officebench_calendar_delete_event`
- `mcp_officebench_pdf_read_file`
- `mcp_officebench_pdf_convert_to_word`
- `mcp_officebench_pdf_convert_to_image`
- `mcp_officebench_ocr_recognize_file`
- `mcp_officebench_shell_command`
- `mcp_officebench_shell_list_directory`
- `mcp_officebench_shell_read_file`
- `mcp_officebench_shell_write_file`
- `mcp_officebench_shell_copy_file`
- `mcp_officebench_system_finish_task`
- `mcp_officebench_system_get_status`
- `mcp_officebench_image_convert_to_pdf`
## 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
### OfficeBench MCP Skill
Use this skill for OfficeBench evaluation runs. OfficeBench task files live in the OfficeBench MCP server, not in Beaver's local filesystem. Complete the task by calling real `mcp_officebench_*` tools.
## Critical Rules
#### Critical Rules
1. Use actual Beaver tool calls only. Do not print XML, DSML, JSON, or markdown that describes a tool call.
2. Never invent tool names. If you need to find files, use `mcp_officebench_shell_list_directory` or `mcp_officebench_shell_command`.
@ -47,9 +95,9 @@ Use this skill for OfficeBench evaluation runs. OfficeBench task files live in t
7. Verify the requested output file or edited cell exists before finishing.
8. Finish every task with `mcp_officebench_system_finish_task`.
## Tool Names And Use
#### Tool Names And Use
### Excel
##### Excel
Use these for `.xlsx` files:
@ -81,7 +129,7 @@ Typical Excel sequence:
For the common task "change Bob's midterm1 score to 100 in score.xlsx", inspect `data/score.xlsx`, find Bob's row and the `midterm1` column, then call `mcp_officebench_excel_set_cell` with that row, that column, and value `100`.
### Word
##### Word
Use these for `.docx` files:
@ -100,7 +148,7 @@ Use these for `.docx` files:
Preserve exact spelling, capitalization, punctuation, and line order from source files.
### Email
##### Email
Use these for email tasks:
@ -115,7 +163,7 @@ Use these for email tasks:
For email-search tasks, final answers should use plain text with literal lines like `Subject: ...`. Do not add markdown labels.
### Calendar
##### Calendar
Use these for calendar `.ics` tasks:
@ -130,7 +178,7 @@ Use these for calendar `.ics` tasks:
Use the task's current date/time context when interpreting relative dates.
### PDF, OCR, And Images
##### PDF, OCR, And Images
Use these for PDF/image tasks:
@ -152,7 +200,7 @@ Use these for PDF/image tasks:
For conversion tasks, create the exact requested filename and verify it exists.
### Shell And System
##### Shell And System
Use these for safe file discovery and text files:
@ -177,7 +225,7 @@ Use these for safe file discovery and text files:
Prefer dedicated Office tools for Office documents. Use shell tools for listing directories, copying/renaming files, and reading/writing plain text.
## Anti-Patterns
#### Anti-Patterns
Do not do any of the following:
@ -188,3 +236,17 @@ Do not do any of the following:
- Do not use `/testbed` as a literal prefix in path arguments unless a tool explicitly asks for an absolute path.
- Do not correct misspellings found in source data. Preserve source text exactly.
## 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,6 +1,6 @@
{
"change_reason": "Initial OfficeBench MCP skill for evaluation runs",
"content_hash": "6afdd5a93ce552f39c1e285fc552059cfada7971e0d5bb91bcd56c6ca608ba17",
"content_hash": "54547e8b2b5de5700d57c464a19e941a2cddd6c42af69c91122f8bd4b9c6726c",
"created_at": "2026-05-27T00:00:00.000000+00:00",
"created_by": "codex",
"frontmatter": {
@ -44,8 +44,8 @@
},
"review_state": "published",
"skill_name": "officebench-mcp",
"summary": "OfficeBench MCP skill for using registered mcp_officebench_* tools correctly during evaluation runs.",
"summary_hash": "914d6759650fce29884f648b84929e0482475c3ccd6601e9903c9b8b826dd874",
"summary": "# Officebench Mcp ## Overview Guidance for OfficeBench evaluation tasks. Use the registered mcp_officebench_* tools to inspect and edit OfficeBench files, spreadsheets, documents, emails, calendars, PDFs, and answer files.",
"summary_hash": "c8702c29954060ae65ca49e5c1a0fbfcd68c40e0522c64d75c7bb3f8c705ee66",
"tool_hints": [
"mcp_officebench_excel_read_file",
"mcp_officebench_excel_set_cell",
@ -77,4 +77,3 @@
],
"version": "v0001"
}