auth
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ApprovalRedirect pyt3client.models.auth `POST /oauth/mcp/decision` result (upstream `AuthMcpApprovalRedirect`). |
||
| McpTokenResult pyt3client.models.auth `POST /oauth/mcp/token` result (upstream `AuthMcpTokenResult`). |
||
| OAuthAuthorizationServerMetadata pyt3client.models.auth `GET /.well-known/oauth-authorization-server`. |
||
| RegisteredClient pyt3client.models.auth `POST /oauth/mcp/register` result (upstream `AuthMcpRegisteredClient`). |
||
| T3Credentials pyt3client.models.auth What a successful sign-in yields; persist it to reconnect without pairing again. |
||
| T3NativeCredentials pyt3client.models.auth A sign-in for T3 Code's native surface: its WebSocket RPC and REST API. |
🛈 DocStrings¶
Models for signing in to a T3 Code environment's /mcp endpoint.
Upstream schemas live in packages/contracts/src/auth.ts (https://github.com/pingdotgg/t3code); names are noted per model.
McpAccess
¶
McpAccess = Literal['read-only', 'approval-required', 'auto-accept-edits', 'auto', 'full-access']
Access level an outside MCP client is approved at (upstream AuthMcpClientAccess).
read-only: read projects, threads, providers and models.approval-required("Supervised") throughfull-access: also start, message and stop threads. A thread the client starts or steers can never run with a broader runtime mode than this level.
A plain pairing code must carry the scopes the level needs (upstream
mcpClientScopes): orchestration:read for read-only, plus
orchestration:operate for the others, plus settings:write and
source-control:write for full-access. The default code from
t3 auth pairing create carries all of them.
RuntimeMode
¶
RuntimeMode = Literal['approval-required', 'auto-accept-edits', 'auto', 'full-access']
Upstream RuntimeMode (packages/contracts/src/providerPolicy.ts).
ApprovalRedirect
¶
Bases: BaseModel
POST /oauth/mcp/decision result (upstream AuthMcpApprovalRedirect).
redirect_to is the registered redirect URI carrying code and state,
or error and error_description when the approval failed.
Source code in src/pyt3client/models/auth.py
72 73 74 75 76 77 78 79 | |
McpTokenResult
¶
Bases: BaseModel
POST /oauth/mcp/token result (upstream AuthMcpTokenResult).
Source code in src/pyt3client/models/auth.py
82 83 84 85 86 87 88 89 90 91 92 | |
OAuthAuthorizationServerMetadata
¶
Bases: BaseModel
GET /.well-known/oauth-authorization-server.
Upstream AuthMcpAuthorizationServerMetadata.
Source code in src/pyt3client/models/auth.py
43 44 45 46 47 48 49 50 51 52 53 54 55 | |
RegisteredClient
¶
Bases: BaseModel
POST /oauth/mcp/register result (upstream AuthMcpRegisteredClient).
Registration is stateless: client_id is a signed blob of the metadata, so
registering costs the server nothing and needs no cleanup.
Source code in src/pyt3client/models/auth.py
58 59 60 61 62 63 64 65 66 67 68 69 | |
T3Credentials
¶
Bases: BaseModel
What a successful sign-in yields; persist it to reconnect without pairing again.
The token is an ordinary environment session with subject mcp-client.
/mcp is the only endpoint that accepts it: the native WebSocket RPC and
REST API reject this subject, because their surface would let the client
act above its approved level. Revoke it in T3 Code under
Settings -> Sharing & access.
Source code in src/pyt3client/models/auth.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
T3NativeCredentials
¶
Bases: BaseModel
A sign-in for T3 Code's native surface: its WebSocket RPC and REST API.
That surface is what the web, desktop and mobile clients use. It streams a
thread's events as they happen and can answer approvals, which /mcp cannot.
It rejects MCP tokens, and /mcp rejects this one, so a client that uses
both holds two sign-ins. Obtained by exchanging a one-time pairing token
(t3 auth pairing create, or Settings -> Sharing & access) at /oauth/token.
Source code in src/pyt3client/models/auth.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |