diff --git a/src/main.py b/src/main.py index e361589..e14aa36 100644 --- a/src/main.py +++ b/src/main.py @@ -134,6 +134,15 @@ async def lifespan(app: FastAPI): max_concurrent_sessions=daemon_config.get("max_concurrent_sessions", 3), default_cooldown_seconds=daemon_config.get("cooldown_seconds", 120), ) + # BootstrapBuilder(L2 引擎注入层) + template_dir = DATA_ROOT.parent / "prompt_templates" + if not template_dir.exists(): + template_dir = Path("prompt_templates") + bootstrap_builder = BootstrapBuilder( + template_dir=template_dir, + max_tokens=4096, + ) + spawner = AgentSpawner( dry_run=False, agent_timeout=daemon_config.get("agent_timeout", 630), @@ -143,6 +152,7 @@ async def lifespan(app: FastAPI): api_host=api_host, api_port=api_port, counter=counter, + bootstrap_builder=bootstrap_builder, ) # 构建 Agent 能力画像(v2.6.1 路由)