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
2026-05-05 03:45:13 +00:00

Hermes Rocket.Chat Plugin

Bidirectional real-time messaging between Hermes Agent and self-hosted Rocket.Chat servers. Zero external dependencies — uses WebSocket/DDP + REST API.

⚠️ Community Add-on — not an official Nous Research product.
This plugin is maintained independently. Use at your own risk. See LICENSE.

Features

  • 🟢 Real-time messaging via DDP/WebSocket (stream-room-messages)
  • 💬 Interactive buttons — Native Rocket.Chat attachments with question_id::choice correlation
  • 🔌 4 REST tools — rocketchat_rooms, rocketchat_users, rocketchat_dm, rocketchat_send
  • 🟢 Online presence — Green dot via DDP UserPresence
  • ♻️ Auto-reconnect with exponential backoff
  • 🌍 Bilingual installer — German & English (--lang de|en)

Quick Install

git clone https://gitea.myowntools.org/andreas/Hermes_rocket.chat_Plugin.git
cd Hermes_rocket.chat_Plugin
./install.sh

The installer will ask for:

  • Rocket.Chat server URL
  • Bot username (the bot account on your Rocket.Chat server)
  • Bot password
  • Home channel (name or room ID)

After installation: The gateway will output a pairing code — enter it in your home channel to activate the bot.

Options

./install.sh --help          # Show all options
./install.sh --lang en       # English
./install.sh --lang de       # German (default)
./install.sh --non-interactive  # Batch mode (reads from env vars)

Architecture

Rocket.Chat Server
      ↕ WebSocket/DDP + REST
Hermes Gateway (plugin)
      ↕
 Hermes Agent ← → LLM inference

The plugin registers as rocketchat-platform in Hermes' bundled plugin path (hermes-agent/plugins/platforms/rocketchat/).

Interactive Buttons

The plugin supports native Rocket.Chat buttons. The agent sends them via send_message with metadata:

send_message(
    target="rocketchat:protonbridge",
    text="Proceed?",
    metadata={
        "template": "custom",
        "question_id": "confirm_42",
        "button_title": "Choose:",
        "custom_buttons": ["✅ Yes", "❌ No"]
    }
)

User click returns: confirm_42::✅ Yes

Button label rules:

  • Max ~7 visible characters on desktop (mobile shows full text)
  • NO underscores — breaks Rocket.Chat rendering
  • Spaces allowed: 1. Left, 2. Right
  • Prefix with number/keyword for distinguishability

See docs/BUTTON_GUIDE.md for full details.

Environment Variables

Set in ~/.config/hermes/rocketchat.env (generated by install.sh):

ROCKETCHAT_BASE_URL=https://rocketchat.example.com
ROCKETCHAT_USER=botuser
ROCKETCHAT_PASSWORD=...
ROCKETCHAT_ROOM_NAME=ki-assistent
ROCKETCHAT_ALLOW_ALL_USERS=true
GATEWAY_ALLOW_ALL_USERS=true

Requirements

  • Hermes Agent installed
  • Self-hosted Rocket.Chat server (V5+)
  • Bot user account on the Rocket.Chat server
  • Python 3.10+ (hermes-agent venv)

License

Unlicense — Public Domain. See LICENSE.

S
Description
Hermes Rocket.Chat Gateway Plugin — DDP/WebSocket + REST API
Readme Unlicense 35 MiB
Languages
Python 94.9%
Shell 5.1%