|
|
@@ -4,7 +4,7 @@ A [Chatto](https://github.com/chattocorp/chatto) platform adapter plugin for [He
|
|
|
|
|
|
All API interaction goes through [chattolib](https://github.com/TheCodemancerLtd/chattolib): a persistent WebSocket realtime connection delivers inbound events, ConnectRPC over HTTP handles outbound messages, reactions, uploads and more. Messages are processed through the full Hermes Agent pipeline (tool use, memory, reasoning) and answered in real time.
|
|
|
|
|
|
-Tested against Chatto v0.4.19 with `chattolib[realtime]>=0.4.19` (realtime protocol v1). Chatto servers older than v0.4.19 are not supported.
|
|
|
+Tested against Chatto v0.4.20 with the vendored `chattolib[realtime]` 0.4.20.post1 (realtime protocol v1). Chatto servers older than v0.4.20 are not supported.
|
|
|
|
|
|
Before setup, here's the part most people want to know: how Hermes behaves once it's in your Chatto instance.
|
|
|
|
|
|
@@ -13,13 +13,13 @@ Before setup, here's the part most people want to know: how Hermes behaves once
|
|
|
| Context | Behavior |
|
|
|
|---------|----------|
|
|
|
| **DMs** | Hermes responds to every message. No `@mention` needed. Each DM has its own session. |
|
|
|
-| **Rooms** | Without a `@mention`, Hermes ignores the message (configurable via `CHATTO_REQUIRE_MENTION`). When you `@mention` it, Hermes responds. |
|
|
|
+| **Rooms** | Hermes responds to every room message by default. With `CHATTO_REQUIRE_MENTION=true`, channel-kind rooms answer only `@mentions`; group-kind rooms always respond. |
|
|
|
| **Threads** | If you reply in a thread, Hermes keeps the thread context isolated from the parent room. The bot auto-follows threads it participates in. |
|
|
|
| **Processing indicators** | Hermes adds a 👀 reaction when it starts processing a message, and replaces it with ✅ on success or ❌ on failure. |
|
|
|
| **Typing indicators** | Hermes broadcasts persistent typing indicators while it's working, so users know the bot is active. |
|
|
|
| **Message splitting** | Long responses (>10000 chars) are automatically split into multiple messages. |
|
|
|
|
|
|
-> **Tip:** If you want Hermes to respond to all messages in a room without requiring an `@mention`, set `CHATTO_REQUIRE_MENTION=false`. DMs always get a response regardless of this setting.
|
|
|
+> **Tip:** By default Hermes answers every message in a room. Set `CHATTO_REQUIRE_MENTION=true` to have him answer only `@mentions` in channel-type rooms.
|
|
|
|
|
|
## Capability Matrix
|
|
|
|
|
|
@@ -52,7 +52,7 @@ Capabilities natively implemented by the Chatto plugin adapter:
|
|
|
3. **Room membership** — the bot account must be a member of any room where you want it to respond. The adapter auto-joins rooms specified in `CHATTO_CHANNELS`. For DMs, simply start a direct message with the bot.
|
|
|
4. **Network access** — the Hermes host must reach the Chatto server URL over HTTPS (or HTTP) and establish a WebSocket connection to `/api/realtime`.
|
|
|
|
|
|
-> **Info:** The adapter uses WebSocket protocol v1 (compatible with Chatto v0.4.19+). Ensure your Chatto server is up to date.
|
|
|
+> **Info:** The adapter uses WebSocket protocol v1 (compatible with Chatto v0.4.20+). Ensure your Chatto server is up to date.
|
|
|
|
|
|
## Install
|
|
|
|
|
|
@@ -102,8 +102,8 @@ CHATTO_PASSWORD=your-password
|
|
|
# Optional: allow any user to talk to the bot (default: false)
|
|
|
# CHATTO_ALLOW_ALL_USERS=true
|
|
|
|
|
|
-# Optional: require @mention in channels (default: false). DMs always respond.
|
|
|
-# CHATTO_REQUIRE_MENTION=false
|
|
|
+# Optional: answer only @mentions in channels — group rooms and DMs always respond
|
|
|
+# CHATTO_REQUIRE_MENTION=true
|
|
|
|
|
|
# Optional: rooms that answer without a mention even when require_mention is on
|
|
|
# CHATTO_FREE_RESPONSE_CHANNELS=REljMv5Pgolo6Y9
|
|
|
@@ -165,7 +165,7 @@ Once configured, start the gateway:
|
|
|
hermes gateway
|
|
|
```
|
|
|
|
|
|
-The bot should connect to your Chatto server within a few seconds. Send it a message — either a DM or an `@mention` in a room — to test.
|
|
|
+The bot should connect to your Chatto server within a few seconds. Send it a message — a DM or any message in a room — to test.
|
|
|
|
|
|
If nothing happens at startup — plugin failed to load, credentials rejected, server unreachable — run `hermes logs` to see what the Chatto adapter reported.
|
|
|
|
|
|
@@ -197,7 +197,7 @@ Hermes uses emoji reactions for processing lifecycle notifications:
|
|
|
- ✅ — replaces 👀 when processing completes successfully
|
|
|
- ❌ — replaces 👀 when processing fails
|
|
|
|
|
|
-The adapter converts Unicode emoji to Chatto shortcode names internally (e.g., `👀` → `eyes`, `✅` → `white_check_mark`). Reactions can also be added/removed programmatically by the agent. Disable the lifecycle reactions with `CHATTO_REACTIONS=false`.
|
|
|
+Disable the lifecycle reactions with `CHATTO_REACTIONS=false`.
|
|
|
|
|
|
### Message Editing and Deletion
|
|
|
|
|
|
@@ -274,7 +274,6 @@ The home channel is where the bot sends proactive messages — cron job output,
|
|
|
|
|
|
- `CHATTO_HOME_CHANNEL` env var (room ID)
|
|
|
- `config.yaml` → `gateway.platforms.chatto.extra.home_channel`
|
|
|
-- `/sethome` slash command in any room where the bot is present
|
|
|
|
|
|
If unset, the first watched room is used as the default home channel.
|
|
|
|
|
|
@@ -325,7 +324,7 @@ If the response does not include a `token` field, the credentials are wrong. Res
|
|
|
|
|
|
**Cause**: The Chatto server is running an older version that doesn't support realtime protocol v1.
|
|
|
|
|
|
-**Fix**: The adapter uses protocol v1, supported by Chatto v0.4.19 and later. Upgrade your Chatto server:
|
|
|
+**Fix**: The adapter uses protocol v1, supported by Chatto v0.4.20 and later. Upgrade your Chatto server:
|
|
|
|
|
|
```bash
|
|
|
curl -s https://chat.example.com/api/version | jq .
|
|
|
@@ -370,7 +369,7 @@ For more information on securing your Hermes Agent deployment, see the security
|
|
|
## Notes
|
|
|
|
|
|
- **Self-hosted friendly**: Works with any self-hosted Chatto instance. No cloud account or subscription required.
|
|
|
-- **Minimal dependencies**: Only requires `chattolib[realtime]>=0.4.19`.
|
|
|
+- **Minimal dependencies**: Only requires `chattolib[realtime]>=0.4.20.post1`, which is vendored — nothing to install.
|
|
|
- **Resume cursor support**: On reconnect, the adapter resumes from the last event cursor, so no messages are lost or replayed during transient disconnects.
|
|
|
|
|
|
## License
|