In Gateway-owned pairing, the Gateway is the source of truth for which nodes are allowed to join. UIs (macOS app, future clients) are just frontends that approve or reject pending requests.
Important: WS nodes use device pairing (role node) during connect.
node.pair.* is a separate pairing store and does not gate the WS handshake.
Only clients that explicitly call node.pair.* use this flow.
node.pair.requested.Pending requests expire automatically after 5 minutes.
coderclaw nodes pending
coderclaw nodes approve <requestId>
coderclaw nodes reject <requestId>
coderclaw nodes status
coderclaw nodes rename --node <id|name|ip> --name "Living Room iPad"
nodes status shows paired/connected nodes and their capabilities.
Events:
node.pair.requested — emitted when a new pending request is created.node.pair.resolved — emitted when a request is approved/rejected/expired.Methods:
node.pair.request — create or reuse a pending request.node.pair.list — list pending + paired nodes.node.pair.approve — approve a pending request (issues token).node.pair.reject — reject a pending request.node.pair.verify — verify { nodeId, token }.Notes:
node.pair.request is idempotent per node: repeated calls return the same
pending request.node.pair.request.silent: true as a hint for auto-approval flows.The macOS app can optionally attempt a silent approval when:
silent, andIf silent approval fails, it falls back to the normal “Approve/Reject” prompt.
Pairing state is stored under the Gateway state directory (default ~/.coderclaw):
~/.coderclaw/nodes/paired.json~/.coderclaw/nodes/pending.jsonIf you override CODERCLAW_STATE_DIR, the nodes/ folder moves with it.
Security notes:
paired.json as sensitive.