From 95872a36dbbce91066e97cc41b202cefc82e896e Mon Sep 17 00:00:00 2001 From: cfdaily Date: Tue, 26 May 2026 08:25:01 +0800 Subject: [PATCH] auto-sync: 2026-05-26 08:25:01 --- src/main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 9432922..d4ec923 100644 --- a/src/main.py +++ b/src/main.py @@ -127,6 +127,11 @@ async def lifespan(app: FastAPI): api_port = daemon_config.get("api_port", 8083) # 创建 Agent 调度组件 + counter = ActiveAgentCounter( + max_global=daemon_config.get("max_global_agents", 5), + max_per_agent=daemon_config.get("max_per_agent", 2), + default_cooldown_seconds=daemon_config.get("cooldown_seconds", 120), + ) spawner = AgentSpawner( dry_run=False, agent_timeout=daemon_config.get("agent_timeout", 630), @@ -135,10 +140,7 @@ async def lifespan(app: FastAPI): max_monitor_timeouts=daemon_config.get("max_monitor_timeouts", 3), api_host=api_host, api_port=api_port, - ) - counter = ActiveAgentCounter( - max_global=daemon_config.get("max_global_agents", 5), - max_per_agent=daemon_config.get("max_per_agent", 2), + counter=counter, ) # 构建 Agent 能力画像(v2.6.1 路由)