diff --git a/plugin/adapter.py b/plugin/adapter.py index 208d363..2b4a0c1 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -30,6 +30,11 @@ class RocketChatRateLimitError(Exception): """HTTP 429 Too Many Requests from Rocket.Chat REST API.""" pass +# ── Room context (global dict statt ContextVar — ContextVars sind asyncio-task-lokal, +# aber der Agent läuft in einem separaten Task und sieht sie nicht) ── +_room_context: Dict[str, Dict[str, str]] = {} # chat_id → {thematic_target, origin_room} +_room_context_lock = threading.Lock() + from archivar.adapter_integration import ArchivarMessageHandler # ── Access __init__ symbols (plugin loaded as flat module, no relative imports) ──