aio-message-bridgelisted
Install: claude install-skill aiocean/claude-plugins
# aio-message-bridge — give Claude Code an event loop
## The problem this solves
Claude Code runs in a turn-by-turn loop. It has no event loop: it cannot
`addEventListener`, cannot hold a socket open and react to frames as they
arrive, cannot block on `await nextEvent()`. So how does something *outside*
Claude — a program in another terminal, a phone, a webhook from a SaaS, a
button in a web page — drive Claude's behavior *while a task is in progress*,
and how does Claude push updates back to it live?
## The pattern — an asymmetric two-channel bridge
One local process (the **relay**) fronts two channels. They are **not
symmetric**, and the asymmetry is the entire lesson:
```
EXTERNAL CLIENT RELAY (one process) CLAUDE
──────────────── ─────────────────── ──────
POST /api/event ──────────────▶ prints MSG::{json} ──stdout──▶ Monitor
(HTTP, fire once) to stdout notification
reads WS frames ◀──WebSocket─── broadcast "events" ◀────────── POST /api/push
(server→client push) (curl, any shell step)
```
- **External → Claude (inbound).** The client makes a one-shot **HTTP POST**
to `/api/event`. The relay prints exactly one sentinel line —
`MSG::{instance,type,payload}` — to its **stdout**. The **Monitor tool**
(which launched the relay) turns each stdout line into a **notification**.
That notification