feat: add 8 builtin tools, AgentSchedules management page, Celery Beat integration

- Add 3 schedule tools (create/list/delete) and 5 utility tools (crypto, random, email, URL, regex)
- Add frontend AgentSchedules.vue page with full CRUD, cron presets, manual trigger
- Integrate Celery Beat for automatic schedule execution
- Update startup scripts with Celery Beat launch
- Fix schedule list API to show all schedules for admin users
- Add celrybeat-schedule.* to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-02 19:14:25 +08:00
parent b608267fb5
commit 68fbadae76
11 changed files with 1299 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
_registered = False
_EXPECTED_BUILTIN = 10
_EXPECTED_BUILTIN = 18
def ensure_builtin_tools_registered() -> None:
@@ -28,6 +28,14 @@ def ensure_builtin_tools_registered() -> None:
json_process_tool,
database_query_tool,
adb_log_tool,
schedule_create_tool,
schedule_list_tool,
schedule_delete_tool,
crypto_util_tool,
random_generate_tool,
send_email_tool,
url_parse_tool,
regex_test_tool,
HTTP_REQUEST_SCHEMA,
FILE_READ_SCHEMA,
FILE_WRITE_SCHEMA,
@@ -38,6 +46,14 @@ def ensure_builtin_tools_registered() -> None:
JSON_PROCESS_SCHEMA,
DATABASE_QUERY_SCHEMA,
ADB_LOG_SCHEMA,
SCHEDULE_CREATE_SCHEMA,
SCHEDULE_LIST_SCHEMA,
SCHEDULE_DELETE_SCHEMA,
CRYPTO_UTIL_SCHEMA,
RANDOM_GENERATE_SCHEMA,
SEND_EMAIL_SCHEMA,
URL_PARSE_SCHEMA,
REGEX_TEST_SCHEMA,
)
tool_registry.register_builtin_tool("http_request", http_request_tool, HTTP_REQUEST_SCHEMA)
@@ -50,6 +66,14 @@ def ensure_builtin_tools_registered() -> None:
tool_registry.register_builtin_tool("json_process", json_process_tool, JSON_PROCESS_SCHEMA)
tool_registry.register_builtin_tool("database_query", database_query_tool, DATABASE_QUERY_SCHEMA)
tool_registry.register_builtin_tool("adb_log", adb_log_tool, ADB_LOG_SCHEMA)
tool_registry.register_builtin_tool("schedule_create", schedule_create_tool, SCHEDULE_CREATE_SCHEMA)
tool_registry.register_builtin_tool("schedule_list", schedule_list_tool, SCHEDULE_LIST_SCHEMA)
tool_registry.register_builtin_tool("schedule_delete", schedule_delete_tool, SCHEDULE_DELETE_SCHEMA)
tool_registry.register_builtin_tool("crypto_util", crypto_util_tool, CRYPTO_UTIL_SCHEMA)
tool_registry.register_builtin_tool("random_generate", random_generate_tool, RANDOM_GENERATE_SCHEMA)
tool_registry.register_builtin_tool("send_email", send_email_tool, SEND_EMAIL_SCHEMA)
tool_registry.register_builtin_tool("url_parse", url_parse_tool, URL_PARSE_SCHEMA)
tool_registry.register_builtin_tool("regex_test", regex_test_tool, REGEX_TEST_SCHEMA)
_registered = True
n = tool_registry.builtin_tool_count()