Commit Graph

393 Commits

Author SHA1 Message Date
Hermes Agent c4775ca99e Fix update flow: git pull statt checkout, Plugin-Dateien direkt kopieren, kein ./install.sh Selbstaufruf 2026-06-04 06:25:30 +02:00
Hermes Agent d7ce3afcd0 Bugfixes für install.sh: 1) Zustandsvariable statt Exit-Code für Updates, 2) Stash-Mechanismus für git checkout mit lokalen Änderungen 2026-06-04 06:10:42 +02:00
Hermes Agent 70008660fc SKILL.md aktualisiert: FAKT→DocStore, Subscription-Validierung, DocumentationStore dokumentiert 2026-06-03 22:38:30 +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 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 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 7a0abc465a fix: template .env aufgeraeumt — nur OLLAMA_API_KEY, kein HERMES_API_KEY 2026-06-03 18:34:35 +02:00
Hermes Agent d01eded6ff fix: drei /API-KEY-Bugs — install.sh jetzt komplett productionsicher
Bug #12: /usr/bin/bash-Expansion im Passwort verhindert — cat <<'EOF' (single-quoted delimiter)
         + Platzhalter-Ersetzung via python3 (sed expandiert hBcZeichen in double quotes)
Bug #10: OLLAMA_BASE_URL aus rocketchat.env entfernt — überschreibt sonst Cloud-Provider-URL
Bug #11: OLLAMA_API_KEY via env var setzbar (OLLAMA_API_KEY=...) statt hartem Platzhalter
2026-06-03 17:37:13 +02:00
Hermes Agent 13a87fb233 fix: template now uses ollama-cloud as built-in provider + home_channel placeholders
Root cause: 'ollama-cloud' is a built-in Hermes provider. Putting it under
custom_providers with api_key_env broke key resolution. Built-in providers
use their own env-var conventions (OLLAMA_API_KEY, not HERMES_API_KEY).

Changes:
- template: model.provider=ollama-cloud, base_url=ollama.com/v1 (no custom_providers)
- template: gateway.platforms.rocketchat.home_channel with PLACEHOLDER vars
- install.sh: sed-replace placeholders with actual RC_URL/RC_HOME_CHANNEL
- template: .env now uses OLLAMA_API_KEY (what ollama-cloud actually reads)
- Bug #11 (export prefix in rocketchat.env) still needs push
2026-06-03 14:05:22 +02:00
Hermes Agent d6b30d8d87 fix: remove export prefix from rocketchat.env (systemd compatibility)
EnvironmentFile in systemd drop-ins parses KEY=VALUE only.
'export' prefix caused systemd to silently ignore all vars,
leaving the Gateway with 'No messaging platforms enabled'.

Bug found during .45 test run #2.
2026-06-03 12:31:15 +02:00
Hermes Agent f54f90be5b fix: provision config.yaml/.env + systemd EnvironmentFile drop-in
Fixes #9 (custom_providers missing — fresh installs had no config.yaml/.env,
so gateway had no provider to connect to) and #10 (systemd unit had no
EnvironmentFile, so gateway couldn't read rocketchat.env/.env → crash-loop).

Templates provisioned on first install only (no overwrites):
- templates/config.yaml: minimal working config with ollama-cloud provider
- templates/.env: API key placeholder
- templates/hermes-gateway-env.conf: systemd drop-in wiring rocketchat.env + .env
2026-06-03 12:24:08 +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 e3dc543af5 fix: install.sh line 318 — don't zero out env vars before --non-interactive reads them
The local initialization RC_URL="" on line 318 was destroying
environment variables before the non-interactive block (line 330+)
could read them via ${RC_URL:-${ROCKETCHAT_BASE_URL:-}}.

Fix: use ${RC_URL:-} to preserve values already set in the environment.
2026-06-03 10:14:07 +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
Hermes Agent e6eddcd3da docs: add Troubleshooting section — absolute import pitfall (archivar) + tools import crash 2026-06-03 06:50:35 +02:00
Hermes Agent 5d65789295 Fix install.sh: Replace with corrected version that resolves update check issues v2.1.0 2026-06-01 08:15:46 +02:00
Hermes Agent a614071ac4 docs: Map bereinigt — DM mit Bernd (toter Solo-Raum) entfernt, Strategie in Catch-All integriert 2026-05-31 11:37:23 +02:00
Hermes Agent 198487bfc7 docs: Public Docs Overhaul — werbewirksame Features, neutrale Beispiele, keine Option C
- README.md: Smart Room Routing + Multi-Room Presence + File Attachments als Features
- COMMUNITY_POST.md: 'Was ist das?' mit Multi-Room-Story, Features-Tabelle erweitert
- room-topic-map.md: Option-C-Referenz durch Multi-Room-Session-Key ersetzt
2026-05-31 11:26:19 +02:00
Hermes Agent 72e748f4e7 docs: Room-Topic-Map vervollständigt + Virtual-Key-Schärfung
- 2 neue Räume: DM mit Bernd, Thomas (inaktiv) + DM mit Bernd, Susi (Bot-zu-Bot)
- Virtual Keys geschärft: nie zeigen, nie abfragen, nie Catch-All
- Rainer-Review aktualisiert (Andreas-Korrektur dokumentiert)
2026-05-31 11:21:46 +02:00
Hermes Agent d14ee2d069 docs: Rainer-Review Room Topic Discipline — Freigegeben (F1-F5 bestanden)
- docs/protocols/2026-05-31_rainer-review-room-topic-discipline.md
- Keine Findings, keine Auflagen
- Trigger: nach Adapter.connect(), automatisch im Plugin-Lifecycle
2026-05-31 11:15:52 +02:00
Hermes Agent 5994024d7d docs: Room Topic Map + Room Topic Discipline in README
- Neue docs/room-topic-map.md: 5 Räume, Catch-All (DM andreas/Bernd), virtuelle Keys
- README.md: Features um Room Topic Discipline + Attachment Support ergänzt
2026-05-31 10:50:47 +02:00
Hermes Agent cb9e913cf5 fix(adapter): deduplicate file/attachment entries by file_id 2026-05-31 00:23:50 +02:00
Hermes Agent c755d88a90 docs: update README + Community Post — 7 tools, v2.3.0, attachment features, changelog 2026-05-31 00:19:13 +02:00
Hermes Agent 369f617bdf fix(upload): 2-step flow — rooms.media + chat.postMessage mit title_link
RC 8.4.1: rooms.media lädt Datei nur hoch, postet sie nicht als Chat-Nachricht.
upload_file() ergänzt automatisches chat.postMessage mit:
- title_link (statt image_url)
- title_link_download: true
- type: file

