From 452532e78e486b49755e72812686dc2195f45c99 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 7 Jun 2026 22:16:54 +0800 Subject: [PATCH] auto-sync: 2026-06-07 22:16:54 --- src/daemon/dispatcher.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/daemon/dispatcher.py b/src/daemon/dispatcher.py index 8d73093..3eec186 100644 --- a/src/daemon/dispatcher.py +++ b/src/daemon/dispatcher.py @@ -187,6 +187,29 @@ class Dispatcher: if is_mail: db_path = Path(project_config["db_path"]) if project_config and "db_path" in project_config else None + # 方案C:inform 类 Mail 不 spawn Agent,直接标 done + if is_mail: + _perf = "request" + try: + _meta = json.loads(task.must_haves) if task.must_haves else {} + _perf = _meta.get("performative", _meta.get("type", "request")) + except Exception: + pass + if _perf == "inform": + # 直接标 working → done,不 spawn + _db_path = Path(project_config["db_path"]) if project_config and "db_path" in project_config else None + if _db_path: + self._mail_auto_working(task.id, _db_path) + self._mail_auto_complete(task.id, agent_id, _db_path, task.must_haves or "") + self._record_routing(task, decision, "dispatched", "inform_skip_spawn", _routing_db) + return { + "level": "mail", + "agent_id": agent_id, + "session_id": None, + "status": "dispatched", + "reason": "inform_skip_spawn", + } + # on_checks_passed: 所有检查通过后才标 working,检查失败不标 on_checks_passed = None _mail_marked_working = False