{
  "openapi": "3.1.0",
  "info": {
    "description": "Every route the tensile-auth server serves for apps: the app API under /v1/, which the app's backend calls with its app key, and the browser routes under /auth/, which the app proxies.",
    "title": "tensile-auth server",
    "version": "1"
  },
  "tags": [
    {
      "name": "admin.agents"
    },
    {
      "name": "admin.alerts"
    },
    {
      "name": "admin.events"
    },
    {
      "name": "admin.me",
      "description": "The caller's own session."
    },
    {
      "name": "admin.meta"
    },
    {
      "name": "admin.overview",
      "description": "Totals and the audit chain status."
    },
    {
      "name": "admin.sessions"
    },
    {
      "name": "admin.signup",
      "description": "Agent self-signup settings."
    },
    {
      "name": "admin.users"
    },
    {
      "name": "browser",
      "description": "Routes the browser client calls"
    },
    {
      "name": "server",
      "description": "Routes the server adds under /auth/"
    }
  ],
  "paths": {
    "/admin/v1/agents": {
      "get": {
        "description": "Lists agents ordered by ID.",
        "operationId": "adminListAgents",
        "parameters": [
          {
            "description": "Only agents this user owns.",
            "in": "query",
            "name": "owner",
            "schema": {
              "$ref": "#/components/schemas/AdminID"
            }
          },
          {
            "description": "`true` for only agents that signed themselves up and that no human has claimed. Don't combine it with `owner`.",
            "in": "query",
            "name": "unclaimed",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "`true` for disabled agents only, claimed or not.",
            "in": "query",
            "name": "disabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/Admincursor"
          },
          {
            "$ref": "#/components/parameters/Adminlimit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAgentList"
                }
              }
            },
            "description": "A page of agents."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List agents",
        "tags": [
          "admin.agents"
        ]
      }
    },
    "/admin/v1/agents/{agent}": {
      "get": {
        "description": "Returns the agent and its stored sessions. An unclaimed agent's signup sessions belong to no user and aren't listed.",
        "operationId": "adminGetAgent",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminagent"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAgentBody"
                }
              }
            },
            "description": "The agent and its sessions."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get an agent",
        "tags": [
          "admin.agents"
        ]
      }
    },
    "/admin/v1/agents/{agent}/revoke": {
      "post": {
        "description": "Disables the agent, so no new sessions can be delegated to it, and revokes its sessions and every session delegated from them. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get `human_required`. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.",
        "operationId": "adminRevokeAgent",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminagent"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAgentBody"
                }
              }
            },
            "description": "The agent after the revocation."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "429": {
            "$ref": "#/components/responses/AdminThrottled"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Revoke an agent",
        "tags": [
          "admin.agents"
        ]
      }
    },
    "/admin/v1/alerts": {
      "get": {
        "description": "Derives alerts, newest first: token reuse, leaked tokens, suspected passkey clones, TOTP locks, bursts of failed attempts from one client or against one user, signup spikes, a full signup quota, and unclaimed agents close to their claim deadline. Alerts are computed on each request and aren't stored.",
        "operationId": "adminListAlerts",
        "parameters": [
          {
            "description": "Scan back to this time, at most 30 days ago by default. The default is 24 hours ago.",
            "in": "query",
            "name": "since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAlertList"
                }
              }
            },
            "description": "Alerts since the given time."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List alerts",
        "tags": [
          "admin.alerts"
        ]
      }
    },
    "/admin/v1/audit/chain": {
      "get": {
        "description": "The result of the last full verification of the audit log's hash chain, against the trusted checkpoints the application passes to `authadmin.WithChainCheck`. When the last check is older than the interval set there, 5 minutes by default, the server starts a new one in the background and still answers with the last. Only the first request waits for a check. Events that are not yet sealed into the chain are not covered; `unsealed` counts them.",
        "operationId": "adminGetAuditChain",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminChainStatus"
                }
              }
            },
            "description": "The last check."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the audit chain status",
        "tags": [
          "admin.overview"
        ]
      }
    },
    "/admin/v1/events": {
      "get": {
        "description": "Pages through the audit log, newest first by default. Events written in concurrent transactions can commit out of `seq` order, so use `seq` for display and paging, not for exactly-once processing.",
        "operationId": "adminListEvents",
        "parameters": [
          {
            "description": "Only events about this user.",
            "in": "query",
            "name": "user",
            "schema": {
              "$ref": "#/components/schemas/AdminID"
            }
          },
          {
            "description": "Only events about this agent.",
            "in": "query",
            "name": "agent",
            "schema": {
              "$ref": "#/components/schemas/AdminID"
            }
          },
          {
            "description": "Only changes this user made on someone else's behalf.",
            "in": "query",
            "name": "actor",
            "schema": {
              "$ref": "#/components/schemas/AdminID"
            }
          },
          {
            "description": "Only these event kinds. Repeat the parameter or separate kinds with commas; at most 32.",
            "explode": true,
            "in": "query",
            "name": "kind",
            "schema": {
              "items": {
                "pattern": "^[a-z][a-z0-9_]{0,63}$",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "`desc` for newest first, the default, or `asc`. A cursor carries its order.",
            "in": "query",
            "name": "order",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Admincursor"
          },
          {
            "$ref": "#/components/parameters/Adminlimit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEventList"
                }
              }
            },
            "description": "A page of events."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List audit events",
        "tags": [
          "admin.events"
        ]
      }
    },
    "/admin/v1/me": {
      "get": {
        "description": "Shows who the caller is and until when their session passes the freshness checks for changes. A client uses it to ask for a step-up before a change instead of after a 403 `step_up_required`.",
        "operationId": "adminGetMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMe"
                }
              }
            },
            "description": "The caller's session."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Describe your own session",
        "tags": [
          "admin.me"
        ]
      }
    },
    "/admin/v1/openapi.json": {
      "get": {
        "description": "Returns this OpenAPI document.",
        "operationId": "adminGetOpenAPI",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The OpenAPI document."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get this document",
        "tags": [
          "admin.meta"
        ]
      }
    },
    "/admin/v1/signup/settings": {
      "get": {
        "description": "Shows the agent self-signup policy in effect, with defaults filled in. With overrides on (`auth.WithSignupOverrides`), it also shows the code policy, the stored override, and its version, and sets the ETag header to the version. Hooks are code: the response says only whether each is set.",
        "operationId": "adminGetSignupSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSignupSettings"
                }
              }
            },
            "description": "The signup policy in effect.",
            "headers": {
              "ETag": {
                "description": "The override's version, when overrides are on.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the signup settings",
        "tags": [
          "admin.signup"
        ]
      },
      "put": {
        "description": "Replaces the stored signup override, which can only narrow the code policy. It needs a human who signed in with more than one factor in the last 10 minutes, and If-Match with the ETag from GET, so two admins can't overwrite each other. The change is recorded as a `signup_settings_changed` event, and every server applies it within 5 seconds.",
        "operationId": "adminUpdateSignupSettings",
        "parameters": [
          {
            "description": "The ETag from GET /v1/signup/settings.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSignupOverride"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSignupSettings"
                }
              }
            },
            "description": "The settings in effect after the change."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminError"
                }
              }
            },
            "description": "`version_conflict`: someone changed the override since the given version."
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminError"
                }
              }
            },
            "description": "`precondition_required`: If-Match is missing."
          },
          "429": {
            "$ref": "#/components/responses/AdminThrottled"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change the signup override",
        "tags": [
          "admin.signup"
        ]
      }
    },
    "/admin/v1/stats": {
      "get": {
        "description": "Totals for an overview. Counting reads every row, so poll it no more than once a minute.",
        "operationId": "adminGetStats",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStats"
                }
              }
            },
            "description": "The totals."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Count users, sessions, agents, and events",
        "tags": [
          "admin.overview"
        ]
      }
    },
    "/admin/v1/users": {
      "get": {
        "description": "Lists users who have a stored session or own an agent, ordered by ID. The library knows users only through their sessions and agents; your application's user directory is the source of truth for accounts.",
        "operationId": "adminListUsers",
        "parameters": [
          {
            "$ref": "#/components/parameters/Admincursor"
          },
          {
            "$ref": "#/components/parameters/Adminlimit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserList"
                }
              }
            },
            "description": "A page of users."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List users",
        "tags": [
          "admin.users"
        ]
      }
    },
    "/admin/v1/users/{user}": {
      "get": {
        "description": "Returns one user's summary.",
        "operationId": "adminGetUser",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserBody"
                }
              }
            },
            "description": "The user."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get a user",
        "tags": [
          "admin.users"
        ]
      }
    },
    "/admin/v1/users/{user}/connections": {
      "get": {
        "description": "Lists the user's live OAuth grants for a resource, such as MCP clients connected to an MCP server, oldest first. Each grant is its own connection, even when several share a client ID. Revoke one with `revokeSession` on its `id`, which ends every token under it and leaves the user's other connections.",
        "operationId": "adminListConnections",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminConnectionList"
                }
              }
            },
            "description": "The user's connections."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List a user's connections",
        "tags": [
          "admin.sessions"
        ]
      }
    },
    "/admin/v1/users/{user}/revoke": {
      "post": {
        "description": "Revokes every session of the user, human and agent, and every session delegated from them. Agents stay enabled; revoke them separately. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get `human_required`. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.",
        "operationId": "adminRevokeUser",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserBody"
                }
              }
            },
            "description": "The user after the revocation."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "429": {
            "$ref": "#/components/responses/AdminThrottled"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Revoke a user's sessions",
        "tags": [
          "admin.users"
        ]
      }
    },
    "/admin/v1/users/{user}/sessions": {
      "get": {
        "description": "Lists every stored session of the user, live or not, in creation order. Build the delegation tree from `parent_id`.",
        "operationId": "adminListSessions",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSessionList"
                }
              }
            },
            "description": "The user's sessions."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List a user's sessions",
        "tags": [
          "admin.sessions"
        ]
      }
    },
    "/admin/v1/users/{user}/sessions/{session}": {
      "get": {
        "description": "Returns the session and every session delegated from it, at any depth, in creation order.",
        "operationId": "adminGetSession",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          },
          {
            "$ref": "#/components/parameters/Adminsession"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSessionTree"
                }
              }
            },
            "description": "The session and its descendants."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get a session and its delegation tree",
        "tags": [
          "admin.sessions"
        ]
      }
    },
    "/admin/v1/users/{user}/sessions/{session}/revoke": {
      "post": {
        "description": "Revokes the session and every session delegated from it. The session must belong to the user in the path. Revoking a revoked session succeeds and changes nothing. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get `human_required`. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.",
        "operationId": "adminRevokeSession",
        "parameters": [
          {
            "$ref": "#/components/parameters/Adminuser"
          },
          {
            "$ref": "#/components/parameters/Adminsession"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSessionTree"
                }
              }
            },
            "description": "The session and its descendants after the revocation."
          },
          "400": {
            "$ref": "#/components/responses/AdminInvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/AdminUnauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/AdminForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AdminNotFound"
          },
          "429": {
            "$ref": "#/components/responses/AdminThrottled"
          },
          "503": {
            "$ref": "#/components/responses/AdminUnavailable"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Revoke a session and its delegation tree",
        "tags": [
          "admin.sessions"
        ]
      }
    },
    "/auth/activity": {
      "get": {
        "operationId": "activity",
        "summary": "The person's own audit events and whether the audit chain verifies",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.activity",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/admin/invites/accept": {
      "post": {
        "operationId": "adminInviteAccept",
        "summary": "Spend an admin invitation from tensile-auth-server admin invite, and become an administrator. Needs a second factor within 15 minutes",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "server.admin_invite",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Done"
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/agents": {
      "post": {
        "operationId": "agentsCreate",
        "summary": "Create an agent",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.agents.create",
        "responses": {
          "201": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/auth/agents/tree": {
      "get": {
        "operationId": "agentsTree",
        "summary": "The signed-in person's live sessions, as a tree of delegations",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.agents.tree",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/agents/{id}/delegate": {
      "post": {
        "operationId": "agentsDelegate",
        "summary": "Give one of the person's agents a token, shown once",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.agents.delegate",
        "responses": {
          "201": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/auth/agents/{id}/revoke": {
      "post": {
        "operationId": "agentsRevoke",
        "summary": "Revoke one of the person's agents and every session it holds",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.agents.revoke",
        "responses": {
          "204": {
            "description": "Done"
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/auth/approvals": {
      "get": {
        "operationId": "approvalsList",
        "summary": "The signed-in person's pending agent approvals",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.approvals.list",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/approvals/{id}": {
      "get": {
        "operationId": "approvalView",
        "summary": "One of the person's approvals",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.approvals.view",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/approvals/{id}/begin": {
      "post": {
        "operationId": "approvalBegin",
        "summary": "Begin approving with a passkey: returns WebAuthn request options bound to the approval",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.approvals.begin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/approvals/{id}/deny": {
      "post": {
        "operationId": "approvalDeny",
        "summary": "Deny an approval",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.approvals.deny",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/approvals/{id}/finish": {
      "post": {
        "operationId": "approvalFinish",
        "summary": "Finish approving with the passkey's receipt",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.approvals.finish",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/claims/claim": {
      "post": {
        "operationId": "claimsClaim",
        "summary": "Claim an agent that signed up by itself",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.claims.claim",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/auth/claims/peek": {
      "post": {
        "operationId": "claimsPeek",
        "summary": "Show an unclaimed agent and its pairing words before claiming it",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.claims.peek",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/auth/client/": {
      "get": {
        "operationId": "client",
        "summary": "The browser client's files",
        "tags": [
          "browser"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "text/javascript": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/dbsc/refresh": {
      "post": {
        "operationId": "dbscRefresh",
        "summary": "Refresh a device-bound session's short-lived cookie",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/dbsc/start": {
      "post": {
        "operationId": "dbscStart",
        "summary": "Bind the session to the device with Device Bound Session Credentials",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/device/{code}": {
      "get": {
        "operationId": "deviceRequest",
        "summary": "The pending device request for a user code, for the app's device page",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.device.request",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/device/{code}/approve": {
      "post": {
        "operationId": "deviceApprove",
        "summary": "Approve the device request for a user code",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.device.approve",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done"
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/device/{code}/deny": {
      "post": {
        "operationId": "deviceDeny",
        "summary": "Deny the device request for a user code",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.device.deny",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done"
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/email/change": {
      "post": {
        "operationId": "emailChange",
        "summary": "Change the email address",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/email/resend": {
      "post": {
        "operationId": "emailResend",
        "summary": "Send the confirmation link again",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/leakscan": {
      "post": {
        "operationId": "leakscan",
        "summary": "Receive a secret-scanning alert in the format of GitHub's partner program, and revoke each leaked session or app key",
        "tags": [
          "server"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A label for each reported token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "token_hash",
                      "token_type",
                      "label"
                    ],
                    "properties": {
                      "token_hash": {
                        "type": "string"
                      },
                      "token_type": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string",
                        "enum": [
                          "true_positive",
                          "false_positive"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "A refusal, with the status text only"
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "operationId": "me",
        "summary": "The signed-in person's session",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oauth/requests/{id}": {
      "get": {
        "operationId": "oauthRequest",
        "summary": "A pending OAuth authorization request, for the app's consent page",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.oauth.request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oauth/requests/{id}/approve": {
      "post": {
        "operationId": "oauthApprove",
        "summary": "Approve an OAuth authorization request, and answer where to send the browser",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.oauth.approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/oauth/requests/{id}/deny": {
      "post": {
        "operationId": "oauthDeny",
        "summary": "Deny an OAuth authorization request, and answer where to send the browser",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.oauth.deny",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/add/begin": {
      "post": {
        "operationId": "passkeyAddBegin",
        "summary": "Begin adding a passkey to the signed-in person's account",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/add/finish": {
      "post": {
        "operationId": "passkeyAddFinish",
        "summary": "Finish adding a passkey",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/credentials": {
      "get": {
        "operationId": "passkeyCredentials",
        "summary": "List the signed-in person's passkeys",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/sign-in/begin": {
      "post": {
        "operationId": "passkeySignInBegin",
        "summary": "Begin a passkey sign-in: returns WebAuthn request options",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/sign-in/finish": {
      "post": {
        "operationId": "passkeySignInFinish",
        "summary": "Finish a passkey sign-in and start a session",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/sign-up/begin": {
      "post": {
        "operationId": "passkeySignUpBegin",
        "summary": "Begin a passkey sign-up: returns WebAuthn creation options",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/sign-up/finish": {
      "post": {
        "operationId": "passkeySignUpFinish",
        "summary": "Finish a passkey sign-up and start a session",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/step-up/begin": {
      "post": {
        "operationId": "passkeyStepUpBegin",
        "summary": "Begin a passkey step-up for the signed-in person",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/passkey/step-up/finish": {
      "post": {
        "operationId": "passkeyStepUpFinish",
        "summary": "Finish a passkey step-up",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/add": {
      "post": {
        "operationId": "passwordAdd",
        "summary": "Add a password to an account that has none",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/change": {
      "post": {
        "operationId": "passwordChange",
        "summary": "Change the password",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/confirm": {
      "get": {
        "operationId": "passwordConfirmPage",
        "summary": "The page an email confirmation link opens; it changes nothing on load",
        "tags": [
          "browser"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "passwordConfirm",
        "summary": "Confirm an email address with the code from its link",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/forgot": {
      "post": {
        "operationId": "passwordForgot",
        "summary": "Send a password reset link",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/link.js": {
      "get": {
        "operationId": "passwordLinkScript",
        "summary": "The script of the email-link pages",
        "tags": [
          "browser"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "text/javascript": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/remove": {
      "post": {
        "operationId": "passwordRemove",
        "summary": "Remove the password",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/reset": {
      "get": {
        "operationId": "passwordResetPage",
        "summary": "The page a reset link opens; it changes nothing on load",
        "tags": [
          "browser"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "passwordReset",
        "summary": "Set a new password with the code from a reset link",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/sign-in": {
      "post": {
        "operationId": "passwordSignIn",
        "summary": "Sign in with an email address and a password",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/sign-up": {
      "post": {
        "operationId": "passwordSignUp",
        "summary": "Sign up with an email address and a password",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/status": {
      "get": {
        "operationId": "passwordStatus",
        "summary": "Whether the person has a password and a confirmed address",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password/step-up": {
      "post": {
        "operationId": "passwordStepUp",
        "summary": "Step up with the password",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/recovery/confirm": {
      "post": {
        "operationId": "recoveryConfirm",
        "summary": "Confirm that the person saved the recovery codes",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/recovery/generate": {
      "post": {
        "operationId": "recoveryGenerate",
        "summary": "Generate a new set of recovery codes",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/recovery/sign-in": {
      "post": {
        "operationId": "recoverySignIn",
        "summary": "Sign in with a recovery code, in recovery mode",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/recovery/sign-ins": {
      "get": {
        "operationId": "recoverySignIns",
        "summary": "Recent sign-ins with a recovery code",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.recovery.sign_ins",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/recovery/undo": {
      "post": {
        "operationId": "recoveryUndo",
        "summary": "Undo a recovery: revoke its session and what it changed",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.recovery.undo",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sessions": {
      "get": {
        "operationId": "sessionsList",
        "summary": "The person's sessions and the agents delegated from them",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.sessions.list",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sessions/revoke-others": {
      "post": {
        "operationId": "sessionsRevokeOthers",
        "summary": "Revoke every other session of the person",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.sessions.revoke_others",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sessions/{id}/revoke": {
      "post": {
        "operationId": "sessionRevoke",
        "summary": "Revoke one of the person's own sessions and what is delegated from it",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.sessions.revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/setup": {
      "get": {
        "operationId": "setup",
        "summary": "What the preset asks the person to set up next",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sign-out": {
      "post": {
        "operationId": "signOut",
        "summary": "Sign out: revoke the session in the cookie and clear it",
        "tags": [
          "browser"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/tokens": {
      "post": {
        "operationId": "tokensCreate",
        "summary": "Create a personal access token, shown once",
        "tags": [
          "server"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.tokens.create",
        "responses": {
          "201": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/auth/totp/confirm": {
      "post": {
        "operationId": "totpConfirm",
        "summary": "Confirm a TOTP enrolment with a code",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/totp/enroll": {
      "post": {
        "operationId": "totpEnroll",
        "summary": "Begin enrolling a TOTP authenticator",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.session",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/totp/remove": {
      "post": {
        "operationId": "totpRemove",
        "summary": "Remove the person's authenticator app; needs a sign-in from the last 10 minutes",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.totp.remove",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enrolled": {
                      "type": "boolean"
                    },
                    "confirmed": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "enrolled",
                    "confirmed",
                    "locked"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/totp/status": {
      "get": {
        "operationId": "totpStatus",
        "summary": "The person's own authenticator app: whether it is set up, confirmed, or locked",
        "tags": [
          "browser"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-tensile-action": "auth.totp.status",
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enrolled": {
                      "type": "boolean"
                    },
                    "confirmed": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "enrolled",
                    "confirmed",
                    "locked"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/auth/totp/verify": {
      "post": {
        "operationId": "totpVerify",
        "summary": "Finish a sign-in with a TOTP code",
        "tags": [
          "browser"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, as an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents": {
      "post": {
        "operationId": "createAgent",
        "summary": "Create an agent for the subject, a person signed in with a human session",
        "security": [
          {
            "appKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't valid, or the library refused the call",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The library's rules refuse the subject",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The app key isn't live (app_key_invalid), or the subject's credential isn't valid (unauthenticated)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{id}/delegate": {
      "post": {
        "operationId": "delegate",
        "summary": "Give the agent a token, delegated from the subject's session",
        "security": [
          {
            "appKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The token, shown once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delegated"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't valid, or the library refused the call",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The library's rules refuse the subject",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The app key isn't live (app_key_invalid), or the subject's credential isn't valid (unauthenticated)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/approvals": {
      "post": {
        "operationId": "requestApproval",
        "summary": "Ask the subject agent's human to approve an action; a pending request for the same action returns the same approval",
        "security": [
          {
            "appKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestApprovalRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The approval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalCreated"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't valid, or the library refused the call",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The library's rules refuse the subject",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The app key isn't live (app_key_invalid), or the subject's credential isn't valid (unauthenticated)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/check": {
      "post": {
        "operationId": "check",
        "summary": "Authenticate a credential, apply a need, and redeem or request an approval",
        "description": "With the header Prefer: wait=N (RFC 7240), N from 1 to 60, a retry that redeems a pending approval is held until the person approves or denies, the approval expires, or N seconds pass, and answers approval_pending when they pass. On the check that creates an approval, N caps the wait that the refusal's fix and wait_hint offer; without the header, the refusal offers no wait and tells the agent to retry after Retry-After. Each app key holds at most 256 waits on each replica; a retry over that answers at once. Give a waiting call a timeout of N seconds plus your usual timeout.",
        "security": [
          {
            "appKey": []
          }
        ],
        "parameters": [
          {
            "name": "Prefer",
            "in": "header",
            "required": false,
            "description": "wait=N, from 1 to 60: how long to hold a retry for the person's decision, and the longest wait the refusal offers. Larger values count as 60.",
            "schema": {
              "type": "string",
              "example": "wait=50"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The server decided; the end user's outcome is in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResponse"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The app key is missing or isn't live: code app_key_invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/stream": {
      "get": {
        "operationId": "eventsStream",
        "summary": "Server-sent events that tell the SDK when to clear its cache: ready once subscribed, then invalidate after each change to sessions, agents, or users. The stream ends when the server stops hearing every change; bypass the cache until it reconnects",
        "security": [
          {
            "appKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The stream: event ready, then event invalidate after each change, and a comment every 15 seconds",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The app key is missing or isn't live: code app_key_invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't hear every change, or can't reach its database; bypass the cache and retry after Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/meta": {
      "get": {
        "operationId": "meta",
        "summary": "The server's version, the API versions it serves, and its preset",
        "security": [
          {
            "appKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The server's metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meta"
                }
              }
            }
          },
          "401": {
            "description": "The app key is missing or isn't live: code app_key_invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "operationId": "openapi",
        "summary": "This document",
        "security": [],
        "responses": {
          "200": {
            "description": "The OpenAPI document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/tree": {
      "get": {
        "operationId": "sessionTree",
        "summary": "The subject's live sessions, as a tree of delegations",
        "security": [
          {
            "appKey": []
          }
        ],
        "parameters": [
          {
            "name": "Tensile-Subject",
            "in": "header",
            "required": true,
            "description": "base64url JSON in the shape of Credential",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The tree",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTree"
                }
              }
            }
          },
          "401": {
            "description": "The app key isn't live (app_key_invalid), or the subject's credential isn't valid (unauthenticated)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{id}": {
      "get": {
        "operationId": "getUser",
        "summary": "What the server knows of a user: the address, whether it's verified, and live sessions and agents",
        "security": [
          {
            "appKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "404": {
            "description": "No session, agent, or address has this user ID: code not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The app key isn't live (app_key_invalid), or the subject's credential isn't valid (unauthenticated)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "The app key sent too many requests; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The server can't reach its database",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Adminagent": {
        "in": "path",
        "name": "agent",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AdminID"
        }
      },
      "Admincursor": {
        "description": "`next_cursor` from the previous page.",
        "in": "query",
        "name": "cursor",
        "schema": {
          "type": "string"
        }
      },
      "Adminlimit": {
        "description": "Items per page.",
        "in": "query",
        "name": "limit",
        "schema": {
          "default": 50,
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        }
      },
      "Adminsession": {
        "in": "path",
        "name": "session",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AdminID"
        }
      },
      "Adminuser": {
        "in": "path",
        "name": "user",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AdminID"
        }
      }
    },
    "responses": {
      "AdminForbidden": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`forbidden`: the principal isn't an administrator, `step_up_required`: a change from a stale session, `stronger_factor_required`: a change from a session whose factors are too weak, such as a recovery code alone, or `human_required`: a change from an agent or a token."
      },
      "AdminInvalidRequest": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`invalid_request`: a parameter is malformed, or `invalid_cursor`: the cursor is malformed or from another route."
      },
      "AdminNotFound": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`not_found`: the user, session, or agent doesn't exist."
      },
      "AdminThrottled": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`throttled`: too many changes.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "AdminUnauthenticated": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`unauthenticated`: no credential, or one that doesn't work.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "AdminUnavailable": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/AdminError"
            }
          }
        },
        "description": "`unavailable`: the store or limiter failed. Retry later."
      }
    },
    "schemas": {
      "Action": {
        "type": "object",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "AdminActor": {
        "additionalProperties": false,
        "description": "Who made a change on someone else's behalf.",
        "properties": {
          "agent_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "session_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "user_id": {
            "$ref": "#/components/schemas/AdminID"
          }
        },
        "required": [
          "user_id"
        ],
        "type": "object"
      },
      "AdminAgent": {
        "additionalProperties": false,
        "description": "An agent: a delegated identity.",
        "properties": {
          "claim_by": {
            "description": "For an unclaimed agent, when it's deleted unless a human claims it.",
            "format": "date-time",
            "type": "string"
          },
          "claimed_at": {
            "description": "When a human claimed the agent. Absent for agents that never signed themselves up.",
            "format": "date-time",
            "type": "string"
          },
          "claimed_type": {
            "description": "The agent type the agent reported when it signed itself up, for example `claude-code`. Self-reported: trust it only when `type_verified` is true.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled_at": {
            "description": "Absent while the agent is enabled.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "$ref": "#/components/schemas/AdminID",
            "description": "The human who owns the agent. Absent while the agent is unclaimed."
          },
          "scopes": {
            "description": "The most any session of the agent may hold.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "state": {
            "description": "`active`, `disabled`, or `unclaimed` for an agent that signed itself up and that no human has claimed. A disabled agent is `disabled` whether or not it was claimed. The set is open: accept values you don't know.",
            "examples": [
              "active",
              "disabled",
              "unclaimed"
            ],
            "type": "string"
          },
          "type_verified": {
            "description": "True only when the application's verifier accepted an attestation of `claimed_type`.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "scopes",
          "state",
          "created_at",
          "type_verified"
        ],
        "type": "object"
      },
      "AdminAgentBody": {
        "additionalProperties": false,
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AdminAgent"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/AdminSession"
            },
            "type": "array"
          }
        },
        "required": [
          "agent",
          "sessions"
        ],
        "type": "object"
      },
      "AdminAgentCounts": {
        "additionalProperties": false,
        "description": "Agents by state.",
        "properties": {
          "active": {
            "description": "Owned by a user and not disabled.",
            "minimum": 0,
            "type": "integer"
          },
          "disabled": {
            "description": "Disabled, claimed or not.",
            "minimum": 0,
            "type": "integer"
          },
          "unclaimed": {
            "description": "Signed themselves up, not claimed, and not disabled.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "active",
          "unclaimed",
          "disabled"
        ],
        "type": "object"
      },
      "AdminAgentList": {
        "additionalProperties": false,
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/AdminAgent"
            },
            "type": "array"
          },
          "next_cursor": {
            "$ref": "#/components/schemas/AdminCursor"
          }
        },
        "required": [
          "agents"
        ],
        "type": "object"
      },
      "AdminAlert": {
        "additionalProperties": false,
        "description": "An alert derived from the audit log.",
        "properties": {
          "agent_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "agent_ids": {
            "description": "Up to 10 agents, for alerts about agent state such as `unclaimed_near_expiry`.",
            "items": {
              "$ref": "#/components/schemas/AdminID"
            },
            "type": "array"
          },
          "client": {
            "type": "string"
          },
          "count": {
            "description": "How many attempts or events the alert covers.",
            "minimum": 1,
            "type": "integer"
          },
          "first_at": {
            "format": "date-time",
            "type": "string"
          },
          "first_seq": {
            "description": "Absent for alerts about agent state, such as `unclaimed_near_expiry`.",
            "minimum": 1,
            "type": "integer"
          },
          "id": {
            "description": "Stable for the same alert across requests.",
            "type": "string"
          },
          "kind": {
            "description": "`token_reuse`, `token_leaked`, `passkey_clone_suspected`, `totp_locked`, `failure_burst`, `signup_spike`, `signup_quota_pressure`, `unclaimed_near_expiry`, `export_started`, `users_exported`, or a kind that an alert source adds, such as the server's `webhook_late` and `webhook_skipped`. The set is open: accept values you don't know.",
            "examples": [
              "token_reuse",
              "token_leaked",
              "passkey_clone_suspected",
              "totp_locked",
              "failure_burst",
              "signup_spike",
              "signup_quota_pressure",
              "unclaimed_near_expiry",
              "export_started",
              "users_exported"
            ],
            "type": "string"
          },
          "last_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_seq": {
            "description": "Absent for alerts about agent state, such as `unclaimed_near_expiry`.",
            "minimum": 1,
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "session_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "severity": {
            "description": "`high`, `medium`, or `low`. The set is open.",
            "examples": [
              "high",
              "medium",
              "low"
            ],
            "type": "string"
          },
          "source": {
            "description": "For `token_leaked`, where the token was found. Show it as text; don't follow it automatically.",
            "type": "string"
          },
          "user_id": {
            "$ref": "#/components/schemas/AdminID"
          }
        },
        "required": [
          "id",
          "kind",
          "severity",
          "message",
          "count",
          "first_at",
          "last_at"
        ],
        "type": "object"
      },
      "AdminAlertList": {
        "additionalProperties": false,
        "properties": {
          "alerts": {
            "items": {
              "$ref": "#/components/schemas/AdminAlert"
            },
            "type": "array"
          },
          "scanned": {
            "description": "How many events the scan read.",
            "minimum": 0,
            "type": "integer"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "truncated": {
            "description": "True when the scan stopped at its limit before reaching `since`.",
            "type": "boolean"
          }
        },
        "required": [
          "alerts",
          "since",
          "scanned",
          "truncated"
        ],
        "type": "object"
      },
      "AdminChainStatus": {
        "additionalProperties": false,
        "description": "The last verification of the audit chain.",
        "properties": {
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "checkpoints": {
            "description": "How many trusted checkpoints the chain was checked against.",
            "minimum": 0,
            "type": "integer"
          },
          "head_hash": {
            "description": "The hex SHA-256 chain hash at `verified_through`. Absent for an empty chain.",
            "type": "string"
          },
          "message": {
            "description": "What failed, when `status` is not `verified`.",
            "type": "string"
          },
          "oldest_unsealed_at": {
            "description": "When the oldest unsealed event was recorded. Absent when every event is sealed.",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "`verified`, `tampered`, or `unavailable` when the check could not run. The set is open.",
            "examples": [
              "verified",
              "tampered",
              "unavailable"
            ],
            "type": "string"
          },
          "unsealed": {
            "description": "How many events were not yet sealed into the chain when the check ran. The check can't detect a change to them. A count that keeps growing means nothing runs `Service.Run`.",
            "minimum": 0,
            "type": "integer"
          },
          "verified_through": {
            "description": "The chain position the check reached. When `status` is `tampered`, the first bad position follows it.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "status",
          "verified_through",
          "checkpoints",
          "checked_at",
          "unsealed"
        ],
        "type": "object"
      },
      "AdminChallenge": {
        "additionalProperties": false,
        "description": "What would make a refused change succeed.",
        "properties": {
          "action": {
            "description": "The route's action.",
            "type": "string"
          },
          "approval": {
            "description": "An approval an agent can wait for. The admin API never sets it, because only humans make changes there.",
            "properties": {
              "expires_in": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "assurance": {
            "description": "The minimum assurance the change needs.",
            "enum": [
              "none",
              "recovering",
              "single",
              "multi"
            ],
            "type": "string"
          },
          "begin": {
            "description": "Where to begin a step-up, when the application set one.",
            "type": "string"
          },
          "human": {
            "description": "True when agents and tokens can't make the change.",
            "type": "boolean"
          },
          "purpose": {
            "description": "Set when only an elevation for this purpose meets the need.",
            "properties": {
              "name": {
                "type": "string"
              },
              "resource": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "satisfy_with": {
            "description": "Factors the administrator has that would pass a step-up, strongest first. Empty when none would.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scopes": {
            "description": "Scopes that were missing.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "within_seconds": {
            "description": "How recent the administrator's sign-in must be.",
            "type": "integer"
          }
        },
        "required": [
          "action",
          "assurance",
          "satisfy_with"
        ],
        "type": "object"
      },
      "AdminConnection": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "description": "The OAuth client ID, which may be the URL of a client ID metadata document.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/AdminID",
            "description": "The grant's root session. Revoke the connection by revoking this session."
          },
          "last_used_at": {
            "description": "The latest use of any token in the grant.",
            "format": "date-time",
            "type": "string"
          },
          "resource": {
            "description": "The resource the tokens are for.",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "client_id",
          "resource",
          "scopes",
          "created_at",
          "last_used_at",
          "expires_at"
        ],
        "type": "object"
      },
      "AdminConnectionList": {
        "additionalProperties": false,
        "properties": {
          "connections": {
            "items": {
              "$ref": "#/components/schemas/AdminConnection"
            },
            "type": "array"
          }
        },
        "required": [
          "connections"
        ],
        "type": "object"
      },
      "AdminCursor": {
        "description": "An opaque cursor for the next page. Absent on the last page. Pass it back unchanged to the same route.",
        "type": "string"
      },
      "AdminError": {
        "additionalProperties": false,
        "description": "An error response: RFC 9457 problem details, served as `application/problem+json`.",
        "properties": {
          "challenge": {
            "$ref": "#/components/schemas/AdminChallenge"
          },
          "code": {
            "$ref": "#/components/schemas/AdminErrorCode"
          },
          "detail": {
            "description": "What went wrong, for people. It may change.",
            "type": "string"
          },
          "fix": {
            "description": "What to do next, for people. It may change.",
            "type": "string"
          },
          "retry_after": {
            "description": "Seconds to wait before retrying, for `throttled`.",
            "type": "integer"
          },
          "status": {
            "description": "The HTTP status code.",
            "type": "integer"
          },
          "title": {
            "description": "A short summary for people. It may change.",
            "type": "string"
          },
          "type": {
            "description": "`urn:tensile:auth:problem:` followed by the code.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "type": "object"
      },
      "AdminErrorCode": {
        "description": "A machine-readable error code. The set is fixed within /v1. The codes `step_up_required`, `stronger_factor_required`, and `human_required` come with a challenge.",
        "enum": [
          "forbidden",
          "human_required",
          "invalid_cursor",
          "invalid_request",
          "method_not_allowed",
          "not_found",
          "precondition_required",
          "step_up_required",
          "stronger_factor_required",
          "throttled",
          "unauthenticated",
          "unavailable",
          "version_conflict"
        ],
        "type": "string"
      },
      "AdminEvent": {
        "additionalProperties": false,
        "description": "An audit event. It never includes a token.",
        "properties": {
          "action": {
            "description": "The attempted operation, for failure events.",
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/AdminActor"
          },
          "agent_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "client": {
            "description": "The client key the application recorded, such as an IP address.",
            "type": "string"
          },
          "count": {
            "description": "Sessions affected by a revocation, or attempts a failure event stands for.",
            "minimum": 1,
            "type": "integer"
          },
          "factor": {
            "description": "The credential or factor involved.",
            "type": "string"
          },
          "kind": {
            "description": "What happened, for example `session_revoked`. The set is open: accept values you don't know.",
            "type": "string"
          },
          "methods": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "parent_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "reason": {
            "description": "Why an attempt failed.",
            "type": "string"
          },
          "seq": {
            "minimum": 1,
            "type": "integer"
          },
          "session_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "source": {
            "description": "For `token_leaked`, where a secret scanner found the token. Show it as text; don't follow it automatically.",
            "type": "string"
          },
          "until": {
            "description": "Set only on a summary of failed attempts: the last attempt it counts. `at` is the first.",
            "format": "date-time",
            "type": "string"
          },
          "user_id": {
            "$ref": "#/components/schemas/AdminID"
          }
        },
        "required": [
          "seq",
          "kind",
          "at"
        ],
        "type": "object"
      },
      "AdminEventList": {
        "additionalProperties": false,
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/AdminEvent"
            },
            "type": "array"
          },
          "next_cursor": {
            "$ref": "#/components/schemas/AdminCursor"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "AdminID": {
        "description": "An opaque ID. Percent-encode it in paths.",
        "maxLength": 256,
        "minLength": 1,
        "pattern": "^[^\\s\\x00-\\x1f\\x7f]+$",
        "type": "string"
      },
      "AdminMe": {
        "additionalProperties": false,
        "description": "The caller's own session.",
        "properties": {
          "agent_id": {
            "$ref": "#/components/schemas/AdminID",
            "description": "Absent for human sessions."
          },
          "authenticated_at": {
            "description": "When the human last proved who they are.",
            "format": "date-time",
            "type": "string"
          },
          "changes_until": {
            "description": "Until when the caller can make changes without a step-up. Absent when a change needs a step-up now, and always for agents.",
            "format": "date-time",
            "type": "string"
          },
          "depth": {
            "description": "0 for a human session, 1 for an agent delegated by a human, and so on.",
            "minimum": 0,
            "type": "integer"
          },
          "expires_at": {
            "description": "The absolute expiry of the session.",
            "format": "date-time",
            "type": "string"
          },
          "kind": {
            "description": "`human`, `agent`, `pat`, `oauth`, or `oauth_refresh`. Clients must accept other values.",
            "type": "string"
          },
          "methods": {
            "description": "How the human proved who they are, sorted.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "multi_factor": {
            "description": "Whether the human used a passkey, or TOTP with another factor.",
            "type": "boolean"
          },
          "profile": {
            "$ref": "#/components/schemas/AdminProfile"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "session_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "signup_changes_until": {
            "description": "The same for the signup settings, which also need more than one factor.",
            "format": "date-time",
            "type": "string"
          },
          "user_id": {
            "$ref": "#/components/schemas/AdminID",
            "description": "The responsible human. Absent for an agent that no human has claimed."
          }
        },
        "required": [
          "kind",
          "session_id",
          "depth",
          "scopes",
          "methods",
          "multi_factor",
          "authenticated_at",
          "expires_at"
        ],
        "type": "object"
      },
      "AdminProfile": {
        "additionalProperties": false,
        "description": "What the application's user directory says about a user. Present only when the application passes authadmin.WithDirectory and the directory knows the user.",
        "properties": {
          "admin": {
            "description": "Whether the application treats the user as an administrator.",
            "type": "boolean"
          },
          "disabled": {
            "description": "Whether the application has disabled the account.",
            "type": "boolean"
          },
          "email": {
            "maxLength": 256,
            "type": "string"
          },
          "name": {
            "description": "The name to show, from the application's user directory.",
            "maxLength": 256,
            "type": "string"
          }
        },
        "required": [
          "admin",
          "disabled"
        ],
        "type": "object"
      },
      "AdminSession": {
        "additionalProperties": false,
        "description": "A session. It never includes the token.",
        "properties": {
          "agent_id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "authenticated_at": {
            "format": "date-time",
            "type": "string"
          },
          "client_id": {
            "description": "The OAuth client an OAuth token was issued to.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "depth": {
            "description": "0 for a human session, 1 for an agent delegated by a human, and so on.",
            "minimum": 0,
            "type": "integer"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "idle_timeout_seconds": {
            "minimum": 0,
            "type": "integer"
          },
          "kind": {
            "description": "`human` for a sign-in, `agent` for a delegated agent session, `pat` for a personal access token, `oauth` for an OAuth access token, and `oauth_refresh` for an OAuth refresh token.",
            "enum": [
              "human",
              "agent",
              "pat",
              "oauth",
              "oauth_refresh"
            ],
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "methods": {
            "description": "How the human proved who they are, for example `passkey`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "description": "The name of a personal access token.",
            "type": "string"
          },
          "parent_id": {
            "$ref": "#/components/schemas/AdminID",
            "description": "The session this one was delegated from. Absent for a session started by a sign-in."
          },
          "resource": {
            "description": "The resource (RFC 8707) an OAuth token is for, such as an MCP server's URI. Absent for tokens without one.",
            "type": "string"
          },
          "revoked_at": {
            "description": "Absent while the session isn't revoked.",
            "format": "date-time",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "state": {
            "description": "`live`, `idle`, `expired`, or `revoked`. The set is open: accept values you don't know.",
            "examples": [
              "live",
              "idle",
              "expired",
              "revoked"
            ],
            "type": "string"
          },
          "user_id": {
            "$ref": "#/components/schemas/AdminID"
          }
        },
        "required": [
          "id",
          "kind",
          "user_id",
          "depth",
          "scopes",
          "methods",
          "state",
          "created_at",
          "authenticated_at",
          "last_seen_at",
          "expires_at",
          "idle_timeout_seconds"
        ],
        "type": "object"
      },
      "AdminSessionList": {
        "additionalProperties": false,
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/AdminSession"
            },
            "type": "array"
          }
        },
        "required": [
          "sessions"
        ],
        "type": "object"
      },
      "AdminSessionTree": {
        "additionalProperties": false,
        "properties": {
          "descendants": {
            "items": {
              "$ref": "#/components/schemas/AdminSession"
            },
            "type": "array"
          },
          "session": {
            "$ref": "#/components/schemas/AdminSession"
          }
        },
        "required": [
          "session",
          "descendants"
        ],
        "type": "object"
      },
      "AdminSignupHooks": {
        "additionalProperties": false,
        "description": "Which signup hooks the application set. Hooks are code, so only their presence is shown.",
        "properties": {
          "admit": {
            "description": "A final per-request admission hook is set.",
            "type": "boolean"
          },
          "verifier": {
            "description": "A vendor attestation verifier is set.",
            "type": "boolean"
          },
          "work_check": {
            "description": "A proof-of-work check is set.",
            "type": "boolean"
          }
        },
        "required": [
          "verifier",
          "work_check",
          "admit"
        ],
        "type": "object"
      },
      "AdminSignupOverride": {
        "additionalProperties": false,
        "description": "Narrows the code policy. It can't turn signup on or widen anything: values past the code ceiling are refused.",
        "properties": {
          "claim_window_seconds": {
            "description": "A shorter claim window for new agents, at least 60 seconds. 0 keeps the code value.",
            "minimum": 0,
            "type": "integer"
          },
          "deny_types": {
            "description": "Agent types to deny, on top of the code list.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "max_unclaimed": {
            "description": "A lower unclaimed-agent quota. 0 keeps the code value.",
            "minimum": 0,
            "type": "integer"
          },
          "paused": {
            "description": "Stops new signups. Agents already signed up keep working.",
            "type": "boolean"
          },
          "require_verified_type": {
            "description": "True requires verified agent types even when the code policy doesn't.",
            "type": "boolean"
          },
          "scopes": {
            "description": "null keeps the code sandbox. A list replaces it with these scopes, which must be in the code sandbox; an empty list empties it.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "paused",
          "max_unclaimed",
          "claim_window_seconds",
          "scopes",
          "deny_types",
          "require_verified_type"
        ],
        "type": "object"
      },
      "AdminSignupPolicy": {
        "additionalProperties": false,
        "description": "A signup policy, with defaults filled in.",
        "properties": {
          "allow_types": {
            "description": "When not empty, only these agent types may sign up. Types are unverified labels unless `require_verified_type` is true.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "claim_window_seconds": {
            "description": "How long an unclaimed agent lives before it and its sessions are deleted.",
            "minimum": 0,
            "type": "integer"
          },
          "deny_types": {
            "description": "Agent types that may not sign up.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "False when the application doesn't turn on agent self-signup. Then every other field is empty or zero.",
            "type": "boolean"
          },
          "hooks": {
            "$ref": "#/components/schemas/AdminSignupHooks"
          },
          "max_unclaimed": {
            "description": "The most unclaimed agents the store holds.",
            "minimum": 0,
            "type": "integer"
          },
          "paused": {
            "description": "True when an override paused new signups, or the server hasn't loaded the override yet. Agents already signed up keep working.",
            "type": "boolean"
          },
          "require_verified_type": {
            "description": "True when an agent's type must be verified by the vendor attestation hook.",
            "type": "boolean"
          },
          "scopes": {
            "description": "The sandbox: the most any session of an unclaimed agent can hold.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "session_idle_seconds": {
            "description": "How long an unclaimed agent's signup session lasts without use.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "paused",
          "scopes",
          "claim_window_seconds",
          "session_idle_seconds",
          "max_unclaimed",
          "allow_types",
          "deny_types",
          "require_verified_type",
          "hooks"
        ],
        "type": "object"
      },
      "AdminSignupSettings": {
        "additionalProperties": false,
        "description": "The signup policy in effect. With overrides on, it also has the code ceiling, the stored override, and its version, which the ETag header carries too.",
        "properties": {
          "allow_types": {
            "description": "When not empty, only these agent types may sign up. Types are unverified labels unless `require_verified_type` is true.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "claim_window_seconds": {
            "description": "How long an unclaimed agent lives before it and its sessions are deleted.",
            "minimum": 0,
            "type": "integer"
          },
          "code": {
            "$ref": "#/components/schemas/AdminSignupPolicy",
            "description": "The policy set in code: the most an override can allow."
          },
          "deny_types": {
            "description": "Agent types that may not sign up.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "False when the application doesn't turn on agent self-signup. Then every other field is empty or zero.",
            "type": "boolean"
          },
          "hooks": {
            "$ref": "#/components/schemas/AdminSignupHooks"
          },
          "max_unclaimed": {
            "description": "The most unclaimed agents the store holds.",
            "minimum": 0,
            "type": "integer"
          },
          "override": {
            "$ref": "#/components/schemas/AdminSignupOverride"
          },
          "paused": {
            "description": "True when an override paused new signups, or the server hasn't loaded the override yet. Agents already signed up keep working.",
            "type": "boolean"
          },
          "require_verified_type": {
            "description": "True when an agent's type must be verified by the vendor attestation hook.",
            "type": "boolean"
          },
          "scopes": {
            "description": "The sandbox: the most any session of an unclaimed agent can hold.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "session_idle_seconds": {
            "description": "How long an unclaimed agent's signup session lasts without use.",
            "minimum": 0,
            "type": "integer"
          },
          "source": {
            "description": "`code`, or `code_and_override` when the application turned overrides on. The set is open.",
            "examples": [
              "code",
              "code_and_override"
            ],
            "type": "string"
          },
          "version": {
            "description": "The override's version. Send it as If-Match to change the override.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "paused",
          "scopes",
          "claim_window_seconds",
          "session_idle_seconds",
          "max_unclaimed",
          "allow_types",
          "deny_types",
          "require_verified_type",
          "hooks",
          "source"
        ],
        "type": "object"
      },
      "AdminStats": {
        "additionalProperties": false,
        "description": "Totals for an overview.",
        "properties": {
          "agents": {
            "$ref": "#/components/schemas/AdminAgentCounts"
          },
          "events_last_24h": {
            "description": "Audit events in the last 24 hours.",
            "minimum": 0,
            "type": "integer"
          },
          "live_sessions": {
            "description": "Sessions, human and agent, that are not revoked or past their absolute expiry.",
            "minimum": 0,
            "type": "integer"
          },
          "users": {
            "description": "Users who have a stored session or own an agent.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "users",
          "live_sessions",
          "agents",
          "events_last_24h"
        ],
        "type": "object"
      },
      "AdminUser": {
        "additionalProperties": false,
        "description": "A user the library knows through their sessions and agents.",
        "properties": {
          "active_agents": {
            "description": "Enabled agents the user owns.",
            "minimum": 0,
            "type": "integer"
          },
          "id": {
            "$ref": "#/components/schemas/AdminID"
          },
          "last_seen_at": {
            "description": "The latest use of any stored session. Absent when the user has none.",
            "format": "date-time",
            "type": "string"
          },
          "live_sessions": {
            "description": "Sessions, human and agent, that aren't revoked or past their absolute expiry. Idle sessions count until they're used.",
            "minimum": 0,
            "type": "integer"
          },
          "profile": {
            "$ref": "#/components/schemas/AdminProfile"
          }
        },
        "required": [
          "id",
          "live_sessions",
          "active_agents"
        ],
        "type": "object"
      },
      "AdminUserBody": {
        "additionalProperties": false,
        "properties": {
          "user": {
            "$ref": "#/components/schemas/AdminUser"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "AdminUserList": {
        "additionalProperties": false,
        "properties": {
          "next_cursor": {
            "$ref": "#/components/schemas/AdminCursor"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/AdminUser"
            },
            "type": "array"
          }
        },
        "required": [
          "users"
        ],
        "type": "object"
      },
      "Agent": {
        "type": "object",
        "required": [
          "id",
          "owner",
          "name",
          "scopes",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApprovalCreated": {
        "type": "object",
        "required": [
          "id",
          "state",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Challenge": {
        "type": "object",
        "description": "What would turn a refused request into a success: the need that failed, and the factors that would meet it",
        "required": [
          "action",
          "assurance",
          "satisfy_with"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "assurance": {
            "type": "string",
            "enum": [
              "none",
              "recovering",
              "single",
              "multi"
            ]
          },
          "within_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "human": {
            "type": "boolean"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "satisfy_with": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "passkey",
                "totp",
                "recovery",
                "external",
                "federated",
                "password",
                "bridged"
              ]
            }
          },
          "begin": {
            "type": "string"
          },
          "approval": {
            "$ref": "#/components/schemas/ChallengeApproval"
          },
          "purpose": {
            "$ref": "#/components/schemas/Purpose"
          }
        }
      },
      "ChallengeApproval": {
        "type": "object",
        "description": "The approval an agent can wait for instead of stopping at a refusal",
        "required": [
          "id",
          "summary",
          "expires_in"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "wait_hint": {
            "type": "string"
          }
        }
      },
      "CheckRequest": {
        "type": "object",
        "required": [
          "credential",
          "request"
        ],
        "additionalProperties": false,
        "properties": {
          "credential": {
            "type": "object",
            "additionalProperties": false,
            "description": "Exactly one of cookie or authorization; dpop only with authorization",
            "properties": {
              "cookie": {
                "type": "string",
                "description": "The __Host-session cookie's value"
              },
              "authorization": {
                "type": "string"
              },
              "dpop": {
                "type": "string"
              }
            }
          },
          "request": {
            "type": "object",
            "required": [
              "url"
            ],
            "additionalProperties": false,
            "properties": {
              "method": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "description": "The URL the client called on the app; its origin must be one of the server's origins, or the answer refuses with origin_not_allowed"
              },
              "client_ip": {
                "type": "string"
              },
              "user_agent": {
                "type": "string"
              },
              "origin": {
                "type": "string",
                "description": "The browser's Origin header. Cookie requests get the library's cross-origin protection"
              },
              "sec_fetch_site": {
                "type": "string",
                "description": "The browser's Sec-Fetch-Site header"
              }
            }
          },
          "need": {
            "$ref": "#/components/schemas/Need"
          },
          "approval": {
            "type": "object",
            "additionalProperties": false,
            "description": "With id, redeems that approval for action; without id, an agent that misses the need gets human_required with an approval for action in challenge.approval",
            "properties": {
              "id": {
                "type": "string"
              },
              "action": {
                "$ref": "#/components/schemas/Action"
              }
            },
            "required": [
              "action"
            ]
          },
          "resource": {
            "type": "string",
            "description": "The canonical URI of the resource server that checks; tokens bound to another resource are refused"
          }
        }
      },
      "CheckResponse": {
        "type": "object",
        "required": [
          "allowed",
          "set_cookies",
          "headers"
        ],
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "principal": {
            "$ref": "#/components/schemas/Principal"
          },
          "problem": {
            "$ref": "#/components/schemas/Problem"
          },
          "set_cookies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "CreateAgentRequest": {
        "type": "object",
        "required": [
          "subject",
          "name"
        ],
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/Credential"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Credential": {
        "type": "object",
        "description": "One of cookie or authorization; dpop only with authorization",
        "properties": {
          "cookie": {
            "type": "string"
          },
          "authorization": {
            "type": "string"
          },
          "dpop": {
            "type": "string"
          }
        }
      },
      "DelegateRequest": {
        "type": "object",
        "required": [
          "subject"
        ],
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/Credential"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ttl_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "key_thumbprint": {
            "type": "string"
          }
        }
      },
      "Delegated": {
        "type": "object",
        "description": "The agent's token, shown once",
        "required": [
          "token",
          "session",
          "agent",
          "scopes",
          "expires_at"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "session": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Meta": {
        "type": "object",
        "required": [
          "version",
          "api_versions",
          "preset"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "api_versions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "preset": {
            "type": "string"
          }
        }
      },
      "Need": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "human": {
            "type": "boolean"
          },
          "assurance": {
            "type": "string",
            "enum": [
              "none",
              "recovering",
              "single",
              "multi"
            ]
          },
          "within_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approval_ttl_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 86400,
            "description": "How long an approval for this need lives: 60 to 86400 seconds, or 0 for 5 minutes."
          }
        }
      },
      "Principal": {
        "type": "object",
        "required": [
          "user",
          "session",
          "kind",
          "agent",
          "scopes",
          "assurance",
          "methods",
          "authenticated_at",
          "expires_at"
        ],
        "properties": {
          "user": {
            "type": "string"
          },
          "session": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "pat",
              "oauth"
            ]
          },
          "agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assurance": {
            "type": "string"
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "authenticated_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Problem": {
        "type": "object",
        "description": "An RFC 9457 problem, as authhttp writes it and the browser client reads it",
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string",
            "description": "What happened in this occurrence, for people"
          },
          "fix": {
            "type": "string"
          },
          "retry_after": {
            "type": "integer",
            "minimum": 0,
            "description": "Seconds to wait before retrying, for throttled"
          },
          "challenge": {
            "$ref": "#/components/schemas/Challenge"
          }
        }
      },
      "Purpose": {
        "type": "object",
        "description": "The purpose an elevation must be for",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        }
      },
      "RequestApprovalRequest": {
        "type": "object",
        "required": [
          "subject",
          "action",
          "need"
        ],
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/Credential"
          },
          "action": {
            "$ref": "#/components/schemas/Action"
          },
          "need": {
            "$ref": "#/components/schemas/Need"
          }
        }
      },
      "Session": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "agent",
          "parent",
          "scopes",
          "created_at",
          "last_seen_at",
          "expires_at",
          "children"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "pat",
              "oauth"
            ]
          },
          "agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          }
        }
      },
      "SessionTree": {
        "type": "object",
        "required": [
          "sessions"
        ],
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          }
        }
      },
      "User": {
        "type": "object",
        "required": [
          "id",
          "email",
          "email_verified",
          "live_sessions",
          "agents",
          "last_seen_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_verified": {
            "type": "boolean"
          },
          "live_sessions": {
            "type": "integer"
          },
          "agents": {
            "type": "integer"
          },
          "last_seen_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      }
    },
    "securitySchemes": {
      "appKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Tensile-App-Key"
      },
      "session": {
        "description": "A session token, human or agent. A browser can send the session cookie instead.",
        "scheme": "bearer",
        "type": "http"
      },
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-session"
      }
    }
  }
}