Handler _handle_rocketchat_upload vereinfacht auf Durchreichen.
Rainer-Review: F1-F6 geprüft. Externer Usertest bestanden.
2026-05-31 00:17:37 +02:00
Hermes Agent 923c76a6be feat(plugin): attachment support — upload, download, files + adapter detection
- tools.py: rocket_upload (rooms.media for RC 8.4+), download, files
- adapter.py: _process_incoming() detects file/attachments → [FILE] enrichment
2026-05-29 23:18:39 +02:00
Hermes Agent 7872d4a47f docs: Option C Architektur-Dokumentation 2026-05-28 22:29:56 +02:00
Hermes Agent 0972f19d73 feat(adapter): Option C — virtuelle Raum-Übersetzung für Cross-Room-Session-Sharing
Eingang: raum-basierte chat_id → user-basierte virtuelle chat_id
Rückkanal: ContextVar _CURRENT_ORIGIN_ROOM für präzises Antwort-Routing
Fallback: _user_rooms Map für proaktive Nachrichten

Kern-Änderungen:
- _CURRENT_ORIGIN_ROOM ContextVar (global, async-safe)
- _process_incoming(): room_id → user:username, force chat_type=dm
- send(): virtuelle chat_id → real room_id via ContextVar / user_map
- connect(): _user_rooms aus DMs aufbauen

Null Hermes-Core-Änderungen. Keine Update-Abhängigkeit.
2026-05-28 22:27:18 +02:00
Bernd (Hermes Agent) 7d1468a9dc fix: Underscores aus Button-Texten entfernt + custom-Template hinzugefügt
- multi_choice_3: '1._Links' → '1. Links' etc. (Underscores zerstören RC-Rendering)
- custom-Template fehlte in Gitea-Version → hinzugefügt
- plugin.yaml: ROCKETCHAT_ROOM_ID env var dokumentiert
2026-05-13 07:31:19 +02:00
Bernd 55a222f044 docs: README, COMMUNITY_POST und BUTTON_GUIDE für v2.0 aktualisiert 2026-05-11 06:58:42 +02:00
Bernd fc13a9ee87 v2.0: Gateway-Plugin-Architektur + interaktiver bilingualer install.sh
- Legacy-Standalone-Daemon entfernt (__init__.py, adapter.py, _merge_config.py, uninstall.sh)
- Plugin-Dateien in plugin/ strukturiert (von produktiver Susi-Instanz)
- Neuer install.sh: --lang en/de, --help, --non-interactive, Bot Username Prompt, Re-Install-Erkennung
- tools.py: Rocket.Chat REST-Tools fur Rooms, Users, DMs, Send
- BasePlatformAdapter-Vererbung, DDP-added-Events, case-insensitive Filter
2026-05-11 06:56:16 +02:00
Bernd (Hermes Agent) 0a64199329 Haftungsausschluss in README.md und COMMUNITY_POST.md eingefügt 2026-05-10 20:11:05 +02:00
Bernd (Hermes) e6efe55edc feat: install.sh schreibt ALLE Einstellungen in config.yaml; Button-Doku korrigiert (Desktop ~5-7 chars, keine Underscores, online statt away); adapter+init auf Produktionsstand 2026-05-10 07:51:00 +02:00
Bernd (Hermes Agent) a7db2942f6 feat: add uninstall.sh with dry-run, --help, full cleanup; update install.sh + COMMUNITY_POST.md 2026-05-05 21:07:11 +02:00
Bernd (Hermes Agent) c4c1f344ce feat: add --dry-run mode to install.sh + update Gitea description 2026-05-05 18:45:38 +02:00
Bernd (Hermes Agent) b6b3469c21 feat: add install.sh — interactive setup for beginners with emoji feedback + README overhaul 2026-05-05 17:46:06 +02:00
Bernd (Hermes Agent) 6ac0f2a08c docs: fix README line break + use external HTTPS URL gitea.thomander.de 2026-05-05 07:38:00 +02:00
Bernd (Hermes Agent) 10821b5f38 docs: use external Gitea URL (192.168.180.101) in COMMUNITY_POST 2026-05-05 07:32:43 +02:00
Bernd (Hermes Agent) bda8c5ed87 docs: replace 'official' with 'useful add-on' — avoids manufacturer implication 2026-05-05 07:10:45 +02:00
Bernd (Hermes Agent) fd616d9100 docs: add COMMUNITY_POST.md for public distribution 2026-05-05 07:06:22 +02:00
Bernd (Hermes Agent) 428090abd5 docs: meaningful README with install/config guide 2026-05-05 06:07:02 +02:00
Bernd (Hermes Agent) 0e31bf55e5 feat: initial plugin release — adapter, init, plugin.yaml 2026-05-05 06:05:47 +02:00
andreas e7ffe0fc84 Initial commit 2026-05-05 03:45:13 +00:00