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