Channels
Plugin Stoat
π¦ Stoat (Revolt) channel plugin for OpenClaw β WebSocket + REST hybrid with image support
Configuration Example
{
"channels": {
"stoat": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"wsBase": "wss://events.stoat.chat"
}
},
"plugins": {
"entries": {
"stoat": {
"enabled": true
}
}
}
}
README
# π¦ openclaw-plugin-stoat
> **The first Revolt/Stoat channel plugin for [OpenClaw](https://github.com/openclaw/openclaw)**
[](https://opensource.org/licenses/MIT)
[](https://github.com/openclaw/openclaw)
Connect your OpenClaw agent to [Revolt](https://revolt.chat) / [Stoat](https://stoat.chat) servers with full bidirectional messaging, image support, and rock-solid connectivity.
## β¨ Features
- **π WebSocket Primary** β Real-time message delivery via Revolt's WebSocket API
- **π REST Polling Fallback** β Automatic 10s polling when WebSocket disconnects
- **πΌοΈ Image Support** β Inbound + outbound attachments via Revolt's Autumn file server
- **β¨οΈ Typing Indicators** β Shows typing status before bot replies
- **π¬ DM Support** β Direct messages and saved messages detection
- **π Auto-Reconnect** β Exponential backoff (max 120s) with automatic recovery
- **π Ping Keepalive** β Proactive 30s pings to prevent server-side disconnects
- **π€ Self-Message Filtering** β Bot won't respond to its own messages
- **π₯ Multi-Account** β Support for multiple bot accounts
## π¦ Installation
1. Copy the plugin to your OpenClaw extensions directory:
```bash
mkdir -p ~/.openclaw/extensions/stoat
cp index.js package.json ~/.openclaw/extensions/stoat/
```
2. Add to your OpenClaw config (`~/.openclaw/openclaw.json`):
```json
{
"channels": {
"stoat": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"wsBase": "wss://events.stoat.chat"
}
},
"plugins": {
"entries": {
"stoat": {
"enabled": true
}
}
}
}
```
3. Restart OpenClaw:
```bash
systemctl --user restart openclaw-gateway
```
## π§ Configuration
| Key | Default | Description |
|-----|---------|-------------|
| `channels.stoat.token` | β | Bot token from Revolt/Stoat |
| `channels.stoat.wsBase` | `wss://events.stoat.chat` | WebSocket endpoint |
| `channels.stoat.apiBase` | `https://api.revolt.chat` | REST API endpoint |
| `channels.stoat.autumnBase` | `https://autumn.revolt.chat` | File upload server |
| `channels.stoat.pollChannels` | `[]` | Channel IDs for REST polling fallback |
### Environment Variables
You can also set the token via environment variable:
```bash
export STOAT_BOT_TOKEN="your-bot-token"
```
## π Self-Hosted Revolt
Works with self-hosted Revolt instances β all endpoints are fully configurable:
```json
{
"channels": {
"stoat": {
"token": "YOUR_BOT_TOKEN",
"apiBase": "https://your-revolt.example.com/api",
"wsBase": "wss://your-revolt.example.com/ws",
"autumnBase": "https://your-revolt.example.com/autumn"
}
}
}
```
No hardcoded URLs β point it at any Revolt-compatible server.
## ποΈ Architecture
```
βββββββββββββββ WebSocket ββββββββββββββββ
β Revolt/ βββββββββββββββββββββΊβ OpenClaw β
β Stoat β (primary) β Gateway β
β Server βββββββββββββββββββββΊβ β
β β REST API β β
β β (fallback) β β
βββββββββββββββ ββββββββββββββββ
β β
β Autumn β
β (file uploads) β
βΌ βΌ
βββββββββββββββ ββββββββββββββββ
β Attachments β β Agent β
β (images) β β Response β
βββββββββββββββ ββββββββββββββββ
```
**Hybrid Connectivity:**
1. WebSocket connects and authenticates with bot token
2. On disconnect β automatic REST polling every 10s
3. On WebSocket reconnect β polling stops
4. Proactive ping every 30s prevents server-side timeouts
## π Security
- Bot token is never logged or exposed in status endpoints
- Self-message filtering prevents infinite loops
- Rate limiting (429) handled with automatic backoff
- No message content is logged
- See [SECURITY-AUDIT.md](SECURITY-AUDIT.md) for full audit
## π Creating a Bot
1. Go to your Revolt/Stoat server settings
2. Navigate to **Bots** β **Create Bot**
3. Copy the bot token
4. Invite the bot to your server/channels
## π€ Contributing
PRs welcome! This is the first Revolt/Stoat plugin for OpenClaw.
## π License
[MIT](LICENSE) Β© 2026 robbyczgw-cla
channels
Comments
Sign in to leave a comment