Skip to content

Pairing & Approvals

A bot-with-tools that talks to anyone is a bad bot. The Messaging Gateway gates every new sender behind a one-time pairing handshake.

1. Inbound message arrives from sender X
2. Sender X is in the platform allow-list (allowedUserIds / allowedGuildIds /
allowedTeamIds)? If no → ignored, no reply
3. Existing approved binding for X? If yes → forward to agent
4. Otherwise: create a "pending" binding, generate a 6-digit pairing code,
bot replies with the code
5. User approves the binding in the Bindings UI (or via gateway:approveBinding
RPC) using the code
6. Binding flips to "approved". Future messages from X go straight to the agent
StatusMeaning
pendingPairing code issued, waiting for approval
approvedActive — messages forwarded to the agent
rejectedPermanently blocked from progressing
revokedWas approved, then revoked. Re-pairing requires new code
MethodPurpose
gateway:listBindingsList all bindings, any status
gateway:approveBindingMove pendingapproved with code
gateway:rejectBindingMove pendingrejected
gateway:blockBindingBlock future messages from the binding
gateway:revokeBindingRevoke an approved binding

Pairing is the outer gate. Once a sender is paired, normal Ptah approval prompts still apply for destructive tools (writes, deletes, network calls). The chat platform just relays the approval prompt as a message — you reply yes/no there and the agent continues.