API and MCP
Base URL https://shuttlewright-trust-gateway.pillar-3a8.workers.dev. JSON in, JSON out, CORS open. Max body 8 KB.
Create a grant (owner)
The grant id is the agent's credential. The owner token is shown once and is needed to approve, deny and revoke. A scope action is exact (email.send) or a wildcard (files.*). Money actions need max_amount.
Check an action (agent)
Proceed only on allow. On hold, stop. After the owner approves, call again with approval_id. An approval is single use and bound to the same action, target and amount.
Approve or deny (owner)
The approval_url opens a page where the owner pastes the token and decides.
Receipts and verification
Signature is Ed25519 over the canonical JSON of payload (keys sorted, no spaces). hash is SHA 256 of the canonical payload, a dot, then the signature. prev_hash in each payload is the previous receipt's hash. You can verify offline with the public key.
Action classes
Unknown actions are classed irreversible. The agent may send a stricter reversibility value, never a looser one.
MCP connector
Stateless streamable HTTP at /mcp (JSON-RPC 2.0). Tools: check_action, get_approval, verify_receipt, list_actions.
Tell your agent: "Before any action that changes something, call check_action with my grant id. Only act on allow." The gateway cannot force an agent to ask.