Reference
pairings
Browser access to a local runtime through origin-bound pairing. Index · shared schemas · errors.
| Procedure | Summary | REST | MCP tool | Stability |
|---|---|---|---|---|
pairings.create | Mint a single-use code for one browser origin. troupe studio uses its own origin and puts the code in the URL fragment, the one allowed URL credential. | POST | — | experimental |
pairings.redeem | Exchange a code for an origin-bound token. The request's Origin MUST equal the pairing's origin. At most 5 failures a minute, after which every open code is voided. | POST | — | experimental |
pairings.list | List active pairings | GET | — | experimental |
pairings.revoke | Revoke a pairing and close its stream sockets with 4403 | POST | — | experimental |
pairings.create
Mint a single-use code for one browser origin. troupe studio uses its own origin and puts the code in the URL fragment, the one allowed URL credential.
| REST | POST /v1/pairings/create (input as a JSON body) |
| RPC | /rpc/v2/pairings/create |
| MCP | not a tool (discovery and administration of the runtime); hints: none |
| Auth | runtime:admin; trust-class: locally only the runtime owner token; in the cloud only an interactive user session re-authenticated within 15 minutes; never an API key or an MCP token |
| Tenancy | none |
| Troupe Cloud | not served; local runtime only |
| Stability | experimental, since 1.0 |
Input:
{
origin: string // ≤ 2048 chars; /^https?:\/\/(\[[0-9A-Fa-f:.]+\]|[A-Za-z0-9.-]+)(:\d{1,5})?$/
scopes?: RuntimeScope[] // 1–10 items
codeTtlMs?: integer // default 60000; 1000–300000
tokenTtlMs?: integer // default 43200000; 60000–604800000
}Output:
{ pairingId: PairingId; code: string; expiresAt: string }Errors: U.
Named types: PairingId, RuntimeScope.
pairings.redeem
Exchange a code for an origin-bound token. The request's Origin MUST equal the pairing's origin. At most 5 failures a minute, after which every open code is voided.
| REST | POST /v1/pairings/redeem (input as a JSON body) |
| RPC | /rpc/v2/pairings/redeem |
| MCP | not a tool (discovery and administration of the runtime); hints: none |
| Auth | public: no credential; any credential sent is ignored |
| Tenancy | none |
| Troupe Cloud | not served; local runtime only |
| Stability | experimental, since 1.0 |
Input:
{
code: string // 1–128 chars
}Output:
{ token: string; pairingId: PairingId; scopes: RuntimeScopeOut[]; expiresAt: string }Named types: PairingId, RuntimeScopeOut.
pairings.list
List active pairings
| REST | GET /v1/pairings/list (input as query parameters) |
| RPC | /rpc/v2/pairings/list |
| MCP | not a tool (discovery and administration of the runtime); hints: read-only, idempotent |
| Auth | runtime:admin |
| Tenancy | none |
| Troupe Cloud | not served; local runtime only |
| Stability | experimental, since 1.0 |
Input:
{}Output:
{ pairings: Pairing[] }Errors: U.
Named types: Pairing.
pairings.revoke
Revoke a pairing and close its stream sockets with 4403
| REST | POST /v1/pairings/revoke (input as a JSON body) |
| RPC | /rpc/v2/pairings/revoke |
| MCP | not a tool (discovery and administration of the runtime); hints: idempotent, destructive |
| Auth | runtime:admin |
| Tenancy | none |
| Troupe Cloud | not served; local runtime only |
| Stability | experimental, since 1.0 |
Input:
{ pairingId: PairingId }Output:
{ revoked: boolean }Named types: PairingId.