Features
Room firmware
Per-room hooks that intercept message.create before fan-out: PII veto, rate limits, denylist.
Room firmware
Room firmware runs synchronous hooks on message.create before messages fan out to the room. Builtin modules ship today. Custom WASM is reserved for a future release.
Console
Settings → Firmware (/settings/firmware)
- Select a room.
- Enable modules and configure JSON config per module.
- Save. Hooks apply on the next message in that room.
| Module | Effect |
|---|---|
pii_veto | Block messages matching PII patterns |
rate_limit | Per-user send throttle in room |
denylist | Block substring / regex matches |
Rejected messages are audited in room_firmware_audit.
API
GET /rooms/:roomId/firmware
PUT /rooms/:roomId/firmware
GET /rooms/:roomId/firmware/audit?limit=Behaviour
- Fail-open on hook errors (message delivers; error logged).
- Hooks run on REST send and Room DO WebSocket path.
- Per-room config stored in D1 (
room_firmware).
Use for compliance rooms, negotiation term caps, or custom moderation without forking the Worker.