Gateway
15 channel adapters, one admission policy
One process holds every messenger on one event loop. Each adapter reads its own variables and stays silent when they are empty, so starting the server without credentials opens no connections and answers no chats.
The inbound matrix — every adapter and the variables it reads
| Adapter | Inbound path | Variables it reads |
|---|---|---|
discord |
Gateway websocket, launched with the bot token | DISCORD_BOT_TOKEN |
email |
IMAP poll of the inbox, SMTP for the reply |
EMAIL_IMAP_HOST EMAIL_IMAP_USER
EMAIL_IMAP_PASS EMAIL_POLL_INTERVAL
|
feishu |
POST /api/webhooks/feishu, SHA-256 over
timestamp, nonce, key and body |
FEISHU_ENCRYPT_KEY |
github |
POST /api/webhooks/github, HMAC of the raw body
in X-Hub-Signature-256 |
GITHUB_WEBHOOK_SECRET |
gitlab |
POST /api/webhooks/gitlab, shared token in
X-Gitlab-Token |
GITLAB_WEBHOOK_SECRET |
googlechat |
POST /api/webhooks/googlechat |
WEB_SECRET_KEY |
irc |
Socket, TLS by port; channels joined after 001 |
IRC_SERVER IRC_NICK IRC_CHANNELS
|
line |
POST /api/webhooks/line, base64 HMAC in
X-Line-Signature |
LINE_CHANNEL_SECRET |
matrix |
GET /_matrix/client/v3/sync long-poll, 30 s |
MATRIX_HOMESERVER MATRIX_ACCESS_TOKEN |
signal |
POST /api/webhooks/signal from a signal-cli receiver |
WEB_SECRET_KEY |
slack |
POST /api/webhooks/slack/events, v0 HMAC of
timestamp and body |
SLACK_SIGNING_SECRET |
teams |
POST /api/webhooks/teams |
WEB_SECRET_KEY |
telegram |
getUpdates long-polling through the Bot API |
TELEGRAM_BOT_TOKEN |
webchat |
WebSocket /ws, /ws/stream,
/ws/canvas |
WEB_SECRET_KEY |
whatsapp |
POST /api/webhooks/whatsapp plus the
GET handshake |
WHATSAPP_APP_SECRET WHATSAPP_VERIFY_TOKEN
|
A webhook route that has no secret of its own accepts the shared HMAC of the raw body in
X-Webhook-Signature instead. With neither key configured it answers 403 to
everything: an unverified payload is refused, not parked in a low-priority queue.
Outbound-only settings — TEAMS_WEBHOOK_URL, GOOGLECHAT_WEBHOOK_URL,
FEISHU_WEBHOOK_URL — carry replies, they do not admit anyone.
Who may talk to it
An unknown address opens a pairing, not a session
Access request recorded. The operator approves it on this host: `raven pairing approve`.
Six characters from A–Z0–9 stand behind that request, minted per address while DM_POLICY=pairing and shown only to raven pairing list
The owner approves it on the machine, not in the chat
raven pairing list
raven pairing approve H7KQ2M
raven doctor
raven doctor lists the adapters that have credentials, so an inert one is visible
Policy is a switch you throw on purpose
DM_POLICY=open admits anyone who finds the bot;
closed admits only addresses already in the store.
CHANNEL_ALLOW_FROM takes a JSON map of channel to user ids and
answers a refusal on the spot. Every approval is written to the audit log and
counted in the metrics.
What you can type to it
A slash message from any adapter reaches the same registry, and /help
answers from the handlers that are actually installed. The table below is generated
from those handlers by scripts/record_site_commands.py rather than typed
out a second time— a hand-written copy is how this page once hid seven commands
that already worked.
The 20 commands you can type on any channel, by name
| You type | What the gateway does |
|---|---|
/activation <mention|always> |
Answer in group chats only when the bot is addressed |
/agent |
Switch agent profile: /agent <profile> (available: architect, planner, coder, reviewer, debugger, qa, researcher, security) |
/agent_status |
Show current agent profile and status |
/code index [path] | search <query> | review <file> | start <goal> | status <id> | end <id> |
Code management |
/compact |
Compact memory into summary |
/help |
Show this help |
/mcp |
MCP server management |
/monitor list | add <type> <target> | remove <id> | pause <id> | resume <id> |
Monitor management |
/new |
Start a new session |
/reset |
Reset session history |
/restart |
Restart the agent |
/routine list | add <action> <schedule> | remove <id> | pause <id> | resume <id> |
Routine management |
/skills |
List available skills |
/status |
Show system status |
/task <goal> | list |
Run a task in background, or list the ones you have |
/think <low|medium|high> |
Set how much the model deliberates before it answers |
/trace <on|off> |
Report the run's iterations, seconds and token cost |
/usage <off|tokens|full> |
Report token usage after each answer |
/verbose <on|off> |
List the tool calls the answer used |
/voice tts <text> | providers |
Voice/TTS commands |
/think, /verbose, /trace, /usage
and /activation are preferences kept per user and per channel in the
state store, so they survive a restart. /activation mention is the
default: in a group the agent answers when the bot is addressed, while commands are
always answered. Regenerate this table after changing a handler's usage
or description; the test suite fails if the page and the registry drift.
The console the same process serves
raven start mounts the built React console on the API it already runs —
no separate web server, no CDN, no second port to firewall.
cd web && npm install && npm run build
raven start
# http://127.0.0.1:18888 — WEB_HOST, WEB_PORT, RAVEN_WEB_DIST
Bound to loopback by default; the gateway warns when you point WEB_HOST at
0.0.0.0. The bundle is looked up in RAVEN_WEB_DIST, then the wheel,
then web/dist, and if none of them carry an index.html the API still
starts and logs the build command instead.
The 38 screens the console serves, by group
| Group | Routes under the SPA shell |
|---|---|
| Agent | agent agents chat
chat/history collab contexts
dream tasks |
| Code | code code-quality git
github ide scaffold
tests cicd |
| Automation | workflows routines monitors
plugins chaos abtesting |
| Knowledge | knowledge rag finetune
providers cost |
| Insight | analytics insights
project-insights |
| Content | media voice email
browser web-search |
| Operations | admin settings components |
/assets and a catch-all are mounted last, after every router, so
/api/* keeps winning and an unknown path under /api/ answers 404
instead of the shell. The console speaks to those same routes: it is a client of the
gateway, not a service beside it.