refactor: Fix code quality issues identified in analysis

1. Rename factory.py's EvoAgent data class to AgentConfig
   - Avoids naming conflict with base/evo_agent.py's EvoAgent

2. Export pipeline_runner functions in backend/core/__init__.py
   - Add create_agents, create_long_term_memory, stop_gateway

3. Consolidate PromptLoader to singleton pattern
   - Add get_prompt_loader() singleton function
   - Update all usages to use singleton

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 01:07:53 +08:00
parent 5b925fbe02
commit 06a23c32a4
14 changed files with 505 additions and 203 deletions

View File

@@ -1,26 +1,17 @@
{
"agents": [
{
"agent_id": "a4090d26a45ac828d",
"agent_type": "oh-my-claudecode:executor",
"started_at": "2026-03-12T10:02:38.238Z",
"agent_id": "a8305a91e192b2196",
"agent_type": "Explore",
"started_at": "2026-03-19T17:00:33.284Z",
"parent_mode": "none",
"status": "completed",
"completed_at": "2026-03-12T10:10:59.192Z",
"duration_ms": 500954
},
{
"agent_id": "af87583ef76a4df30",
"agent_type": "oh-my-claudecode:executor",
"started_at": "2026-03-12T10:40:04.409Z",
"parent_mode": "none",
"status": "completed",
"completed_at": "2026-03-12T10:41:17.387Z",
"duration_ms": 72978
"completed_at": "2026-03-19T17:02:19.439Z",
"duration_ms": 106155
}
],
"total_spawned": 2,
"total_completed": 2,
"total_spawned": 1,
"total_completed": 1,
"total_failed": 0,
"last_updated": "2026-03-12T10:41:17.490Z"
"last_updated": "2026-03-19T17:02:39.175Z"
}