aiti-pair (Device Pairing)
Device Pairing (aiti-pair)
Different devices, one bridge — as if everyone sat in the same room.
Devices attached to the same bridge — phone browsers, another computer, agent sessions, injected pages — message each other and move files. Temporariness first: messages stay in memory, files expire after 1 h and offline devices are reclaimed after 1 h.
Shape
- This extension is a thin pi-web shell: a toolbar entry (inside the "more" overflow as "Device pairing") → floating panel (obeys the
data-ext-floatcontract; aiti-float handles dragging and small-screen fullscreen) that lazily mounts the pair widget. - The widget and protocol live elsewhere: aiti-devtools' public asset
pair-client.js(built from the bridge core — the single protocol source). It is loaded at runtime, so a missing aiti-devtools only shows onboarding, never a crash. - Reach = the device set of this instance's embedded bridge (the standalone bridge on 8777 is a separate island).
Other entries
| Entry | Where |
|---|---|
| Phone / external browser page | the bridge-served /pair.html (standalone bridge https://<host>/aiti/pair.html; pi-web /api/extensions/aiti-devtools/pair.html) |
| Cockpit | toolbar ✉ button → popover widget |
| Agent (MCP) | bridge_status (unified device view) + aiti_pair_send / aiti_pair_file / aiti_pair_fetch |
Cross-bridge federation (off by default)
Reach is one bridge by default. With aiti-devtools' pairFed.enabled, the panel and agent tools can see the authoritative bridge (default http://127.0.0.1:8777/aiti, override via pairFed.url) and send messages/files to its devices (fed: namespace); a message from the authoritative bridge to a "pi-web bridge" device broadcasts into every pair device of this bridge (asymmetric v1 semantics). Federated file downloads read directly on the authoritative bridge machine, so cross-machine deployments cannot use them.
Security
- Messages and file downloads require a peer token (issued at registration, remembered in localStorage).
- Registration/discovery has two gates: the bridge's private-network gate (
X-Real-IP;AITI_PAIR_PUBLIC=1opens it,AITI_PAIR_TOKENadds a registration token) plus reverse-proxy auth on public exposure. - Temporary by design: in-memory messages, 1 h file TTL, 1 h offline-device reclamation.