Bernd (Hermes)
21b1fd4e13
feat(archivar): LLM_ROOM_PROMPT um UNSICHER erweitern + Red-Flag-Logik anpassen
...
STAY wird wieder zu 'passt hier' (sicher) — stay_in_room OHNE Red Flag,
unabhängig von der Raumzahl. UNSICHER wird zum expliziten Red-Flag-Trigger
(>=1 Raum statt >1). Timeout (llm_unavailable) bleibt Red Flag bei >1 Raum.
- config.py: LLM_ROOM_PROMPT mit drei Antwortmöglichkeiten (STAY/UNSICHER/Raum-ID)
- router.py: _llm_room_lookup parst UNSICHER als drittes Token (reason='unsicher')
- router.py: STAY-Branch → stay_in_room ohne Red Flag; UNSICHER-Branch → Red Flag
- router.py: _build_red_flag_decision kennt reason='llm_unsicher'
- routing_telemetry.py: Timeout als decision='timeout' (nicht mit STAY vermischt)
- Tests: 11 neue Tests (test_unsicher_red_flag.py) + bestehende STAY-Tests auf
neue Semantik umgestellt
Abnahmekriterien t_f81acd6f: STAY ohne Red Flag, UNSICHER mit Red Flag,
STAY bei 4 Alternativräumen ohne Red Flag, UNSICHER bei 1 Alternativraum mit
Red Flag, Timeout bei >1 mit Red Flag, Parser erkennt UNSICHER.
2026-09-02 15:22:41 +02:00
Bernd (Hermes)
9798a3e8a0
feat(F100): Self-Check Stufe 4b (Router-E2E) + Runtime-Watchdog
...
Zweite Verteidigungslinie gegen die 110 Router-Timeouts/7d (Andreas-Direktive
01.09.): Stufe 4b prüft beim Start, dass Modell+Endpoint wirklich antworten
(Smoke-Test), der Runtime-Watchdog misst die echte Router-Pipeline über
record_attempt() nach jedem Live-Call.
D1 Stufe 4b (self_check.py):
- _probe_llm_room_e2e(): POST /api/generate mit Mini-Prompt, Latenz <= 15s
- ComponentCheckResult + llm_room_e2e_ok / llm_room_e2e_latency_ms
- ready = ... AND llm_room_e2e_ok; needs_warmup schliesst 4b-Fail ein
- Prompt empirisch kalibriert (qwen2.5:7b): 'Antworte ausschließlich mit dem
Wort STAY' statt naivem 'genau einem Wort: STAY' (lieferte 'Ok.')
D2 Runtime-Watchdog (routing_counter.py + router.py + adapter.py):
- RoutingCounter.record_attempt() + success_ratio(window_s, min_samples)
(NEUE Methoden, increment() unverändert — P-019, 165 Call-Sites)
- record_attempt() an success/timeout/exception-Branches (router.py Z.1670+)
- _start_routing_watchdog() neben _start_self_check() in connect()
- 5 Konstanten in config.py (Kalibrierungs-Kommentar 'nach 7 Tagen prüfen')
K3 Cooldown (watchdog_alert.py, NEU):
- 24h-Cooldown + persistentes Flag in ~/.hermes/hermes-agent/data/
routing_watchdog_alert.json (last_alert_ts, atomar via tmp+rename P-101)
- logger.error (KEIN RC-Post, P-088-Lehre)
D3 Tests: test_f92_self_check erweitert (TestStufe4bProbe,
TestComponentCheckResult4b), test_f92_routing_counter.py (Window/Min-Samples/
Boundary/GC), test_f100_watchdog.py (Trigger/Cooldown/Min-Samples/Persistenz).
D4 Verifikation: echte Probe gegen localhost:11434 (qwen2.5:7b) → ok=True,
latency ~850ms. 98 Tests grün (F92/F93/F100 + Stufe4-Red-Flag).
KEIN Push, KEIN Deploy — wartet auf QG-Freigabe Rainer.
2026-09-02 06:30:09 +02:00
Bernd (Hermes)
059673b62d
feat(archivar): Stufe 4 Red Flag Detection + Bernd Activation
...
Routing-Pipeline Stufe 4: Wenn der LLM-Router unsicher ist (STAY bei
>1 Raum), verloren ist (Timeout/None) ODER ein neues Thema erkennt
(unbekannter Raum-Name), setzt der Archivar eine Red Flag und aktiviert
den Hauptagenten als Entscheidungsträger (STAY/ROUTE).
Änderungen:
- router.py: _llm_room_lookup liefert 5-Tupel (room, stay, failed,
reason, suggestion). reason ∈ {route, stay, unavailable, new_topic}.
Neues 'new_topic'-Signal: LLM nannte einen Raum der nicht in der
Raum-Map steht → Red Flag mit red_flag_suggestion.
- router.py: asyncio.wait_for(LLM_ROOM_LOOKUP_TIMEOUT) um den LLM-Call
(Rainer-Niagara-Befund #3 : war ohne wait_for → Event-Loop-Blockade).
- router.py: RoutingDecision + red_flag_reason / red_flag_suggestion;
_build_red_flag_decision(reason, suggestion) injiziert den Grund als
Hinweis in den Red-Flag-Prompt.
- config.py: LLM_ROOM_LOOKUP_TIMEOUT (Default 15s, env-schaltbar).
- adapter.py: RED_FLAG_TIMEOUT tatsächlich anwenden (Rainer-Niagara
Befund #4 : war toter Code) via _RED_FLAG_SET_TIME ContextVar;
Timeout → STAY-Fallback (red_flag_timeout_fallback).
- multiroom_context.py: CrossRoomEntry.source-Feld ('manual'/'move'/
'red_flag'); add(source=...) → Ring-Feedback mit Quellen-Tag für
Stufe-5-Lern-Semantik (Rainer FIX P2).
- adapter.py: Ring-Feedback source='red_flag'; Stufe-4-Feedback-Log
(reason + suggestion) für spätere Lern-Semantik (nur loggen, nicht
lernend — Andreas-Entscheidung offen).
Pitfalls adressiert: P-084 (neues Thema, kein toter Code mehr),
P-102 (Clarify-Responses greifen weiterhin NICHT — unverändert vor
classify_and_route).
Tests: test_stufe4_red_flag.py (13 Tests: new_topic, reason je Trigger,
Ring-source, Config-Timeout). 1643 Tests gesamt grün, keine Regression
in Stufe 1-3.
2026-08-23 18:29:46 +02:00
Bernd (Hermes)
0840c1383c
fix(archivar): LLM-Modell via ARCHIVAR_LLM_MODEL konfigurierbar (Default qwen2.5:7b lokal)
2026-08-22 14:28:23 +02:00
Bernd (Hermes)
2cb506c5a8
fix: P-056 + P-057 + P-058 — Themenring-Normalisierung, stay_once neutral, Button 4 reject
...
P-056 (Themenring-Bug):
- _normalize_room_id() Hilfsmethode (strip+lower) in allen _never_route-Methoden
- Logger-Statements symmetrisch in set_never_route/is_never_route
- _detect_topic_change-Guard: last_extended < 5s → überspringe VERBLASST
P-057 (stay_once neutral):
- adapter.py: feedback_type='neutral' statt 'stay' für stay_once
- handle_feedback_response: 'neutral'-Zweig VOR update_keyword_weight
- update_keyword_weight: defensiver else-Zweig für 'neutral'/unbekannt
- Button-Label: 'generell hier bleiben' → 'jetzt hier bleiben'
P-058 (Button 4 reject):
- MOVE_REQUEST_TEMPLATE um Button 4 'Falsch geroutet' (reject) erweitert
- adapter.py: reject-Branch mit feedback_type='reject', KEIN set_never_route
- update_keyword_weight: 'reject'-Zweig — Zielraum ×0.2, Ursprungsraum +LR
- _routed_messages um origin_room erweitert
- DM-Ausschluss: Button 4 in DMs ausblenden (P-040)
- Choice-Normalisierung für '4'/'4️⃣ ' erweitert
Tests: 21 Unit-Tests (P-056: 9, P-057: 6, P-058: 6) — alle grün
2026-08-12 19:42:04 +02:00
Bernd (Hermes)
f94d73585c
fix(P1): ISSUE 1 — Button-Texte v6→v7 aktualisiert
...
- config.py: '2️⃣ Generell hier' → '2️⃣ Thema hier lassen'
- adapter.py Z.2394: stay_here-Feedback themenbezogen statt raumbezogen
- adapter.py Z.2450: Auto-Promote-Feedback themenbezogen
- Semantik: raumbezogen → themenbezogen (24h/ Themenwechsel TTL)
2026-07-25 11:13:38 +02:00
Bernd (Hermes)
4ad3facfae
feat: V8.5 — Satzeinleitungs-Erkennung (Stufe 0 Regex + LLM-Validierung, topic_revive, V7-3/V7-4 Integration)
2026-07-19 01:38:00 +02:00
Bernd (Hermes)
e1167c470a
feat: V8.4 — Red Flag: Agent als 6. Entscheidungsträger (Pre-Dispatch-Hook, Ring-Feedback, Feature-Flag)
2026-07-15 20:36:52 +02:00
Bernd (Hermes)
641b066db0
feat: V8.3.3 — Routing-Telemetrie (Konfidenz-Logging) + Echte Integration-Tests
...
FEATURE 1: Routing-Telemetrie (Konfidenz-Logging)
- Neue Datei: archivar/routing_telemetry.py — RoutingTelemetry Klasse
- Feature-Flag: ARCHIVAR_ROUTING_TELEMETRY env var (Default true)
- Pro Routing-Entscheidung: stage, score, decision, target, origin, duration_ms
- Format: [TELEMETRY] stage=keyword_100 score=1.00 decision=route ...
- NIEMALS Nachrichteninhalte im Log (Datenschutz)
- Telemetrie-Punkte in router.py an allen 5 Stufen:
keyword_100, context_keyword, faiss, llm, default
- Flush in adapter.py nach classify_and_route()
FEATURE 2: Echte Integration-Tests
- Neue Datei: archivar/tests/test_v8_3_3.py (18 Tests)
- Echte RoutingDecision-Objekte statt Dict-Simulationen
- 7 Integration-Test-Klassen:
1. 100%-Keyword im falschen Raum → route
2. 100%-Keyword im richtigen Raum → stay (self-match)
3. Kontext-Keyword → butler
4. FAISS hohe Ähnlichkeit → route
5. FAISS mittlere Ähnlichkeit → butler
6. LLM → STAY
7. LLM → ROUTE
- Telemetrie-Tests: Logging, Datenschutz, Feature-Flag
- Erweiterte conftest.py: multi_room_map, Mock-LLM Fixtures
Verifikation: 527 passed, 1 pre-existing fail, 2 skipped (FAISS)
2026-07-15 17:35:28 +02:00
Bernd (Hermes)
de930a1227
fix: V8.2.1 — 7 Befunde (A2 Caller, A3 Persistenz, A4 Strategie-Block, Tests, Feature-Flag, conftest, runbook)
...
Befund 1 (P0): A2 Dead-Code — _should_trigger_nachklaerung() in adapter.py
Button-Response-Handler angebunden. stay_once (Button 3) triggert jetzt
Nachklärung mit Strategie-Buttons. ARCHIVAR_CLARIFY-Responses werden
verarbeitet (Strategie-Thema → Ring-Zustand "jetzt", ANDERER GRUND →
normales Lernen).
Befund 2 (P0): A3 Persistenz-Bug — _stay_counts und _keyword_last_matched
in RoomMap.save() und _from_dict() serialisiert. Tracking-Felder
überleben Gateway-Restart.
Befund 3 (P1): A4 Strategie-Block — _is_strategie_topic() im DM-Pfad
des Routers. Strategie-Themen im DM → stay_in_room (kein Routing,
kein Lernen).
Befund 4 (P1): Tests — 8 neue echte Integrationstests (TestV821A2,
TestV821A3, TestV821A4). 27/27 grün.
Befund 5 (P2): ARCHIVAR_STRATEGY_AUTO_DETECT env var in config.py,
Default false (Rainer Auflage P1).
Befund 6 (P2): conftest.py mit temp_room_map_path und temp_state_path
Fixtures für saubere Pfad-Tests.
Befund 7 (P2): docs/deployment-runbook.md mit .45 Bare-VM Schritten
inkl. room-map.json Pfad-Korrektur.
2026-07-14 21:27:32 +02:00
Bernd (Hermes)
8853a1d9e3
fix: V8.1 Routing-Engine — 7 Root Causes (Auto-Route, Sticky, Echo, Kontext-Ring, LLM-URL, FAISS, Buttons)
...
P1: 100%-Keyword-Route sendet Antwort in Zielraum (echtes Routing)
- adapter.py:1603-1645: Auto-Route-Block vor _CURRENT_ORIGIN_ROOM
- Bei move_request_sent=False + target_room != room_id → dispatch in Zielraum
- Nachricht wird in Zielraum kopiert, Agent antwortet dort
P2: Temporäres Sticky (30 Min) bei confirm_move
- adapter.py:625: _session_room_preferences Dict
- adapter.py:1414-1428: Sticky bei confirm_move gesetzt
- adapter.py:1557-1597: Session-Sticky-Check vor Archivar (Auto-Route)
- adapter.py:1638-1645: Sticky auch bei Auto-Route gesetzt
P3: Echtes Move (Original löschen) statt Copy+Breadcrumb
- adapter.py:1414-1420: Kein Copy mehr bei confirm_move
- Nur Breadcrumb "Wir sind rübergewechselt → #Zielraum" im Ursprungsraum
P4: MultiRoomContext-Ring — raum-übergreifender Konversations-Kontext
- Neu: archivar/multiroom_context.py (Ring-Buffer, 10 Einträge)
- adapter.py:1293-1299: Ring-Update bei jeder User-Nachricht
- adapter.py:1752-1767: Ring-Summary in System-Prompt injiziert
P5: LLM-Router URL — ARCHIVAR_LLM_BASE_URL statt OLLAMA_BASE_URL
- config.py:150-153: Neue Env-Var ARCHIVAR_LLM_BASE_URL
- OLLAMA_BASE_URL als Legacy-Fallback
P6: FAISS is_stale() — Member-Set-Check zusätzlich zu Version
- room_index.py:540-590: Prüft set(map_rooms) == set(index_rooms)
- Bei Mismatch → rebuild mit Logging
P7: Move-Request-Template auf 3 Buttons
- config.py:209-215: 1️⃣ Rüber, 2️⃣ Generell hier, 3️⃣ Nur diesmal
- stay_once fällt in else-Branch (adapter.py:1447)
Verifikation: 345/346 archivar tests passed (1 pre-existing env fail)
2026-07-14 19:31:55 +02:00
Bernd (Hermes)
8b67e03f7e
feat(v6): Phase 1 — Origin-First Guard + LLM Fix + Proaktiver Broadcast
...
P3: LLM_CONFIG base_url jetzt aus OLLAMA_BASE_URL Env-Var (config.py:150)
I1: LLM_ROOM_PROMPT umgeschrieben — STAY/ROUTE statt CATCH_ALL,
Ursprungsraum-Kontext, Few-Shot-Beispiele, Catch-All nicht als Option
(config.py:175-195, router.py:_llm_room_lookup)
P2: Origin-First Guard (Schritt -0.5) in router.py:route():
- origin_room_id leer (echte DM) → normaler Flow
- origin_room ist Catch-All → stay_in_room
- origin_room ist excluded → ignore
- LLM sagt STAY → stay_in_room
- LLM == origin_room → stay_in_room
- LLM == catch_all_room → stay_in_room (kein DM-Routing!)
- LLM == anderer Raum → Move-Request (Butler-Prinzip)
Catch-All-Schutz: DM-Nachrichten skippen Routing-Flow (router.py:270-282)
Move-Request-Routing-Fix (adapter.py):
- 1️⃣ Rüberkopieren → _CURRENT_ORIGIN_ROOM = Zielraum
- 2️⃣ Generell hier bleiben → Sticky-Eintrag
- 3️⃣ Hier bleiben → nur diesmal, kein Sticky
- Button-Labels aktualisiert: 1️⃣ Rüber / 2️⃣ Generell / 3️⃣ Hier
B6: Proaktiver Raum-Broadcast (tools.py):
- Neues Tool rocketchat_broadcast mit 5-Min-Cooldown
- Format: menschenähnlich, kein Bot-Ton
- Registriert in _TOOLS mit 📢 Emoji
2026-07-09 17:33:14 +02:00
Bernd (Hermes)
1ad9155a24
fix(config): use ARCHIVAR_EMBEDDING_BASE_URL for embeddings — separate from OLLAMA_BASE_URL (chat)
2026-06-19 21:08:36 +02:00
Bernd (Hermes)
4596ffba2a
perf(config): increase LLM timeout 10s→30s — iterative binary search optimization
2026-06-19 21:06:11 +02:00
Bernd (Hermes)
0e13e4b30d
fix(archivar): ContextVar→global dict, asyncio.to_thread, EMBEDDING_BASE_URL, FAISS_AUTO_ROUTE=0.55
...
- adapter.py: ContextVars durch globales _room_context dict + threading.Lock ersetzt
(Agent-Task sieht jetzt Archivar-Zielraum — kein error-not-allowed mehr)
- adapter_integration.py: Stay-Feedback-Handler leert thematic_target
(verhindert dass nächster Send auf alten Archivar-Vorschlag fällt)
- classifier.py: _llm_raw() nutzt asyncio.to_thread() statt direktem await
(LLMClient.generate() ist synchron — vorher TypeError)
- config.py: ARCHIVAR_EMBEDDING_BASE_URL trennt Embeddings von Chat-URL
(OLLAMA_BASE_URL-Kollision behoben). FAISS_AUTO_ROUTE 0.70→0.55
(mehr Nachrichten durch Booster statt direktem FAISS-Routing)
2026-06-19 09:09:17 +02:00
Bernd (Hermes)
d005eb769d
feat(archivar): Booster-Gewichtung verstärkt — FAISS + Keywords
...
Booster-Strategie: IMMER aktiv (nicht nur bei Konflikten)
- router.py: Konfliktbedingung entfernt, Booster auf alle FAISS-Treffer
- booster.py: Boost +0.05→+0.10, zusätzlich +0.05 pro weiterem unique Keyword
- config.py: FAISS_AUTO_ROUTE 0.85→0.70
Kombiniert semantische Breite (FAISS) mit präziser Keyword-Diskriminierung.
Ziel: granulare Raum-Entscheidungen bei überlappenden Themen.
2026-06-18 07:55:14 +02:00
Bernd (Hermes)
134c21a218
feat(archivar): FAISS Phase-1 Router-Integration
...
config.py:
- FAISS_AUTO_ROUTE (0.85): Direkt-Routing-Schwelle ohne LLM
- FAISS_MIN_SCORE (0.50): Minimaler Treffer-Score
- FAISS_TOP_K (3): Top-Treffer aus dem Index
- FAISS_CONFLICT_DIFF (0.05): Booster-Aktivierungsschwelle
router.py:
- RoutingDecision: 5 neue FAISS-Felder (faiss_score, faiss_room_id,
faiss_room_name, is_faiss_routed, booster_applied)
- BidirectionalRouter.__init__: optionale room_index + booster Parameter
(None = Phase-1 übersprungen, bestehendes Verhalten)
- route(): Schritt 3.5 FAISS Phase-1 zwischen Keyword-Match und
Embedding-Vorfilter eingefügt
- search_text() → Booster bei knappen Top-2 → Auto-Route bei >= 0.85
- Score < 0.85 → Fall-through zu Embedding + LLM (unverändert)
- Drei-Schichten-Logik: FAISS → Keyword-Booster → LLM
- Bestehender LLM/Embedding-Code unverändert
2026-06-16 19:18:36 +02:00
Bernd (Hermes)
186308c983
fix(archivar): Timeouts auf 10s erhöht — empirisch ermittelt (Ø 2.4s, Cold-Start 7.8s)
2026-06-14 15:47:28 +02:00
Bernd (Hermes)
170f7e6096
feat(archivar): LLM-basierter Raum-Router ersetzt IntentClassifier — Embedding-Vorfilter + LLM_ROOM_PROMPT + Move-Request-Buttons
...
Korrigierter Archivar-Routing-Flow gemäß Architekturskizze:
1. Embedding-Vorfilter (nomic-embed-text): binär Smalltalk vs. potenzieller Auftrag
- Klarer Smalltalk → stay_in_room
- Unsicher → LLM-Raum-Router
2. LLM-Raum-Router (qwen2.5:7b): LLM_ROOM_PROMPT als zentraler Prompt
- Erhält Nachrichtentext + Raumliste mit IDs und ALLEN Keywords
- Liefert room_id direkt (keine Kategorien, kein Name-Matching)
3. Move-Request-Buttons (Butler-Prinzip): ✅ Ja/📍 Hier VOR Routing
- Kein automatisches Routing ohne User-Bestätigung
4. Betriebsstufen-Log: 'Archivar Stufe 1: Embedding-Vorfilter + LLM-Raum-Router aktiv (5 Räume)'
Änderungen:
- config.py: LLM_ROOM_PROMPT auf Raum-ID-Ausgabe umgestellt, Keywords pro Raum,
ARCHIVAR_STUFE_LOG, MOVE_REQUEST_TEMPLATE, max_tokens=30
- classifier.py: LLMClient.generate() als neue ABC-Methode + OllamaLLMClient-Impl,
_llm_raw_sync nutzt generate() statt classify()
- router.py: RoutingDecision um move_request_sent/target_name/target_id erweitert,
route() komplett neu: Embedding→LLM→Move-Request, _llm_room_lookup() mit IDs+Keywords
- adapter_integration.py: _send_move_request() + handle_move_request_response(),
classify_and_route() behandelt move_request_sent, handle_and_forward() wartet auf Bestätigung
IntentClassifier.classify() wird NICHT gelöscht — nur als binärer Vorfilter verwendet.
Bestehende Tests: 53/54 grün (1 pre-existing env-var issue).
2026-06-14 10:25:33 +02:00
Hermes Agent
4bb1ccbc82
feat(archivar): Lernsystem-Verdrahtung — Move-Request + Clarify lernen Keyword-Gewichte
...
- RoutingDecision um matched_keywords-Feld erweitert (router.py)
- _extract_routing_keywords-Stub entfernt, Keywords aus Decision durchreichen (adapter_integration.py)
- _routed_messages nach classify_and_route() befüllen (adapter.py)
- move_req-Dict um message_id erweitert (adapter.py)
- Move-Request-Handler: handle_feedback_response mit confirm/stay/never aufrufen (adapter.py)
- handle_clarification_response: update_keyword_weight für ambige Keywords lernen (adapter_integration.py)
- Clarify-Frage-Text: "Ich möchte mir das für die Zukunft richtig merken..." (config.py)
Feedback-Mapping: 1️⃣ Rüber=confirm, 2️⃣ Hier=stay, 3️⃣ Nein=never, 📝 /💬 =stay, 📋 =confirm
2026-06-13 09:50:54 +02:00
Hermes Agent
c23127c9c5
fix(archivar): sync __init__.py barrel imports + test_router.py to v3 class names
...
- __init__.py: MessageClassifier→IntentClassifier, MessageRouter→BidirectionalRouter, CONFIDENCE_THRESHOLD→CONFIDENCE_THRESHOLDS, added ROOM_MAP_PATH, ARCHIVAR_STATE_PATH, ArchivarState
- config.py: added missing ROOM_MAP_PATH constant (imported by router.py)
- test_router.py: updated imports + BidirectionalRouter(state=ArchivarState()) constructor
Root cause: Miguel's v3 refactoring renamed classes but didn't update the barrel file. Gateway failed with 'No adapter available for rocketchat' because archivar/__init__.py imported non-existent names.
2026-06-11 22:25:35 +02:00
Hermes Agent
92bdb396a9
feat(archivar): Update config.py für Archivar v3 - Neue CATEGORY_TEXTS, Intent-Typen und Konfiguration
2026-06-11 21:39:21 +02:00
Hermes Agent
83a5d262c7
fix: User-Map-Fallback + LLM-Prompt-Fix
...
- User-Map: Fallback aus DM-Namen-Parsing + REST-API-Abfrage wenn usernames-Feld fehlt (Rainer)
- LLM: max_tokens 10→5, Prompt verschärft auf Ein-Wort-Antwort (Raum-Name oder CATCH_ALL)
- Keine Erklärungen, keine Sätze — der Validator akzeptiert jetzt alle Antworten
- Vault-Doku: Rocket.Chat Plugin.md aktualisiert (User-Flow C, Bugfixes)
2026-06-08 07:40:04 +02:00
Hermes Agent
54a19a039d
Task 3: Deprecated marker für LLM_CLASSIFY_PROMPT in config.py hinzugefügt
2026-06-06 06:14:52 +02:00
Hermes Agent
58f00c0c23
feat(archivar): Phase 1-3 — RoomMap + thematischer Router
...
Phase 1 (Datenmodell):
- plugin/archivar/room_map.py: RoomMap, RoomEntry, RoomMapValidationError
- room-map.schema.json: JSON-Schema für room-map.json
- room-map.json: Echte Raum-IDs (RC, BAT, LAN-Doku, DM Andreas)
- config.py: LLM_ROOM_PROMPT, ROOM_MAP_PATH, deprecated-Marker
Phase 2 (Router-Umbau):
- router.py: MessageRouter nutzt RoomMap statt ROOM_MAPPING Env-Vars
- Neue Methode _llm_room_lookup() fragt LLM: 'In welchen Raum?'
- Keyword-Match aus RoomEntry.keywords (vor Embedding)
- Excluded rooms check via RoomMap.is_excluded()
- origin_room_id Parameter für Multi-Agent-Raum-Ausschluss
Phase 3 (Integration):
- adapter_integration.py: _load_room_map() mit Env-Var-Fallback
- validate() beim Gateway-Start
- classify_and_route() reicht origin_room_id durch
- classifier.py: _llm_raw_sync() für Room-Prompts (nicht Kategorien)
12/12 Unit-Tests bestanden ✅
2026-06-05 22:06:32 +02:00
Hermes Agent
e5a32abf5c
feat(archivar): dreistufiger Klassifikator — Keyword + Embedding + LLM (qwen2.5:7b)
...
Phase 3 (Miguel): 236 Zeilen in config.py, classifier.py, adapter_integration.py.
Phase 4 (Rainer): Quality Gate F1–F5 bestanden.
- Stufe 0: Keyword-Vorfilter mit erweiterten ALARM/FRAGE-Listen
- Stufe 1: Embedding (nomic-embed-text, Schwelle 0.70)
- Stufe 2: LLM-Klassifikation (qwen2.5:7b) für Grenzfälle
- Feature-Flag ARCHIVAR_ENABLE_LLM über Env-Variable
- LLMClient-Interface für Testbarkeit
- router.py unverändert (Blackbox-Integration)
2026-06-04 21:49:17 +02:00
Hermes Agent
ccce90fdb0
FAKT ist Dokumentation, keine Kommunikation — nie in Chat-Räume routen
...
Vier harte Änderungen:
1. config.py: ARCHIVAR_FAKT_ROOM existiert nicht mehr. FAKT wird
niemals in ROOM_MAPPING aufgenommen — Env-Variable obsolet.
2. router.py: FAKT-Entscheidungen werden VOR der Subscription-
Validierung als is_unrouteable markiert. Kein if/else, kein
Ermessensspielraum.
3. adapter_integration.py: classify_and_route() legt FAKT automatisch
im DocumentationStore ab (existiert bereits).
4. Env-Variable ARCHIVAR_FAKT_ROOM aus systemd env.conf entfernt.
Resultat: Nur FRAGE und ALARM werden jemals in Chat-Räume geroutet.
FAKT-Nachrichten wie 'CPU-Last bei 92%' sind reine Dokumentation —
sie landen als Markdown unter data/archivar_docs/fakt/
2026-06-03 22:11:25 +02:00
Hermes Agent
1c7b82e27f
feat: Archivar-Universalisierung A–E — env-vars, SKILL.md, Pipeline-Integration, file-download
...
A: config.py auf Env-Vars umgestellt (ARCHIVAR_FAKT_ROOM, _FRAGE_ROOM, _ALARM_ROOM, _CATCHALL_ROOM, _PROJECT_ROOMS)
B: adapter.py-Kommentare von BAT-Terminologie auf generisch umgeschrieben
C: archivar/SKILL.md — Hermes-Skill-Schema mit Triggern, Architektur, Konfiguration, Pitfalls
D: classify_and_route() + send_callback in _process_incoming() integriert, chat_name mit [KATEGORIE] angereichert
E: RocketChatREST.download_file() — authentifizierter Datei-Download via X-Auth-Token, kein Security-Scanner-Trigger mehr
_download_and_inline_files() inlined [FILE]-Inhalte direkt in den Prompt
2026-06-03 20:14:40 +02:00
Hermes Agent
bb8623aed5
fix: binary corruption in adapter.py + absolute→relative imports in archivar/
...
- adapter.py: recopied from production (write_file corrupted the em-dash on line 8)
- All archivar/*.py: from archivar.X → from .X for plugin-context compatibility
2026-06-03 10:17:03 +02:00
Hermes Agent
88b7149dd1
feat: Archivar delivery + install.sh v2.2 — full function set
...
- Add archivar/ submodule to plugin/ (5 files, relative imports)
- Update adapter.py with relative Archivar import from .archivar.adapter_integration
- install.sh: fix --non-interactive env-var reading (Z.316-318, Bug #7 )
- install.sh: recursive file copy (was 4 flat files, now entire plugin/ tree incl. submodules)
- install.sh: Ollama presence check + nomic-embed-text pull
- install.sh: write OLLAMA_BASE_URL to rocketchat.env
- install.sh: add new message keys (collama_check, nomic_pull, nomic_ok, nomic_fail, copied)
Closes: Archivar delivery gap (2026-06-03)
Reviewed-by: Bernd (Advisor)
2026-06-03 10:12:47 +02:00