An adapter watches one agent runtime (an IDE, a CLI, a desktop app) and publishes its sessions to the daemon. This is the contribution the project most wants — a good adapter PR needs no prior discussion.
- Connect to the Unix socket (
$MICROBRIDGE_SOCKET, default~/.microbridge/microbridged.sock). - Send
hellowith your adapter name and protocol version. - Send
statuson every session state transition — never on a timer unless the host's supported contract only provides snapshots. - Send
byewhen a session ends; reconnect and republish after crashes. - Advertise exact capabilities in
hello. Handle only supported incoming actions; unknown actions are a logged no-op.
Wire format: protocol.md. Working example:
adapters/reference-echo (~50 lines
of dependency-free Node).
Prefer, in order:
- Official hooks/APIs — e.g. CNVS's authenticated loopback control API, Cursor/Factory hooks, Factory JSON-RPC, and T3 Code's authenticated paired HTTP GET/POST orchestration contract. Stable and supported.
- Session files — many runtimes journal to disk (e.g.
~/.codex/sessions). Watch with FSEvents/inotify, not polling. - Logs — fragile; document exactly which version you tested.
Never scrape another app's private Electron internals — adapters that do will not be merged.
- Event-driven where the host supports it; bounded snapshot refreshes are documented and emit only changed sessions
- Idle cost ≈ 0 CPU; states from watching, not asking
-
statussent only on transitions, with complete session records - Sessions cleaned up (
bye) on end; correct republish on reconnect - No undeclared network I/O. Paired remote hosts require explicit consent, scoped credentials, timeouts, and revocation behavior
-
README.mdin your adapter folder: supported runtime versions, how state is sourced, known limitations - Tested against the daemon with
cargo run -p microbridged
First-party adapters (Codex CLI, Claude Code) are Rust modules compiled into
the daemon to keep the resident footprint at one process. Community adapters
live in adapters/<name>/ in any language and run as their own process. A
community adapter that proves stable and broadly used can graduate to
in-process. T3 Code is daemon-owned because its paired credential and action
routing must share Microbridge's consent boundary. Cursor and Factory remain
host-managed so each host owns hook execution and Microbridge owns only the
entries it installs. CNVS is daemon-owned because its canvas/node identity and
short-lived local token must remain inside the same routing boundary. Synara
and Conductor reuse the built-in journal watchers.
Adapters / session sources publish or watch state (Claude Code, Codex CLI, CNVS, Cursor, T3 Code, Factory, OpenCode). They may have Enable / Pair / Disconnect actions.
Host-attributed apps (Synara, ChatGPT, Claude Desktop, Conductor) are not
separate pairable adapters. They share ~/.claude/projects and
~/.codex/sessions; the built-in watchers label sessions by entrypoint /
originator / cwd. Settings still shows each as its own Integrations card with
a green / yellow / red status derived from live threads — do not open a PR
that adds a Synara (or ChatGPT) pairing adapter unless the host publishes a
distinct control API.