auto-sync: 2026-05-19 23:34:43
This commit is contained in:
+22
@@ -175,6 +175,25 @@ async def lifespan(app: FastAPI):
|
||||
db_path=default_db_path,
|
||||
)
|
||||
|
||||
# ── 集成模块 ──
|
||||
# HealthChecker(僵尸检测)
|
||||
health_checker = HealthChecker(
|
||||
zombie_threshold=daemon_config.get("zombie_threshold", 20),
|
||||
)
|
||||
|
||||
# ExperienceDistiller(经验自动蒸馏)
|
||||
experience_config = config.get("experience", {})
|
||||
experience_distiller = ExperienceDistiller(
|
||||
store=ExperienceStore(store_path=DATA_ROOT / "experiences.jsonl"),
|
||||
)
|
||||
|
||||
# InboxWatcher(即时事件监听)
|
||||
inbox_config = config.get("inbox", {})
|
||||
inbox_watcher = InboxWatcher(
|
||||
inbox_path=DATA_ROOT / inbox_config.get("path", "inbox/daemon.jsonl"),
|
||||
watch_interval=inbox_config.get("watch_interval", 1.0),
|
||||
)
|
||||
|
||||
ticker = Ticker(
|
||||
registry=registry,
|
||||
tick_interval=tick_interval,
|
||||
@@ -183,6 +202,9 @@ async def lifespan(app: FastAPI):
|
||||
max_dispatch_per_tick=max_dispatch,
|
||||
claim_timeout_minutes=claim_timeout,
|
||||
default_task_timeout_minutes=task_timeout,
|
||||
health_checker=health_checker,
|
||||
experience_distiller=experience_distiller,
|
||||
inbox_watcher=inbox_watcher,
|
||||
)
|
||||
await ticker.start()
|
||||
agent_ids = list(agent_profiles.keys())
|
||||
|
||||
Reference in New Issue
Block a user