connect
Pairs a device for live layout authoring, with zero-config local connection or relay gateway support.
Instructions
Pair a device for live layout authoring. Hassle-free by default.
target="local" (default): spins up an in-process, auth-free MeshSocket relay on this Mac and builds a QR with the LAN IP — no gateway, no token, no AWS. Just have the phone on the same Wi-Fi (the app allows ws:// on the LAN).
target="relay": use the Connect+ gateway instead (phone can be on any
network, wss). The token is taken from token / CARTER_MESH_TOKEN, or
auto-minted from the dev validator (validator_url / CARTER_VALIDATOR_URL)
so you still don't hand-paste one.
Args: channel: MeshSocket channel name (default 'editor'). role: MeshSocket role for the editor (default 'editor'). target: 'local' (default, zero-config) or 'relay' (gateway). url: gateway ws/wss URL (target='relay' only); else CARTER_RELAY_URL/default. token: gateway token (target='relay' only); else env, else auto-mint. validator_url: dev-validator base URL to mint a token from (target='relay').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| role | No | editor | |
| token | No | ||
| target | No | local | |
| channel | No | editor | |
| validator_url | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |