diff --git a/plugin/archivar/router.py b/plugin/archivar/router.py index 1e493c7..ff2cbb9 100644 --- a/plugin/archivar/router.py +++ b/plugin/archivar/router.py @@ -153,13 +153,16 @@ class RoutingDecision: Im neuen Flow (Embedding-Vorfilter + LLM-Raum-Router + Move-Request): Routing erfolgt nur, wenn ein Zielraum gesetzt ist und kein - stay_in_room/meta/catch_all/unrouteable vorliegt. + stay_in_room/meta/catch_all/unrouteable/move_request_sent vorliegt. + move_request_sent=True bedeutet: Butler-Prinzip aktiv — erst auf + Button-Antwort warten, nicht direkt routen. """ return ( not self.stay_in_room and not self.is_meta and not self.is_catch_all and not self.is_unrouteable and + not self.move_request_sent and bool(self.target_room) ) @@ -362,6 +365,9 @@ class BidirectionalRouter: matched_room_name=matched_room.name, source_room_notification=notification, matched_keywords=matched_keywords, + move_request_sent=True, + move_request_target_name=matched_room.name, + move_request_target_id=matched_room.room_id, ) # ── Schritt 3.5: FAISS Phase-1 (Raum-Index + Keyword-Booster) ─ @@ -431,6 +437,9 @@ class BidirectionalRouter: faiss_room_name=room.name, is_faiss_routed=True, booster_applied=booster_applied, + move_request_sent=True, + move_request_target_name=room.name, + move_request_target_id=top_room_id, ) # ── Score unter Schwelle → Fall-through zu Embedding + LLM @@ -499,6 +508,9 @@ class BidirectionalRouter: matched_room_name=matched_room.name, source_room_notification=notification, matched_keywords=matched_keywords, + move_request_sent=True, + move_request_target_name=matched_room.name, + move_request_target_id=matched_room.room_id, ) # ── Schritt 5: LLM-Raum-Router (zentraler Prompt) ────────────