feat(plugins): add Rocket.Chat platform adapter as bundled plugin - #30463
feat(plugins): add Rocket.Chat platform adapter as bundled plugin#30463HearthCore wants to merge 3 commits into
Conversation
Adds a Rocket.Chat gateway adapter as a self-contained plugin (kind: platform) in plugins/platforms/rocketchat/. Based on PR NousResearch#14869 by @cyb0rgk1tty, refactored from gateway/platforms/ into the modern plugin format — zero core Hermes changes needed. Thanks also to @meron1122 (PR NousResearch#4637) for the parallel plugin-structure approach. Features: - DDP WebSocket (__my_messages__) for inbound messages - REST API v1 (chat.postMessage) for outbound writes - Two-step file upload via rooms.media + rooms.mediaConfirm - Attachment download with image/audio/document caching - Voice message → MP3 conversion via ffmpeg for STT - Thread support via tmid - Bidirectional Hermes session title ↔ RC room topic sync - Mention gating with free-response room exceptions - Slash command routing (position-0 only, gate via is_gateway_known_command()) - typing indicator (Rocket.Chat 8.x compatible) - Emoji reactions (👀✅❌) on channel messages - DDP reconnect with exponential backoff (2s–60s) - Standalone REST-only sender for cron delivery - Interactive setup wizard (hermes gateway setup) - Plugin.yaml manifest with full env var metadata - AGENTS.md for AI assistant development reference - README.md with setup guide and troubleshooting Signed-off-by: HearthCore <timo.goetzken@gmail.com>
The README was originally written in German for local use. Since this PR targets the upstream repo, the documentation needs to be in English — the project's lingua franca.
|
i'm a rocket-chat user excited about this, thank you @HearthCore some suggestions for consideration:
following feedback via codex-5.5 (not too worried about file size caps on first version of this myself):
other auto-feedback:
|
|
Any updates on that? |
Thanks for the great work, Floris + Hermes. |
|
Any updates? |
|
Heads up on a related change landing upstream that could simplify the outbound half of this adapter down the line: RocketChat/Rocket.Chat#41082 adds a native MCP server to Rocket.Chat, exposing its REST API as MCP tools over JSON-RPC 2.0 at Why it's relevant here This adapter currently hand-rolls all of its outbound traffic against Rocket.Chat's REST API — sending messages, file upload/download, reactions, topic sync, slash-command routing. That same REST surface is exactly what #41082 wraps as MCP tools, with authentication, permission checks, rate limiting, and CORS handled server-side. Since Hermes is already MCP-capable, a good chunk of that bespoke REST plumbing could eventually be replaced by MCP tool calls instead — less integration code to maintain, and it tracks Rocket.Chat's API automatically rather than drifting. Scope — outbound only To be clear, this only touches the outbound path. The inbound side of this adapter relies on a DDP WebSocket subscription for real-time message delivery, and #41082 is request/response only (no streaming/subscription for receiving messages). So the WebSocket layer stays exactly as-is regardless — MCP doesn't replace it. Not a dependency to adopt now Flagging this as a future simplification path, not something to take on in this PR:
Suggest we keep the current REST implementation as-is for this PR and revisit routing outbound calls through MCP once #41082 lands and stabilizes — potentially as an optional backend that's used when the target instance has it enabled. |
|
Thanks for the substantial standalone-platform implementation and for preserving the earlier Rocket.Chat contributors as references. This automated hermes-sweeper review is closing this under the standing
This is a coupling and maintenance policy, not a judgment on the quality or usefulness of the work. Closed as not-planned per standing maintainer policy ( |
|
I published plugin powerup with amazing features from @HearthCore and a few more. Feel free to use and contribute |
Summary
Adds a Rocket.Chat gateway adapter as a self-contained plugin (
kind: platform) inplugins/platforms/rocketchat/. Built onaiohttp— zero new Python dependencies.Background
This work is based on PR #14869 by @cyb0rgk1tty, refactored from the core
gateway/platforms/approach into the modern standalone plugin format introduced by PR #17664 / #17751. Many thanks to @cyb0rgk1tty for the original implementation and to @meron1122 (PR #4637) for the parallel plugin-structure work — both served as valuable references.Architecture
Key Design Decisions
/is matched at position 0 in bothraw_msgandmessage_text(DMs may retain @mention prefix). Mid-sentence/statusis correctly ignored. Hermes-known commands gate viais_gateway_known_command()before falling through to RC'scommands.run.Files Changed
Note: this is a pure plugin addition (
kind: platform) — zero changes to Hermes core files.Env Var Contract
How to Test
Desktop RC Note
The Rocket.Chat Desktop/Browser client intercepts unknown
/commands client-side. To use Hermes commands on desktop, setMessage_AllowUnrecognizedSlashCommand = truein RC Admin (Settings -> Message) or via envOVERWRITE_SETTING_Message_AllowUnrecognizedSlashCommand=true. Mobile clients work out of box.Testing
Tested live against a self-hosted Rocket.Chat 8.x instance with:
Co-authored-by: HearthCore timo.goetzken@gmail.com