8 Commits

Author SHA1 Message Date
Bernd (Hermes) 32b560dfe3 feat(F072,F544): Welle 3 — Prozess-Isolation POC + Context-Curator im multiroom=false @implements: [F-072] [F-544] 2026-09-17 18:04:03 +02:00
Bernd (Hermes) f165f110e3 chore(F-542): @implements Batch 2b — 20 Reverse-Engineering-Dateien @implements: [F-542] 2026-09-17 14:40:08 +02:00
Bernd (Hermes) f687c49295 P0 Nachbesserungen + V7-1: Butler antwortet im Zielraum
Auflage 1: Unit-Tests für ConversationHistory (34 Tests)
- test_conversation_history.py: add/get, Ring-Buffer, topic_hint,
  cleanup_orphaned_rooms (sync+async), Thread-safety, Edge cases

Auflage 2: Schritt-4.5 Stick-Check im Router
- router.py Zeile ~556: _check_never_route_topic VOR is_100_percent_match
  in Schritt 4.5 (Keyword-Match vor LLM) eingefügt

Auflage 3: Topic-Extraktion zentralisieren
- router.py: room_name_to_topic als Module-Level-Alias exportiert
- adapter.py: importiert room_name_to_topic, ersetzt 2× inline
  .lstrip('#').lower().replace(' ', '-') durch zentralen Aufruf

V7-1: Butler antwortet im Zielraum + Breadcrumb
- adapter.py _process_incoming: move_request_sent=True → return (kein Agent-Dispatch)
- adapter.py Move-Request-Handler: bei ✅Ja → Breadcrumb im Ursprungsraum,
  _CURRENT_ORIGIN_ROOM + _THEMATIC_TARGET_ROOM auf Zielraum gesetzt,
  _dispatch_agent() im Zielraum-Kontext
- adapter.py _dispatch_agent(): extrahierte Dispatch-Methode für V7-1-Pfad

Syntax-Check: alle .py bestehen py_compile
Tests: 99/100 passed (1 pre-existing env-var failure)
2026-07-13 15:33: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 886e566e77 Doc-Store: Messages in nicht abonnierte Räume werden im Filesystem abgelegt
Harte Durchsetzung: Der Archivar darf NUR in Räume routen, die der Bot
tatsächlich abonniert hat. Alles andere ist ein Architekturfehler.

Neu:
- doc_store.py: DocumentationStore — speichert unrouteable Nachrichten
  als Markdown mit YAML-Frontmatter unter data/archivar_docs/{category}/
- router.py: RoutingDecision.is_unrouteable + unrouteable_reason,
  MessageRouter.set_subscribed_room_ids(), Zielraum-Validierung
- adapter_integration.py: ArchivarMessageHandler.set_subscribed_room_ids(),
  classify_and_route() leitet bei is_unrouteable in doc_store um
- adapter.py: set_subscribed_room_ids() wird nach connect() mit den
  realen subscribed rooms gefüttert

Verhalten: Wenn jemand 'ALARM: Server down' in einem Raum schreibt,
den der Bot nicht abonniert hat, wird die Nachricht KLASSIFIZIERT,
aber NICHT geroutet — sie landet im doc_store mit Begründung.
2026-06-03 22:06:30 +02:00
Hermes Agent abe93cc2dc Arbeitspakete A+B: Hausinterne Begriffe durch generische Beispiele ersetzt
- room-topic-map.md: BAT-Team → Support-Team, Protonbridge-Plugin → Mail-Bridge-Plugin,
  andreas/Bernd → Admin, personenbezogene Namen anonymisiert
- OPTION_C_SESSION_SHARING.md: BAT-Team → Support-Team, andreas → admin
- BUTTON_GUIDE.md: rocketchat:protonbridge → rocketchat:my-room (3 Stellen)
- plugin/archivar/__init__.py: /home/bernd/ → docs/

Alle Beispiele sind jetzt generisch und unabhängig vom LLM nutzbar.
2026-06-03 21:55:22 +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