{
  "openapi": "3.1.0",
  "info": {
    "title": "agentsfleet API",
    "description": "API for managing workspaces, fleets, triggers, and runs.",
    "contact": {
      "name": "agentsfleet",
      "url": "https://agentsfleet.net"
    },
    "license": {
      "name": "MIT",
      "identifier": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.agentsfleet.net",
      "description": "Production"
    }
  ],
  "paths": {
    "/healthz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Liveness check",
        "description": "Returns 200 when the server can answer HTTP requests. Use `/readyz` to check the database and event queue.",
        "operationId": "healthz",
        "responses": {
          "200": {
            "description": "The process is alive",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Liveness"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/readyz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Readiness probe",
        "description": "Returns 200 when the database is available, or 503 otherwise. `queue` reports whether the event bus answered; a bus outage delays notifications but does not make the instance unready. This check remains available when the server is busy.",
        "operationId": "readyz",
        "responses": {
          "200": {
            "description": "Every dependency this instance needs is reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            }
          },
          "503": {
            "description": "A dependency this instance needs is unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/admin/models": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List models",
        "description": "Returns a bounded page of shared models, ordered by provider and model identifier. Continue with next_cursor as starting_after; catalogue edits invalidate cursors. Requires the `model:read` scope. ",
        "operationId": "list_admin_models",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1–100; defaults to 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Continuation cursor from this catalogue generation and page size",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid page size or malformed, mismatched or stale cursor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Add a priced model to the catalogue",
        "description": "Adds a model and its rates. Prices take effect without a restart. Requires `model:admin`. To change `provider` or `model_id`, delete the entry and create another.",
        "operationId": "create_admin_model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminModelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelCreated"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/models/{id}": {
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Remove a model",
        "description": "Refuses to remove the active default model. Choose another default first. Requires the `model:admin` scope. ",
        "operationId": "delete_admin_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Admin"
        ],
        "summary": "Update model settings and rates",
        "description": "Updates model rates and inference settings without a restart. Requires `model:admin`. The `provider` and `model_id` fields cannot change.",
        "operationId": "update_admin_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminModelPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelUpdated"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/platform-keys": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List shared model-provider credentials",
        "description": "Lists shared model-provider credentials used by workspaces without their own credentials.",
        "operationId": "list_platform_keys",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKeysResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Set a shared model-provider credential",
        "description": "Selects a workspace's stored provider credential for shared use across workspaces.",
        "operationId": "put_platform_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformKeyPut"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKeySetResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/platform-keys/{provider}": {
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Remove a shared model-provider credential",
        "description": "Removes a shared model-provider credential. Workspaces without their own credential will lose access to this provider.",
        "operationId": "delete_platform_key",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKeyDeactivateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/runners": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List platform runners",
        "description": "Lists every runner newest first, tenant runners included with their `tenant_id`. Requires platform administrator access. Each item includes its current connection status, without authentication state or token hashes. Use `next_cursor` to continue.",
        "operationId": "list_platform_runners",
        "parameters": [
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page (1-100).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Register a platform runner",
        "description": "Registers a platform runner and assigns its policy. Requires `runner:register` on a bearer credential. Save the returned `agt_r` token securely; it appears once. The runner must apply the assigned policy. A host registers once: registering a `host_id` again answers 409 with `current_state` `registered` and `Location` naming its runner, whose token the runner's `rotate` action recovers.",
        "operationId": "register_platform_runner",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Runner registered; the bearer token is returned exactly once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "This host is already registered; `Location` names its runner",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "The runner the host is registered as"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/runners/{runner_id}": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read a platform runner",
        "description": "Returns a runner's details and current work. Requires platform administrator access.",
        "operationId": "get_platform_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Runners"
        ],
        "summary": "Delete a revoked platform runner",
        "description": "Permanently deletes a revoked runner, its runs, and runner events. Revoke it first with a PATCH request setting `action` to `revoke`. Active runs must finish or expire before deletion. Fleets previously assigned to this runner can then use another runner.",
        "operationId": "delete_platform_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The runner is still in service; revoke it first",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Runners"
        ],
        "summary": "Manage a platform runner",
        "description": "Requires platform administrator access. Send either `action` or an edit containing `assigned_policy`, `labels`, or both. Both edits succeed together or neither changes.\n\nActions are `cordon`, `drain`, `revoke`, `rotate`, and `self_test`. Revocation is permanent. `rotate` returns a replacement `runner_token` once; save it and update the host. `self_test` queues a sandbox check; a connected runner is notified immediately and reports later. The response confirms the request, not the result. Revoked runners return 409 `UZ-RUN-018`.\n\nChanges notify a connected runner after commit; its next heartbeat repairs a lost notification. Repeating the current policy has no effect; revoked runners return 400. Labels replace the entire set, using enrollment limits. Duplicates are removed in their original order; an empty list clears labels. Revoked runners' labels remain editable. The response includes labels when supplied.",
        "operationId": "update_platform_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunnerAdminPatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The runner's state after the change, or its replacement token after a `rotate`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerPatchReply"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The runner is revoked, or a rotate addressed a tenant runner, whose tenant rotates its token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/runners/{runner_id}/history": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List runner activity",
        "description": "Lists a runner's recorded activity newest first. Requires platform administrator access. Filter by event type or an occurrence-time range in milliseconds.",
        "operationId": "list_platform_runner_history",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page (1-100).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "description": "Filter to one runner event type, or a comma-separated set returning the union (multi-value equality). Allowed tags: runner_registered, runner_online, runner_offline, run_acquired, run_released, runner_cordoned, runner_uncordoned, runner_draining, runner_drained, runner_revoked. An unrecognised tag or an empty value refuses the whole request.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Lower bound on occurred_at, an RFC 3339 instant (inclusive).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Upper bound on occurred_at, an RFC 3339 instant (inclusive). Must be >= since.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerEventsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/runners/{runner_id}/runs": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List a runner's work assignments",
        "description": "Lists a runner's work assignments newest first, with fleet outcomes and failure reasons. Requires platform administrator access. Continue with `next_cursor` as `starting_after`.\n\n`destination` is `available` for a fleet in your account, `fleet_deleted` after deletion, or `not_permitted` in another account. Fleet and event fields become null when their records are removed.\n\nAssignments and runner activity are kept, whatever their state, until a retention policy is chosen.",
        "operationId": "list_platform_runner_runs",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Run identifier from this runner's previous `next_cursor`. It must match the current workspace and fleet filters. If the run was removed, restart from the first page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace_id",
            "in": "query",
            "description": "Narrow the page and total to runs owned by one workspace. A malformed id is refused; an unknown one matches nothing.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet",
            "in": "query",
            "description": "Filter by fleet identifier or exact name, ignoring case. Combines with `workspace_id`. Empty or oversized values are refused; unknown fleets return no results.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page (1-100).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the runner's runs, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerRunsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/admin/workspaces/{workspace_id}/checkpoint-key/rotate": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Rotate a workspace's checkpoint key",
        "description": "A side-effecting operation with no undo: writes a new checkpoint key for the workspace and deletes every checkpoint the old key sealed. Their stored objects are removed from object storage afterwards. A run interrupted across the rotation starts from its original message, and the workspace's next save is a full one. Use it when a key may be compromised. Sends no body and honors no `Idempotency-Key`: a repeat rotates again and retires what was saved in between. A workspace the caller cannot reach, an unknown one among them, returns 403 `UZ-AUTH-001`.",
        "operationId": "rotate_workspace_checkpoint_key",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "The workspace whose key rotates.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointKeyRotation"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "tags": [
          "API Keys"
        ],
        "summary": "List account API keys",
        "description": "Lists your account's API key details without key hashes. Continue with `next_cursor`, keeping the same sort order.",
        "operationId": "list_api_keys",
        "parameters": [
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged, with the same sort order.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageResponse_ApiKeySummary"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "API Keys"
        ],
        "summary": "Create an account API key",
        "description": "Creates an account administrator API key beginning with `agt_t`. The key is returned once; save it securely. Only its hash is stored.",
        "operationId": "create_api_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintedApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/api-keys/{id}": {
      "delete": {
        "tags": [
          "API Keys"
        ],
        "summary": "Delete a revoked account API key",
        "description": "Deletes a revoked tenant API key. An active key returns 409 `UZ-APIKEY-008`. ",
        "operationId": "delete_api_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "API Keys"
        ],
        "summary": "Revoke an account API key",
        "description": "Set `active` to false to revoke a key and set `revoked_at` and `updated_at`. Revoked keys cannot be reactivated; create a new key instead.",
        "operationId": "revoke_api_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/auth/identity-events/clerk": {
      "post": {
        "tags": [
          "auth-identity-events"
        ],
        "summary": "Receive a Clerk account event",
        "description": "Receives signed account events from Clerk. A `user.created` event creates the user's account and default workspace. Repeated events return `created:false`. Unsupported event types return 200 with `status: ignored`. ",
        "operationId": "auth_identity_event_clerk",
        "parameters": [
          {
            "name": "svix-id",
            "in": "header",
            "description": "Svix message identifier (used for deduplication and signature binding).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "svix-timestamp",
            "in": "header",
            "description": "Unix timestamp of the Svix delivery (used for replay protection).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "svix-signature",
            "in": "header",
            "description": "Space-separated list of Svix v1 signatures.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The account the event opened or found, or a delivery not acted on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/sessions": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Start a command-line login session",
        "description": "Starts a command-line sign-in session that lasts 5 minutes. The response includes a URL for approval in a browser. No access token is required. Rate limits may return 429. ",
        "operationId": "create_auth_session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      },
      "delete": {
        "tags": [
          "Authentication"
        ],
        "summary": "Cancel your unfinished sign-in sessions",
        "description": "Cancels your approved, unfinished sign-in sessions. Accepts a browser session or your `afc_` credential; account API keys are refused. Unapproved sessions expire after five minutes. Existing credentials remain valid; revoke them through `/v1/cli-credentials/{id}`.",
        "operationId": "delete_all_auth_sessions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAllSessionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/auth/sessions/{session_id}": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Read a sign-in session",
        "description": "Returns the current sign-in status. No access token is required. An expired session returns 401 with a stable error code; a used or cancelled one returns 410. ",
        "operationId": "poll_auth_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Login session identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollSessionResponse"
                }
              }
            }
          },
          "401": {
            "description": "The session has expired; start a new one",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "410": {
            "description": "The resource is gone and will not return",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/sessions/{session_id}/approve": {
      "patch": {
        "tags": [
          "Authentication"
        ],
        "summary": "Approve a sign-in session",
        "description": "Approves a pending command-line sign-in session. The dashboard sends encrypted sign-in data and a six-digit verification code. A second approval for the same session returns 409 `UZ-AUTH-015`. ",
        "operationId": "approve_auth_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Login session identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApproveSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "410": {
            "description": "The resource is gone and will not return",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/auth/sessions/{session_id}/verify": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Verify a sign-in session",
        "description": "Verifies a six-digit code and returns encrypted sign-in data. The fifth incorrect attempt ends the session. After success, the same client can retry for one minute; later retries return 410 `UZ-AUTH-012`. Errors identify an incorrect code (`UZ-AUTH-011`), invalid format (`UZ-AUTH-018`), ended session (`UZ-AUTH-013`), pending approval (`UZ-AUTH-014`), or five-minute expiry (`UZ-AUTH-006`).",
        "operationId": "verify_auth_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Login session identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifySessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The session has expired; start a new one",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "410": {
            "description": "The resource is gone and will not return",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/cli-credentials": {
      "post": {
        "tags": [
          "CLI Credentials"
        ],
        "summary": "Create a command-line credential",
        "description": "Creates your machine's `afc_` credential and revokes its previous credential with the same machine name. Save the returned value securely; it cannot be read again. Requires a fresh browser session. Existing command-line credentials and account API keys are refused.",
        "operationId": "create_cli_credential",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintCliCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintedCliCredentialResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "The user is not recognized in this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/cli-credentials/{id}": {
      "delete": {
        "tags": [
          "CLI Credentials"
        ],
        "summary": "Revoke a command-line credential",
        "description": "Revokes one of your command-line credentials. Its next request returns `UZ-AUTH-023`. `agentsfleet logout` revokes the current machine's credential. Browser sessions stay signed in.",
        "operationId": "revoke_cli_credential",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "The user is not recognized in this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/connectors/{provider}/callback": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Complete a provider connection",
        "description": "Completes browser authorization with a provider. Requires `connector:write`, workspace access, and the person who started the connection. The server checks these before using the one-time connection state or exchanging the provider code.",
        "operationId": "connector_callback_complete",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Signed one-time value supplied through the connection URL.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Authorization code supplied by the provider when required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "installation_id",
            "in": "query",
            "description": "Installation identifier supplied by providers such as GitHub.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Provider data-center location supplied by multi-region providers such as Zoho.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The grant landed and no dashboard page could be named to send the person to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connected"
                }
              }
            }
          },
          "302": {
            "description": "Redirect to the page where you started"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "502": {
            "description": "A required external service rejected the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/connectors/{provider}/events": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Receive Slack events",
        "description": "Receives Slack events; users do not call this endpoint. Invalid signatures return 401 `UZ-WH-010`; timestamps outside five minutes return `UZ-WH-011`. Accepted bot mentions return an event identifier. Other deliveries return their reason for being ignored.",
        "operationId": "slack_events",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Slack-Signature",
            "in": "header",
            "description": "Slack request signature. Slack supplies this value.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Slack-Request-Timestamp",
            "in": "header",
            "description": "Delivery time in Unix seconds. Values outside 5 minutes are rejected.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A handshake echo, an ignored delivery with its reason, or an accepted mention with its event identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsAnswer"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/ingress/qstash/schedules": {
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Receive a scheduled fire",
        "description": "Receives signed schedule deliveries from Upstash QStash and queues a fleet event. Duplicate, missing, inactive, or outdated schedules are acknowledged without starting a run.",
        "operationId": "ingest_qstash_schedule",
        "parameters": [
          {
            "name": "Upstash-Signature",
            "in": "header",
            "description": "QStash signature over the exact request body and destination URL.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Upstash-Schedule-Id",
            "in": "header",
            "description": "Schedule identifier returned by QStash: `fleet-schedule-{schedule_id}`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Upstash-Message-Id",
            "in": "header",
            "description": "QStash delivery identifier used for replay suppression.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The signed event was ignored; the response explains why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ignored"
                }
              }
            }
          },
          "202": {
            "description": "The schedule fired, or already had for this delivery",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fired"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/ingress/{provider}": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Receive a provider event",
        "description": "Receives signed GitHub events and starts runs for matching subscribed fleets. Duplicate deliveries do not start another run. Repair pull requests, workflow results, and `deployment_status` deliveries do not start unrelated investigations. A finished workflow run or check run on the exact head a durable task waits on wakes that task once.",
        "operationId": "ingest_connector_webhook",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-GitHub-Event",
            "in": "header",
            "description": "GitHub event type, currently `ping`, `pull_request`, `workflow_run`, `check_run`, or `deployment_status`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-GitHub-Delivery",
            "in": "header",
            "description": "Delivery identifier supplied by GitHub.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Hub-Signature-256",
            "in": "header",
            "description": "Hash-based Message Authentication Code (HMAC)-SHA256 of the raw body, prefixed with `sha256=`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A handshake echoed, or a delivery acknowledged and not acted on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppIngressAnswer"
                }
              }
            }
          },
          "202": {
            "description": "The delivery fanned out to the fleets it matched",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FannedOut"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "Model Library"
        ],
        "summary": "List available models",
        "description": "Lists models available to your account, including provider, context limit, and usage fields. Models are ordered by model identifier and provider. Follow `next_cursor` until null.\n\nResponses include `ETag`, `Cache-Control: private, no-cache`, and `Vary: Authorization`. Send the previous `ETag` as `If-None-Match`; unchanged results return 304 with no body and the same headers.",
        "operationId": "get_model_library",
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "description": "Exact match on the normalized provider. At most 64 bytes once\nnormalized; empty after normalization is treated as absent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "advanced",
            "in": "query",
            "description": "`true` adds the advanced models a picker offers on request.\n\nThe page then lists the ordinary catalogue and the advanced models together. `false`\nor absent lists the ordinary catalogue alone. No other spelling is accepted.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous `next_cursor` unchanged, keeping the same filters and page size.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page, 1..100. Defaults to 50.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One model page with an ETag for cache validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogueResponse"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged since your last request; use your cached response"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read this runner's status",
        "description": "Returns this runner's status, assigned policy, and supported operating-system protections. Reading this endpoint does not mark the runner online; only heartbeats update its connection status.",
        "operationId": "get_runner_self",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/credentials/mint": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Create a tool credential",
        "description": "Creates a tool credential limited to the runner's current work assignment. The request cannot select another workspace. A removed or revoked GitHub App returns 409 `UZ-GH-001` with `reconnect_required`; reconnect GitHub before retrying.",
        "operationId": "runner_mint_credential",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintCredentialResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "502": {
            "description": "A required external service rejected the request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/memory/{fleet_id}": {
      "get": {
        "tags": [
          "Memory"
        ],
        "summary": "Load what a fleet remembers",
        "description": "Loads a fleet's saved memory at the start of a run. Requires its current work assignment. Replaced assignments return 409 `UZ-RUN-005` with `superseded`.",
        "operationId": "runner_load_memory",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryLoadResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Memory"
        ],
        "summary": "Capture what a fleet learned",
        "description": "Saves memory learned during this run and reports stored and skipped entries. A replaced assignment or incorrect assignment token returns 409 `UZ-RUN-005` with `superseded`.",
        "operationId": "runner_capture_memory",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryCaptureResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/memory/{fleet_id}/recall": {
      "post": {
        "tags": [
          "Memory"
        ],
        "summary": "Search what a fleet remembers",
        "description": "Searches memory keys and content without case sensitivity, with key matches first. Shared entries are included when permitted and identify the fleet that wrote them. Replaced assignments return 409 `UZ-RUN-005` with `superseded`.",
        "operationId": "runner_recall_memory",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryRecallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRecallResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/access": {
      "post": {
        "tags": [
          "Integration Grants"
        ],
        "summary": "Ask a person for a host, secret or integration",
        "description": "Asks a person to approve `name` for the assigned fleet: a workspace secret or a connected integration. An alternative `host` asks for a DNS hostname for web access. `github` names its `scope`. A request the fleet's approved grant already covers answers 200 with no card. Any other raises a card carrying the run's turn and answers 201; the run then ends waiting for the person's answer. A card already open for the name answers 200. A name the workspace lacks answers `UZ-AGT-022`, an integration it has not connected `UZ-AGT-023`.",
        "operationId": "runner_request_access",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Covered, or a card is already open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequested"
                }
              }
            }
          },
          "201": {
            "description": "A card was raised",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequested"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/bindings": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Accept a complete native durable task interpretation",
        "description": "Checks accounted current intent and association answers, whole-message multiplicity, pinned item digests and native source spans. Accepts every item in one transaction. Conversation never creates a durable task; independent new work joins the existing FIFO turn queue. Existing PR targets require exact human assignment, reviewed workflows and current grants.",
        "operationId": "runner_accept_durable_task_bindings",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DurableTaskBindingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Immutable interpretation replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskBindingsResponse"
                }
              }
            }
          },
          "201": {
            "description": "Complete interpretation accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskBindingsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Allocate a fenced checkpoint capture plan",
        "description": "Binds the native repository, cumulative byte ceilings, immutable ordered page identities and one expiring writer pin before any upload. Replays preserve the original operation and deadlines.",
        "operationId": "runner_checkpoint_plan",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointPlanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Immutable checkpoint plan replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPlan"
                }
              }
            }
          },
          "201": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPlan"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}": {
      "patch": {
        "tags": [
          "Runners"
        ],
        "summary": "Publish a complete verified checkpoint",
        "description": "Checks ordered base plus overlay pages, expanded file bounds, chained symlinks, compatible history, all verified objects and native input/effect coverage. Only the committed manifest advances recovery.",
        "operationId": "runner_checkpoint_commit",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointCommitInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPlan"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}/authorizations": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Acquire or refresh bounded checkpoint transfers",
        "description": "A restore request without object identities acquires a native reader pin and ordered manifest descriptors. Bounded refresh verifies acknowledged uploads or signs current scoped transfers.",
        "operationId": "runner_checkpoint_authorize",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointAuthorizationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointAuthorizations"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}/objects": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Page authorized restore objects",
        "description": "Returns at most 100 scoped registered objects and expiring read authorizations. Every page checks the current run and restore pin.",
        "operationId": "runner_checkpoint_objects_read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "path",
            "description": "Current run fence.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "pin_id",
            "in": "path",
            "description": "Current restore pin.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "path",
            "description": "Ordered object cursor.",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointObjectsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Register immutable checkpoint objects",
        "description": "Arbitrates at most 256 scoped plaintext descriptors in one quota transaction. Returns missing, verified reusable or busy objects; temporary key material belongs only to trusted supervision.",
        "operationId": "runner_checkpoint_objects_register",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointObjectsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointObjectsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}/pages/{page_id}": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read one bounded manifest page",
        "description": "Requires the current live run and native restore pin. Returns one base or overlay page; the supervisor verifies its digest and the ordered root before attaching files.",
        "operationId": "runner_checkpoint_page_read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_id",
            "in": "path",
            "description": "Native page UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "path",
            "description": "Current run fence.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "pin_id",
            "in": "path",
            "description": "Current restore pin.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "path",
            "description": "Ordered object cursor.",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Runners"
        ],
        "summary": "Freeze one complete manifest page",
        "description": "Checks canonical page bytes, native page position, paths and registered object scope. Identical replay succeeds; changed bytes or page position conflict.",
        "operationId": "runner_checkpoint_page_write",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_id",
            "in": "path",
            "description": "Native page UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointPageInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}/pins/{pin_id}": {
      "patch": {
        "tags": [
          "Runners"
        ],
        "summary": "Renew a current capture or restore pin",
        "description": "Requires matching durable task, fence and pin versions. Renewal cannot extend the original transfer deadline or revive expired, stopped or superseded authority.",
        "operationId": "runner_checkpoint_pin",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pin_id",
            "in": "path",
            "description": "Native pin UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointPinInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointPin"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/checkpoints/{checkpoint_id}/uploads": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Freeze exact ciphertext upload descriptors",
        "description": "Records every ciphertext digest and length before signing create-only uploads. Exact replay cannot choose a new key, nonce or representation.",
        "operationId": "runner_checkpoint_uploads",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Native run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkpoint_id",
            "in": "path",
            "description": "Native checkpoint UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointUploadsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Native checkpoint result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointObjectsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/decisions": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Reserve a physical durable task decision",
        "description": "Uses the run's reviewed decision profile, native source and accepted questions. Confirmed credit and fresh platform Secrets are required before one credential response. Identical retries return saved state without another credential.",
        "operationId": "runner_reserve_durable_task_decision",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Original run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionReservationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved call without another credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionReservationResult"
                }
              }
            }
          },
          "201": {
            "description": "One physical send authorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionReservationResult"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/decisions/{call_id}": {
      "patch": {
        "tags": [
          "Runners"
        ],
        "summary": "Record a physical durable task decision receipt",
        "description": "Accounts usage under the original runner, run and fence, even after live work is removed. Known charges and unknown reservations are independent of answer usability. Canonical retries do not charge twice.",
        "operationId": "runner_record_durable_task_decision",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Original run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_id",
            "in": "path",
            "description": "Native physical decision call UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionReceiptInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Current accounting and answer disposition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionReceiptResult"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/effects": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Recover publications after a checkpoint watermark",
        "description": "Pages native task-local effect order, including unresolved and newly confirmed effects. A replacement worker needs no previously returned effect ID.",
        "operationId": "runner_list_durable_task_effects",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "path",
            "description": "Current run fence.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "durable_task_id",
            "in": "path",
            "description": "Selected current task.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ordinal_after",
            "in": "path",
            "description": "Checkpoint's last confirmed effect.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "path",
            "description": "Last native ordinal returned by the preceding page.",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "path",
            "description": "Maximum effects in one response.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ordered recoverable publication states",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskEffectsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Publish one tested exact-head repair",
        "description": "Records immutable expected-head and tested-tree authority before one native publication. Refuses workflow changes, unsupported file modes, stale ownership and unresolved effects. Unknown acknowledgements require reconciliation and never repeat the mutation.",
        "operationId": "runner_publish_durable_task_effect",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DurableTaskEffectInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved operation replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskEffect"
                }
              }
            }
          },
          "201": {
            "description": "Confirmed new publication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskEffect"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "Coded problem with the immutable effect receipt; UZ-DT-010 identifies an uncertain publication",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/effects/{effect_id}": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read and reconcile one publication",
        "description": "Returns the immutable publication identity and verified receipt. Reconciles unknown outcomes through bounded exact-branch history reads; absence never authorizes another mutation.",
        "operationId": "runner_read_durable_task_effect",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "effect_id",
            "in": "path",
            "description": "Native effect UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "path",
            "description": "Current fleet-thread fence.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Native publication state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskEffect"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/input-receipts": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Acknowledge accepted input and its original reply",
        "description": "Fences apply-here and queued acknowledgements against immutable accepted meaning. Advances the current input cursor once, preserves original delivery deliveries and never runs a different durable task under the current run.",
        "operationId": "runner_accept_durable_task_input_receipt",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DurableTaskInputReceiptInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Immutable receipt replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskInputReceiptResult"
                }
              }
            }
          },
          "201": {
            "description": "Accepted input receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskInputReceiptResult"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/durable_tasks/inputs": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read pending human durable task input",
        "description": "Returns a page of complete human messages from the current source conversation in native FIFO order, with current durable task summaries. Reads never claim or consume input. Requires the current runner, live run and fence.",
        "operationId": "runner_read_durable_task_inputs",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Current run UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "path",
            "description": "Current native run fence.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "path",
            "description": "Opaque ascending boundary returned by the previous input page.",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "after_input_sequence",
            "in": "path",
            "description": "Task-local position already present in this worker's recovered/current history.",
            "required": true,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "path",
            "description": "Complete messages per safe boundary; the daemon serves at most its\npolicy's input batch.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Complete pending input and native work",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskInputsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/extracts": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Read a page for a public fleet",
        "description": "Submit once. A temporary reader failure permits one local read only if the problem explicitly carries local_read_permitted: true.",
        "operationId": "runner_web_extract",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Page content as Markdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "502": {
            "description": "Page unavailable, reader unavailable, or invalid reader response",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/fleets": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List the workspace's fleets",
        "description": "Lists the fleets in the running fleet's workspace, newest first, archived fleets included with their status. Continue with `starting_after` and `limit`.",
        "operationId": "runner_list_fleets",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 100. Defaults to 50.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/fleets/{fleet_id}/turns": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List one fleet's recent turns",
        "description": "Lists one fleet's events in the running fleet's workspace, newest first. Each row carries at most 1024 bytes of what was asked and what was answered. Waiting messages read `queued`. A fleet outside the workspace returns 404 `UZ-AGT-009`.",
        "operationId": "runner_list_fleet_turns",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "The fleet to read: one in the running fleet's workspace.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 25. Defaults to 20.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetTurnsPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/items": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Save full tool call output",
        "description": "Saves completed tool calls before the final run report. Reposting a call replaces its record safely. Replaced work assignments are refused without saving anything.\n\nThe body limit is 33554432 bytes, the runner frame. No call's arguments or output, and no turn's total, is capped. Malformed records count toward `skipped_count`; other records are saved.",
        "operationId": "runner_record_tool_calls",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolCallRecordsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolCallRecordsStored"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/messages": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Post a message to the event's thread",
        "description": "Posts to the event's original thread with secrets masked. The server holds the channel credential. Events without a thread return 409 `UZ-RUN-019` with `current_state`. `delivered` is false when the channel refuses the message or retries fail within 12 seconds. Each call posts once: a request repeating its `item_id` and `call_number` returns the first request's answer and posts nothing.",
        "operationId": "runner_post_message",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePosted"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/schedules": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "List the running fleet's schedules",
        "description": "Lists the assigned fleet's schedules oldest first. `source` is `api` for user-created schedules or `fleet` for fleet-created schedules. This runner can change only `fleet` schedules.",
        "operationId": "runner_list_schedules",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Create a schedule for the running fleet",
        "description": "Creates a schedule for the assigned fleet and registers it with QStash. Source is `fleet`; secret values are masked in its message. A fleet may create 16 schedules; excess returns `UZ-SCHED-009`. `once` retires the schedule after its first delivery. Registration failures still return 201 with `sync` state. Each call creates one schedule: a request repeating its `item_id` and `call_number` returns the first request's schedule and creates nothing.",
        "operationId": "runner_create_schedule",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The schedule as reconciled with the scheduler",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/schedules/{schedule_id}": {
      "delete": {
        "tags": [
          "Schedules"
        ],
        "summary": "Delete a schedule the fleet made",
        "description": "Deletes a fleet-created schedule after the scheduler confirms removal. Returns 204 when complete, or 200 with the schedule while removal is pending. User-created schedules return `UZ-SCHED-010`.",
        "operationId": "runner_delete_schedule",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The schedule as reconciled with the scheduler",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Schedules"
        ],
        "summary": "Change a schedule the fleet made",
        "description": "Updates supplied fields on a fleet-created schedule and synchronizes it with the scheduler. Secret values are masked in the message. User-created schedules return `UZ-SCHED-010`. A request repeating its `item_id` and `call_number` returns the first request's answer and changes nothing again.",
        "operationId": "runner_update_schedule",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchedulePatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The schedule as reconciled with the scheduler",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/schedules/{schedule_id}/runs": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "List a schedule's runs",
        "description": "Lists runs started by this schedule, newest first, with actor `cron:<schedule_id>`. One-time schedules keep their history after retiring. Continue with `starting_after` and `limit`.",
        "operationId": "runner_list_schedule_runs",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of runs to return. The default is 50. Valid values are 1 through 100.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Run a schedule now",
        "description": "Starts the assigned fleet's schedule now. Repeating this request for the same assigned event returns the same run.\n\nPaused or deleting schedules return `UZ-SCHED-011`. Schedule-triggered runs receive the same error with `scheduled_run` to prevent loops. A fleet refusing work returns `UZ-AGT-012`.\n\nA one-time schedule can start only once. Concurrent scheduled and manual starts return the same run; later requests after retirement return 404.",
        "operationId": "runner_run_schedule",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The run that was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRun"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/searches": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Search the web for a public fleet",
        "description": "Submit this request once. Each vendor dispatch reserves a physical attempt. A lost response leaves the outcome unknown. HTTP 503 includes Retry-After when all vendors are cooling down.",
        "operationId": "runner_web_search",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Results from the first working vendor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "502": {
            "description": "Search vendors failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/steers": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Steer another fleet",
        "description": "Puts work on another fleet in the running fleet's workspace, as a chat message that names the sender. The target answers in the sender's thread and runs under its own setup. The same words from the same event return the first `turn_id` with `replayed` true. A steer to the sender returns 409 `UZ-AGT-018`. A fleet outside the workspace returns 404 `UZ-AGT-009`.",
        "operationId": "runner_steer_fleet",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FleetSteerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted for publication; delivery to subscribers is not yet confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetSteerAccepted"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/triggers": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List the running fleet's triggers",
        "description": "Lists the assigned fleet's triggers, oldest first.",
        "operationId": "runner_list_triggers",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Fleets"
        ],
        "summary": "Add a trigger to the running fleet",
        "description": "Adds a webhook, a GitHub App subscription or a Slack mention that wakes the assigned fleet. A webhook's `url` is its delivery address. A provider the workspace has not connected answers `UZ-AGT-023`. A signing secret its vault lacks answers `UZ-AGT-025`. A second trigger of one kind and source answers `UZ-AGT-024`. Each call adds one trigger. A request repeating its `item_id` and `call_number` returns the first request's trigger and adds nothing.",
        "operationId": "runner_add_trigger",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerAddRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trigger"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/runs/{run_id}/triggers/{trigger_id}": {
      "delete": {
        "tags": [
          "Fleets"
        ],
        "summary": "Remove one of the running fleet's triggers",
        "description": "Removes one trigger of the assigned fleet; deliveries to it are refused from then on. A trigger already gone answers 204 as well.",
        "operationId": "runner_remove_trigger",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "description": "Run identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "The trigger's identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fencing_token",
            "in": "query",
            "description": "Attempt token returned with the run. Replaced assignments are refused.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/runners/me/stream": {
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Open a runner session stream",
        "description": "Open control first with the runner bearer credential. After prepared, confirm and welcome, open work, reports and activity on that same native connection using the returned session identifier. Bodies contain length-prefixed JSON frames. Requires the configured private HTTP/3 or HTTP/2 listener; ordinary API connections cannot open a session. Reports retain run-keyed idempotence and take no Idempotency-Key.",
        "operationId": "runner_stream",
        "parameters": [
          {
            "name": "agentsfleet-runner-protocol",
            "in": "header",
            "description": "Required runner protocol revision",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "agentsfleet.runner.v8"
          },
          {
            "name": "agentsfleet-runner-kind",
            "in": "header",
            "description": "control, work, reports or progress",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentsfleet-runner-connection",
            "in": "header",
            "description": "Previous owner on control reconnect; welcome owner on secondary requests",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Length-prefixed session frames",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The previous connection no longer owns this runner",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "RunnerBearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/billing": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Read account balance",
        "description": "Returns your account's balance, shared across its workspaces, and whether the balance is empty.",
        "operationId": "get_tenant_billing",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Token from `next_cursor` in the previous response. Omit it for the first page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of records to return. The default is 50. Valid values are 1 through 200.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/billing/activities/{activity_id}/charges": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Removed: per-activity charges",
        "description": "Per-activity charges were removed. This route always answers 410 Gone with UZ-REQ-003; read settled totals from GET /v1/tenants/me/billing/reports/current.",
        "operationId": "get_tenant_billing_activity_charges",
        "parameters": [
          {
            "name": "activity_id",
            "in": "path",
            "description": "Ignored; the route is removed",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "410": {
            "description": "The resource is gone and will not return",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/billing/charges": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "List account charges",
        "description": "Returns fleet-run and settled setup-chat costs with the newest record first. Use `limit` and `cursor` to read more records. ",
        "operationId": "get_tenant_billing_charges",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Token from `next_cursor` in the previous response. Omit it for the first page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of records to return. The default is 50. Valid values are 1 through 200.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/billing/reports/current": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Read settled usage report",
        "description": "Returns settled totals, spending groups, daily spend and filter choices for every whole Coordinated Universal Time (UTC) day of the selected month, week or today. Runs are counted on the period totals and each fleet. Unsettled usage is excluded.",
        "operationId": "get_tenant_billing_report",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "month (default), week (seven calendar days) or today, in Coordinated Universal Time (UTC).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "query",
            "description": "Exact runtime fleet identifier.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "through_at",
            "in": "query",
            "description": "Inclusive cutoff; defaults to now. The report covers every whole UTC day through it.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "activity_type",
            "in": "query",
            "description": "`runtime`, a fleet run's usage; absent selects every line.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingReport"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/invites": {
      "get": {
        "tags": [
          "Invites"
        ],
        "summary": "List pending invites",
        "description": "Lists pending account invites newest first, including acceptance links. Results use one page: `next_cursor` is null and `total` counts all invites.",
        "operationId": "list_invites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageResponse_InviteSummary"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Invites"
        ],
        "summary": "Invite a person into your account",
        "description": "Invites an email address to your account for seven days. Members can use every workspace but cannot store secrets, connect apps, or manage members. Share the returned `link`.\n\nExisting invites or members return 409 `UZ-INV-003`, with `current_state` of `invited` or `member`. After an uncertain response, check the invite list; retrying cannot create another pending invite.",
        "operationId": "create_invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteSummary"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/invites/{invite_id}": {
      "delete": {
        "tags": [
          "Invites"
        ],
        "summary": "Revoke an invite",
        "description": "Revokes a pending invite and disables its link. Missing, already revoked, or accepted invites for former members return 204. An accepted invite for a current member returns 409 `UZ-INV-003` with `member`; remove that member instead.",
        "operationId": "revoke_invite",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "description": "Invite identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/invites/{invite_id}/send": {
      "post": {
        "tags": [
          "Invites"
        ],
        "summary": "Send an invite's email again",
        "description": "Resends a pending invite email. Each call sends another email; `Idempotency-Key` is not supported. Delivery failures return 503 `UZ-INV-005`; the invite link remains usable. Expired, revoked, or accepted invites return 404 `UZ-INV-001`.",
        "operationId": "send_invite_email",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "description": "Invite identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteEmailResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "List the people in your account",
        "description": "Lists account members oldest first, with roles `owner` or `member`. Results use one page: `next_cursor` is null and `total` counts all members.",
        "operationId": "list_members",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageResponse_MemberSummary"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/members/{user_id}": {
      "delete": {
        "tags": [
          "Members"
        ],
        "summary": "Remove a member",
        "description": "Removes an account member. Their open streams close; later workspace requests are refused. Missing members return 204. Removing the last owner returns 409 `UZ-INV-004`.",
        "operationId": "remove_member",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Member's user identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/models": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "List configured account models",
        "description": "Lists configured models newest first, with provider details and whether each is active. API keys are never returned. Several entries may share a `secret_ref`.\n\nPass `next_cursor` as `starting_after`; null means the last page. Keep `limit` unchanged while paging, or restart from the first page.",
        "operationId": "list_tenant_model_entries",
        "parameters": [
          {
            "name": "starting_after",
            "in": "query",
            "description": "Cursor returned as `next_cursor` by the previous page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelEntriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Tenant"
        ],
        "summary": "Register a model entry",
        "description": "Adds a `(workspace_id, model_id, secret_ref)` entry. First store the secret through `/v1/workspaces/{workspace_id}/secrets`. The workspace must belong to your account. Select the new model through `PUT /v1/tenants/me/provider`; adding it does not activate it.",
        "operationId": "create_tenant_model_entry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredModelEntry"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/models/{id}": {
      "delete": {
        "tags": [
          "Tenant"
        ],
        "summary": "Remove a model entry",
        "description": "Removes a model entry; missing entries also return 204. Its stored secret and other models sharing that secret remain unchanged.",
        "operationId": "delete_tenant_model_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Tenant"
        ],
        "summary": "Change the model on an entry",
        "description": "Changes only `model_id`. To use a different `secret_ref`, create another entry.",
        "operationId": "update_tenant_model_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredModelEntry"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/provider": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Read account model provider settings",
        "description": "Returns your account's provider mode, provider name, model, context limit, and credential reference. Secret values are never returned.",
        "operationId": "get_tenant_provider",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantProviderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Tenant"
        ],
        "summary": "Set account model provider",
        "description": "Sets your account's provider mode and model. Self-managed mode requires an existing secret named by `secret_ref` in the supplied `workspace_id`. The workspace must belong to your account. Creates the model entry if missing.",
        "operationId": "put_tenant_provider",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantProviderResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Tenant"
        ],
        "summary": "Reset the account model provider",
        "description": "Selects the shared platform provider, equivalent to PUT with `mode` set to `platform`. The response records that you explicitly reset the choice.",
        "operationId": "delete_tenant_provider",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantProviderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/runners": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "List tenant runners",
        "description": "Lists the calling tenant's runners newest first; `total` counts only them. Requires `runner:tenant`.",
        "operationId": "list_tenant_runners",
        "parameters": [
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page (1-100).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnersResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Runners"
        ],
        "summary": "Register a tenant runner",
        "description": "Registers a runner that takes only the calling tenant's work. Requires `runner:tenant`, which a platform admin grants per account. A host registers once: `host_id` is unique within the tenant, and `Idempotency-Key` is not used. Registering a host again answers 409 with `current_state` `registered` and `Location` naming its runner. The token appears only once, so recover it with that runner's `rotate` action. Durable tasks are stored off whatever the body asks; only a platform admin turns them on.",
        "operationId": "register_tenant_runner",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Runner registered; the bearer token is returned exactly once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "This host is already registered; `Location` names its runner",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "The runner the host is registered as"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/runners/{runner_id}": {
      "get": {
        "tags": [
          "Runners"
        ],
        "summary": "Read a tenant runner",
        "description": "Returns one of the calling tenant's runners. Another tenant's runner answers 404. Requires `runner:tenant`.",
        "operationId": "get_tenant_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Runners"
        ],
        "summary": "Delete a revoked tenant runner",
        "description": "Permanently deletes one of the calling tenant's revoked runners. Another tenant's runner answers 404. Requires `runner:tenant`.",
        "operationId": "delete_tenant_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The runner is still in service; revoke it first",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Runners"
        ],
        "summary": "Manage a tenant runner",
        "description": "Takes the same body as the platform runner PATCH: an `action` (`cordon`, `drain`, `revoke`, `rotate`, `self_test`) or an edit of `assigned_policy`, `labels`, or both. A tenant runner never takes a decision model, and only a platform admin switches on durable tasks; both answer 400. Another tenant's runner answers 404. Requires `runner:tenant`.",
        "operationId": "update_tenant_runner",
        "parameters": [
          {
            "name": "runner_id",
            "in": "path",
            "description": "Runner identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunnerAdminPatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The runner's state after the change, or its replacement token after a `rotate`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunnerPatchReply"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The runner is revoked, so the request can never be honoured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/tenants/me/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List your workspaces",
        "description": "Lists workspaces across your own account and accounts you joined, oldest first. Each includes the account and your role. API keys and command-line credentials list only their own account.\n\nContinue with `next_cursor` as `starting_after`. Use the exact `name` filter to find a workspace after an uncertain create response. `tenant_id` identifies your own account.",
        "operationId": "list_tenant_workspaces",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Exact tenant-scoped workspace name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Cursor returned as `next_cursor` by the previous page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/users/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Read the current user",
        "description": "Returns your user, account, credential type, and permissions. Accepts browser sessions, account API keys, and command-line credentials. API keys identify their creator. Use this endpoint to check whether a credential works; no additional permission is required.",
        "operationId": "get_current_user",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "The user is not recognized in this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/users/me/invites": {
      "get": {
        "tags": [
          "Invites"
        ],
        "summary": "List invites waiting for you",
        "description": "Lists pending invites sent to your email address across all accounts, newest first. Each invite names its account. Results use one page; `next_cursor` is null.",
        "operationId": "list_my_invites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageResponse_WaitingInvite"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "The user is not recognized in this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/users/me/invites/{invite_id}/accept": {
      "post": {
        "tags": [
          "Invites"
        ],
        "summary": "Accept an invite",
        "description": "Joins the invited account. Your signed-in email must match the invite, or the request returns 403 `UZ-INV-002`. Expired, revoked, or otherwise unavailable invites return 404 `UZ-INV-001`.\n\nAccepting again while still a member returns 200 with current workspaces. After removal from the account, the old invite returns 404.",
        "operationId": "accept_invite",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "description": "Invite identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedInviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/webhooks/{fleet_id}/approval": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Resolve a fleet approval gate",
        "description": "Approves or rejects a fleet's pending request through an email link or Slack action. The body requires a valid signature using the fleet's webhook secret.",
        "operationId": "approval_webhook",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resolved"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/webhooks/{fleet_id}/github": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Receive a signed GitHub event",
        "description": "Verifies the body with the `webhook_secret` field from the workspace's `github` secret. Reviewable `pull_request` events and failed completed `workflow_run` events create fleet events. A delivery identifier remains reserved for 72 hours after acceptance. ",
        "operationId": "github_webhook",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-GitHub-Event",
            "in": "header",
            "description": "GitHub event type.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-GitHub-Delivery",
            "in": "header",
            "description": "GitHub-issued delivery UUID. Used as the dedupe key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Hub-Signature-256",
            "in": "header",
            "description": "HMAC-SHA256 of the raw body, prefixed with `sha256=`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The signed event was ignored; the response explains why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ignored"
                }
              }
            }
          },
          "202": {
            "description": "Accepted for publication; delivery to subscribers is not yet confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/webhooks/{fleet_id}/{source}": {
      "post": {
        "tags": [
          "Fleets"
        ],
        "summary": "Send a signed event from one source to a fleet",
        "description": "Sends an event to a fleet's named webhook trigger. Requires the trigger's valid signature. New events return 202; repeats within 24 hours return `status: duplicate`. A fleet that is not active returns `ignored: fleet_not_active`.",
        "operationId": "receive_source_webhook",
        "parameters": [
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "path",
            "description": "The `source` of the fleet's webhook trigger, such as `linear`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The provider's original event body; requires a valid signature",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The signed event was ignored; the response explains why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ignored"
                }
              }
            }
          },
          "202": {
            "description": "Accepted for publication; delivery to subscribers is not yet confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "The signature does not verify, the timestamp is stale, or no signing secret is configured",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/workspaces": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create a workspace",
        "description": "Creates a workspace in your account and assigns its identifier. Automatic retries and replay keys are unsupported. After an uncertain response, list workspaces by exact name. Reusing a saved name returns 409 instead of creating a duplicate.",
        "operationId": "create_workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateWorkspaceRequest"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedWorkspaceResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/approvals": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "List workspace approval requests",
        "description": "Lists approval requests newest first, including proposed actions, evidence, potential impact, and time remaining. Filter by fleet, request kind, or status. All states are included by default. Follow the cursor to continue.",
        "operationId": "list_workspace_approvals",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Narrows to one state: \"pending\", \"approved\", \"denied\", \"timed_out\" or \"archived\". Omit it for every state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gate_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/approvals/{gate_id}": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "Read an approval request",
        "description": "Returns an approval request. Missing requests and requests in another workspace return 404.",
        "operationId": "get_workspace_approval",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gate_id",
            "in": "path",
            "description": "Approval gate identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalSummary"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/approvals/{gate_id}/{decision}": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Approve, reject or answer a pending request",
        "description": "Approves or rejects a pending request, or answers a question with `answer` and a body of `{\"answer\":\"…\"}`. A request past its deadline still takes a decision. If two callers resolve it, the first result wins. A repeat of the standing decision receives 200 with the same result; any other caller receives 409 with the existing result and resolver. A request whose fleet is archived receives 409. Approve and deny need a signed-in person; an API key receives 403 and nothing changes.",
        "operationId": "approve_workspace_approval",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gate_id",
            "in": "path",
            "description": "Approval gate identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decision",
            "in": "path",
            "description": "What to do with the gate: `approve` or `deny`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/connectors": {
      "get": {
        "tags": [
          "Connectors"
        ],
        "summary": "List connectors for a workspace",
        "description": "Returns the providers available to the workspace. Each item shows whether its application is configured and the workspace holds a saved connection, plus the connected account label when available. This read does not contact providers to check authorization health. Requires the `connector:read` scope.",
        "operationId": "connector_catalog",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CatalogueEntry"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/connectors/{provider}": {
      "get": {
        "tags": [
          "Connectors"
        ],
        "summary": "Read a connector status",
        "description": "Returns `connected` or `not_connected` for one provider. Requires the `connector:read` scope. An unknown provider returns 404 `UZ-CONN-004`. ",
        "operationId": "connector_status",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionView"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Connectors"
        ],
        "summary": "Disconnect a provider from a workspace",
        "description": "Disconnects the provider and removes event routing from this workspace. Repeating the request returns 204. Authorization at the provider remains active. Choose Connect to reconnect. If a model still uses this credential, returns 409 `UZ-VAULT-004` without disconnecting.",
        "operationId": "connector_disconnect",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/connectors/{provider}/connect": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Get a provider connection URL",
        "description": "Returns a URL for connecting the workspace to the provider. Open the URL in a browser. An unknown provider returns 404 `UZ-CONN-004`. An unavailable provider returns 503 `UZ-CONN-001`. ",
        "operationId": "connector_connect",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "description": "Provider identifier, such as `slack` or `github`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentRedirect"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List fleets in a workspace",
        "description": "Returns visible fleets with the newest fleet first. Omit `starting_after` for the first page. Use the returned `next_cursor` to read the next page. With `name`, returns the one fleet saved under that name, or no item, and ignores paging.",
        "operationId": "list_fleets",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "A fleet's saved name, matched exactly: 1 to 64 lower-case letters, digits or hyphens.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged. Omit for the first page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size. Defaults to the deployment's default page size and is clamped to its maximum page size.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Fleets"
        ],
        "summary": "Start a fleet with its first message",
        "description": "Creates an active fleet, its thread and its first turn in one transaction. The fleet runs on `model_ref`, or on the workspace's selected model when it is omitted. It is named `name`, or `fleet-` and the last 12 hex digits of its id. Its answer arrives on `GET /v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns/stream`. Retry with the same `operation_id` and body to receive the same fleet with `replayed: true`. The same key with another body answers 409 `UZ-FLEET-004`. A key whose fleet was deleted answers 410 `UZ-FLEET-006`. Invalid images return 400 `UZ-AGT-026`. A text-only model returns 409 `UZ-AGT-027`.",
        "operationId": "create_fleet",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFleetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A repeat of an earlier create: the same fleet and turn",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedFleet"
                }
              }
            }
          },
          "201": {
            "description": "The new fleet and its first turn",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedFleet"
                }
              }
            }
          },
          "400": {
            "description": "Invalid message, key, model or name",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "No usable model (`UZ-FLEET-005`), a taken name (`UZ-AGT-006`), or a key used with another body (`UZ-FLEET-004`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "410": {
            "description": "The key's fleet was deleted (`UZ-FLEET-006`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "Read a fleet",
        "description": "Returns the fleet with its model, network toggles, schedules, triggers and grants. Every member of the workspace reads a fleet from the moment it is created.",
        "operationId": "get_fleet",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current fleet",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid identity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Fleet unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Fleets"
        ],
        "summary": "Permanently delete a fleet",
        "description": "Permanently deletes the fleet, events, runs, approvals, grants, keys, and memory, in any status. A running fleet's live work ends first, and its schedules are removed from Upstash QStash before the fleet goes. This cannot be undone. Archive is a separate operation: set the status to `archived` to keep the history instead. ",
        "operationId": "delete_fleet",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Required current resource tag",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "A schedule is still registered with the scheduler; repeat the delete",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "412": {
            "description": "Stale resource tag",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "428": {
            "description": "Current resource tag required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Fleets"
        ],
        "summary": "Change a fleet's name, model, network or lifecycle",
        "description": "Updates the name, the model the next run uses, the network toggles or the lifecycle. Send the current `ETag` in `If-Match`. A model change writes one `model_changed` turn. `http_egress` and `package_domains` need a signed-in person; an API key receives 403 and nothing changes. Archiving ends the fleet's live work and is terminal.",
        "operationId": "patch_fleet",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Required current strong resource tag.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchFleetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Current fleet",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid mutation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "No such fleet in this workspace",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The fleet is archived (`UZ-AGT-020`, `current_state: archived`), the model is not one the workspace can use (`UZ-FLEET-005`), or the name is taken (`UZ-AGT-006`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "412": {
            "description": "Stale tag",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "428": {
            "description": "Missing tag",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/durable_tasks": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List unfinished fleet work",
        "description": "Returns unfinished durable tasks newest first. Durable task details remain readable after completion. An empty page does not imply that a conversation request has completed.",
        "operationId": "list_fleet_durable_tasks",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Opaque next_cursor from the previous page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size; defaults to 20.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 100,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current work",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTasksResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid page",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or fleet unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/durable_tasks/{durable_task_id}": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "Read confirmed durable task progress and success criteria",
        "description": "Returns the accepted objective, success criteria, generation and cumulative limits. The strong ETag identifies the current native resource version.",
        "operationId": "get_fleet_durable_task",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durable_task_id",
            "in": "path",
            "description": "Durable task UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "description": "Previously returned resource tag.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Durable task detail",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskResponse"
                }
              }
            }
          },
          "304": {
            "description": "Resource unchanged",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid durable task identifier",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Durable task unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Fleets"
        ],
        "summary": "Control fleet work or edit its completion statements",
        "description": "Requires FleetWrite and the current strong If-Match tag. Native version and generation checks run while holding the durable task lock. Controls preserve the accepted goal, cumulative usage and deadline. Ready resumes paused or blocked work within its remaining allowance; cancellation does not claim rollback of issued effects. A statement edit replaces `questions`, writes a new goal digest and raises the generation by one. It needs a signed-in person; an API key receives 403. A stale generation receives 412 `UZ-DT-013`.",
        "operationId": "patch_fleet_durable_task",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durable_task_id",
            "in": "path",
            "description": "Durable task UUIDv7.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Required current strong resource tag.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchDurableTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Current durable task",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurableTaskResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid durable task control",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Durable task unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "Generation or lifecycle refuses mutation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "412": {
            "description": "Stale resource tag; problem body carries the current etag",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "428": {
            "description": "Missing tag",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "Durable task allowance or request limit reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/integration-grants": {
      "get": {
        "tags": [
          "Integration Grants"
        ],
        "summary": "List integration grants for a fleet",
        "description": "Returns pending, approved, and revoked grants, newest first. ",
        "operationId": "list_integration_grants",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/integration-grants/{grant_id}": {
      "delete": {
        "tags": [
          "Integration Grants"
        ],
        "summary": "Revoke an integration grant",
        "description": "Revokes a grant. A live run keeps what it was issued; the fleet's next run and its next token mint do not hold it. Requires a signed-in person; an API key receives 403.",
        "operationId": "revoke_integration_grant",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grant_id",
            "in": "path",
            "description": "Grant identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/memories": {
      "get": {
        "tags": [
          "Memory"
        ],
        "summary": "List or search memory entries for a fleet",
        "description": "Lists fleet memories newest first. Filter by `category` or search `key` and `content` with `query`, ignoring case. Characters such as `%` are searched literally. Pass `next_cursor` as `starting_after`; null means the last page.",
        "operationId": "list_fleet_memories",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Free text the entries are searched by.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Keep only the entries in one category.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Cursor returned as `next_cursor` by the previous page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return; a positive integer.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/memories/{key}": {
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Forget a fleet memory entry",
        "description": "Deletes one memory entry for this fleet. The key is scoped to the fleet, so a key from another fleet is not deleted. Missing keys return 404 so an operator can tell a mistyped key from a successful forget. ",
        "operationId": "delete_fleet_memory",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Memory entry key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/memory-access": {
      "patch": {
        "tags": [
          "Memory"
        ],
        "summary": "Set who reads and publishes shared memory",
        "description": "Sets shared-memory permissions. `read` allows reading other fleets' published entries; `publish` allows sharing this fleet's entries within the workspace. Both default to false. Omitted fields keep their values. Repeating the body is safe.",
        "operationId": "patch_fleet_memory_access",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryAccess"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/messages": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List a fleet's chat thread with bodies",
        "description": "Lists chat events newest first with request bodies and full replies. Pages hold at most `limit` items and 512 KiB; the newest item is always included. Follow `next_cursor` for more. Older waiting messages may also appear with status `queued` and no reply.",
        "operationId": "list_fleet_messages",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous response's `next_cursor` unchanged.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "description": "Exact recorded event type, such as activity. Filtering happens before paging and excludes queued turns. Omit for the mixed thread, including queued messages.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Fleets"
        ],
        "summary": "Post a chat message to a fleet",
        "description": "Sends a message and returns its event identifier. Reuse `operation_id` with the same message and sender to retry without another run or charge. This remains safe after stopping or pausing the fleet.\n\nReusing it with different text or sender returns 409 `UZ-AGT-016`. Each person is one sender; workspace API keys share one sender. Without `operation_id`, every request creates a new message. An image message keeps its own turn when a run is active. Invalid images return 400 `UZ-AGT-026`. A text-only model returns 409 `UZ-AGT-027`.",
        "operationId": "post_fleet_message",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SteerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted for publication; delivery to subscribers is not yet confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SteerAccepted"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/schedules": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "List hosted schedules",
        "description": "Lists the fleet's hosted schedules, limited by its schedule cap. Missing fleets and fleets in other workspaces return an empty list.",
        "operationId": "list_fleet_schedules",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Create a hosted schedule",
        "description": "Saves a schedule and attempts registration with Upstash QStash. A 201 response can still contain a registration failure. Check `sync`, `last_error`, and `run_state`; use this schedule's `/sync` endpoint to retry registration.",
        "operationId": "create_fleet_schedule",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Saved schedule with its registration status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "412": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "422": {
            "description": "The request format is valid, but its content cannot be processed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/schedules/{schedule_id}": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "Get a hosted schedule",
        "description": "Returns the saved schedule, including its registration status and any registration failure.",
        "operationId": "get_fleet_schedule",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Schedules"
        ],
        "summary": "Delete a hosted schedule",
        "description": "Removes the schedule from Upstash QStash before deleting its saved record.",
        "operationId": "delete_fleet_schedule",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Schedules"
        ],
        "summary": "Update a hosted schedule",
        "description": "Saves schedule changes and attempts to update the Upstash QStash registration. A 200 response can still contain a registration failure. Check `sync`, `last_error`, and `run_state`; use this schedule's `/sync` endpoint to retry registration.",
        "operationId": "update_fleet_schedule",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchedulePatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved schedule with its registration status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "412": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "422": {
            "description": "The request format is valid, but its content cannot be processed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/schedules/{schedule_id}/sync": {
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Sync a hosted schedule",
        "description": "Replaces the Upstash QStash registration with the latest saved schedule. Repeating this request is safe.",
        "operationId": "sync_fleet_schedule",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The schedule as re-reconciled with the scheduler",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/triggers": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List what wakes a fleet",
        "description": "Returns the fleet's webhook, GitHub App and Slack mention triggers, oldest first. A webhook carries the `url` its deliveries are sent to. The fleet adds triggers itself, when a person's message asks it to.",
        "operationId": "list_fleet_triggers",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The fleet's triggers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid identity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Fleet unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/triggers/{trigger_id}": {
      "delete": {
        "tags": [
          "Fleets"
        ],
        "summary": "Remove a trigger from a fleet",
        "description": "Removes one trigger. A delivery to a removed webhook's URL answers 404 and wakes nothing. A trigger already gone answers 204 as well.",
        "operationId": "remove_fleet_trigger",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "The trigger's identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Invalid identity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Fleet unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List a fleet's turn history",
        "description": "Returns fleet turns with the newest turn first. Filter with `actor` or `since`. You cannot use `since` and `cursor` together. ",
        "operationId": "list_fleet_turns",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Use the returned `next_cursor` unchanged. Cannot be combined with `since`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor",
            "in": "query",
            "description": "Glob filter against the row's actor. `*` is a wildcard.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Lower bound on `created_at`. Accepts Go-style durations (15s/30m/2h/7d) or RFC 3339 timestamps.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns/stream": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "Stream live fleet activity",
        "description": "Streams fleet activity using Server-Sent Events (SSE). Each message has `id`, `event`, and JSON `data`; `event` matches `data.kind`.\n\nThe first message is `hello`, with `fleet_ids` containing this fleet and empty `counters`. It confirms subscription readiness. No `hello` means the live subscription is unavailable.\n\nActivity includes:\n- `durable_task_changed`: committed `durable_task_id` and `resource_version`. Read the task collection or detail for confirmed progress; also reconcile tasks on `hello` and gap recovery.\n- `turn_admitted`: accepted chat message, with `turn_id`, `actor`, `event_type`, `message`, and `created_at`.\n- `turn_received`: run started, with the same fields; `message` appears for user messages.\n- `run_restarted`: a replacement attempt committed, with `turn_id`, decimal-string `fencing_token`, and `restarted_at`. It is best-effort and may be lost.\n- `turn_complete`: the saved turn without fleet or workspace identifiers, plus `fleet_status` and `pending_approvals`. `final_reply` appears up to 64 KiB; otherwise fetch turn details.\n- `gate_opened` and `gate_resolved`: `gate_id`, `turn_id`, and `pending_approvals`. Requests outside a run use null `turn_id`. Resolutions add `status` and `resolved_by`.\n- `chunk`, `tool_call_started`, `tool_call_progress`, `tool_call_completed`, and `context_progress`: live reply and tool activity. Every attempt output includes a decimal-string `fencing_token`; discard lower attempts and reset provisional output once on a greater attempt. Tool messages include `turn_id` and `name`. Newer runners add a unique `call_id` per call, shared across its messages.\n- `durable_task_decision_started`, `durable_task_decision_completed`, and `durable_task_transfer_progress`: `turn_id` and a `progress` object with operation identity, phase, selected model and bounded object counts. Turn details keep the latest step of each activity, operation and phase in `durable_task_activity`. These observations never establish task completion or expose private recovery contents.\n- Completed tools from newer runners add `status` (`succeeded`, `failed`, or `interrupted`), the first and last five output lines, and `output_line_count`. These lines are `output_head` and `output_tail`; process calls also include `exit_code`.\n\n`catching_up` reports missed messages through `dropped`; zero means the count is unknown. Reload saved turns after this signal. Identifiers restart at zero per connection; `Last-Event-ID` is ignored. `hello` and `catching_up` use zero without advancing activity identifiers. Heartbeats arrive after 15 idle seconds, with `kind: heartbeat` and no identifier.\n\nAccess is checked again when the account's members change. `access_revoked` sends `data: {\"kind\":\"access_revoked\",\"error_code\":\"UZ-AUTH-001\"}` and closes; do not reconnect. An access check that cannot be answered closes the stream with no frame; recover as after a disconnect. At capacity, 503 `UZ-API-002` includes `Retry-After`. Fetch missed turns before reconnecting.",
        "operationId": "stream_fleet_turns",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stream is open; frames follow as Server-Sent Events",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns/{turn_id}": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "Read one fleet turn",
        "description": "Returns one turn's request body and full reply. Turn lists omit these bodies; fetch details when opening a turn. Missing turns and turns outside your workspace both return 404.",
        "operationId": "get_fleet_turn",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn_id",
            "in": "path",
            "description": "Turn identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Fleets"
        ],
        "summary": "Stop a fleet turn",
        "description": "Stops a turn with `{\"status\":\"cancelled\"}`. A queued turn is cancelled and never runs. A running turn is cancelled with every turn its run serves. The runner ends the run within one renewal interval. Its usage is billed, and it gets no answer. A waiting turn's open approval closes. Repeating the call answers the same state. A turn that already finished answers 409 and keeps its answer. Requires `fleet:write`.",
        "operationId": "stop_fleet_turn",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn_id",
            "in": "path",
            "description": "Turn identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TurnPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The turn already finished",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns/{turn_id}/items/{item_id}": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "Read one tool call in full",
        "description": "Returns full tool arguments and output with secrets masked. URL-encode the `item_id`, the trace's `call_id`. Neither is capped; `truncated_arguments` and `truncated` mark content the runner shortened to fit one 33554432-byte post. Missing, unrecorded, or inaccessible calls return 404.",
        "operationId": "get_fleet_turn_item",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "path",
            "description": "Fleet identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn_id",
            "in": "path",
            "description": "Turn identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "description": "Tool call identifier from the activity stream, in `{fence}:{n}` format. Keep it\nunchanged and URL-encode it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolCallDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "List who can work in a workspace",
        "description": "Lists workspace account members with names, roles, and message `actor` values. Email addresses are excluded. Results use one page; `next_cursor` is null.",
        "operationId": "list_workspace_members",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageResponse_WorkspaceMember"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/models": {
      "get": {
        "tags": [
          "Fleets"
        ],
        "summary": "List workspace model choices",
        "description": "Lists models available to this workspace's billing account. Requires `fleet:read` and current membership. Credentials and their storage locations are never returned.",
        "operationId": "list_workspace_models",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "description": "runtime keeps only models a fleet can run on; omit for every model",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows scanned per page, 1..100; default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "Use the previous `next_cursor` unchanged, for the same owner, workspace, person, purpose, and page size.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configured priced choices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPage_WorkspaceModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "Workspace unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/onboarding": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Read the workspace's onboarding checklist state",
        "description": "Returns Getting Started progress: model configured, fleet created, credential stored, event processed, and message sent.",
        "operationId": "get_workspace_onboarding",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/secrets": {
      "get": {
        "tags": [
          "Secrets"
        ],
        "summary": "List secrets stored for a workspace",
        "description": "Returns secret names and non-secret details. Secret values are never returned. ",
        "operationId": "list_workspace_secrets",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Secrets"
        ],
        "summary": "Store a workspace secret",
        "description": "Creates an encrypted secret; values are never returned. Send a nonempty JSON object in `data`, up to 4 KiB. Invalid shapes return `UZ-VAULT-001`; oversized values return `UZ-VAULT-002`.\n\nAn existing name returns 409 `UZ-VAULT-005` without changing it. Concurrent creates produce one 201 and one 409. Use the secret's `PUT` endpoint to replace it. The name `checkpoint_key` is the workspace's checkpoint key, which the platform writes; it returns 403 `UZ-VAULT-006`.",
        "operationId": "store_workspace_secret",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreSecretRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/secrets/{name}": {
      "put": {
        "tags": [
          "Secrets"
        ],
        "summary": "Replace a secret's stored body",
        "description": "Replaces the entire secret with the JSON object in `data`. Omitted fields are removed. Send every required field; stored secret values cannot be read back. A missing name returns `UZ-VAULT-003` without creating it; use `POST` to create a secret. The workspace's `checkpoint_key` returns 403 `UZ-VAULT-006` and keeps its value.",
        "operationId": "replace_workspace_secret",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "The name the secret is stored under.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceSecretRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds this endpoint's size limit",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Secrets"
        ],
        "summary": "Delete a secret from the workspace vault",
        "description": "Deletes a secret; missing secrets also return 204. Models still using it cause 409 `UZ-VAULT-004`, with the number of references. Deleting a connector's `{provider}` secret also removes its event routing and requires `connector:write`. The workspace's `checkpoint_key` returns 403 `UZ-VAULT-006` and stays.",
        "operationId": "delete_workspace_secret",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "The name the secret is stored under.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found or is not accessible to you",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/turns": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspace turn history",
        "description": "Lists workspace turns newest first. Filter by `fleet_id`, `actor` pattern, or `since` time. `since` accepts a duration or RFC 3339 timestamp and cannot be combined with `cursor`.",
        "operationId": "list_workspace_turns",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fleet_id",
            "in": "query",
            "description": "Drill down to one fleet within the workspace.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Use the returned `next_cursor` unchanged. Cannot be combined with `since`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor",
            "in": "query",
            "description": "Glob filter against the row's actor. `*` is a wildcard.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Lower bound on `created_at`. Accepts Go-style durations (15s/30m/2h/7d) or RFC 3339 timestamps.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "429": {
            "description": "A request or capacity limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/turns/stream": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Stream live activity for a whole workspace",
        "description": "Streams activity for every fleet you can read using one Server-Sent Events (SSE) connection. The first `hello` contains `kind: hello` and readable `fleet_ids`. Activity uses the fleet stream's frame kinds, with `fleet_id` added to each payload. Fleets join or leave the stream as access changes.\n\n`catching_up` contains `kind: catching_up` and `dropped`, the number missed since the previous signal. Zero means the count is unknown. Reload missed turns through `/v1/workspaces/{workspace_id}/turns`. After reconnecting, reload this history to recover the gap.\n\nIdentifiers restart at zero per connection; `Last-Event-ID` is ignored. `hello` and `catching_up` use zero without advancing activity identifiers. Heartbeats arrive after 15 idle seconds, with `kind: heartbeat` and no identifier.\n\nAccess and the fleet set are checked again when the account's members or the workspace's fleets change. `access_revoked` sends `data: {\"kind\":\"access_revoked\",\"error_code\":\"UZ-AUTH-001\"}` and closes; do not reconnect. An access check that cannot be answered closes the stream with no frame; recover as after a disconnect. At capacity, 503 `UZ-API-002` includes `Retry-After`.",
        "operationId": "stream_workspace_turns",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace identifier (version 7 universally unique identifier, or UUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stream is open; frames follow as Server-Sent Events",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing, invalid, or not accepted by this endpoint",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "403": {
            "description": "You do not have permission for this action",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "500": {
            "description": "An internal server error occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          },
          "503": {
            "description": "A required service is unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Accepted": {
        "type": "object",
        "description": "An accepted delivery and its turn identifier. Repeated deliveries return the original\nidentifier without starting another run.",
        "required": [
          "turn_id",
          "replayed"
        ],
        "properties": {
          "replayed": {
            "type": "boolean",
            "description": "True when an earlier delivery already created this turn; no additional run was\nstarted."
          },
          "turn_id": {
            "type": "string",
            "description": "The turn the fleet will run, or already ran."
          }
        }
      },
      "AcceptedInviteResponse": {
        "type": "object",
        "description": "`POST /v1/users/me/invites/{invite_id}/accept` — the account joined.",
        "required": [
          "tenant_id",
          "workspace_ids"
        ],
        "properties": {
          "tenant_id": {
            "type": "string",
            "description": "The account the caller is now a member of."
          },
          "workspace_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Its workspaces, oldest first, each now open to the caller."
          }
        }
      },
      "AccessOutcome": {
        "type": "string",
        "description": "Which run owns the decision card, or whether the grant already covers this request.",
        "enum": [
          "raised",
          "pending",
          "covered"
        ]
      },
      "AccessRequest": {
        "allOf": [
          {
            "type": "object",
            "description": "`POST /v1/runners/me/runs/{run_id}/access` request.",
            "required": [
              "fencing_token"
            ],
            "properties": {
              "evidence": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RedirectEvidence",
                    "description": "Redirect evidence recorded by the runner, present only for a matching host."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "fencing_token": {
                "type": "integer",
                "format": "int64",
                "description": "The run's fencing token; a holder the fleet has superseded is refused.",
                "minimum": 0
              },
              "host": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Hostname",
                    "description": "A host grant, mutually exclusive with a credential name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The workspace vault key or connected integration, such as `sentry` or\n`github`."
              },
              "scope": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The GitHub scope, `{repositories, access, base?}`; required for\n`github` and refused for any other name. The daemon reads it through\n`af_fleet_runtime::config::RepositoryBinding::parse`."
              }
            },
            "additionalProperties": false
          },
          {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "evidence": {
                    "type": "null"
                  },
                  "host": {
                    "type": "null"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "host"
                ],
                "properties": {
                  "host": {
                    "type": "string"
                  },
                  "name": {
                    "type": "null"
                  },
                  "scope": {
                    "type": "null"
                  }
                }
              }
            ]
          }
        ],
        "description": "Provide one credential name or one host. Only host requests accept redirect evidence, and its to_host must match the requested host."
      },
      "AccessRequested": {
        "type": "object",
        "description": "What an access request did.",
        "required": [
          "state",
          "grant_id"
        ],
        "properties": {
          "gate_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The card when observed. A concurrent pending request may not yet see its ID.\nRunners use `state` to decide whether this turn waits or continues."
          },
          "grant_id": {
            "type": "string",
            "description": "The fleet's grant for the name."
          },
          "state": {
            "$ref": "#/components/schemas/AccessOutcome",
            "description": "What took place independent of whether the transaction saw the card ID."
          }
        }
      },
      "AccountOpened": {
        "type": "object",
        "description": "The workspace created for the signup event.",
        "required": [
          "workspace_id",
          "workspace_name",
          "created"
        ],
        "properties": {
          "created": {
            "type": "boolean",
            "description": "`true` on a fresh account, `false` when this delivery was a replay."
          },
          "workspace_id": {
            "type": "string",
            "description": "The default workspace the account was opened with."
          },
          "workspace_name": {
            "type": "string",
            "description": "What that workspace is called."
          }
        }
      },
      "AdminDecisionModel": {
        "type": "object",
        "description": "Decision settings and their protocol-specific complete price schedule.",
        "required": [
          "enabled",
          "profile",
          "prices"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Activation is independent of the immutable reviewed definition."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CataloguePrice"
            },
            "description": "The schedule belongs to this decision revision, independently of coding.",
            "maxItems": 64,
            "minItems": 1
          },
          "profile": {
            "$ref": "#/components/schemas/DecisionModelSettings",
            "description": "Responses borrow the stored definition; request decoding owns its fields."
          }
        },
        "additionalProperties": false
      },
      "AdminModelCreate": {
        "type": "object",
        "description": "`POST /v1/admin/models` input: one identity, its evidence, its complete\nprice schedule and, optionally, its inference settings.",
        "required": [
          "provider",
          "model_id",
          "metadata",
          "prices"
        ],
        "properties": {
          "decision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AdminDecisionModel",
                "description": "Omission leaves a new model without decision capability."
              },
              {
                "type": "null"
              }
            ]
          },
          "inference": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelInference",
                "description": "Explicit inference settings; omitted rows remain unavailable for inference."
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/CatalogueMetadata",
            "description": "Label and context evidence."
          },
          "model_id": {
            "type": "string",
            "description": "Provider-native model identity."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CataloguePrice"
            },
            "description": "Every prompt tier across every date range, in integer nanos per\nmillion tokens.",
            "maxItems": 64
          },
          "provider": {
            "type": "string",
            "description": "Provider identity."
          }
        },
        "additionalProperties": false
      },
      "AdminModelCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AdminModelItem",
            "description": "The created model fields, flattened on the existing wire."
          },
          {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "request_id": {
                "type": "string",
                "description": "Reference identifier to include when contacting support."
              }
            }
          }
        ],
        "description": "Successful model creation."
      },
      "AdminModelItem": {
        "type": "object",
        "description": "One model in the admin list.",
        "required": [
          "id",
          "provider",
          "model_id",
          "metadata",
          "prices"
        ],
        "properties": {
          "decision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AdminDecisionModel",
                "description": "Reviewed decision definition and independent rates, when configured."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "Model record's version 7 universally unique identifier (UUID)."
          },
          "inference": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelInference",
                "description": "Non-secret settings used by setup chat and runtime runs."
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/CatalogueMetadata",
            "description": "Label and context evidence."
          },
          "model_id": {
            "type": "string",
            "description": "Provider-native model identity."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CataloguePrice"
            },
            "description": "The complete schedule, ordered by tier then start."
          },
          "provider": {
            "type": "string",
            "description": "Provider identity."
          }
        },
        "additionalProperties": false
      },
      "AdminModelPatch": {
        "type": "object",
        "description": "`PATCH /v1/admin/models/{id}` input: a complete replacement of the\nevidence and the price schedule, and optionally of the inference settings.",
        "required": [
          "metadata",
          "prices"
        ],
        "properties": {
          "decision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AdminDecisionModel",
                "description": "Omission preserves the saved decision definition and schedule."
              },
              {
                "type": "null"
              }
            ]
          },
          "inference": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelInference",
                "description": "Omission preserves the current inference settings."
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/CatalogueMetadata",
            "description": "Label and context evidence."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CataloguePrice"
            },
            "description": "The whole coding schedule; the saved settings determine whether it can\nbe empty. A range absent here is removed.",
            "maxItems": 64
          }
        },
        "additionalProperties": false
      },
      "AdminModelUpdated": {
        "type": "object",
        "description": "Successful model rate update.",
        "required": [
          "id",
          "updated",
          "request_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Updated row identity."
          },
          "request_id": {
            "type": "string",
            "description": "Reference identifier to include when contacting support."
          },
          "updated": {
            "type": "boolean",
            "description": "Always true after an update."
          }
        },
        "additionalProperties": false
      },
      "AdminModelsResponse": {
        "type": "object",
        "description": "`GET /v1/admin/models` response.",
        "required": [
          "models",
          "request_id"
        ],
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminModelItem"
            },
            "description": "One bounded page of priced rows."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Continue with `starting_after`, or null at the end of this catalogue snapshot."
          },
          "request_id": {
            "type": "string",
            "description": "Reference identifier to include when contacting support."
          }
        },
        "additionalProperties": false
      },
      "AdminState": {
        "type": "string",
        "description": "Administrator-selected runner state. Only `Active` permits runner API requests.",
        "enum": [
          "active",
          "cordoned",
          "draining",
          "drained",
          "revoked"
        ]
      },
      "ApiKeySummary": {
        "type": "object",
        "description": "One key as a list shows it: metadata, never a secret.",
        "required": [
          "id",
          "key_name",
          "active",
          "created_at"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Whether it still authenticates."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was minted."
          },
          "display_suffix": {
            "type": [
              "string",
              "null"
            ],
            "description": "Final four hexadecimal characters for recognition only. Never authenticates a request.\nNull when no suffix was recorded; the original credential cannot be recovered."
          },
          "id": {
            "type": "string",
            "description": "The key's identifier."
          },
          "key_name": {
            "type": "string",
            "description": "What it is called."
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was revoked, or null while active."
          }
        }
      },
      "AppIngressAnswer": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Pong",
            "description": "The handshake, answered with the word the provider expects."
          },
          {
            "$ref": "#/components/schemas/Ignored",
            "description": "A signed delivery that was ignored, with the reason."
          }
        ],
        "description": "A successful provider handshake or an ignored delivery with its reason."
      },
      "ApprovalSummary": {
        "type": "object",
        "description": "One gate as the inbox lists it.",
        "required": [
          "gate_id",
          "fleet_id",
          "fleet_name",
          "workspace_id",
          "action_id",
          "tool_name",
          "action_name",
          "gate_type",
          "proposed_action",
          "blast_radius",
          "status",
          "detail",
          "created_at",
          "expires_at",
          "resolved_by",
          "resolved_by_name"
        ],
        "properties": {
          "action_id": {
            "type": "string",
            "description": "The action it gates."
          },
          "action_name": {
            "type": "string",
            "description": "The verb it wants."
          },
          "blast_radius": {
            "type": "string",
            "description": "How far the consequences reach."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was raised."
          },
          "detail": {
            "type": "string",
            "description": "The resolver's note, empty while pending."
          },
          "evidence": {
            "type": [
              "object",
              "null"
            ],
            "description": "The evidence behind the proposal, verbatim."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it stops waiting."
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet that raised it."
          },
          "fleet_name": {
            "type": "string",
            "description": "That fleet's name, joined at read time so a rename is visible."
          },
          "gate_id": {
            "type": "string",
            "description": "The gate's own row id — what a decision addresses it by."
          },
          "gate_type": {
            "type": "string",
            "description": "Which family of gate this is."
          },
          "proposed_action": {
            "type": "string",
            "description": "What the fleet proposes, in a person's words."
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was resolved, or `null` while pending."
          },
          "resolved_by": {
            "type": "string",
            "description": "Who resolved it, empty while pending."
          },
          "resolved_by_name": {
            "type": "string",
            "description": "Resolver's display name, or an empty string when unavailable. Fall back to\n`resolved_by` when empty."
          },
          "status": {
            "type": "string",
            "description": "Where the gate stands."
          },
          "tool_name": {
            "type": "string",
            "description": "The tool asking."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace it belongs to."
          }
        }
      },
      "ApprovalsResponse": {
        "type": "object",
        "description": "`GET /v1/workspaces/{workspace_id}/approvals` — the queue.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalSummary"
            },
            "description": "The gates on this page, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last one."
          }
        }
      },
      "ApproveSessionRequest": {
        "type": "object",
        "description": "`PATCH /v1/auth/sessions/{session_id}/approve` — a person clicked Approve.",
        "required": [
          "dashboard_public_key",
          "ciphertext",
          "nonce",
          "verification_code"
        ],
        "properties": {
          "ciphertext": {
            "type": "string",
            "description": "Encrypted credential, forwarded without being decrypted by the server."
          },
          "dashboard_public_key": {
            "type": "string",
            "description": "The dashboard's public key, for the client's key agreement."
          },
          "nonce": {
            "type": "string",
            "description": "The nonce used to encrypt this credential."
          },
          "verification_code": {
            "type": "string",
            "description": "The six digits shown to the person, whose digest is what gets stored."
          }
        },
        "additionalProperties": false
      },
      "ApproveSessionResponse": {
        "type": "object",
        "description": "What approving answers with.",
        "required": [
          "request_id"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "description": "The request that recorded the approval."
          }
        }
      },
      "AssignedPolicy": {
        "type": "object",
        "description": "Sandbox isolation, outgoing network access, and concurrency settings assigned to this\nrunner.",
        "required": [
          "durable_tasks_enabled",
          "sandbox_tier",
          "network_policy",
          "registry_allowlist",
          "worker_count"
        ],
        "properties": {
          "decision_model_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Canonical `UUIDv7` of the platform decision model; absent disables decisions."
          },
          "durable_tasks_enabled": {
            "type": "boolean",
            "description": "Permit new durable task runs; existing runs retain their issued mode."
          },
          "network_policy": {
            "$ref": "#/components/schemas/RunnerNetworkPolicy",
            "description": "Outgoing network access policy to apply."
          },
          "registry_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Default package registries added to each assignment's allowed network hosts. An empty\nlist uses the runner's defaults."
          },
          "sandbox_tier": {
            "$ref": "#/components/schemas/SandboxTier",
            "description": "Isolation strength to apply."
          },
          "worker_count": {
            "type": "integer",
            "format": "int32",
            "description": "Concurrent workers the runner may start. Clamped on both sides.",
            "minimum": 0
          }
        }
      },
      "BillingBreakdown": {
        "type": "object",
        "description": "One spending group across the entire selected period.",
        "required": [
          "totals"
        ],
        "properties": {
          "key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet or model identifier."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recorded fleet label, when available."
          },
          "totals": {
            "$ref": "#/components/schemas/BillingTotals",
            "description": "Exact filtered totals for this group."
          }
        }
      },
      "BillingChoices": {
        "type": "object",
        "description": "Available choices across the entire unfiltered period.",
        "required": [
          "fleets"
        ],
        "properties": {
          "fleets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingFleetChoice"
            },
            "description": "The fleets the period's usage names."
          }
        }
      },
      "BillingDaily": {
        "type": "object",
        "description": "Settled totals for one UTC ledger creation date, including empty days.",
        "required": [
          "day",
          "totals"
        ],
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "description": "UTC calendar date in YYYY-MM-DD form.",
            "x-stability": "stable"
          },
          "totals": {
            "$ref": "#/components/schemas/BillingTotals",
            "description": "Additive daily quantities; runs are counted on the period and fleet totals only."
          }
        }
      },
      "BillingFleetBreakdown": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BillingBreakdown",
            "description": "Fleet identity and exact filtered totals."
          },
          {
            "type": "object",
            "required": [
              "models"
            ],
            "properties": {
              "models": {
                "type": "array",
                "items": {
                  "type": "string",
                  "x-stability": "stable"
                },
                "description": "Sorted distinct nonempty model identifiers recorded in matching lines."
              }
            }
          }
        ],
        "description": "A fleet's complete recorded spending and model attribution."
      },
      "BillingFleetChoice": {
        "type": "object",
        "description": "A fleet choice independent of the currently selected filters.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet identifier."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recorded fleet name, when available."
          }
        }
      },
      "BillingReport": {
        "type": "object",
        "description": "The selected account's current settled usage report.",
        "required": [
          "period",
          "from_at",
          "through_at",
          "totals",
          "daily",
          "spending",
          "filters"
        ],
        "properties": {
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingDaily"
            },
            "description": "Every UTC date in the selected interval, ascending."
          },
          "filters": {
            "$ref": "#/components/schemas/BillingChoices",
            "description": "Unfiltered period choices."
          },
          "from_at": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive beginning of the selected period."
          },
          "period": {
            "type": "string",
            "description": "`month`, `week` or `today`, interpreted in Coordinated Universal Time (UTC)."
          },
          "spending": {
            "$ref": "#/components/schemas/BillingSpending",
            "description": "Full-period spending groups."
          },
          "through_at": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive end of the period; the report covers every whole UTC day through it."
          },
          "totals": {
            "$ref": "#/components/schemas/BillingTotals",
            "description": "Totals across every matching settled line."
          }
        }
      },
      "BillingResponse": {
        "type": "object",
        "description": "`GET /v1/tenants/me/billing` — the wallet snapshot.",
        "required": [
          "balance_nanos",
          "updated_at",
          "is_exhausted"
        ],
        "properties": {
          "balance_nanos": {
            "$ref": "#/components/schemas/SignedNanos",
            "description": "What remains, in nanos — one thousand-millionth of a dollar.\n\nNegative while the tenant owes a debt. A settlement takes its whole charge, and the\nnext grant repays the debt before any of it is spendable."
          },
          "exhausted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it did, or `null` while money remains — emitted either way, for\nthe module's null rule."
          },
          "is_exhausted": {
            "type": "boolean",
            "description": "Whether the balance has reached zero or gone below it."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the balance last moved."
          }
        }
      },
      "BillingSpending": {
        "type": "object",
        "description": "Full-period settled spending.",
        "required": [
          "by_fleet",
          "by_model"
        ],
        "properties": {
          "by_fleet": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingFleetBreakdown"
            },
            "description": "Spending grouped by fleet."
          },
          "by_model": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingBreakdown"
            },
            "description": "Grouped model identifiers."
          }
        }
      },
      "BillingTotals": {
        "type": "object",
        "description": "Recorded settled totals over a period, a spending group or a day.",
        "required": [
          "charged_nanos",
          "input_tokens",
          "output_tokens",
          "runtime_ms",
          "line_count",
          "unpriced_tokens"
        ],
        "properties": {
          "activity_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Runs counted on their first runtime slice's day. Present on the period\ntotals and each fleet group; absent on model and daily groups, since one\nrun spans several models and days.",
            "x-stability": "stable"
          },
          "charged_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Actual combined credit charge, as integer nanodollar text."
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Recorded input tokens, including the cached subset."
          },
          "line_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of individually settled usage lines."
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Recorded output tokens."
          },
          "runtime_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Recorded runtime in milliseconds."
          },
          "unpriced_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Tokens without a published platform price."
          }
        }
      },
      "CapabilityReport": {
        "type": "object",
        "description": "What this host can actually enforce.",
        "required": [
          "engine",
          "isolation",
          "kvm"
        ],
        "properties": {
          "build_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source digest compiled into the reporting runner; absent for an unbound build."
          },
          "durable_tasks_v1": {
            "type": "boolean",
            "description": "This build supports fenced task work and workspace handoff."
          },
          "engine": {
            "$ref": "#/components/schemas/SandboxEngine",
            "description": "The engine that builds this runner's sandboxes."
          },
          "isolation": {
            "$ref": "#/components/schemas/Isolation",
            "description": "The wall that engine puts between a sandbox's code and the host."
          },
          "kvm": {
            "$ref": "#/components/schemas/Kvm",
            "description": "What the host's virtualization device offers."
          },
          "sandboxes_max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How many sandboxes the host's memory holds at once; absent where the\nengine reserves no memory per sandbox.",
            "maximum": 2147483647,
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "CatalogueEntry": {
        "type": "object",
        "description": "One row of `GET …/connectors`.\n\nNo secret material and no field that could carry any — the whole document is\nfour facts about availability.",
        "required": [
          "id",
          "archetype",
          "display_name",
          "configured",
          "connected"
        ],
        "properties": {
          "archetype": {
            "type": "string",
            "description": "Which flow connecting it runs — see [`ARCHETYPE_OAUTH2`]."
          },
          "configured": {
            "type": "boolean",
            "description": "Whether this DEPLOYMENT has been set up to connect it."
          },
          "connected": {
            "type": "boolean",
            "description": "Whether THIS workspace holds a landed grant for it."
          },
          "display_name": {
            "type": "string",
            "description": "The name a card shows."
          },
          "id": {
            "type": "string",
            "description": "The provider's route segment, which is also its stored id."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The public name of this workspace’s connection, when available."
          }
        }
      },
      "CatalogueMetadata": {
        "type": "object",
        "description": "One exact provider/model identity's label and context evidence.",
        "required": [
          "display_name",
          "context_cap_tokens",
          "context_source_url",
          "context_verified_at",
          "advanced"
        ],
        "properties": {
          "advanced": {
            "type": "boolean",
            "description": "Whether a picker lists the model only when asked for advanced models."
          },
          "context_cap_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Verified request-context ceiling for this model and protocol."
          },
          "context_source_url": {
            "type": "string",
            "description": "Provider limit source: models API for coding, published limits for a\ndecision API whose model metadata omits context."
          },
          "context_verified_at": {
            "type": "string",
            "format": "date-time",
            "description": "When that response was verified."
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable label; never used to route a request."
          }
        },
        "additionalProperties": false
      },
      "CatalogueModel": {
        "type": "object",
        "description": "A model with prices in billionths of a dollar per million tokens. `id` is the provider's\nmodel identifier, not the database record identifier.",
        "required": [
          "id",
          "provider",
          "context_cap_tokens",
          "input_nanos_per_mtok",
          "cached_input_nanos_per_mtok",
          "output_nanos_per_mtok",
          "display_name",
          "advanced",
          "context_source_url",
          "context_verified_at",
          "prices"
        ],
        "properties": {
          "advanced": {
            "type": "boolean",
            "description": "Listed only when the caller asks for advanced models."
          },
          "cached_input_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "The cached-input rate, likewise."
          },
          "context_cap_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "The context window the price is quoted for."
          },
          "context_source_url": {
            "type": "string",
            "description": "The provider models API response the context limit came from."
          },
          "context_verified_at": {
            "type": "string",
            "format": "date-time",
            "description": "When that response was verified."
          },
          "display_name": {
            "type": "string",
            "description": "The label a picker shows; never used to route a request."
          },
          "id": {
            "type": "string",
            "description": "The model identifier a tenant selects by."
          },
          "input_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "The input rate, in nanos per million tokens."
          },
          "output_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "The output rate, likewise."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CataloguePrice"
            },
            "description": "The complete schedule, ordered by tier then start. The three rates\nabove are its base tier as it stands now."
          },
          "provider": {
            "type": "string",
            "description": "The provider hosting it."
          }
        }
      },
      "CataloguePrice": {
        "type": "object",
        "description": "One prompt-size tier's rates during a half-open date range.",
        "required": [
          "effective_from",
          "prompt_tokens_above",
          "input_nanos_per_mtok",
          "cached_input_nanos_per_mtok",
          "output_nanos_per_mtok",
          "source_url",
          "verified_at",
          "conditions"
        ],
        "properties": {
          "cache_write_1h_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "Cache writes with a one-hour lifetime."
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_write_5m_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "Cache writes with a five-minute lifetime."
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_write_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "Cache writes whose provider reports no lifetime."
              },
              {
                "type": "null"
              }
            ]
          },
          "cached_input_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Input read from the provider's cache."
          },
          "conditions": {
            "type": "string",
            "description": "Scope, exclusions and provider-specific conditions; may be empty."
          },
          "effective_from": {
            "type": "string",
            "format": "date-time",
            "description": "The first instant this quote applies."
          },
          "effective_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The first instant it no longer applies, or `null` for an open range."
          },
          "input_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Uncached input."
          },
          "output_nanos_per_mtok": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Output, reasoning included once where the provider bills it."
          },
          "prompt_tokens_above": {
            "type": "integer",
            "format": "int32",
            "description": "The tier applies to a request whose whole prompt exceeds this many\ntokens; `0` is the base tier."
          },
          "source_url": {
            "type": "string",
            "description": "The provider's pricing page or response the quote came from."
          },
          "verified_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the quote was verified."
          }
        },
        "additionalProperties": false
      },
      "CatalogueResponse": {
        "type": "object",
        "description": "`GET /v1/models` — one page of the catalogue.",
        "required": [
          "version",
          "models"
        ],
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogueModel"
            },
            "description": "The rows on this page, in the catalogue's normalized order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Always `null` — never counted, always present."
          },
          "version": {
            "type": "string",
            "description": "The catalogue's version stamp: the newest row's change date, UTC.\nPositive timestamps beyond the supported calendar range use their decimal\nUnix timestamp in milliseconds instead of a date."
          }
        }
      },
      "ChargeSummary": {
        "type": "object",
        "description": "One runtime charge or settled setup-chat cost.\n\nField order is wire order — the struct is serialized straight to JSON, so\nthe row IS the wire shape.",
        "required": [
          "id",
          "tenant_id",
          "workspace_id",
          "charge_type",
          "posture",
          "model",
          "credit_deducted_nanos",
          "recorded_at"
        ],
        "properties": {
          "charge_type": {
            "type": "string",
            "description": "`receive`, `stage`, or `setup` (a settled setup-chat run)."
          },
          "credit_deducted_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "What this row drained, in nanos."
          },
          "fleet_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet charged for this work. Run charges retain the identifier after deletion. Setup\nchats use the saved fleet's identifier, or null before saving."
          },
          "fleet_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet name captured when a run charge was recorded; later renames do not change it.\n\nA value equal to `fleet_id` means no name was captured. Setup chats show the saved\nfleet's current name, or null before saving."
          },
          "id": {
            "type": "string",
            "description": "The runtime ledger row's or setup settlement's identifier."
          },
          "model": {
            "type": "string",
            "description": "The model used by the run or setup chat."
          },
          "posture": {
            "type": "string",
            "description": "Whose model bill the tokens landed on."
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row was written — the walk's sort key, and what its cursor\nhalf is rendered from."
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The setup run, or `null` for a fleet run. Identifies the charge\nwithout exposing the chat's content or depending on its retention."
          },
          "tenant_id": {
            "type": "string",
            "description": "Whose charge it is."
          },
          "token_count_input": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Recorded input tokens for a run or settled setup chat."
          },
          "token_count_output": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens out, likewise."
          },
          "turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The turn that triggered the work, or `null` for a setup chat."
          },
          "wall_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Recorded runtime in milliseconds."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace it was incurred in. It survives that workspace's\ndeletion, because a charge outlives what it was incurred on."
          }
        }
      },
      "ChargesResponse": {
        "type": "object",
        "description": "`GET /v1/tenants/me/billing/charges` — one page of the ledger.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChargeSummary"
            },
            "description": "The rows on this page, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page — emitted\neither way, for the module's null rule."
          }
        }
      },
      "CheckpointAuthorizationInput": {
        "type": "object",
        "description": "Acquire a restore pin, or refresh exact registered transfer material.",
        "required": [
          "fencing_token",
          "durable_task",
          "purpose"
        ],
        "properties": {
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "object_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Native object identities, never arbitrary bucket paths."
          },
          "pin_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Omitted only to bootstrap a restore pin and ordered pages."
          },
          "purpose": {
            "$ref": "#/components/schemas/CheckpointTransferPurpose",
            "description": "Read or upload authority, each checked natively."
          }
        },
        "additionalProperties": false
      },
      "CheckpointAuthorizations": {
        "type": "object",
        "description": "Restore bootstrap or bounded refresh, always including the native pin.",
        "required": [
          "plan",
          "objects"
        ],
        "properties": {
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointObject"
            },
            "description": "Requested scoped transfers; empty at restore bootstrap."
          },
          "plan": {
            "$ref": "#/components/schemas/CheckpointPlan",
            "description": "Bounded complete recovery descriptor."
          }
        }
      },
      "CheckpointCipher": {
        "type": "string",
        "description": "What seals a checkpoint's objects and history root under its workspace's key.",
        "enum": [
          "aes_256_gcm",
          "plain"
        ]
      },
      "CheckpointCommitInput": {
        "type": "object",
        "description": "Commit only after complete pages and registered objects verify.",
        "required": [
          "fencing_token",
          "durable_task",
          "pin_id",
          "manifest_root",
          "history_digest",
          "covered_input_sequence",
          "effect_watermark",
          "uploaded"
        ],
        "properties": {
          "covered_input_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Inputs included in the saved state.",
            "minimum": 0
          },
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "effect_watermark": {
            "type": "integer",
            "format": "int64",
            "description": "Confirmed effects incorporated locally, never merely observed remotely.",
            "minimum": 0
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "history_digest": {
            "type": "string",
            "description": "Complete compatible conversation digest."
          },
          "manifest_root": {
            "type": "string",
            "description": "Canonical ordered page-root digest."
          },
          "pin_id": {
            "type": "string",
            "description": "Current writer pin."
          },
          "uploaded": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Objects of this plan whose bound PUT the runner saw accepted. The\ncommit records `verified_at` for these. It refuses any object the\ngeneration names that has none."
          }
        },
        "additionalProperties": false
      },
      "CheckpointEntry": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaggedCheckpointFile",
                "description": "Ordinary file; special files are never captured."
              },
              {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "file"
                    ]
                  }
                }
              }
            ],
            "description": "Ordinary file; special files are never captured."
          },
          {
            "type": "object",
            "description": "An explicit directory, including empty directories.",
            "required": [
              "path",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "directory"
                ]
              },
              "path": {
                "type": "string",
                "description": "Workspace-relative directory path, including an otherwise empty directory."
              }
            }
          },
          {
            "type": "object",
            "description": "A relative non-escaping symlink, validated against its parent natively.",
            "required": [
              "path",
              "target",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "symlink"
                ]
              },
              "path": {
                "type": "string",
                "description": "Workspace-relative location at which the link is restored."
              },
              "target": {
                "type": "string",
                "description": "Link destination relative to its parent, checked for workspace escape."
              }
            }
          },
          {
            "type": "object",
            "description": "Explicit removal from the verified base, or from the parent a delta\nmanifest is applied over.",
            "required": [
              "path",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "remove"
                ]
              },
              "path": {
                "type": "string",
                "description": "Workspace-relative base entry to remove, including any descendants."
              }
            }
          }
        ],
        "description": "Complete logical entry or explicit deletion relative to the retained base."
      },
      "CheckpointKeyRotation": {
        "type": "object",
        "description": "What rotating a workspace's checkpoint key retired. The old key sealed all\nof it, so none of it can be restored.",
        "required": [
          "retired_generations",
          "retired_objects"
        ],
        "properties": {
          "retired_generations": {
            "type": "integer",
            "format": "int64",
            "description": "Checkpoint generations deleted, unfinished saves among them.",
            "minimum": 0
          },
          "retired_objects": {
            "type": "integer",
            "format": "int64",
            "description": "Stored objects whose deletion from the bucket is now owed.",
            "minimum": 0
          }
        }
      },
      "CheckpointLink": {
        "type": "object",
        "description": "One generation of a delta chain, as a restore reads it: its ordered pages\nand the root they hash to.",
        "required": [
          "checkpoint_id",
          "page_ids",
          "manifest_root"
        ],
        "properties": {
          "checkpoint_id": {
            "type": "string",
            "description": "The generation."
          },
          "manifest_root": {
            "type": "string",
            "description": "The canonical ordered page-root digest its commit recorded."
          },
          "page_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Its ordered pages."
          }
        },
        "additionalProperties": false
      },
      "CheckpointMode": {
        "type": "string",
        "description": "A verified base is retained separately from task recovery pointers.",
        "enum": [
          "retain_base",
          "incremental"
        ]
      },
      "CheckpointObject": {
        "type": "object",
        "description": "Registration projection; the key remains outside model/sandbox state.",
        "required": [
          "object_id",
          "repository",
          "plaintext",
          "status",
          "cipher"
        ],
        "properties": {
          "cipher": {
            "$ref": "#/components/schemas/CheckpointCipher",
            "description": "The cipher this object was registered under; a restore opens with it."
          },
          "ciphertext_length": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Frozen ciphertext length when already known.",
            "minimum": 0
          },
          "ciphertext_sha256": {
            "type": [
              "string",
              "null"
            ],
            "description": "Frozen ciphertext digest when already known."
          },
          "data_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace's checkpoint key, returned only to this native owner/reader."
          },
          "nonce": {
            "type": [
              "string",
              "null"
            ],
            "description": "The object's registered random nonce, base64 encoded."
          },
          "object_id": {
            "type": "string",
            "description": "Native random object identity."
          },
          "plaintext": {
            "$ref": "#/components/schemas/CheckpointPlaintext",
            "description": "Plaintext descriptor."
          },
          "repository": {
            "type": "string",
            "description": "Canonical scope for authenticated encryption."
          },
          "status": {
            "$ref": "#/components/schemas/CheckpointObjectStatus",
            "description": "Current ownership disposition."
          },
          "transfer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CheckpointTransfer",
                "description": "Exact scoped URL when requested."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CheckpointObjectStatus": {
        "type": "string",
        "description": "Native registration disposition.",
        "enum": [
          "missing",
          "reused",
          "busy"
        ]
      },
      "CheckpointObjectsInput": {
        "type": "object",
        "description": "Register a batch under one quota and ownership transaction.",
        "required": [
          "fencing_token",
          "durable_task",
          "pin_id",
          "objects"
        ],
        "properties": {
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointPlaintext"
            },
            "description": "One descriptor page."
          },
          "pin_id": {
            "type": "string",
            "description": "Current writer pin."
          }
        },
        "additionalProperties": false
      },
      "CheckpointObjectsPage": {
        "type": "object",
        "description": "Bounded current object page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointObject"
            },
            "description": "Complete objects for this request or bounded read page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Next native identity when more objects remain."
          }
        }
      },
      "CheckpointOperationId": {
        "type": "string",
        "description": "A canonical stored identifier; domain code converts it once to its native UUID type."
      },
      "CheckpointPage": {
        "type": "object",
        "description": "At most one mebibyte of the complete logical manifest.",
        "required": [
          "page_number",
          "entries",
          "history_objects"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointEntry"
            },
            "description": "Logical entries, bounded by complete serialized bytes."
          },
          "history_objects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compatible private conversation objects; not independently selected history."
          },
          "page_number": {
            "type": "integer",
            "format": "int32",
            "description": "Zero-based immutable page position.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CheckpointPageInput": {
        "type": "object",
        "description": "Publish one immutable manifest page with its exact digest.",
        "required": [
          "fencing_token",
          "durable_task",
          "pin_id",
          "digest",
          "contents"
        ],
        "properties": {
          "contents": {
            "$ref": "#/components/schemas/CheckpointPage",
            "description": "Bounded typed representation."
          },
          "digest": {
            "type": "string",
            "description": "Canonical SHA-256 of this complete page."
          },
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "pin_id": {
            "type": "string",
            "description": "Live writer pin."
          }
        },
        "additionalProperties": false
      },
      "CheckpointPin": {
        "type": "object",
        "description": "One capture or restore operation, renewed without extending its deadline.",
        "required": [
          "id",
          "resource_version",
          "operation_deadline",
          "expires_at"
        ],
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Current liveness deadline."
          },
          "id": {
            "type": "string",
            "description": "Native pin identity."
          },
          "operation_deadline": {
            "type": "string",
            "format": "date-time",
            "description": "Hard operation deadline."
          },
          "resource_version": {
            "type": "integer",
            "format": "int64",
            "description": "Compare-and-swap version for renewal.",
            "minimum": 0
          }
        }
      },
      "CheckpointPinInput": {
        "type": "object",
        "description": "Versioned reader/writer renewal.",
        "required": [
          "fencing_token",
          "durable_task",
          "resource_version"
        ],
        "properties": {
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "resource_version": {
            "type": "integer",
            "format": "int64",
            "description": "Existing pin version.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CheckpointPlaintext": {
        "type": "object",
        "description": "Trusted capture's plaintext descriptor; no storage key is caller-selected.",
        "required": [
          "sha256",
          "size",
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "Declared file, Git or history bytes."
          },
          "sha256": {
            "type": "string",
            "description": "Private plaintext SHA-256, verified again after decryption."
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "description": "Plaintext chunk length in bytes. Bounded by the largest chunk sealed\nin one authenticated buffer, which no capture exceeds.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CheckpointPlan": {
        "type": "object",
        "description": "Native recovery descriptor, bounded independently of manifest size.",
        "required": [
          "checkpoint_id",
          "generation",
          "chain",
          "mode",
          "repository",
          "format_version",
          "toolbox_digest",
          "page_ids",
          "base_page_ids",
          "covered_input_sequence",
          "effect_watermark",
          "expires_at",
          "pin",
          "replayed"
        ],
        "properties": {
          "base_commit_oid": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact base commit, independent of a later published branch head."
          },
          "base_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Retained base identity when present."
          },
          "base_manifest_root": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ordered retained-base root, checked before overlaying local changes."
          },
          "base_page_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Verified retained base pages, read through the same scoped page resource."
          },
          "chain": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointLink"
            },
            "description": "Every generation the delta resolves through, its full manifest first\nand `parent` last; empty for a full manifest."
          },
          "checkpoint_id": {
            "type": "string",
            "description": "Native task-bound plan."
          },
          "covered_input_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Inputs actually incorporated in this state.",
            "minimum": 0
          },
          "effect_watermark": {
            "type": "integer",
            "format": "int64",
            "description": "Confirmed outcomes incorporated in this state.",
            "minimum": 0
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Deadline established once when the plan is created."
          },
          "format_version": {
            "type": "integer",
            "format": "int32",
            "description": "Required restore format.",
            "minimum": 0
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Checkpoint ordering, distinct from the task generation.",
            "minimum": 0
          },
          "history_digest": {
            "type": [
              "string",
              "null"
            ],
            "description": "History state bound to the same file generation."
          },
          "manifest_root": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absent until native verification commits."
          },
          "mode": {
            "$ref": "#/components/schemas/CheckpointMode",
            "description": "Base or incremental state."
          },
          "page_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Complete ordered pages; never an unbounded inline manifest."
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The generation this plan's pages are a delta against; absent for a\nfull manifest."
          },
          "pin": {
            "$ref": "#/components/schemas/CheckpointPin",
            "description": "Current writer/reader pin."
          },
          "replayed": {
            "type": "boolean",
            "description": "Immutable plan replay."
          },
          "repository": {
            "type": "string",
            "description": "Repository identity selected by native task authority."
          },
          "sandbox": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CheckpointSandbox",
                "description": "The sandbox the files were taken in, which a restore lands them only\nin; absent for a task that ran with none."
              },
              {
                "type": "null"
              }
            ]
          },
          "toolbox_digest": {
            "type": "string",
            "description": "Host-local toolbox compatibility."
          }
        }
      },
      "CheckpointPlanInput": {
        "type": "object",
        "description": "Allocate immutable page identities before capture uploads.",
        "required": [
          "fencing_token",
          "operation_id",
          "durable_task",
          "mode",
          "format_version",
          "toolbox_digest",
          "page_count",
          "new_bytes",
          "logical_bytes",
          "entry_count"
        ],
        "properties": {
          "base_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "An already verified base; omitted for repository-free tasks."
          },
          "commit_oid": {
            "type": [
              "string",
              "null"
            ],
            "description": "Captured repository head; an incremental plan can use an older retained base."
          },
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current objective version."
          },
          "entry_count": {
            "type": "integer",
            "format": "int32",
            "description": "Expanded entries, checked again against complete pages. Bounded by its\nPostgres `INTEGER` column.",
            "minimum": 0
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing fleet-thread authority.",
            "minimum": 0
          },
          "format_version": {
            "type": "integer",
            "format": "int32",
            "description": "Restore format, independently checked by the daemon: version 1 is the\nonly one.",
            "minimum": 0
          },
          "logical_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Expanded logical state, independent of deduplication. Bounded by its\nPostgres `BIGINT` column.",
            "minimum": 0
          },
          "mode": {
            "$ref": "#/components/schemas/CheckpointMode",
            "description": "Initial retained source or an incremental logical state."
          },
          "new_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "The most this save's unique new chunks upload: each uncompressed, with\nits authentication tag and its stored form's byte.\nThe daemon refuses it above its ceiling for the save's mode and\nrecords it as the plan's upload budget. Bounded by its Postgres\n`BIGINT` column.",
            "minimum": 0
          },
          "operation_id": {
            "type": "string",
            "description": "Retry identity; replay returns this exact plan."
          },
          "page_count": {
            "type": "integer",
            "format": "int32",
            "description": "Ordered page identities to allocate.",
            "minimum": 0
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The generation this plan's pages are a delta against: the task's\ncurrent checkpoint. Absent for a full manifest."
          },
          "sandbox": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CheckpointSandbox",
                "description": "The sandbox the files were taken in; absent for a task that ran with\nnone."
              },
              {
                "type": "null"
              }
            ]
          },
          "toolbox_digest": {
            "type": "string",
            "description": "Pinned host-local toolbox, excluded from checkpoint bytes."
          }
        },
        "additionalProperties": false
      },
      "CheckpointSandbox": {
        "type": "object",
        "description": "The sandbox a checkpoint's files were taken in. A restore lands them only\nin a sandbox of the same engine and guest agent image.",
        "required": [
          "engine"
        ],
        "properties": {
          "engine": {
            "$ref": "#/components/schemas/SandboxEngine",
            "description": "The engine that built it."
          },
          "guest_agent_digest": {
            "type": [
              "string",
              "null"
            ],
            "description": "The SHA-256 of the image its guest agent booted from; absent when the\nengine names none."
          }
        },
        "additionalProperties": false
      },
      "CheckpointTransfer": {
        "type": "object",
        "description": "Exact scoped transfer material, redacted from debug output.",
        "required": [
          "url",
          "headers",
          "expires_at"
        ],
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Deadline shared with native pin custody."
          },
          "headers": {
            "type": "object",
            "description": "Exact signed headers; create-only uploads cannot omit them.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "description": "Short-lived supervisor-only URL."
          }
        }
      },
      "CheckpointTransferPurpose": {
        "type": "string",
        "description": "Supervisor-only read purpose.",
        "enum": [
          "upload",
          "restore"
        ]
      },
      "CheckpointUpload": {
        "type": "object",
        "description": "One frozen ciphertext representation, registered before its first URL.",
        "required": [
          "object_id",
          "ciphertext_sha256",
          "ciphertext_length"
        ],
        "properties": {
          "ciphertext_length": {
            "type": "integer",
            "format": "int64",
            "description": "Stored length: the chunk, compressed when that shrinks it. Under\n`aes_256_gcm` it adds a 16-byte tag, and one byte names the stored\nform. It is never more than the registration was charged. Bounded\nby the largest stored object: a full chunk, the tag and the form byte.",
            "minimum": 0
          },
          "ciphertext_sha256": {
            "type": "string",
            "description": "SHA-256 of the object as stored."
          },
          "object_id": {
            "type": "string",
            "description": "Native registration identity."
          }
        },
        "additionalProperties": false
      },
      "CheckpointUploadsInput": {
        "type": "object",
        "description": "Freeze an entire descriptor page atomically.",
        "required": [
          "fencing_token",
          "durable_task",
          "pin_id",
          "objects"
        ],
        "properties": {
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task version."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing run fence.",
            "minimum": 0
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckpointUpload"
            },
            "description": "One immutable descriptor page."
          },
          "pin_id": {
            "type": "string",
            "description": "Current writer pin."
          }
        },
        "additionalProperties": false
      },
      "ChoiceOption": {
        "type": "object",
        "description": "One mutually exclusive choice with its reviewed meaning.",
        "required": [
          "value",
          "description"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Reviewed semantic meaning, never an authority grant."
          },
          "value": {
            "type": "string",
            "description": "Stable option identity, including native task identities when associating."
          }
        },
        "additionalProperties": false
      },
      "Connected": {
        "type": "object",
        "description": "The provider connected successfully, but no dashboard redirect was available. The\nconnection is active; do not repeat Connect.",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Always `connected`; the same word a status read answers once the grant\nhas landed."
          }
        }
      },
      "ConnectionView": {
        "type": "object",
        "description": "One provider's connection, as a status read returns it.\n\nThis response carries no access token and no expiry. It tells you whether\nsomeone connected this provider, and what the connection is called.",
        "required": [
          "status"
        ],
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "What a person sees the connection called, when the grant named one."
          },
          "status": {
            "type": "string",
            "description": "Whether this workspace holds a landed grant — [`STATUS_CONNECTED`] or\n[`STATUS_NOT_CONNECTED`]."
          }
        }
      },
      "ConsentRedirect": {
        "type": "object",
        "description": "`POST …/connectors/{provider}/connect` — where a person is sent to consent.",
        "required": [
          "install_url"
        ],
        "properties": {
          "install_url": {
            "type": "string",
            "description": "Provider authorization URL containing signed, one-time connection state."
          }
        }
      },
      "ContextBudget": {
        "type": "object",
        "description": "Context-budget knobs. `model` and `context_cap_tokens` are upstream-populated\npassthrough — the runner does not interpret `model`.",
        "required": [
          "tool_window",
          "memory_checkpoint_every",
          "stage_chunk_threshold",
          "model",
          "context_cap_tokens"
        ],
        "properties": {
          "context_cap_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "The fleet's operating context cap, or zero when unresolved.",
            "minimum": 0
          },
          "memory_checkpoint_every": {
            "type": "integer",
            "format": "int32",
            "description": "How often a run checkpoints its memory.",
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "The active model, carried through without interpretation."
          },
          "stage_chunk_threshold": {
            "type": "number",
            "format": "float",
            "description": "Fill fraction at which a stage chunks rather than growing: 0 to 1 of\nthe context window.",
            "maximum": 1,
            "minimum": 0
          },
          "tool_window": {
            "type": "integer",
            "format": "int32",
            "description": "Tool results retained in the working window.",
            "minimum": 0
          }
        }
      },
      "CordonReason": {
        "type": "string",
        "description": "Why the daemon has stopped assigning new work to an operator-active host.",
        "enum": [
          "missed_heartbeats"
        ]
      },
      "CreateFleetRequest": {
        "type": "object",
        "description": "`POST /v1/workspaces/{workspace_id}/fleets`: a person's first message makes\nan active fleet and its first turn in one transaction.",
        "required": [
          "message",
          "operation_id"
        ],
        "properties": {
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageImage"
            },
            "description": "Images accompanying the first message."
          },
          "message": {
            "type": "string",
            "description": "What to say to the new fleet: 1 to 1,048,576 characters, with no NUL\ncharacter, counted on the decoded text."
          },
          "model_ref": {
            "type": "string",
            "description": "The workspace model to use; the workspace's selected model when omitted.",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Validated instance slug; `fleet-` and the last 12 hex digits of the new\nfleet's id when omitted.",
            "maxLength": 64,
            "minLength": 1
          },
          "operation_id": {
            "type": "string",
            "description": "Required retry identifier: a version 7 universally unique identifier\n(UUID). A retry with the same `operation_id` and request answers the\nfirst fleet; the same key with other text answers 409 `UZ-FLEET-004`.",
            "maxLength": 36,
            "minLength": 36
          }
        },
        "additionalProperties": false
      },
      "CreateInviteRequest": {
        "type": "object",
        "description": "`POST /v1/tenants/me/invites` — invite one address into the caller's account.",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "The address to invite. Stored lowercased; accepting requires the\nsigned-in account's address to equal it. A domain literal, an IP\ndomain, a domain without a dot, or over 254 characters is refused\nwith 400 `UZ-REQ-001`."
          }
        },
        "additionalProperties": false
      },
      "CreateModelEntryRequest": {
        "type": "object",
        "description": "Registers a model against a stored credential.\n\nUnknown request fields are refused.",
        "required": [
          "workspace_id",
          "model_id",
          "secret_ref"
        ],
        "properties": {
          "model_id": {
            "type": "string",
            "description": "The model to register."
          },
          "secret_ref": {
            "type": "string",
            "description": "The credential to back it with. Immutable once the entry exists."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace holding the credential. Must belong to your account."
          }
        },
        "additionalProperties": false
      },
      "CreateWorkspaceRequest": {
        "type": "object",
        "description": "`POST /v1/workspaces` — create one.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the workspace will be called, when the caller cares."
          }
        },
        "additionalProperties": false
      },
      "CreatedFleet": {
        "type": "object",
        "description": "`POST /v1/workspaces/{workspace_id}/fleets`: the fleet and its first turn.",
        "required": [
          "fleet",
          "accepted",
          "replayed"
        ],
        "properties": {
          "accepted": {
            "$ref": "#/components/schemas/FirstTurn",
            "description": "The first message, as the fleet's first turn."
          },
          "fleet": {
            "$ref": "#/components/schemas/FleetResponse_Value",
            "description": "The created fleet."
          },
          "replayed": {
            "type": "boolean",
            "description": "Whether an earlier create with the same `operation_id` already made\nthis fleet: `true` on a repeat, which answers 200."
          }
        }
      },
      "CreatedWorkspaceResponse": {
        "type": "object",
        "description": "What creating answers with.",
        "required": [
          "workspace_id",
          "name",
          "request_id",
          "tenant_id"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Its name — echoed when chosen, revealed when generated."
          },
          "request_id": {
            "type": "string",
            "description": "The correlation token for this request, repeated in the body."
          },
          "tenant_id": {
            "type": "string",
            "description": "Account identifier assigned by the server to the new workspace."
          },
          "workspace_id": {
            "type": "string",
            "description": "The new workspace's identifier."
          }
        }
      },
      "CurrentUserResponse": {
        "type": "object",
        "description": "`GET /v1/users/me` — the person, the tenant, and how they proved it.",
        "required": [
          "user_id",
          "email",
          "tenant_id",
          "tenant_name",
          "credential",
          "scopes"
        ],
        "properties": {
          "credential": {
            "type": "string",
            "description": "How you signed in: `session_token`, `tenant_api_key`, or `cli_credential`."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your display name. Absent when the account never set one."
          },
          "email": {
            "type": "string",
            "description": "The address this account was opened with."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What you may do. Each entry is a scope name, such as `fleet:read`.\n\nAn empty list means you hold no scopes. The key is always present."
          },
          "tenant_id": {
            "type": "string",
            "description": "The tenant you act in."
          },
          "tenant_name": {
            "type": "string",
            "description": "That tenant's display name."
          },
          "user_id": {
            "type": "string",
            "description": "Your own identifier. Stable for the life of the account."
          }
        }
      },
      "CursorPage_WorkspaceModel": {
        "type": "object",
        "description": "One page of results. `total` is null when unavailable; `next_cursor` is null on the last\npage.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A priced explicit selection owned by the workspace's billing account.",
              "required": [
                "ref",
                "is_default",
                "label",
                "provider",
                "model",
                "context_window_tokens",
                "eligibility",
                "pricing"
              ],
              "properties": {
                "context_window_tokens": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Catalogue context bound."
                },
                "eligibility": {
                  "$ref": "#/components/schemas/Eligibility",
                  "description": "Supported purposes."
                },
                "is_default": {
                  "type": "boolean",
                  "description": "Whether this is the default model for new fleets in the workspace.",
                  "x-stability": "stable"
                },
                "label": {
                  "type": "string",
                  "description": "Display label."
                },
                "max_output_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Maximum output tokens; omitted when model settings are not configured."
                },
                "model": {
                  "type": "string",
                  "description": "Provider model identifier."
                },
                "pricing": {
                  "$ref": "#/components/schemas/ModelPricing",
                  "description": "Exact current rates."
                },
                "provider": {
                  "type": "string",
                  "description": "Approved provider identifier."
                },
                "ref": {
                  "type": "string",
                  "description": "Model selection reference, including an explicit shared platform default. Use it\nunchanged as a fleet's `model_ref`."
                }
              }
            },
            "description": "Current bounded rows."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Use this value unchanged for the next page, or stop when null."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Known total, or null.",
            "minimum": 0
          }
        }
      },
      "DecisionAnswer": {
        "oneOf": [
          {
            "type": "object",
            "description": "Probability of yes; thresholds remain native policy.",
            "required": [
              "noul",
              "type"
            ],
            "properties": {
              "noul": {
                "type": "number",
                "format": "double",
                "description": "Probability from zero to one."
              },
              "type": {
                "type": "string",
                "enum": [
                  "noul"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Categorical choice with its complete probability distribution.",
            "required": [
              "choice",
              "probabilities",
              "type"
            ],
            "properties": {
              "choice": {
                "type": "string",
                "description": "Selected option identity."
              },
              "confidence": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "description": "Provider-native confidence, absent when unavailable."
              },
              "probabilities": {
                "type": "object",
                "description": "Probability of every allowed option.",
                "additionalProperties": {
                  "type": "number",
                  "format": "double"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "choice"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Probability-weighted ordered rubric.",
            "required": [
              "score",
              "probabilities",
              "type"
            ],
            "properties": {
              "confidence": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "description": "Provider-native confidence, absent when unavailable."
              },
              "probabilities": {
                "type": "object",
                "description": "Distribution over zero-based levels.",
                "additionalProperties": {
                  "type": "number",
                  "format": "double"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "score": {
                "type": "number",
                "format": "double",
                "description": "Expected zero-based level."
              },
              "type": {
                "type": "string",
                "enum": [
                  "score"
                ]
              }
            }
          }
        ],
        "description": "Native probability answers after exact question/type/option validation."
      },
      "DecisionApi": {
        "type": "string",
        "description": "Native decision protocols; none is a structured-chat substitute.",
        "enum": [
          "typesafe",
          "openai",
          "perplexity",
          "cloudflare"
        ]
      },
      "DecisionAssessment": {
        "oneOf": [
          {
            "type": "object",
            "description": "Assess one completed action group against its task's statements.",
            "required": [
              "action_group_id",
              "kind"
            ],
            "properties": {
              "action_group_id": {
                "type": "string",
                "description": "Trusted supervisor identity retained through this logical assessment."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "goal"
                ]
              }
            }
          }
        ],
        "description": "The native meaning being assessed, independently of its physical calls:\none completed action group against its task's completion statements."
      },
      "DecisionAssignment": {
        "type": "object",
        "description": "One reviewed catalogue revision, retained unchanged for this run.\nProvider keys are resolved separately for each reserved physical call.",
        "required": [
          "revision_id",
          "profile",
          "goal"
        ],
        "properties": {
          "goal": {
            "$ref": "#/components/schemas/GoalDecisionPolicy",
            "description": "Goal acceptance thresholds reviewed with the profile."
          },
          "profile": {
            "$ref": "#/components/schemas/DecisionProfile",
            "description": "Protocol, endpoint, model and capabilities from that same revision."
          },
          "revision_id": {
            "type": "string",
            "description": "Native immutable revision identity used to resolve rates and authority."
          }
        },
        "additionalProperties": false
      },
      "DecisionCallState": {
        "type": "string",
        "description": "Native physical-call lifecycle; unresolved calls retain their reservation.",
        "enum": [
          "issued",
          "known",
          "unknown",
          "not_sent"
        ]
      },
      "DecisionCapabilities": {
        "type": "object",
        "description": "Capabilities reviewed with a catalogue profile; unsupported work is refused.",
        "required": [
          "noul",
          "choice",
          "score"
        ],
        "properties": {
          "choice": {
            "type": "boolean",
            "description": "Selected option and full distribution."
          },
          "noul": {
            "type": "boolean",
            "description": "True/false probability."
          },
          "score": {
            "type": "boolean",
            "description": "Ordered rubric and full distribution."
          }
        },
        "additionalProperties": false
      },
      "DecisionDispatch": {
        "type": "object",
        "description": "One-use material for the trusted supervisor, outside model and sandbox state.\nThe shared redaction owner supplies credential-safe Debug formatting.",
        "required": [
          "assessment_id",
          "attempt",
          "assignment",
          "request",
          "api_key",
          "expires_at"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Fresh platform-admin secret; immediately move into the existing guard."
          },
          "assessment_id": {
            "type": "string",
            "description": "Stable logical assessment shared by its at most two physical calls."
          },
          "assignment": {
            "$ref": "#/components/schemas/DecisionAssignment",
            "description": "Reviewed selection already frozen on the original run."
          },
          "attempt": {
            "type": "integer",
            "format": "int32",
            "description": "Zero for the original call, one for its approved throttling retry.",
            "minimum": 0
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Native issuance deadline; the client also bounds its physical timeout."
          },
          "request": {
            "$ref": "#/components/schemas/DecisionRequest",
            "description": "Native call identity, evidence and accepted questions for this send."
          }
        },
        "additionalProperties": false
      },
      "DecisionDurableTaskVersion": {
        "type": "object",
        "description": "Task identity and generation supplied from the native run context.",
        "required": [
          "durable_task_id",
          "generation"
        ],
        "properties": {
          "durable_task_id": {
            "type": "string",
            "description": "The current run's objective; not another task selected by model text."
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Expected current task generation, without resetting cumulative usage.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DecisionInvalid": {
        "type": "string",
        "description": "Why a readable provider response cannot drive a native transition.",
        "enum": [
          "model",
          "usage",
          "answers"
        ]
      },
      "DecisionModelSettings": {
        "type": "object",
        "description": "Editable, non-secret model settings; catalogue identity is supplied natively.",
        "required": [
          "revision",
          "api",
          "endpoint",
          "accepted_models",
          "capabilities",
          "input_max_bytes",
          "goal",
          "evaluation_digest",
          "evaluation_source_url",
          "evaluated_at"
        ],
        "properties": {
          "accepted_models": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1048576,
              "minLength": 1
            },
            "description": "Provider-reported names supported by this revision's evaluation evidence.",
            "minItems": 1
          },
          "api": {
            "$ref": "#/components/schemas/DecisionApi",
            "description": "Native decision API; never inferred from a provider or model name."
          },
          "capabilities": {
            "$ref": "#/components/schemas/DecisionCapabilities",
            "description": "Question types verified against the provider API for this definition."
          },
          "endpoint": {
            "type": "string",
            "description": "Exact reviewed HTTPS endpoint, including its API path.",
            "maxLength": 1048576,
            "minLength": 1
          },
          "evaluated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Recorded evaluation instant; actual activation proof remains an operator duty."
          },
          "evaluation_digest": {
            "type": "string",
            "description": "Digest of the frozen evaluation inputs and graded outcomes.",
            "pattern": "^[0-9a-f]{64}$"
          },
          "evaluation_source_url": {
            "type": "string",
            "description": "Evidence location reviewed before activation; it carries no credentials.",
            "maxLength": 1048576,
            "minLength": 1
          },
          "goal": {
            "$ref": "#/components/schemas/GoalDecisionPolicy",
            "description": "Goal question and threshold policy."
          },
          "input_max_bytes": {
            "type": "integer",
            "format": "int32",
            "description": "Complete encoded-request ceiling established for the provider.",
            "minimum": 1
          },
          "revision": {
            "type": "string",
            "description": "Immutable reviewed definition revision; changing settings needs a new one.",
            "maxLength": 2676,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        },
        "additionalProperties": false
      },
      "DecisionNotSentCause": {
        "type": "string",
        "description": "Failures that prove the SDK never sent a physical provider request.",
        "enum": [
          "preflight",
          "build"
        ]
      },
      "DecisionOutcome": {
        "oneOf": [
          {
            "type": "object",
            "description": "Complete typed evidence, still subject to native thresholds and authority.",
            "required": [
              "answers",
              "outcome"
            ],
            "properties": {
              "answers": {
                "type": "object",
                "description": "Exact reviewed question-key coverage.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/DecisionAnswer"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "answered"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The provider declined at least one required question.",
            "required": [
              "outcome"
            ],
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "refused"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The response cannot authorize a semantic transition.",
            "required": [
              "reason",
              "outcome"
            ],
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "invalid"
                ]
              },
              "reason": {
                "$ref": "#/components/schemas/DecisionInvalid",
                "description": "Bounded native diagnostic, without provider text."
              }
            }
          }
        ],
        "description": "A readable physical result, separately from whether it may advance work."
      },
      "DecisionProfile": {
        "type": "object",
        "description": "Non-secret catalogue metadata frozen for a run's selected decision model.",
        "required": [
          "model_id",
          "revision",
          "api",
          "endpoint",
          "model",
          "accepted_models",
          "capabilities",
          "input_max_bytes"
        ],
        "properties": {
          "accepted_models": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Reviewed reported model names; activation owns alias/version evidence."
          },
          "api": {
            "$ref": "#/components/schemas/DecisionApi",
            "description": "Native API selected by its catalogue entry."
          },
          "capabilities": {
            "$ref": "#/components/schemas/DecisionCapabilities",
            "description": "Capabilities verified for this exact profile revision."
          },
          "endpoint": {
            "type": "string",
            "description": "Exact reviewed HTTPS endpoint, including the native API path."
          },
          "input_max_bytes": {
            "type": "integer",
            "format": "int32",
            "description": "Conservative serialized evidence/question byte ceiling established for\nthis profile, preventing providers from silently truncating its input.",
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "Requested model; an alias is not evidence of a resolved serving version.",
            "maxLength": 2595,
            "minLength": 1
          },
          "model_id": {
            "type": "string",
            "description": "Catalogue model identity; this is not another model registry."
          },
          "revision": {
            "type": "string",
            "description": "Reviewed profile revision used for acceptance and accounting."
          }
        },
        "additionalProperties": false
      },
      "DecisionPurpose": {
        "type": "string",
        "description": "Why the native runtime reserved a physical decision call.",
        "enum": [
          "goal"
        ]
      },
      "DecisionQuestion": {
        "oneOf": [
          {
            "type": "object",
            "description": "True/false assessment with explicit criteria.",
            "required": [
              "instructions",
              "criteria",
              "type"
            ],
            "properties": {
              "criteria": {
                "$ref": "#/components/schemas/NoulCriteria",
                "description": "Reviewed criteria for both answers."
              },
              "instructions": {
                "type": "string",
                "description": "The question to evaluate."
              },
              "type": {
                "type": "string",
                "enum": [
                  "noul"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Choice among a complete fixed option set.",
            "required": [
              "instructions",
              "options",
              "type"
            ],
            "properties": {
              "instructions": {
                "type": "string",
                "description": "The question to evaluate."
              },
              "options": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChoiceOption"
                },
                "description": "Every eligible task plus new-work and unclear fit, without truncation."
              },
              "type": {
                "type": "string",
                "enum": [
                  "choice"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Probability-weighted rating over an ordered rubric.",
            "required": [
              "instructions",
              "levels",
              "type"
            ],
            "properties": {
              "instructions": {
                "type": "string",
                "description": "The question to evaluate."
              },
              "levels": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Rubric from lowest to highest, with zero-based numeric levels."
              },
              "type": {
                "type": "string",
                "enum": [
                  "score"
                ]
              }
            }
          }
        ],
        "description": "The typed question forms used for intent and goal evaluation."
      },
      "DecisionReceipt": {
        "oneOf": [
          {
            "type": "object",
            "description": "A decoded provider result, including refused/invalid semantic answers.",
            "required": [
              "result",
              "outcome"
            ],
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "provider"
                ]
              },
              "result": {
                "$ref": "#/components/schemas/DecisionResult",
                "description": "Known usage is preserved independently of semantic acceptance."
              }
            }
          },
          {
            "type": "object",
            "description": "The physical outcome remains unknown; no zero-cost line is inserted.",
            "required": [
              "cause",
              "outcome"
            ],
            "properties": {
              "cause": {
                "$ref": "#/components/schemas/DecisionUnavailableCause",
                "description": "Bounded cause, never raw provider text or endpoint data."
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "unknown"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The supervisor proved that no provider request was sent.",
            "required": [
              "cause",
              "outcome"
            ],
            "properties": {
              "cause": {
                "$ref": "#/components/schemas/DecisionNotSentCause",
                "description": "Unknown transport outcomes cannot inhabit this proved-unsent type."
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "not_sent"
                ]
              }
            }
          }
        ],
        "description": "Usage remains accountable when semantics or current task authority fail."
      },
      "DecisionReceiptInput": {
        "type": "object",
        "description": "PATCH and late renew/report receipts share the same native recorder.",
        "required": [
          "fencing_token",
          "receipt"
        ],
        "properties": {
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The original call's fence, not permission to advance a later task.",
            "minimum": 0
          },
          "receipt": {
            "$ref": "#/components/schemas/DecisionReceipt",
            "description": "Canonical physical result or explicit uncertainty."
          }
        },
        "additionalProperties": false
      },
      "DecisionReceiptResult": {
        "type": "object",
        "description": "Confirms receipt accounting without claiming goal completion.",
        "required": [
          "call_id",
          "state",
          "replayed",
          "disposition",
          "reserved_nanos"
        ],
        "properties": {
          "call_id": {
            "type": "string",
            "description": "Original native call identity, even after run deletion."
          },
          "charged_nanos": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact native charge when priced or proved unsent; absent while unknown."
          },
          "disposition": {
            "$ref": "#/components/schemas/DecisionRecordDisposition",
            "description": "Current semantic usability; never an authority grant."
          },
          "overage_nanos": {
            "type": [
              "string",
              "null"
            ],
            "description": "Known cost above this call's provisional credit; related paid work stops."
          },
          "replayed": {
            "type": "boolean",
            "description": "Identical saved receipt, with no new charge or counter movement."
          },
          "reserved_nanos": {
            "type": "string",
            "description": "Remaining provisional credit, without claiming an unknown cost is zero."
          },
          "state": {
            "$ref": "#/components/schemas/DecisionCallState",
            "description": "Current durable accounting state."
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionUsage",
                "description": "Normalized provider categories, including known usage awaiting pricing."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "DecisionRecordDisposition": {
        "type": "string",
        "description": "Semantic usability is separate from a recorded charge and native authority.",
        "enum": [
          "current",
          "stale",
          "unusable"
        ]
      },
      "DecisionRecorded": {
        "type": "object",
        "description": "Recover a confirmed decision after an acknowledgement or worker was lost.",
        "required": [
          "request",
          "result",
          "disposition"
        ],
        "properties": {
          "disposition": {
            "$ref": "#/components/schemas/DecisionRecordDisposition",
            "description": "Saved results confer no authority when their context is stale."
          },
          "request": {
            "$ref": "#/components/schemas/DecisionRequest",
            "description": "Exact original evidence and accepted questions, not a fresh rendering."
          },
          "result": {
            "$ref": "#/components/schemas/DecisionResult",
            "description": "Original provider result, independently revalidated by native code."
          }
        },
        "additionalProperties": false
      },
      "DecisionRequest": {
        "type": "object",
        "description": "One physical request, reserved natively before any transport sends it.",
        "required": [
          "call_id",
          "purpose",
          "state",
          "questions"
        ],
        "properties": {
          "call_id": {
            "type": "string",
            "description": "Native physical call identity for accounting and reconciliation."
          },
          "purpose": {
            "$ref": "#/components/schemas/DecisionPurpose",
            "description": "Runtime-owned intent or goal purpose."
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NamedQuestion"
            },
            "description": "Complete reviewed question set; partial delivery is forbidden."
          },
          "state": {
            "description": "Complete evidence. Oversize input is refused, never silently shortened."
          }
        },
        "additionalProperties": false
      },
      "DecisionReservationInput": {
        "type": "object",
        "description": "Reserve one physical attempt; native code supplies the accepted questions.",
        "required": [
          "operation_id",
          "fencing_token",
          "source_turn_id",
          "assessment",
          "evidence"
        ],
        "properties": {
          "assessment": {
            "$ref": "#/components/schemas/DecisionAssessment",
            "description": "Logical role; native state derives its identity and accepted questions."
          },
          "durable_task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionDurableTaskVersion",
                "description": "The current task and generation, including while routing another input.\nOnly a goal call debits this task; intent retains source attribution."
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "description": "Caller evidence stays data alongside native source and task identities."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Existing fleet-thread fence issued with the run.",
            "minimum": 0
          },
          "operation_id": {
            "type": "string",
            "description": "Retry identity of this reservation request, not a second physical send."
          },
          "retry_of": {
            "type": [
              "string",
              "null"
            ],
            "description": "First physical call when requesting its one permitted throttling retry."
          },
          "source_turn_id": {
            "type": "string",
            "description": "Admitted source whose meaning the call is assessing."
          }
        },
        "additionalProperties": false
      },
      "DecisionReservationResult": {
        "oneOf": [
          {
            "type": "object",
            "description": "A newly committed native issuance permits this one physical send.",
            "required": [
              "call_id",
              "dispatch",
              "status"
            ],
            "properties": {
              "call_id": {
                "type": "string",
                "description": "Native physical call, independent of the caller's operation id."
              },
              "dispatch": {
                "$ref": "#/components/schemas/DecisionDispatch",
                "description": "Contains credentials and is never included in model-visible output."
              },
              "status": {
                "type": "string",
                "enum": [
                  "dispatch"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The saved attempt is recoverable, but its credential is not replayed.",
            "required": [
              "call_id",
              "state",
              "status"
            ],
            "properties": {
              "call_id": {
                "type": "string",
                "description": "Native physical call being reconciled."
              },
              "recorded": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DecisionRecorded",
                    "description": "Saved data, without credentials, for a confirmed prior physical call."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "$ref": "#/components/schemas/DecisionCallState",
                "description": "Authoritative accounting state."
              },
              "status": {
                "type": "string",
                "enum": [
                  "existing"
                ]
              }
            }
          }
        ],
        "description": "Reservation replay never issues a second credential for the same call."
      },
      "DecisionResult": {
        "type": "object",
        "description": "Usage is retained even when the semantic result is refused or stale.",
        "required": [
          "result"
        ],
        "properties": {
          "reported_model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-reported name, without claiming an observable serving revision."
          },
          "result": {
            "$ref": "#/components/schemas/DecisionOutcome",
            "description": "Native interpretation of this physical response."
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionUsage",
                "description": "Measured usage, or an unknown reservation when unavailable."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "DecisionRetryDelay": {
        "oneOf": [
          {
            "type": "object",
            "description": "No provider delay; the caller still applies bounded jitter.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "unspecified"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The provider named a delay; the retry waits it out.",
            "required": [
              "milliseconds",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "within_budget"
                ]
              },
              "milliseconds": {
                "type": "integer",
                "format": "int32",
                "description": "Earliest retry, relative to the recorded failure.",
                "minimum": 0
              }
            }
          },
          {
            "type": "object",
            "description": "The provider named a delay too long for the wire's milliseconds.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "too_long"
                ]
              }
            }
          }
        ],
        "description": "Provider delay evidence without retaining raw headers or private text."
      },
      "DecisionThreshold": {
        "type": "object",
        "description": "Probability and native confidence requirements, in integer basis points:\n10,000 is one, so no requirement exceeds it.",
        "required": [
          "probability_bps",
          "confidence_bps"
        ],
        "properties": {
          "confidence_bps": {
            "type": "integer",
            "format": "int32",
            "description": "Required provider-native confidence; absence cannot meet this bound.",
            "maximum": 10000,
            "minimum": 0
          },
          "probability_bps": {
            "type": "integer",
            "format": "int32",
            "description": "The selected option's required probability; 10,000 means one.",
            "maximum": 10000,
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DecisionUnavailableCause": {
        "oneOf": [
          {
            "type": "object",
            "description": "The physical deadline elapsed without complete usage.",
            "required": [
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "timeout"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The transport failed after native issuance.",
            "required": [
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "transport"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "An HTTP refusal carried no normalized usage.",
            "required": [
              "status",
              "retry_delay",
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "provider_status"
                ]
              },
              "retry_delay": {
                "$ref": "#/components/schemas/DecisionRetryDelay",
                "description": "A long delay remains evidence and cannot become an immediate retry."
              },
              "status": {
                "type": "integer",
                "format": "int32",
                "description": "Status is recorded independently of any untrusted error body. HTTP\ndefines status codes as 100 through 599 (RFC 9110, section 15).",
                "minimum": 0
              }
            }
          },
          {
            "type": "object",
            "description": "Reply size, JSON or response shape prevented complete accounting.",
            "required": [
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "response"
                ]
              }
            }
          }
        ],
        "description": "Value-free physical failure; only recorded 429/529 evidence permits retry."
      },
      "DecisionUsage": {
        "type": "object",
        "description": "Measured provider token categories, without multiplying per-question totals.",
        "required": [
          "input_tokens",
          "output_tokens",
          "cached_input_tokens",
          "cache_write_tokens"
        ],
        "properties": {
          "cache_write_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Cache writes, already included in `input_tokens`.",
            "minimum": 0
          },
          "cached_input_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Input tokens served from cache, already included in `input_tokens`.",
            "minimum": 0
          },
          "input_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Complete input total, including cache reads and writes.",
            "minimum": 0
          },
          "output_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Completion tokens, including any provider-reported reasoning.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DeleteAllSessionsResponse": {
        "type": "object",
        "description": "What aborting every in-flight login answers with.",
        "required": [
          "aborted_count"
        ],
        "properties": {
          "aborted_count": {
            "type": "integer",
            "description": "How many were aborted by this call.",
            "minimum": 0
          }
        }
      },
      "DurableTaskAcceptedInput": {
        "type": "object",
        "description": "Recovery receipt for an acknowledged interpretation whose worker was lost.",
        "required": [
          "source_turn_id",
          "plan_digest",
          "item_id",
          "durable_task",
          "sequence",
          "action",
          "original_message",
          "accepted_text",
          "interpretation",
          "applied"
        ],
        "properties": {
          "accepted_text": {
            "type": "string",
            "description": "Exact accepted source slice."
          },
          "action": {
            "$ref": "#/components/schemas/DurableTaskInputAction",
            "description": "Accepted native action."
          },
          "applied": {
            "type": "boolean",
            "description": "Already incorporated natively; recovery restores meaning without applying it twice."
          },
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current task and generation that may apply this input."
          },
          "interpretation": {
            "type": "string",
            "description": "Accepted interpretation, never recomputed after recovery."
          },
          "item_id": {
            "type": "string",
            "description": "Immutable interpreted item."
          },
          "original_message": {
            "type": "string",
            "description": "Complete original human message, preserving mixed-request context."
          },
          "plan_digest": {
            "type": "string",
            "description": "Immutable complete interpretation digest."
          },
          "response_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Confirmed original answer when available, independent of the lost local history."
          },
          "sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Strict task-local input order.",
            "minimum": 0
          },
          "source_turn_id": {
            "type": "string",
            "description": "Original native turn, retained even after queue settlement."
          }
        }
      },
      "DurableTaskAcceptedInterpretation": {
        "type": "object",
        "description": "Complete immutable source interpretation, retained independently of a worker.",
        "required": [
          "source_turn_id",
          "plan_digest",
          "message",
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskRecoveredItem"
            },
            "description": "Native item identities in the accepted original order."
          },
          "message": {
            "type": "string",
            "description": "Complete original human text."
          },
          "plan_digest": {
            "type": "string",
            "description": "Complete accepted plan digest."
          },
          "source_turn_id": {
            "type": "string",
            "description": "Original admitted source."
          }
        }
      },
      "DurableTaskActivity": {
        "type": "object",
        "description": "Progress comes from native identities and counters, never model prose.",
        "required": [
          "activity_id",
          "operation",
          "phase",
          "completed"
        ],
        "properties": {
          "activity_id": {
            "type": "string",
            "description": "Physical decision or checkpoint operation identity."
          },
          "bytes": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskTransferBytes",
                "description": "Deduplicated ciphertext bytes; absent for decisions and historical frames."
              },
              {
                "type": "null"
              }
            ]
          },
          "completed": {
            "type": "integer",
            "format": "int32",
            "description": "Completed objects, never an inferred success percentage.",
            "minimum": 0
          },
          "durable_task_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Native task, absent during initial intent routing."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Selected model label."
          },
          "operation": {
            "$ref": "#/components/schemas/DurableTaskActivityOperation",
            "description": "Native operation category."
          },
          "phase": {
            "$ref": "#/components/schemas/DurableTaskActivityPhase",
            "description": "The current public stage."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Selected provider label; no credential or URL."
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Event-local observation order assigned by the daemon, never a worker clock.\n\nBounded by JavaScript's `Number.MAX_SAFE_INTEGER`, 2^53 - 1: the browser\nand the CLI read this JSON number as a double and order by it exactly.",
            "minimum": 0
          },
          "source_turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact original turn, when assessing human intent."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Total objects when known.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DurableTaskActivityHistory": {
        "type": "object",
        "description": "Retained activity, kept apart from the task's private history.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskActivityRecord"
            },
            "description": "The newest fact of each operation and stage, in observed order."
          }
        }
      },
      "DurableTaskActivityOperation": {
        "type": "string",
        "description": "The operation whose progress is being shown.",
        "enum": [
          "goal",
          "capture",
          "restore"
        ]
      },
      "DurableTaskActivityPhase": {
        "type": "string",
        "description": "A public stage, separate from authoritative task completion.",
        "enum": [
          "starting",
          "recorded",
          "unavailable",
          "preparing",
          "scanning",
          "uploading",
          "verifying",
          "saved",
          "restoring",
          "restored",
          "failed"
        ]
      },
      "DurableTaskActivityRecord": {
        "oneOf": [
          {
            "type": "object",
            "description": "A physical judgment started.",
            "required": [
              "progress",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "durable_task_decision_started"
                ]
              },
              "progress": {
                "$ref": "#/components/schemas/DurableTaskActivity",
                "description": "A physical judgment started."
              }
            }
          },
          {
            "type": "object",
            "description": "Its original receipt was recorded or remained unusable.",
            "required": [
              "progress",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "durable_task_decision_completed"
                ]
              },
              "progress": {
                "$ref": "#/components/schemas/DurableTaskActivity",
                "description": "Its original receipt was recorded or remained unusable."
              }
            }
          },
          {
            "type": "object",
            "description": "A bounded capture/restore stage advanced.",
            "required": [
              "progress",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "durable_task_transfer_progress"
                ]
              },
              "progress": {
                "$ref": "#/components/schemas/DurableTaskActivity",
                "description": "A bounded capture/restore stage advanced."
              }
            }
          }
        ],
        "description": "Saved progress uses the same discriminators as live activity."
      },
      "DurableTaskBindingItem": {
        "oneOf": [
          {
            "type": "object",
            "description": "Start a task whose objective is the span.",
            "required": [
              "source_start",
              "source_end",
              "title",
              "target",
              "statements",
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "new_work"
                ]
              },
              "source_end": {
                "type": "integer",
                "format": "int32",
                "description": "Exclusive byte offset."
              },
              "source_start": {
                "type": "integer",
                "format": "int32",
                "description": "Inclusive byte offset in the complete original human message."
              },
              "statements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DurableTaskStatement"
                },
                "description": "At least one statement, each with a unique id."
              },
              "target": {
                "$ref": "#/components/schemas/DurableTaskRequestedTarget",
                "description": "What the task works on; the daemon resolves its authority."
              },
              "title": {
                "type": "string",
                "description": "Compact label; the accepted objective remains the source text."
              }
            }
          },
          {
            "type": "object",
            "description": "Join the span to an unfinished task of the same fleet.",
            "required": [
              "source_start",
              "source_end",
              "durable_task_id",
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "steer"
                ]
              },
              "durable_task_id": {
                "type": "string",
                "description": "The unfinished task the span steers."
              },
              "source_end": {
                "type": "integer",
                "format": "int32",
                "description": "Exclusive byte offset."
              },
              "source_start": {
                "type": "integer",
                "format": "int32",
                "description": "Inclusive byte offset in the complete original human message."
              }
            }
          }
        ],
        "description": "One span of a person's message bound to durable work. It is a new task with\nthe statements it is judged done against, or a steer of an unfinished task.\n\nSpans are byte offsets into the complete source message; the daemon checks\ntheir UTF-8 boundaries and takes the text it accepts from them."
      },
      "DurableTaskBindingsInput": {
        "type": "object",
        "description": "Bind one span of the run's source message to durable work.",
        "required": [
          "fencing_token",
          "source_turn_id",
          "plan_digest",
          "items"
        ],
        "properties": {
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Current thread fence.",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskBindingItem"
            },
            "description": "The one item a tool call binds; a source turn takes one plan."
          },
          "plan_digest": {
            "type": "string",
            "description": "SHA-256 of `interpretation()`, computed independently by the daemon."
          },
          "source_turn_id": {
            "type": "string",
            "description": "The person's message: the run's head turn or one folded into it."
          }
        },
        "additionalProperties": false
      },
      "DurableTaskBindingsResponse": {
        "type": "object",
        "description": "Complete message receipt, stable across lost acknowledgements.",
        "required": [
          "items",
          "replayed"
        ],
        "properties": {
          "current_durable_task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskContext",
                "description": "Current run objective after binding, with native target and recovery state."
              },
              {
                "type": "null"
              }
            ]
          },
          "execution_deadline": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Current run's immutable ceiling after native task binding."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskItemBinding"
            },
            "description": "Accepted immutable items in their original order."
          },
          "replayed": {
            "type": "boolean",
            "description": "True when no new item, task, input or continuation was allocated."
          }
        }
      },
      "DurableTaskCheck": {
        "type": "object",
        "description": "One check run on the observed head, from any app (Actions, Vercel, Greptile).",
        "required": [
          "id",
          "name",
          "app",
          "status"
        ],
        "properties": {
          "app": {
            "type": "string",
            "description": "The app that posted it, by slug, such as `github-actions` or `vercel`."
          },
          "conclusion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recorded provider conclusion; absent until completed."
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "GitHub's check run identity.",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "The check's name as GitHub shows it."
          },
          "status": {
            "type": "string",
            "description": "Recorded provider status: `queued`, `in_progress` or `completed`."
          }
        }
      },
      "DurableTaskContext": {
        "type": "object",
        "description": "Context for a task-bound run; ordinary runs omit this owner.",
        "required": [
          "durable_task_id",
          "originating_item_id",
          "target",
          "generation",
          "stop_generation",
          "objective",
          "goal_digest",
          "questions",
          "state",
          "covered_input_sequence",
          "input_sequence",
          "effect_cursor",
          "confirmed_effect_watermark",
          "expires_at",
          "limits",
          "usage"
        ],
        "properties": {
          "checkpoint_generation": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Last complete saved generation, distinct from allocated failed plans.",
            "minimum": 0
          },
          "checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Compatible complete checkpoint, if one has been published."
          },
          "confirmed_effect_watermark": {
            "type": "integer",
            "format": "int64",
            "description": "Last confirmed effect covered by the saved state.",
            "minimum": 0
          },
          "covered_input_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Inputs whose meaning is included in the supplied state.",
            "minimum": 0
          },
          "durable_task_id": {
            "type": "string",
            "description": "Native task identity; never selected by a tool result."
          },
          "effect_cursor": {
            "type": "integer",
            "format": "int64",
            "description": "Native ordinal offered for the next immutable publication identity.",
            "minimum": 0
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Existing wall deadline; waking does not extend it."
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Generation the next semantic transition must assess.",
            "minimum": 0
          },
          "goal_digest": {
            "type": "string",
            "description": "Digest of the frozen objective and completion questions."
          },
          "input_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Last accepted input; recovery must incorporate any gap before new effects.",
            "minimum": 0
          },
          "limits": {
            "$ref": "#/components/schemas/DurableTaskLimits",
            "description": "Cumulative bounds, clamped by existing fleet/credit ceilings."
          },
          "objective": {
            "type": "string",
            "description": "Accepted objective: the span of the person's message that started the task."
          },
          "originating_item_id": {
            "type": "string",
            "description": "Immutable source item required for attributable task effects."
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NamedQuestion"
            },
            "description": "The task's completion statements, as named questions with both criteria."
          },
          "state": {
            "$ref": "#/components/schemas/DurableTaskState",
            "description": "Current durable state."
          },
          "stop_generation": {
            "type": "integer",
            "format": "int64",
            "description": "Committed cutoff for new effects.",
            "minimum": 0
          },
          "target": {
            "$ref": "#/components/schemas/DurableTaskTarget",
            "description": "Exact target selected by the native turn, never changed by recovered notes."
          },
          "usage": {
            "$ref": "#/components/schemas/DurableTaskUsage",
            "description": "Already consumed and reserved work."
          }
        }
      },
      "DurableTaskControlState": {
        "type": "string",
        "description": "Explicit human lifecycle control; completion requires native goal proof.",
        "enum": [
          "paused",
          "ready",
          "cancelled"
        ]
      },
      "DurableTaskDependency": {
        "type": "object",
        "description": "Current native dependency; reading it launches no remote checks.",
        "required": [
          "active",
          "head",
          "checks",
          "updated_at"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Whether this observation still owns an unconsumed, uncancelled wait."
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskCheck"
            },
            "description": "Check runs observed on the head when the wait was armed."
          },
          "head": {
            "type": "string",
            "description": "Exact branch head this wait observes."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the native wait was updated; not a fresh provider observation time."
          }
        }
      },
      "DurableTaskEffect": {
        "type": "object",
        "description": "No token or arbitrary remote response is exposed in this receipt.",
        "required": [
          "effect_id",
          "ordinal",
          "state",
          "expected_head",
          "tested_tree",
          "pull_request_url"
        ],
        "properties": {
          "commit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Confirmed commit only after native readback."
          },
          "effect_id": {
            "type": "string",
            "description": "Native effect `UUIDv7` discoverable after replacement-worker recovery."
          },
          "expected_head": {
            "type": "string",
            "description": "Recorded expected branch head."
          },
          "ordinal": {
            "type": "integer",
            "format": "int64",
            "description": "Task-local publication order, independent of response delivery.",
            "minimum": 0
          },
          "pull_request_url": {
            "type": "string",
            "description": "Exact accepted PR URL."
          },
          "state": {
            "$ref": "#/components/schemas/DurableTaskEffectState",
            "description": "Native state."
          },
          "tested_tree": {
            "type": "string",
            "description": "Verified candidate tree."
          }
        }
      },
      "DurableTaskEffectInput": {
        "type": "object",
        "description": "The supervisor has tested this exact tree against the recorded expected head.",
        "required": [
          "operation_id",
          "fencing_token",
          "durable_task",
          "source_item_id",
          "covered_input_sequence",
          "expected_head",
          "tested_tree",
          "changes"
        ],
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskFileChange"
            },
            "description": "Complete changes, bounded natively by their decoded bytes."
          },
          "covered_input_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Every accepted current-task input through this cursor was considered.",
            "minimum": 0
          },
          "durable_task": {
            "$ref": "#/components/schemas/DecisionDurableTaskVersion",
            "description": "Current selected task and generation."
          },
          "expected_head": {
            "type": "string",
            "description": "Exact native old head; GitHub compares it atomically during publication."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Current thread fence.",
            "minimum": 0
          },
          "operation_id": {
            "type": "string",
            "description": "Stable identity; a lost acknowledgement must reuse this operation."
          },
          "source_item_id": {
            "type": "string",
            "description": "Accepted originating action item."
          },
          "tested_tree": {
            "type": "string",
            "description": "Git tree actually tested in the isolated workspace."
          }
        },
        "additionalProperties": false
      },
      "DurableTaskEffectState": {
        "type": "string",
        "description": "Native publication state, retained independently of a runner response.",
        "enum": [
          "prepared",
          "issued",
          "confirmed",
          "unknown",
          "refused"
        ]
      },
      "DurableTaskEffectsPage": {
        "type": "object",
        "description": "Ordered complete effect recovery page.",
        "required": [
          "effects"
        ],
        "properties": {
          "effects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskEffect"
            },
            "description": "Includes unresolved and newly confirmed publications."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Native ordinal cursor when more rows remain."
          }
        }
      },
      "DurableTaskFileChange": {
        "type": "object",
        "description": "Complete content for one supported regular-file change.",
        "required": [
          "path"
        ],
        "properties": {
          "contents": {
            "type": [
              "string",
              "null"
            ],
            "description": "Standard base64 contents; null deletes a regular file."
          },
          "path": {
            "type": "string",
            "description": "Canonical relative Git path; no Git metadata."
          }
        },
        "additionalProperties": false
      },
      "DurableTaskHumanInput": {
        "type": "object",
        "description": "One complete saved human message; reading never consumes it.",
        "required": [
          "source_turn_id",
          "sequence",
          "message"
        ],
        "properties": {
          "accepted": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskAcceptedInterpretation",
                "description": "Already accepted meaning; recovery must answer it without reclassification."
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "Complete user text; never a truncated interpretation."
          },
          "sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Native FIFO position, independent of task-local input positions.",
            "minimum": 0
          },
          "source_turn_id": {
            "type": "string",
            "description": "Native source turn identity used for decision and consumption."
          }
        }
      },
      "DurableTaskInputAction": {
        "type": "string",
        "description": "What a bound item does to durable work.",
        "enum": [
          "steer",
          "new_work"
        ]
      },
      "DurableTaskInputCandidate": {
        "type": "object",
        "description": "A fleet's unfinished task, compact enough for a model to name the one a\nperson's message steers without loading its private evidence.",
        "required": [
          "durable_task_id",
          "title",
          "state",
          "generation"
        ],
        "properties": {
          "durable_task_id": {
            "type": "string",
            "description": "Native task identity."
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Current native generation, required for an accepted steer.",
            "minimum": 0
          },
          "state": {
            "$ref": "#/components/schemas/DurableTaskState",
            "description": "Current durable state."
          },
          "title": {
            "type": "string",
            "description": "User-facing compact objective name."
          }
        }
      },
      "DurableTaskInputMode": {
        "type": "string",
        "description": "One durable item can be applied once and answered once.",
        "enum": [
          "apply_here",
          "queued",
          "answered"
        ]
      },
      "DurableTaskInputReceiptInput": {
        "type": "object",
        "description": "Record a native input outcome, without reinterpreting any accepted item.",
        "required": [
          "fencing_token",
          "operation_id",
          "source_turn_id",
          "plan_digest",
          "item_id",
          "mode"
        ],
        "properties": {
          "durable_task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionDurableTaskVersion",
                "description": "Expected associated task; absent only for conversation or clarification."
              },
              {
                "type": "null"
              }
            ]
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Current thread fence.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "One native action within the complete accepted plan."
          },
          "mode": {
            "$ref": "#/components/schemas/DurableTaskInputMode",
            "description": "Native application or answer mode."
          },
          "operation_id": {
            "type": "string",
            "description": "Stable acknowledgement identity."
          },
          "plan_digest": {
            "type": "string",
            "description": "Complete immutable interpretation identity."
          },
          "response_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required only for a conversational answer; queued text is formed natively."
          },
          "source_turn_id": {
            "type": "string",
            "description": "Accepted native source, never an invented reply destination."
          }
        },
        "additionalProperties": false
      },
      "DurableTaskInputReceiptResult": {
        "type": "object",
        "description": "Acknowledges history and cursors, without claiming a task goal is complete.",
        "required": [
          "item_id",
          "mode",
          "replayed"
        ],
        "properties": {
          "covered_input_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Current covered input boundary when a task is associated.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "Accepted native item."
          },
          "mode": {
            "$ref": "#/components/schemas/DurableTaskInputMode",
            "description": "Committed historical outcome."
          },
          "replayed": {
            "type": "boolean",
            "description": "No repeated application, response or continuation was created."
          }
        }
      },
      "DurableTaskInputsResponse": {
        "type": "object",
        "description": "Complete bounded messages and eligible current work from the same run scope.",
        "required": [
          "source_turn_id",
          "inputs",
          "accepted_inputs",
          "durable_tasks"
        ],
        "properties": {
          "accepted_inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskAcceptedInput"
            },
            "description": "Accepted meaning not yet incorporated by the current native task cursor."
          },
          "current_durable_task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskContext",
                "description": "Current native objective and recovery pointer, including after interpretation replay."
              },
              {
                "type": "null"
              }
            ]
          },
          "current_interpretation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskAcceptedInterpretation",
                "description": "Current turn's complete saved meaning, including a conversation-only replay."
              },
              {
                "type": "null"
              }
            ]
          },
          "current_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Complete current human message, absent for native machine continuations.\nIts presence is established from native turn authority."
          },
          "durable_tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskInputCandidate"
            },
            "description": "At most sixteen unfinished native objectives."
          },
          "execution_deadline": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Immutable ceiling read with this run's current native ownership."
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskHumanInput"
            },
            "description": "Ascending native message order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absent when no next eligible input exists."
          },
          "source_turn_id": {
            "type": "string",
            "description": "Native turn owned by this run, including signed continuation events."
          }
        }
      },
      "DurableTaskItemBinding": {
        "type": "object",
        "description": "One accepted immutable item and the task it bound.",
        "required": [
          "item_id",
          "action",
          "applies_here"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/DurableTaskInputAction",
            "description": "What the item did."
          },
          "applies_here": {
            "type": "boolean",
            "description": "Whether the current run may apply this input at its next safe boundary."
          },
          "durable_task_generation": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Current native generation, including a wake caused by this input.",
            "minimum": 0
          },
          "durable_task_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The task the item started or steers."
          },
          "input_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Native FIFO cursor for an accepted existing-task input.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "Native immutable item `UUIDv7`."
          }
        }
      },
      "DurableTaskLimits": {
        "type": "object",
        "description": "Approved initial limits; a smaller existing fleet or credit limit wins.",
        "required": [
          "model_nanos",
          "wall_seconds",
          "running_seconds",
          "runs",
          "publications",
          "decision_calls"
        ],
        "properties": {
          "decision_calls": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum physical decision calls, including retries.",
            "minimum": 0
          },
          "model_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Total paid-model allowance, in whole nanodollars."
          },
          "publications": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum physical repair publication attempts.",
            "minimum": 0
          },
          "running_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Cumulative running time across all attempts.",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum distinct issued runs.",
            "minimum": 0
          },
          "wall_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Wall-clock lifetime including paused and waiting time.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DurableTaskRecoveredItem": {
        "type": "object",
        "description": "An accepted item and its already confirmed original reply, if any.",
        "required": [
          "binding",
          "accepted_text",
          "interpretation"
        ],
        "properties": {
          "accepted_text": {
            "type": "string",
            "description": "Exact accepted byte slice."
          },
          "binding": {
            "$ref": "#/components/schemas/DurableTaskItemBinding",
            "description": "Native current association; no new work is authorized by reading it."
          },
          "interpretation": {
            "type": "string",
            "description": "Immutable accepted interpretation."
          },
          "response_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Confirmed original response; absent means the item still needs an answer."
          }
        }
      },
      "DurableTaskRequestedTarget": {
        "oneOf": [
          {
            "type": "object",
            "description": "API-only work has no mandatory repository checkout or GitHub grant.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "api_only"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Existing-PR work must name an exact human-assigned same-repository PR.",
            "required": [
              "repository",
              "number",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "existing_pr"
                ]
              },
              "number": {
                "type": "integer",
                "format": "int32",
                "description": "Exact open PR requested by the person.",
                "minimum": 0
              },
              "repository": {
                "type": "string",
                "description": "Repository inside the fleet's approved GitHub grant."
              }
            }
          }
        ],
        "description": "Requested target; the daemon resolves its authority and exact remote identity."
      },
      "DurableTaskResponse": {
        "type": "object",
        "description": "Task detail with its completion statements and cumulative progress.",
        "required": [
          "etag",
          "title",
          "resource_version",
          "context"
        ],
        "properties": {
          "context": {
            "$ref": "#/components/schemas/DurableTaskContext",
            "description": "Accepted objective, completion statements, cursors and remaining limits."
          },
          "dependency": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskDependency",
                "description": "Current native dependency and saved check results; no remote refresh is implied."
              },
              {
                "type": "null"
              }
            ]
          },
          "etag": {
            "type": "string",
            "description": "Strong version shared with the response header and conditional writes."
          },
          "publication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskEffect",
                "description": "Latest publication receipt; only a confirmed receipt establishes a published head."
              },
              {
                "type": "null"
              }
            ]
          },
          "resource_version": {
            "type": "integer",
            "format": "int64",
            "description": "Version used by the strong resource tag.",
            "minimum": 0
          },
          "title": {
            "type": "string",
            "description": "User-facing title."
          }
        }
      },
      "DurableTaskState": {
        "type": "string",
        "description": "The durable objective's state, independent of its current turn.",
        "enum": [
          "ready",
          "running",
          "waiting",
          "blocked",
          "paused",
          "done",
          "cancelled",
          "exhausted"
        ]
      },
      "DurableTaskStatement": {
        "type": "object",
        "description": "A stable id, the question, and what a yes and a no each mean.",
        "required": [
          "id",
          "question",
          "criteria"
        ],
        "properties": {
          "criteria": {
            "$ref": "#/components/schemas/NoulCriteria",
            "description": "Both probability-of-yes criteria; neither is a permission grant."
          },
          "id": {
            "type": "string",
            "description": "Stable key a person's edit keeps when it rewords the statement.",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.-]+$"
          },
          "question": {
            "type": "string",
            "description": "The completion question, assessed against the task's evidence."
          }
        },
        "additionalProperties": false
      },
      "DurableTaskSummary": {
        "type": "object",
        "description": "Compact native state for the fleet's current-work panel.",
        "required": [
          "id",
          "title",
          "status",
          "resource_version",
          "generation",
          "created_at",
          "expires_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Native creation instant."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Existing cumulative deadline."
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Current task ownership generation.",
            "minimum": 0
          },
          "id": {
            "type": "string",
            "description": "Stable objective identifier."
          },
          "resource_version": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic native resource version.",
            "minimum": 0
          },
          "status": {
            "$ref": "#/components/schemas/DurableTaskState",
            "description": "Confirmed durable lifecycle state."
          },
          "title": {
            "type": "string",
            "description": "User-facing work title."
          }
        }
      },
      "DurableTaskTarget": {
        "oneOf": [
          {
            "type": "object",
            "description": "Repository-free work cannot acquire a coding checkout by implication.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "api_only"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Explicitly accepted existing same-repository pull request.",
            "required": [
              "repository",
              "repository_id",
              "number",
              "branch",
              "base",
              "head",
              "tree",
              "url",
              "kind"
            ],
            "properties": {
              "base": {
                "type": "string",
                "description": "Accepted base branch."
              },
              "branch": {
                "type": "string",
                "description": "Writable non-protected branch selected by the native turn."
              },
              "head": {
                "type": "string",
                "description": "Latest native confirmed branch head."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "existing_pr"
                ]
              },
              "number": {
                "type": "integer",
                "format": "int32",
                "description": "Accepted pull request number.",
                "minimum": 0
              },
              "repository": {
                "type": "string",
                "description": "Canonical owner/name from GitHub, never a guessed repository."
              },
              "repository_id": {
                "type": "integer",
                "format": "int64",
                "description": "Immutable native repository identity.",
                "minimum": 0
              },
              "tree": {
                "type": "string",
                "description": "Tree at that head."
              },
              "url": {
                "type": "string",
                "description": "Confirmed pull request link."
              }
            }
          }
        ],
        "description": "No repository is required for a repair performed only through APIs."
      },
      "DurableTaskTransferBytes": {
        "type": "object",
        "description": "Transfer facts, excluding speculative sends and repeated object references.",
        "required": [
          "acknowledged",
          "missing",
          "reused"
        ],
        "properties": {
          "acknowledged": {
            "type": "integer",
            "format": "int64",
            "description": "Unique bytes verified after upload or authenticated download.",
            "minimum": 0
          },
          "missing": {
            "type": "integer",
            "format": "int64",
            "description": "Known missing bytes still awaiting acknowledgement; not a total estimate.",
            "minimum": 0
          },
          "reused": {
            "type": "integer",
            "format": "int64",
            "description": "Unique bytes already present when native authorization was read.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DurableTaskUsage": {
        "type": "object",
        "description": "Measured usage retained on the objective, including stopped attempts.",
        "required": [
          "model_nanos",
          "running_nanos",
          "runs",
          "publications",
          "decision_calls"
        ],
        "properties": {
          "decision_calls": {
            "type": "integer",
            "format": "int32",
            "description": "Physical decision calls, including retries.",
            "minimum": 0
          },
          "model_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Measured paid-model cost, including coding and decision calls."
          },
          "publications": {
            "type": "integer",
            "format": "int32",
            "description": "Physical publication attempts.",
            "minimum": 0
          },
          "running_nanos": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative measured running time, in nanoseconds.",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "format": "int32",
            "description": "Distinct issued runs.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DurableTasksResponse": {
        "type": "object",
        "description": "A bounded page of unfinished work belonging to one fleet.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskSummary"
            },
            "description": "Newest work first; completed work remains available by its identity."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque keyset boundary, absent when no later work exists."
          }
        }
      },
      "EarlierCall": {
        "type": "object",
        "description": "One tool call an earlier turn's run made: what it called, with what, and\nwhat came back, as the model read it then.",
        "required": [
          "call_id",
          "tool",
          "arguments",
          "output",
          "status"
        ],
        "properties": {
          "arguments": {
            "type": "object",
            "description": "Every argument the call was made with, secret values masked."
          },
          "call_id": {
            "type": "string",
            "description": "The call's `{fence}:{n}` identifier, as the thread names it."
          },
          "output": {
            "type": "string",
            "description": "What the call returned, secret values masked."
          },
          "status": {
            "$ref": "#/components/schemas/ItemStatus",
            "description": "How it ended."
          },
          "tool": {
            "type": "string",
            "description": "The tool it called."
          }
        }
      },
      "EchoAnswer": {
        "type": "object",
        "description": "The echo a connector handshake is answered with.\n\nOne key, named by the provider, carrying the value the provider sent.",
        "additionalProperties": {
          "type": "string",
          "description": "The provider's own challenge field, echoed under its own name."
        }
      },
      "Eligibility": {
        "type": "object",
        "description": "What a model's saved settings support.",
        "required": [
          "runtime"
        ],
        "properties": {
          "runtime": {
            "type": "boolean",
            "description": "Runtime provider resolution is supported."
          }
        }
      },
      "EventsAnswer": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/EchoAnswer"
          },
          {
            "$ref": "#/components/schemas/Ignored"
          },
          {
            "$ref": "#/components/schemas/Accepted"
          }
        ],
        "description": "A handshake echo under the provider's field name, an ignored delivery with its reason, or an accepted delivery with its event identifier"
      },
      "ExecutionPolicy": {
        "type": "object",
        "description": "Everything a single run is permitted to do.",
        "required": [
          "network_policy",
          "tools",
          "mintable",
          "provider",
          "api_key",
          "inference_host",
          "http_origin_policies",
          "context"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Provider credential for this run. Secret — never logged, never echoed."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL override for a compatible provider."
          },
          "context": {
            "$ref": "#/components/schemas/ContextBudget",
            "description": "Context-budget knobs for the run."
          },
          "http_origin_policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HttpOriginPolicy"
            },
            "description": "Per-host request boundaries."
          },
          "inference": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelInference",
                "description": "Saved model inference settings, required for runtime provider connections."
              },
              {
                "type": "null"
              }
            ]
          },
          "inference_host": {
            "type": "string",
            "description": "Inference host to dial."
          },
          "mintable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mintable"
            },
            "description": "Integration credentials this run may request when needed."
          },
          "model_context_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Saved physical model context, independent of the fleet's operating cap.\nZero is unresolved and cannot authorize a provider connection.",
            "minimum": 0
          },
          "network_policy": {
            "$ref": "#/components/schemas/NetworkPolicy",
            "description": "Where the run may reach on the network."
          },
          "provider": {
            "type": "string",
            "description": "Inference provider name."
          },
          "repository_binding": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RepositoryBinding",
                "description": "Repositories the run is bound to, when it is bound to any."
              },
              {
                "type": "null"
              }
            ]
          },
          "secrets_map": {
            "description": "Static secrets substituted at the tool boundary. Free-form by design."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tools the run may call."
          }
        }
      },
      "ExtractRequest": {
        "type": "object",
        "description": "Read a single public page through a vendor.",
        "required": [
          "fencing_token",
          "call_number",
          "url"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The model's one-based tool call number.",
            "minimum": 1
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The current holder's fence.",
            "minimum": 0
          },
          "url": {
            "type": "string",
            "description": "The page's HTTPS URL. The daemon checks destination policy before dispatch.",
            "maxLength": 1048576,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "ExtractResponse": {
        "type": "object",
        "description": "One extracted page and its requested URL.",
        "required": [
          "vendor",
          "url",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "Full Markdown content returned by the reader."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page title, when known."
          },
          "url": {
            "type": "string",
            "description": "The requested page; vendors may follow redirects internally."
          },
          "vendor": {
            "type": "string",
            "description": "The vendor that read the page."
          }
        }
      },
      "FannedOut": {
        "type": "object",
        "description": "Result of a provider delivery, including how many matching fleets received a turn.",
        "required": [
          "matched",
          "enqueued"
        ],
        "properties": {
          "enqueued": {
            "type": "integer",
            "description": "Fleets given a new turn. May be lower than `matched` when some already received this\ndelivery. Retrying starts only newly matched fleets.",
            "minimum": 0
          },
          "matched": {
            "type": "integer",
            "description": "How many fleets subscribed to this delivery.",
            "minimum": 0
          }
        }
      },
      "FileChange": {
        "type": "object",
        "description": "One file an edit changed.",
        "required": [
          "path",
          "added",
          "removed"
        ],
        "properties": {
          "added": {
            "type": "integer",
            "format": "int64",
            "description": "Lines the call added to the file.",
            "minimum": 0
          },
          "path": {
            "type": "string",
            "description": "The file, as the call named it relative to its working directory,\nsecret values masked; never empty."
          },
          "removed": {
            "type": "integer",
            "format": "int64",
            "description": "Lines the call removed from it.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "Fired": {
        "type": "object",
        "description": "What an accepted schedule fire is answered with.",
        "required": [
          "turn_id",
          "replayed"
        ],
        "properties": {
          "replayed": {
            "type": "boolean",
            "description": "Whether an earlier attempt already produced it."
          },
          "turn_id": {
            "type": "string",
            "description": "The turn the fleet will run, or already ran."
          }
        }
      },
      "FirstTurn": {
        "type": "object",
        "description": "The first message a create accepted, as the fleet's first turn.",
        "required": [
          "turn_id",
          "disposition"
        ],
        "properties": {
          "disposition": {
            "$ref": "#/components/schemas/FirstTurnDisposition",
            "description": "Where it went."
          },
          "turn_id": {
            "type": "string",
            "description": "The turn the message became; filter the fleet's turn stream on it."
          }
        }
      },
      "FirstTurnDisposition": {
        "type": "string",
        "description": "Where a new fleet's first message went. Nothing runs ahead of it, so it\nnever joins a live run.",
        "enum": [
          "started",
          "queued"
        ]
      },
      "FleetItem": {
        "type": "object",
        "description": "One fleet of the run's workspace.",
        "required": [
          "fleet_id",
          "name",
          "status",
          "events_processed"
        ],
        "properties": {
          "events_processed": {
            "type": "string",
            "description": "How many turns it has processed, as a decimal string. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet's identifier: what `fleet_steer` and the turns read take. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "name": {
            "type": "string",
            "description": "Its saved name in this workspace. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "status": {
            "type": "string",
            "description": "Where it stands: `active` or `archived`. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "FleetResponse": {
        "type": "object",
        "description": "Shared fleet resource, returned by create, read and every change.",
        "required": [
          "id",
          "name",
          "status",
          "etag",
          "model_ref",
          "http_egress",
          "package_domains",
          "schedules",
          "triggers",
          "grants",
          "memory_access",
          "created_at",
          "updated_at",
          "events_processed",
          "budget_used_nanos",
          "pending_approvals"
        ],
        "properties": {
          "budget_used_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Exact lifetime spend in nanos."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp, such as `2026-10-24T05:00:00.000Z`."
          },
          "etag": {
            "type": "string",
            "description": "Strong resource tag for every change."
          },
          "events_processed": {
            "type": "string",
            "description": "Exact lifetime event count."
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Grant"
            },
            "description": "The secrets and integrations it asked for, and where each stands."
          },
          "http_egress": {
            "$ref": "#/components/schemas/HttpEgress",
            "description": "Where the fleet's HTTP tools may reach: `restricted` to the hosts of its\napproved access, or `public`. A new fleet is `restricted`."
          },
          "id": {
            "type": "string",
            "description": "Fleet identity."
          },
          "memory_access": {
            "$ref": "#/components/schemas/MemoryAccess",
            "description": "Current independent shared-memory permissions."
          },
          "model_ref": {
            "type": "string",
            "description": "The workspace model the fleet's runs use; copy one from\n`GET /v1/workspaces/{workspace_id}/models`."
          },
          "name": {
            "type": "string",
            "description": "Validated instance slug."
          },
          "package_domains": {
            "type": "boolean",
            "description": "Whether its HTTP tools may also reach the package registries. A new\nfleet may not."
          },
          "pending_approvals": {
            "type": "integer",
            "format": "int64",
            "description": "Current unanswered approval gates."
          },
          "schedules": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Stored schedule observations."
          },
          "status": {
            "type": "string",
            "description": "`active` or `archived`."
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trigger"
            },
            "description": "What else may wake it, as its rows hold them."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp, such as `2026-10-24T05:00:00.000Z`."
          }
        }
      },
      "FleetResponse_Value": {
        "type": "object",
        "description": "Shared fleet resource, returned by create, read and every change.",
        "required": [
          "id",
          "name",
          "status",
          "etag",
          "model_ref",
          "http_egress",
          "package_domains",
          "schedules",
          "triggers",
          "grants",
          "memory_access",
          "created_at",
          "updated_at",
          "events_processed",
          "budget_used_nanos",
          "pending_approvals"
        ],
        "properties": {
          "budget_used_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Exact lifetime spend in nanos."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp, such as `2026-10-24T05:00:00.000Z`."
          },
          "etag": {
            "type": "string",
            "description": "Strong resource tag for every change."
          },
          "events_processed": {
            "type": "string",
            "description": "Exact lifetime event count."
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Grant"
            },
            "description": "The secrets and integrations it asked for, and where each stands."
          },
          "http_egress": {
            "$ref": "#/components/schemas/HttpEgress",
            "description": "Where the fleet's HTTP tools may reach: `restricted` to the hosts of its\napproved access, or `public`. A new fleet is `restricted`."
          },
          "id": {
            "type": "string",
            "description": "Fleet identity."
          },
          "memory_access": {
            "$ref": "#/components/schemas/MemoryAccess",
            "description": "Current independent shared-memory permissions."
          },
          "model_ref": {
            "type": "string",
            "description": "The workspace model the fleet's runs use; copy one from\n`GET /v1/workspaces/{workspace_id}/models`."
          },
          "name": {
            "type": "string",
            "description": "Validated instance slug."
          },
          "package_domains": {
            "type": "boolean",
            "description": "Whether its HTTP tools may also reach the package registries. A new\nfleet may not."
          },
          "pending_approvals": {
            "type": "integer",
            "format": "int64",
            "description": "Current unanswered approval gates."
          },
          "schedules": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Stored schedule observations."
          },
          "status": {
            "type": "string",
            "description": "`active` or `archived`."
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trigger"
            },
            "description": "What else may wake it, as its rows hold them."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp, such as `2026-10-24T05:00:00.000Z`."
          }
        }
      },
      "FleetSteerAccepted": {
        "type": "object",
        "description": "What a fleet's steer was answered with.",
        "required": [
          "turn_id",
          "replayed"
        ],
        "properties": {
          "replayed": {
            "type": "boolean",
            "description": "Whether an earlier send of the same words from the same event already\nadmitted it. When `true`, `turn_id` is that send's event. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "turn_id": {
            "type": "string",
            "description": "The event the steer became on the target fleet. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "FleetSteerRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/steers` request.",
        "required": [
          "fencing_token",
          "fleet_id",
          "text"
        ],
        "properties": {
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet to steer: another fleet in the run's workspace.",
            "maxLength": 36,
            "minLength": 36
          },
          "text": {
            "type": "string",
            "description": "What to ask it: 1 to 1,048,576 characters with no NUL character.",
            "maxLength": 1048576,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "FleetSummary": {
        "type": "object",
        "description": "A shared fleet in the workspace directory.",
        "required": [
          "id",
          "name",
          "status",
          "created_at",
          "updated_at",
          "events_processed",
          "budget_used_nanos"
        ],
        "properties": {
          "budget_used_nanos": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Exact lifetime spend in nanos."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time."
          },
          "events_processed": {
            "type": "string",
            "description": "Exact lifetime event count."
          },
          "id": {
            "type": "string",
            "description": "Fleet identity."
          },
          "name": {
            "type": "string",
            "description": "Validated instance slug."
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle state."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last mutation."
          }
        }
      },
      "FleetTurnItem": {
        "type": "object",
        "description": "One turn of a fleet, as another fleet reads it.",
        "required": [
          "turn_id",
          "actor",
          "event_type",
          "status",
          "created_at",
          "request_excerpt"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "Who or what produced it: `steer:<user>`, `fleet:<fleet_id>`, `cron:<id>`. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was admitted. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "event_type": {
            "type": "string",
            "description": "How it entered: `chat`, `webhook`, `cron` or `continuation`. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "failure_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "What refused or failed the run. Omitted on a clean one. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "request_excerpt": {
            "type": "string",
            "description": "What it was asked. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "response_excerpt": {
            "type": [
              "string",
              "null"
            ],
            "description": "What it answered. Omitted until it answers. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "status": {
            "type": "string",
            "description": "Where its run got to; `queued` while it waits for a runner. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "turn_id": {
            "type": "string",
            "description": "The turn's identifier. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "FleetTurnsPage": {
        "type": "object",
        "description": "One page of a fleet's turns, newest first.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetTurnItem"
            },
            "description": "The turns on this page. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `starting_after` for the next page; null on the last one. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Unknown without a separate count; always null. Beta: this field may change shape before it is stable.",
            "minimum": 0,
            "x-stability": "beta"
          }
        }
      },
      "FleetsPage": {
        "type": "object",
        "description": "One page of the run's workspace's fleets, newest first.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetItem"
            },
            "description": "The fleets on this page. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `starting_after` for the next page; null on the last one. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Unknown without a separate count; always null. Beta: this field may change shape before it is stable.",
            "minimum": 0,
            "x-stability": "beta"
          }
        }
      },
      "FleetsResponse": {
        "type": "object",
        "description": "One directory page, newest first.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetSummary"
            },
            "description": "Rows on this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Use this value unchanged for the next page, or stop when null."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Unknown without a separate count; always null.",
            "minimum": 0
          }
        }
      },
      "FoldResponse": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/folds` reply: the run's unread messages.\n\nOldest first, cut to one frame ([`FoldResponse::keep_within`]). The next\nfold returns the rest.",
        "required": [
          "inputs"
        ],
        "properties": {
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FoldedInput"
            },
            "description": "The messages, oldest first. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        },
        "additionalProperties": false
      },
      "FoldedInput": {
        "type": "object",
        "description": "One message the fleet received, assigned to the run, whatever sent it: a\nsteer, a webhook, a chat mention or a schedule fire.",
        "required": [
          "turn_id",
          "sequence",
          "text"
        ],
        "properties": {
          "sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Its place in the fleet's order. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "text": {
            "type": "string",
            "description": "The message's text. It is the request's `message` string when it has\none. Otherwise it is the whole request, so a payload with no `message`\nstill reaches the run verbatim. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "turn_id": {
            "type": "string",
            "description": "The message's event id; its own reply lands on that event. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        },
        "additionalProperties": false
      },
      "GoalDecisionPolicy": {
        "type": "object",
        "description": "Reviewed goal-template revision and acceptance thresholds.",
        "required": [
          "questions_revision",
          "statement_min_bps",
          "continue_action",
          "wait"
        ],
        "properties": {
          "continue_action": {
            "$ref": "#/components/schemas/DecisionThreshold",
            "description": "Continue acceptance, subject to native remaining limits."
          },
          "questions_revision": {
            "type": "string",
            "description": "Exact native question revision implemented by this runner generation.",
            "pattern": "^dt-goal-v1$"
          },
          "statement_min_bps": {
            "type": "integer",
            "format": "int32",
            "description": "The task is done when every completion statement meets this Noul\nthreshold, whatever the next action says; independently checked native\nevidence still applies.",
            "maximum": 10000,
            "minimum": 0
          },
          "wait": {
            "$ref": "#/components/schemas/DecisionThreshold",
            "description": "Wait acceptance, subject to a concrete native dependency."
          }
        },
        "additionalProperties": false
      },
      "Grant": {
        "type": "object",
        "description": "One grant as the fleet's list shows it.",
        "required": [
          "id",
          "kind",
          "name",
          "status"
        ],
        "properties": {
          "approved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a person approved it, or `null`."
          },
          "id": {
            "type": "string",
            "description": "The grant's own row id — what a revoke addresses it by."
          },
          "kind": {
            "type": "string",
            "description": "`secret`, `integration` or `host`, from [`grant_type`]."
          },
          "name": {
            "type": "string",
            "description": "The vault key or integration the fleet asked for."
          },
          "requested_scope": {
            "type": [
              "object",
              "null"
            ],
            "description": "A wider GitHub scope waiting on a person, or `null`."
          },
          "scope": {
            "type": [
              "object",
              "null"
            ],
            "description": "The GitHub scope in force, `{repositories, access, base?}`, or `null`."
          },
          "status": {
            "type": "string",
            "description": "Where the decision stands, from [`status`]."
          }
        }
      },
      "GrantsResponse": {
        "type": "object",
        "description": "`GET /v1/workspaces/{workspace_id}/fleets/{fleet_id}/integration-grants`.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Grant"
            },
            "description": "The fleet's grants, newest first."
          }
        }
      },
      "HostFacts": {
        "type": "object",
        "description": "What the host offers its runs, as one beat read it. A fact the host could\nnot read is absent.",
        "properties": {
          "cpu_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Processors the runner may use.",
            "maximum": 2147483647,
            "minimum": 1
          },
          "free_disk_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Free bytes on the file system that holds the runner's sandboxes.",
            "maximum": 9223372036854775807,
            "minimum": 0
          },
          "memory_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The host's total memory, in bytes.",
            "maximum": 9223372036854775807,
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "Hostname": {
        "type": "string",
        "description": "A DNS hostname for a web-host grant, canonicalized before any lookup or recording."
      },
      "HttpEgress": {
        "type": "string",
        "description": "Which public HTTPS destinations HTTP tools may reach.",
        "enum": [
          "restricted",
          "public"
        ]
      },
      "HttpJsonFieldRule": {
        "type": "object",
        "description": "One required top-level JSON field, with exactly one expected value set.",
        "required": [
          "name"
        ],
        "properties": {
          "boolean_value": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Expected boolean value, when the rule locks a boolean."
          },
          "name": {
            "type": "string",
            "description": "The field name the rule locks."
          },
          "string_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expected string value, when the rule locks a string."
          }
        }
      },
      "HttpMethod": {
        "type": "string",
        "description": "HTTP methods allowed by a server-defined request rule.",
        "enum": [
          "get",
          "head",
          "post",
          "patch"
        ]
      },
      "HttpOriginPolicy": {
        "type": "object",
        "description": "The provider-neutral request boundary for one exact host.",
        "required": [
          "host",
          "credential_names",
          "requests"
        ],
        "properties": {
          "credential_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Credentials admitted at this host."
          },
          "host": {
            "type": "string",
            "description": "The host this boundary governs."
          },
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HttpRequestRule"
            },
            "description": "Requests admitted at this host."
          }
        }
      },
      "HttpPathMatch": {
        "type": "string",
        "description": "Whether a request path must equal the authored bytes or begin with them.",
        "enum": [
          "exact",
          "prefix"
        ]
      },
      "HttpRequestRule": {
        "type": "object",
        "description": "An allowed HTTP method and path.\n\nLocked fields must match. When `permitted_fields` is present, only locked and listed\nfields are allowed; query strings are refused. When absent, other fields and query strings\nare allowed.",
        "required": [
          "method",
          "path",
          "path_match",
          "json_fields"
        ],
        "properties": {
          "json_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HttpJsonFieldRule"
            },
            "description": "Fields whose values the rule locks."
          },
          "method": {
            "$ref": "#/components/schemas/HttpMethod",
            "description": "The method this rule admits."
          },
          "path": {
            "type": "string",
            "description": "The path this rule admits."
          },
          "path_match": {
            "$ref": "#/components/schemas/HttpPathMatch",
            "description": "Whether `path` is matched exactly or as a prefix."
          },
          "permitted_fields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Additional allowed field names. An empty list permits only locked fields. When\nomitted, other fields and query strings are allowed."
          }
        }
      },
      "IdentityAnswer": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AccountOpened",
            "description": "The workspace the event opened, or the one it already had."
          },
          {
            "$ref": "#/components/schemas/Ignored",
            "description": "A signed delivery that was ignored, with the reason."
          }
        ],
        "description": "What `POST /v1/auth/identity-events/clerk` answers with a 200.\n\nAn event that opened or found an account names it; one that changes nothing\nsays why."
      },
      "Ignored": {
        "type": "object",
        "description": "A signed delivery that starts no run, with its reason. Returns 200 so the provider does\nnot retry an intentionally ignored event.",
        "required": [
          "ignored"
        ],
        "properties": {
          "ignored": {
            "type": "string",
            "description": "Which rule dropped it."
          }
        }
      },
      "InferenceApi": {
        "type": "string",
        "description": "The provider API rig uses for this configured model.",
        "enum": [
          "chat",
          "responses",
          "messages",
          "gemini",
          "ollama"
        ]
      },
      "InviteEmailResponse": {
        "type": "object",
        "description": "`POST /v1/tenants/me/invites/{invite_id}/send` — the invite email went.",
        "required": [
          "email_status"
        ],
        "properties": {
          "email_status": {
            "type": "string",
            "description": "`sent`: the relay accepted the email."
          }
        }
      },
      "InviteSummary": {
        "type": "object",
        "description": "One invite, as the account's owner sees it.",
        "required": [
          "id",
          "email",
          "role",
          "expires_at",
          "created_at",
          "link",
          "email_status"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was issued."
          },
          "email": {
            "type": "string",
            "description": "The address it is for, lowercased."
          },
          "email_sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the relay last accepted its email; `null` if\nit never has."
          },
          "email_status": {
            "type": "string",
            "description": "What became of its most recent email: `sent`, `failed`, or\n`unconfigured` when this deployment has no mail relay set up."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it stops being acceptable."
          },
          "id": {
            "type": "string",
            "description": "The invite's identifier."
          },
          "link": {
            "type": "string",
            "description": "The dashboard page the invitee opens to accept it."
          },
          "role": {
            "type": "string",
            "description": "The role accepting it grants: `member`."
          }
        }
      },
      "Isolation": {
        "type": "string",
        "description": "The wall between a sandbox's code and the runner host.",
        "enum": [
          "hardware_vm"
        ]
      },
      "ItemKind": {
        "type": "string",
        "description": "What kind of thing one item of a run is.",
        "enum": [
          "tool_call",
          "edit"
        ]
      },
      "ItemStatus": {
        "type": "string",
        "description": "How an item's call ended. A record is written once its call answered, so\nit is never running.",
        "enum": [
          "succeeded",
          "failed"
        ]
      },
      "Kvm": {
        "type": "string",
        "description": "What the runner host's virtualization device offers.",
        "enum": [
          "usable",
          "denied",
          "absent"
        ]
      },
      "Liveness": {
        "type": "object",
        "description": "Server availability and build information. Does not check the database or event queue; use\nthe readiness endpoint for those.",
        "required": [
          "status",
          "service",
          "version",
          "commit"
        ],
        "properties": {
          "build_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source digest shared with the app, runner and terminal client, when bound."
          },
          "commit": {
            "type": "string",
            "description": "The commit this binary was built from, or `unknown` when the build was\nnot told."
          },
          "service": {
            "type": "string",
            "description": "The service answering: `agentsfleetd`."
          },
          "status": {
            "type": "string",
            "description": "Always `ok` from a live process. One word to switch on, so a reader\nnever has to treat an empty document as a signal."
          },
          "version": {
            "type": "string",
            "description": "The version this binary was cut from."
          }
        }
      },
      "MemberSummary": {
        "type": "object",
        "description": "One member of the caller's account.",
        "required": [
          "user_id",
          "email",
          "role",
          "joined_at"
        ],
        "properties": {
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their name, `null` when the identity provider supplied none."
          },
          "email": {
            "type": "string",
            "description": "Their address."
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "description": "When they joined the account."
          },
          "role": {
            "type": "string",
            "description": "Their role: `owner` or `member`."
          },
          "user_id": {
            "type": "string",
            "description": "The member's user identifier."
          }
        }
      },
      "MemoriesResponse": {
        "type": "object",
        "description": "`GET /v1/workspaces/{workspace_id}/fleets/{fleet_id}/memories` — one page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryEntry"
            },
            "description": "The entries on this page, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last one."
          },
          "total": {
            "type": "integer",
            "description": "How many memories this page carries. The count covers this page only,\nnot the whole Fleet.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "MemoryAccess": {
        "type": "object",
        "description": "Current shared-memory permissions.",
        "required": [
          "read",
          "publish"
        ],
        "properties": {
          "publish": {
            "type": "boolean",
            "description": "Publish permission."
          },
          "read": {
            "type": "boolean",
            "description": "Read permission."
          }
        },
        "additionalProperties": false
      },
      "MemoryAccessRequest": {
        "type": "object",
        "description": "Presence-based memory permission changes.",
        "properties": {
          "publish": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Publish workspace memory."
          },
          "read": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Read shared workspace memory."
          }
        },
        "additionalProperties": false
      },
      "MemoryCaptureResponse": {
        "type": "object",
        "description": "`POST /v1/runners/me/memory/{fleet_id}` reply — what the write did.",
        "required": [
          "stored",
          "skipped"
        ],
        "properties": {
          "skipped": {
            "type": "integer",
            "description": "Deltas refused for shape, which the runner should investigate.",
            "minimum": 0
          },
          "stored": {
            "type": "integer",
            "description": "Deltas written, after upsert.",
            "minimum": 0
          }
        }
      },
      "MemoryDelta": {
        "type": "object",
        "description": "One durable memory item — the unit of both reading and writing.",
        "required": [
          "key",
          "content",
          "category"
        ],
        "properties": {
          "category": {
            "type": "string",
            "description": "Retention category, which decides load order and retention."
          },
          "content": {
            "type": "string",
            "description": "The remembered content."
          },
          "key": {
            "type": "string",
            "description": "Stable key. A repeated key overwrites rather than accumulating."
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Who reads it; absent means the writing fleet alone. Left off the wire\nat that default, so a delta that shares nothing reads as it always did."
          }
        }
      },
      "MemoryEntry": {
        "type": "object",
        "description": "One stored entry as the OPERATOR surface renders it.",
        "required": [
          "key",
          "content",
          "category",
          "updated_at",
          "writer_fleet_id"
        ],
        "properties": {
          "category": {
            "type": "string",
            "description": "The retention category, which decides load order and retention."
          },
          "content": {
            "type": "string",
            "description": "What it remembers."
          },
          "key": {
            "type": "string",
            "description": "The stable key the fleet remembers this under."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last written."
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Who reads it: `fleet` for its writer alone, `workspace` when shared."
          },
          "writer_fleet_id": {
            "type": "string",
            "description": "The fleet that wrote it. Another fleet's identifier marks a shared\nentry this fleet reads and cannot change or forget."
          }
        },
        "additionalProperties": false
      },
      "MemoryLoadResponse": {
        "type": "object",
        "description": "What a fleet remembers, compacted to fit one window.",
        "required": [
          "memory"
        ],
        "properties": {
          "memory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryDelta"
            },
            "description": "The window's items."
          },
          "publish": {
            "type": "boolean",
            "description": "Whether this fleet may store an entry the workspace reads; left off\nthe wire when it may not."
          },
          "shared": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SharedMemory"
            },
            "description": "What other fleets in the workspace published, newest first. Empty, and\nleft off the wire, for a fleet without the read grant, so its reply is\nthe shape every runner parses."
          }
        }
      },
      "MemoryPushRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/memory/{fleet_id}` request.",
        "required": [
          "run_id",
          "fencing_token",
          "memory"
        ],
        "properties": {
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic guard; a holder a reassignment superseded is rejected.",
            "minimum": 0
          },
          "memory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryDelta"
            },
            "description": "The items to remember."
          },
          "run_id": {
            "type": "string",
            "description": "The run authorizing this write."
          }
        },
        "additionalProperties": false
      },
      "MemoryRecallRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/memory/{fleet_id}/recall` request.",
        "required": [
          "run_id",
          "fencing_token",
          "query",
          "limit"
        ],
        "properties": {
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic guard; a holder a reassignment superseded is rejected.",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "description": "The most entries of each kind to answer with.",
            "minimum": 1
          },
          "query": {
            "type": "string",
            "description": "Text to find in a key or content, ignoring case; empty matches all."
          },
          "run_id": {
            "type": "string",
            "description": "The run authorizing this read."
          }
        },
        "additionalProperties": false
      },
      "MemoryRecallResponse": {
        "type": "object",
        "description": "`POST /v1/runners/me/memory/{fleet_id}/recall` reply: the fleet's own\nmatches and, for a granted reader, the workspace's shared ones.",
        "required": [
          "memory"
        ],
        "properties": {
          "memory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryDelta"
            },
            "description": "The fleet's own entries, key matches first."
          },
          "shared": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SharedMemory"
            },
            "description": "Other fleets' shared entries, key matches first."
          }
        }
      },
      "MessageImage": {
        "type": "object",
        "description": "An image attached to a person or API client's message.",
        "required": [
          "media_type",
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "Standard base64; at most 5 MiB when decoded."
          },
          "media_type": {
            "type": "string",
            "description": "One of `image/png`, `image/jpeg`, `image/gif` and `image/webp`."
          }
        },
        "additionalProperties": false
      },
      "MessagePosted": {
        "type": "object",
        "description": "What posting a message did.",
        "required": [
          "delivered"
        ],
        "properties": {
          "delivered": {
            "type": "boolean",
            "description": "Whether the thread has the message. `false` when the channel refused\nit or stayed unreachable through every retry; the run goes on, and the\nreport still carries the answer. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "MessageRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/messages` request.",
        "required": [
          "fencing_token",
          "item_id",
          "call_number",
          "text"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The call's number within its run, from 1, as its record names it.",
            "minimum": 0
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "The item this call is: a `UUIDv7` the runner mints once per call.\nA retry sends it again and gets the first post's result."
          },
          "text": {
            "type": "string",
            "description": "What to say in the thread: nonempty, with no NUL character.",
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "MintApiKeyRequest": {
        "type": "object",
        "description": "Request to create an account API key.",
        "required": [
          "key_name"
        ],
        "properties": {
          "key_name": {
            "type": "string",
            "description": "What the key will be called. Unique per tenant."
          }
        },
        "additionalProperties": false
      },
      "MintCliCredentialRequest": {
        "type": "object",
        "description": "Request to create this machine's command-line credential.",
        "required": [
          "machine_name"
        ],
        "properties": {
          "machine_name": {
            "type": "string",
            "description": "The terminal's own label, as an operator will read it back."
          }
        },
        "additionalProperties": false
      },
      "MintCredentialRequest": {
        "type": "object",
        "description": "Requests a tool credential for the current work assignment. `run_id` determines\nworkspace access; the body cannot select another workspace and contains no token.",
        "required": [
          "run_id",
          "integration"
        ],
        "properties": {
          "integration": {
            "type": "string",
            "description": "Connected integration that needs a credential."
          },
          "run_id": {
            "type": "string",
            "description": "Current work assignment authorizing this credential request."
          },
          "scope": {
            "type": [
              "string",
              "null"
            ],
            "description": "An integration-specific narrowing the broker may honour."
          }
        },
        "additionalProperties": false
      },
      "MintCredentialResponse": {
        "type": "object",
        "description": "Newly issued tool credential.",
        "required": [
          "token",
          "expires_at"
        ],
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it stops working, so the caller re-mints before expiry rather than on failure.\n\nA credential with no upstream expiry carries the far-future instant\n`9999-12-30T22:00:00.999Z`, so the caller's one comparison covers it."
          },
          "token": {
            "type": "string",
            "description": "The short-lived, workspace-scoped credential. Secret — never logged,\nnever echoed into a frame."
          }
        }
      },
      "Mintable": {
        "type": "object",
        "description": "An integration this run may request a short-lived credential for. Contains its identifier,\nnever a stored credential or token.",
        "required": [
          "name",
          "integration"
        ],
        "properties": {
          "integration": {
            "type": "string",
            "description": "The integration the broker mints for. The workspace is server-derived."
          },
          "name": {
            "type": "string",
            "description": "The placeholder name the fleet references."
          }
        }
      },
      "MintedApiKeyResponse": {
        "type": "object",
        "description": "The one response that reveals a key's plaintext.",
        "required": [
          "id",
          "key_name",
          "key",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was minted."
          },
          "id": {
            "type": "string",
            "description": "The key's identifier, which every later call addresses it by."
          },
          "key": {
            "type": "string",
            "description": "The credential itself. Shown once and never stored in this shape."
          },
          "key_name": {
            "type": "string",
            "description": "What it is called."
          }
        }
      },
      "MintedCliCredentialResponse": {
        "type": "object",
        "description": "The only response that returns a command-line credential in plaintext.\n\nSave the value when you receive it. No later call returns it again.",
        "required": [
          "id",
          "credential",
          "machine_name",
          "deployment"
        ],
        "properties": {
          "credential": {
            "type": "string",
            "description": "The credential itself. Shown once and never stored in this shape."
          },
          "deployment": {
            "type": "string",
            "description": "Deployment that issued this credential, assigned by the server."
          },
          "id": {
            "type": "string",
            "description": "The credential row's identifier, which the revoke addresses it by."
          },
          "machine_name": {
            "type": "string",
            "description": "The terminal's label, echoed back as it was stored."
          }
        }
      },
      "ModelEntriesResponse": {
        "type": "object",
        "description": "`GET /v1/tenants/me/models` — one page of the registry.",
        "required": [
          "models",
          "platform_default_available"
        ],
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelEntryRow"
            },
            "description": "The registered models, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or null on the last one."
          },
          "platform_default": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PlatformDefaultRow",
                "description": "The default's identity, when there is one."
              },
              {
                "type": "null"
              }
            ]
          },
          "platform_default_available": {
            "type": "boolean",
            "description": "Whether an active platform-default row exists at all."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Always null — see the module note.",
            "minimum": 0
          }
        }
      },
      "ModelEntryRow": {
        "type": "object",
        "description": "One configured model, as the registry page shows it.\n\n`id` is the entry's own identity — the `{id}` the item route takes — and not\nthe model's. The model is `model_id`, which is what a provider spells.",
        "required": [
          "id",
          "model_id",
          "secret_ref",
          "kind",
          "has_key",
          "active",
          "created_at"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Whether this entry is the tenant's current selection."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The custom endpoint, where one may be displayed."
          },
          "cached_input_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The cached-input rate, likewise."
              },
              {
                "type": "null"
              }
            ]
          },
          "context_cap_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The context window this model is priced at, in tokens.\n\nAbsent when the catalogue carries no rate for this model. An absent\nvalue does not mean zero.",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was first stored."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The catalogue's label for the model. Absent for a model the catalogue\ndoes not carry, which a picker shows by its `model_id`."
          },
          "has_key": {
            "type": "boolean",
            "description": "Whether a key is stored under that name. Never the key."
          },
          "id": {
            "type": "string",
            "description": "The entry's identity."
          },
          "input_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The input rate, in nanos per million tokens."
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "description": "What the credential is, as the server classified it at write time."
          },
          "model_id": {
            "type": "string",
            "description": "The model this entry configures."
          },
          "output_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The output rate, likewise."
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider label, for the credential kinds that carry one."
          },
          "secret_ref": {
            "type": "string",
            "description": "The vault key name backing it."
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace holding the credential. Absent if that workspace is unavailable.",
            "x-stability": "stable"
          }
        }
      },
      "ModelInference": {
        "type": "object",
        "description": "Admin-owned model settings; credentials remain separate vault references.",
        "required": [
          "api",
          "base_url",
          "max_output_tokens"
        ],
        "properties": {
          "api": {
            "$ref": "#/components/schemas/InferenceApi",
            "description": "Explicit provider API; never inferred from a model identifier."
          },
          "base_url": {
            "type": "string",
            "description": "HTTPS provider base. Host safety is proven by the credential service."
          },
          "dialect": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registered rig dialect, or absent for a plain compatible gateway. The\nnative Gemini and Ollama APIs take none."
          },
          "max_output_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Model's configured maximum completion length, including reasoning.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ModelPricing": {
        "type": "object",
        "description": "Integer prices never cross a floating-point client boundary.",
        "required": [
          "input_nanos_per_million",
          "output_nanos_per_million",
          "runtime_nanos_per_second"
        ],
        "properties": {
          "input_nanos_per_million": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Input nanos per million tokens."
          },
          "output_nanos_per_million": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Output nanos per million tokens."
          },
          "runtime_nanos_per_second": {
            "$ref": "#/components/schemas/Nanos",
            "description": "Runtime nanos per second."
          }
        }
      },
      "NamedQuestion": {
        "type": "object",
        "description": "Names are stable question identities, not model-generated output keys.",
        "required": [
          "name",
          "question"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Native question identity echoed by every adapter."
          },
          "question": {
            "$ref": "#/components/schemas/DecisionQuestion",
            "description": "Reviewed question representation."
          }
        },
        "additionalProperties": false
      },
      "Nanos": {
        "type": "string",
        "description": "A whole number of nanos (10⁻⁹ US dollars) as a decimal string.",
        "pattern": "^(0|[1-9][0-9]*)$"
      },
      "NetworkPolicy": {
        "type": "object",
        "description": "Allowed hosts for HTTP tools.\n\nRestricted mode with no allowed hosts blocks these requests. Sandbox network access also depends on the\nrunner's network policy and registry allowlist.",
        "required": [
          "allow"
        ],
        "properties": {
          "allow": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Exact hostnames HTTP tools may reach."
          },
          "http_egress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HttpEgress"
              }
            ],
            "description": "HTTP destination scope; omitted means restricted to named hosts. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "package_manager_domains": {
            "type": "boolean",
            "description": "Admit the standard package registry hosts through HTTP tools. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "NoulCriteria": {
        "type": "object",
        "description": "Accepted meanings of a true and false assessment.",
        "required": [
          "true",
          "false"
        ],
        "properties": {
          "false": {
            "type": "string",
            "description": "Evidence supporting no."
          },
          "true": {
            "type": "string",
            "description": "Evidence supporting yes."
          }
        },
        "additionalProperties": false
      },
      "OnboardingResponse": {
        "type": "object",
        "description": "The whole onboarding checklist, in one call.",
        "required": [
          "model_configured",
          "has_fleet",
          "has_secret",
          "has_processed_event",
          "has_steer_event"
        ],
        "properties": {
          "has_fleet": {
            "type": "boolean",
            "description": "The workspace holds at least one fleet."
          },
          "has_processed_event": {
            "type": "boolean",
            "description": "At least one event has reached the workspace."
          },
          "has_secret": {
            "type": "boolean",
            "description": "The workspace holds at least one vault secret."
          },
          "has_steer_event": {
            "type": "boolean",
            "description": "At least one of those events came from a steer."
          },
          "model_configured": {
            "type": "boolean",
            "description": "A model resolves — the tenant's own selection, or the platform default."
          }
        }
      },
      "OpenSessionRequest": {
        "type": "object",
        "description": "`POST /v1/auth/sessions` — the command line opens a login.",
        "required": [
          "public_key",
          "token_name"
        ],
        "properties": {
          "public_key": {
            "type": "string",
            "description": "Client public key, forwarded unchanged by the server."
          },
          "token_name": {
            "type": "string",
            "description": "What the credential this login mints will be called."
          }
        },
        "additionalProperties": false
      },
      "OpenSessionResponse": {
        "type": "object",
        "description": "What opening a login answers with.",
        "required": [
          "session_id",
          "login_url",
          "request_id"
        ],
        "properties": {
          "login_url": {
            "type": "string",
            "description": "The page a person approves the login on."
          },
          "request_id": {
            "type": "string",
            "description": "The request that opened it, for an operator correlating a failed login."
          },
          "session_id": {
            "type": "string",
            "description": "The identifier the command line polls on."
          }
        }
      },
      "Page": {
        "type": "object",
        "description": "A page of schedules.",
        "required": [
          "schedules"
        ],
        "properties": {
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/View"
            },
            "description": "The fleet's schedules, oldest first."
          }
        }
      },
      "PageResponse_ApiKeySummary": {
        "type": "object",
        "description": "One result page with `items`, `total`, and `next_cursor`. A null `next_cursor` means the\nlast page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One key as a list shows it: metadata, never a secret.",
              "required": [
                "id",
                "key_name",
                "active",
                "created_at"
              ],
              "properties": {
                "active": {
                  "type": "boolean",
                  "description": "Whether it still authenticates."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it was minted."
                },
                "display_suffix": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Final four hexadecimal characters for recognition only. Never authenticates a request.\nNull when no suffix was recorded; the original credential cannot be recovered."
                },
                "id": {
                  "type": "string",
                  "description": "The key's identifier."
                },
                "key_name": {
                  "type": "string",
                  "description": "What it is called."
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the key was revoked, or null while active."
                }
              }
            },
            "description": "The rows on this page, in the requested order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page.\n\nAlways emitted, never omitted, for the module's null rule."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching records across all pages. Use `next_cursor` to determine whether\nanother page exists."
          }
        }
      },
      "PageResponse_InviteSummary": {
        "type": "object",
        "description": "One result page with `items`, `total`, and `next_cursor`. A null `next_cursor` means the\nlast page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One invite, as the account's owner sees it.",
              "required": [
                "id",
                "email",
                "role",
                "expires_at",
                "created_at",
                "link",
                "email_status"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it was issued."
                },
                "email": {
                  "type": "string",
                  "description": "The address it is for, lowercased."
                },
                "email_sent_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the relay last accepted its email; `null` if\nit never has."
                },
                "email_status": {
                  "type": "string",
                  "description": "What became of its most recent email: `sent`, `failed`, or\n`unconfigured` when this deployment has no mail relay set up."
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it stops being acceptable."
                },
                "id": {
                  "type": "string",
                  "description": "The invite's identifier."
                },
                "link": {
                  "type": "string",
                  "description": "The dashboard page the invitee opens to accept it."
                },
                "role": {
                  "type": "string",
                  "description": "The role accepting it grants: `member`."
                }
              }
            },
            "description": "The rows on this page, in the requested order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page.\n\nAlways emitted, never omitted, for the module's null rule."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching records across all pages. Use `next_cursor` to determine whether\nanother page exists."
          }
        }
      },
      "PageResponse_MemberSummary": {
        "type": "object",
        "description": "One result page with `items`, `total`, and `next_cursor`. A null `next_cursor` means the\nlast page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One member of the caller's account.",
              "required": [
                "user_id",
                "email",
                "role",
                "joined_at"
              ],
              "properties": {
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Their name, `null` when the identity provider supplied none."
                },
                "email": {
                  "type": "string",
                  "description": "Their address."
                },
                "joined_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When they joined the account."
                },
                "role": {
                  "type": "string",
                  "description": "Their role: `owner` or `member`."
                },
                "user_id": {
                  "type": "string",
                  "description": "The member's user identifier."
                }
              }
            },
            "description": "The rows on this page, in the requested order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page.\n\nAlways emitted, never omitted, for the module's null rule."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching records across all pages. Use `next_cursor` to determine whether\nanother page exists."
          }
        }
      },
      "PageResponse_WaitingInvite": {
        "type": "object",
        "description": "One result page with `items`, `total`, and `next_cursor`. A null `next_cursor` means the\nlast page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One invite waiting for the caller's address.",
              "required": [
                "id",
                "account",
                "expires_at"
              ],
              "properties": {
                "account": {
                  "$ref": "#/components/schemas/WorkspaceAccount",
                  "description": "The account accepting it joins."
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it stops being acceptable."
                },
                "id": {
                  "type": "string",
                  "description": "The invite's identifier, which the accept route names."
                }
              }
            },
            "description": "The rows on this page, in the requested order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page.\n\nAlways emitted, never omitted, for the module's null rule."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching records across all pages. Use `next_cursor` to determine whether\nanother page exists."
          }
        }
      },
      "PageResponse_WorkspaceMember": {
        "type": "object",
        "description": "One result page with `items`, `total`, and `next_cursor`. A null `next_cursor` means the\nlast page.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One member of a workspace's account, as its thread names senders.\n\nNo address: every member of an account can read this list, and a name is\nall a thread needs.",
              "required": [
                "user_id",
                "role",
                "actor"
              ],
              "properties": {
                "actor": {
                  "type": "string",
                  "description": "The actor their messages record, `steer:<subject>`: what a thread\nrow's `actor` equals when this member sent it."
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Their name, `null` when the identity provider supplied none."
                },
                "role": {
                  "type": "string",
                  "description": "Their role: `owner` or `member`."
                },
                "user_id": {
                  "type": "string",
                  "description": "The member's user identifier."
                }
              }
            },
            "description": "The rows on this page, in the requested order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page.\n\nAlways emitted, never omitted, for the module's null rule."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching records across all pages. Use `next_cursor` to determine whether\nanother page exists."
          }
        }
      },
      "PatchApiKeyRequest": {
        "type": "object",
        "description": "`PATCH /v1/api-keys/{id}` — the only mutation, and only downward.",
        "required": [
          "active"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Must be `false`. A revoked key is never brought back."
          }
        },
        "additionalProperties": false
      },
      "PatchDurableTaskRequest": {
        "oneOf": [
          {
            "type": "object",
            "description": "Pause, resume or cancel without changing the accepted objective.",
            "required": [
              "state",
              "expected_generation"
            ],
            "properties": {
              "expected_generation": {
                "type": "integer",
                "format": "int64",
                "description": "Generation from the task's current native context.",
                "minimum": 0
              },
              "state": {
                "$ref": "#/components/schemas/DurableTaskControlState",
                "description": "Requested native lifecycle state."
              }
            }
          },
          {
            "type": "object",
            "description": "Replace the statements the task is judged done against.",
            "required": [
              "questions",
              "expected_generation"
            ],
            "properties": {
              "expected_generation": {
                "type": "integer",
                "format": "int64",
                "description": "Generation read before the edit; a stale one is refused.",
                "minimum": 0
              },
              "questions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DurableTaskStatement"
                },
                "description": "At least one statement, each with a unique id."
              }
            }
          }
        ],
        "description": "A person's conditional lifecycle control, or their edit of the task's\ncompletion statements."
      },
      "PatchFleetRequest": {
        "type": "object",
        "description": "`PATCH` a fleet under its required resource tag. An omitted field keeps its\nvalue; an explicit `null` is refused. Only a signed-in person may change\n`http_egress` or `package_domains`.",
        "properties": {
          "http_egress": {
            "$ref": "#/components/schemas/HttpEgress",
            "description": "`public` lets the fleet's HTTP tools reach any public host;\n`restricted` keeps them to the hosts of its approved access."
          },
          "model_ref": {
            "type": "string",
            "description": "The workspace model the fleet's next run uses.",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Validated instance slug.",
            "maxLength": 64,
            "minLength": 1
          },
          "package_domains": {
            "type": "boolean",
            "description": "Whether the fleet's HTTP tools may also reach the package registries."
          },
          "status": {
            "$ref": "#/components/schemas/PatchStatus",
            "description": "`archived` archives the fleet. Terminal."
          }
        },
        "additionalProperties": false
      },
      "PatchStatus": {
        "type": "string",
        "description": "The lifecycle target a person may request.",
        "enum": [
          "archived"
        ]
      },
      "PlatformDefaultRow": {
        "type": "object",
        "description": "The deployment's platform default, as the page's Default row shows it.",
        "required": [
          "provider",
          "model",
          "context_cap_tokens"
        ],
        "properties": {
          "cached_input_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The cached-input rate, likewise."
              },
              {
                "type": "null"
              }
            ]
          },
          "context_cap_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "The context window the catalogue prices it at.",
            "minimum": 0
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The catalogue's label for the model. Absent when the catalogue\ncarries no price for it."
          },
          "input_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The input rate, in nanos per million tokens."
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "type": "string",
            "description": "The model it selects."
          },
          "output_nanos_per_mtok": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "The output rate, likewise."
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": "string",
            "description": "The provider the default belongs to."
          }
        }
      },
      "PlatformKeyDeactivateResponse": {
        "type": "object",
        "description": "Successful platform-default deactivation.",
        "required": [
          "provider",
          "active",
          "request_id"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Always false after deactivation."
          },
          "provider": {
            "type": "string",
            "description": "Provider that was deactivated."
          },
          "request_id": {
            "type": "string",
            "description": "Reference identifier to include when contacting support."
          }
        },
        "additionalProperties": false
      },
      "PlatformKeyItem": {
        "type": "object",
        "description": "Reveal-free platform-key list item.",
        "required": [
          "provider",
          "source_workspace_id",
          "active",
          "updated_at"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Whether this row is the platform default."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Active priced model, absent after deactivation."
          },
          "provider": {
            "type": "string",
            "description": "Provider and vault-row name."
          },
          "source_workspace_id": {
            "type": "string",
            "description": "Workspace holding the key."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last mutation instant."
          }
        },
        "additionalProperties": false
      },
      "PlatformKeyPut": {
        "type": "object",
        "description": "`PUT /v1/admin/platform-keys` metadata; key bytes already live in the vault.",
        "required": [
          "provider",
          "source_workspace_id",
          "model"
        ],
        "properties": {
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom endpoint for the compatible-provider mode."
          },
          "model": {
            "type": "string",
            "description": "Priced model selected as platform default."
          },
          "provider": {
            "type": "string",
            "description": "Provider and vault-row name."
          },
          "source_workspace_id": {
            "type": "string",
            "description": "Workspace holding that vault row."
          }
        },
        "additionalProperties": false
      },
      "PlatformKeySetResponse": {
        "type": "object",
        "description": "Successful platform-default activation.",
        "required": [
          "provider",
          "model",
          "source_workspace_id",
          "active",
          "request_id"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Always true after activation."
          },
          "model": {
            "type": "string",
            "description": "Selected priced model."
          },
          "provider": {
            "type": "string",
            "description": "Provider and vault-row name."
          },
          "request_id": {
            "type": "string",
            "description": "Reference identifier to include when contacting support."
          },
          "source_workspace_id": {
            "type": "string",
            "description": "Workspace holding the key."
          }
        },
        "additionalProperties": false
      },
      "PlatformKeysResponse": {
        "type": "object",
        "description": "`GET /v1/admin/platform-keys` response.",
        "required": [
          "keys",
          "request_id"
        ],
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformKeyItem"
            },
            "description": "Every active and inactive provider row."
          },
          "request_id": {
            "type": "string",
            "description": "Reference identifier to include when contacting support."
          }
        },
        "additionalProperties": false
      },
      "PollSessionResponse": {
        "type": "object",
        "description": "`GET /v1/auth/sessions/{session_id}` — where a login has got to.",
        "required": [
          "status",
          "cli_public_key",
          "token_name",
          "expires_at"
        ],
        "properties": {
          "cli_public_key": {
            "type": "string",
            "description": "The public key the command line presented, echoed back."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the window closes."
          },
          "status": {
            "type": "string",
            "description": "`pending` or `verification_pending`."
          },
          "token_name": {
            "type": "string",
            "description": "What the credential will be called."
          }
        }
      },
      "Pong": {
        "type": "object",
        "description": "What a `ping` is answered with.",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "The pong marker this deployment answers with."
          }
        }
      },
      "ProblemBody": {
        "type": "object",
        "description": "The body every refusal carries, under `application/problem+json`.",
        "required": [
          "docs_uri",
          "title",
          "detail",
          "error_code",
          "request_id"
        ],
        "properties": {
          "action_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "On that 409 only: the action the gate held."
          },
          "current_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a 409 only: the state that forbade the transition."
          },
          "detail": {
            "type": "string",
            "description": "One sentence on what was refused and why."
          },
          "docs_uri": {
            "type": "string",
            "description": "Where the error code is documented."
          },
          "error_code": {
            "type": "string",
            "description": "The registry code, stable across releases."
          },
          "etag": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a 412 only: the resource's current entity tag, to refetch and retry."
          },
          "gate_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "On an answered approval gate's 409 only: the gate that was answered."
          },
          "local_read_permitted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "On a temporary extract outage, true authorizes one local read under the fleet's network policy."
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "description": "On that 409 only: the answer that stands."
          },
          "request_id": {
            "type": "string",
            "description": "The request this refusal answers, for support."
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "On that 409 only: when the standing answer was given."
          },
          "resolved_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "On that 409 only: who gave it."
          },
          "title": {
            "type": "string",
            "description": "A short name for the refusal, safe to show a person."
          },
          "user_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "A curated sentence for end users, where the code has one."
          }
        }
      },
      "ProviderMode": {
        "type": "string",
        "description": "The `mode` a client sends and reads back.",
        "enum": [
          "platform",
          "self_managed"
        ]
      },
      "Readiness": {
        "type": "object",
        "description": "Whether this server can accept traffic. Both 200 and 503 responses include separate\ndatabase and event-queue checks.",
        "required": [
          "ready",
          "database",
          "queue"
        ],
        "properties": {
          "database": {
            "type": "boolean",
            "description": "Whether the database answered."
          },
          "queue": {
            "type": "boolean",
            "description": "Whether the event bus answered; reported only, never gating `ready`."
          },
          "ready": {
            "type": "boolean",
            "description": "`true` only when every dependency answered. Mirrors the status code:\n`true` with a 200, `false` with a 503."
          }
        }
      },
      "RedirectEvidence": {
        "type": "object",
        "description": "The adjacent hosts observed on a refused redirect during this run.",
        "required": [
          "tool",
          "from_host",
          "to_host"
        ],
        "properties": {
          "from_host": {
            "$ref": "#/components/schemas/Hostname",
            "description": "The host that returned the redirect."
          },
          "to_host": {
            "$ref": "#/components/schemas/Hostname",
            "description": "The destination refused before connection."
          },
          "tool": {
            "$ref": "#/components/schemas/RefusedTool",
            "description": "The tool that encountered the refused redirect."
          }
        },
        "additionalProperties": false
      },
      "RefusedTool": {
        "type": "string",
        "description": "The tool whose actual network refusal supplied the redirect evidence.",
        "enum": [
          "web_fetch"
        ]
      },
      "RegisterRequest": {
        "type": "object",
        "description": "`POST /v1/admin/runners` request. Authorized by an existing operator credential,\nnot an enrollment token. The operator ASSIGNS the policy; the host never\ndeclares one.",
        "required": [
          "host_id",
          "assigned_policy",
          "labels"
        ],
        "properties": {
          "assigned_policy": {
            "$ref": "#/components/schemas/AssignedPolicy",
            "description": "The policy the operator assigns to it."
          },
          "host_id": {
            "type": "string",
            "description": "Stable identifier for the host being enrolled."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Operator labels for placement and filtering. A label given twice is\nstored once."
          }
        },
        "additionalProperties": false
      },
      "RegisterResponse": {
        "type": "object",
        "description": "Registered runner and its access token. Save the token securely; it is returned once and\nonly its hash is stored.",
        "required": [
          "runner_id",
          "runner_token",
          "assigned_policy"
        ],
        "properties": {
          "assigned_policy": {
            "$ref": "#/components/schemas/AssignedPolicy",
            "description": "The assignment AS STORED, with the worker count clamped, so the\nenrolling operator sees exactly what the host will apply."
          },
          "runner_id": {
            "type": "string",
            "description": "The runner's durable identifier."
          },
          "runner_token": {
            "type": "string",
            "description": "The minted bearer token. Secret — revealed once, never re-readable."
          }
        },
        "additionalProperties": false
      },
      "ReplaceSecretRequest": {
        "type": "object",
        "description": "`PUT /v1/workspaces/{workspace_id}/secrets/{secret_name}` — replace the body.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Complete replacement JSON object. Fields omitted from this object are removed from the\nsecret."
          }
        },
        "additionalProperties": false
      },
      "RepositoryAccess": {
        "type": "string",
        "description": "Whether a bound repository may be written or only read.",
        "enum": [
          "read",
          "write"
        ]
      },
      "RepositoryBinding": {
        "type": "object",
        "description": "The repositories a run is bound to, and how it may use them.",
        "required": [
          "repositories",
          "access",
          "base_branch"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/RepositoryAccess",
            "description": "Whether the run may write to them."
          },
          "base_branch": {
            "type": "string",
            "description": "Branch a write is based on."
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Repositories the run may reach."
          }
        }
      },
      "ResolveApprovalRequest": {
        "type": "object",
        "description": "The body a decision may carry.\n\nEvery field is optional, and so is the whole body. A decision is complete\nwithout a note, and demanding one would make the common answer the awkward\none.",
        "properties": {
          "answer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The person's answer to a `question` gate, which the `answer`\ndecision requires and stores as the gate's `detail`."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The operator's note, stored as the gate's `detail`."
          }
        },
        "additionalProperties": false
      },
      "Resolved": {
        "type": "object",
        "description": "What the approval callback returns to the sender that resolved a gate.\n\nThis response repeats what the sender sent, plus a marker. It never reports\nwho else answered the gate.",
        "required": [
          "status",
          "action_id",
          "decision"
        ],
        "properties": {
          "action_id": {
            "type": "string",
            "description": "The gate that was answered."
          },
          "decision": {
            "type": "string",
            "description": "The answer it was given."
          },
          "status": {
            "type": "string",
            "description": "The resolved marker this route answers with."
          }
        }
      },
      "ResolvedResponse": {
        "type": "object",
        "description": "What answering a gate reports, whether or not this caller won the race.",
        "required": [
          "gate_id",
          "action_id",
          "outcome",
          "resolved_at",
          "resolved_by"
        ],
        "properties": {
          "action_id": {
            "type": "string",
            "description": "The action it gated."
          },
          "gate_id": {
            "type": "string",
            "description": "The gate that was answered."
          },
          "outcome": {
            "type": "string",
            "description": "Where it now stands."
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was decided."
          },
          "resolved_by": {
            "type": "string",
            "description": "Who decided it — not necessarily this caller."
          }
        }
      },
      "RevokedApiKeyResponse": {
        "type": "object",
        "description": "What revoking answers with.",
        "required": [
          "id",
          "active",
          "revoked_at"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Always `false` — the field is present so a client can write the reply\nstraight into whatever it was holding."
          },
          "id": {
            "type": "string",
            "description": "The key's identifier."
          },
          "revoked_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row records it stopped working."
          }
        }
      },
      "RunDestination": {
        "type": "string",
        "description": "Whether the signed-in operator can open the run's fleet.",
        "enum": [
          "available",
          "fleet_deleted",
          "not_permitted"
        ]
      },
      "RunKind": {
        "type": "string",
        "description": "Whether the run was the turn's first assignment or a later reassignment.",
        "enum": [
          "fresh",
          "reassigned"
        ]
      },
      "RunOutcome": {
        "type": "string",
        "description": "Server-derived outcome of one runner run.",
        "enum": [
          "running",
          "succeeded",
          "failed",
          "expired",
          "stopped",
          "unknown"
        ]
      },
      "RunOwnerRef": {
        "oneOf": [
          {
            "type": "object",
            "description": "A fleet's turn.",
            "required": [
              "fleet_id",
              "kind"
            ],
            "properties": {
              "fleet_id": {
                "type": "string",
                "description": "The fleet."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "fleet"
                ]
              }
            }
          }
        ],
        "description": "Whose work a run runs: always a fleet, the one `event.fleet_id` names.\n\nIt is a tagged enum of one variant rather than a bare id. A frame naming any\nother owner then fails to decode instead of running as a fleet's."
      },
      "RunPayload": {
        "type": "object",
        "description": "Work assigned to a runner. Return its `fencing_token` with updates; the server rejects\nolder tokens after reassignment.",
        "required": [
          "run_id",
          "fencing_token",
          "name",
          "run_expires_at",
          "event",
          "policy",
          "history",
          "resume_park",
          "resume_from_checkpoint",
          "inputs_waiting",
          "owner"
        ],
        "properties": {
          "decision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionAssignment",
                "description": "Reviewed runner decision selection frozen at issue; no provider key.\nAbsent on hosts without an enabled reviewed selection."
              },
              {
                "type": "null"
              }
            ]
          },
          "durable_task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DurableTaskContext",
                "description": "Native task ownership and saved recovery cursors, frozen at issuance."
              },
              {
                "type": "null"
              }
            ]
          },
          "event": {
            "$ref": "#/components/schemas/TurnEnvelope",
            "description": "The turn to run."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic guard a report must echo.",
            "minimum": 0
          },
          "finished_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EarlierCall"
            },
            "description": "The calls earlier runs of this turn finished before they died, oldest first.\nA resumed run reconciles them before it acts again. Empty for a turn's first run."
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Turn"
            },
            "description": "Every finished earlier turn of the conversation, oldest first, ahead\nof this turn; empty unless the turn is a chat message. Only the run\nframe bounds it: an assignment that would not fit one drops its\noldest turns."
          },
          "inputs_waiting": {
            "type": "boolean",
            "description": "Whether a later message waited in the run's conversation when the\ndaemon assigned it. False lets the run skip its first fold ask; a\nmessage that lands after the assignment folds on the ask after the answer."
          },
          "memory": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemoryLoadResponse",
                "description": "The fleet's memory window, as `GET /v1/runners/me/memory/{fleet_id}`\nreturns it. A daemon that reads a report's `memory` sends it on every\nrun, an empty window included. It is absent when the read failed; the\nrunner then reads memory itself."
              },
              {
                "type": "null"
              }
            ],
            "description": "Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "name": {
            "type": "string",
            "description": "The fleet's name, which the run's fixed prompt text introduces it by."
          },
          "owner": {
            "$ref": "#/components/schemas/RunOwnerRef",
            "description": "Whose work this is: the fleet `event.fleet_id` names."
          },
          "policy": {
            "$ref": "#/components/schemas/ExecutionPolicy",
            "description": "What the run is permitted to do."
          },
          "resume_from_checkpoint": {
            "type": "boolean",
            "description": "Whether the deployment resumes a dead run of an ordinary turn from its\ncheckpoint. False, nothing reads an ordinary turn's save, so the\nrunner takes none; a durable task saves either way."
          },
          "resume_park": {
            "type": "boolean",
            "description": "True when the runner can reuse its latest parked sandbox for a new turn. Reassigned\nturns and expired or outdated sandboxes require a fresh sandbox."
          },
          "run_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The instant after which the turn becomes reassignable."
          },
          "run_id": {
            "type": "string",
            "description": "Identifier for this run."
          },
          "turn_resume": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TurnResume",
                "description": "Exact committed ordinary-turn state; private bytes require a fenced native read."
              },
              {
                "type": "null"
              }
            ]
          },
          "unfinished_tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DurableTaskInputCandidate"
            },
            "description": "The fleet's unfinished tasks, newest first, so the run's model can name\nthe one a person's message steers. Empty on a task-bound run, and on a\nrun that is offered no task tools."
          }
        }
      },
      "RunState": {
        "type": "string",
        "description": "Whether a schedule will run, so a client never computes a run time for one\nthat is paused, unregistered or unreadable.",
        "enum": [
          "scheduled",
          "paused",
          "activation_pending",
          "next_run_unavailable"
        ]
      },
      "RunnerAdminAction": {
        "type": "string",
        "description": "Platform-operator mutation actions.\n\nRotation and self-test are operations rather than state transitions. They\nride the same endpoint because they share the operator scope and the\nexactly-one-of body guard with the transition actions.",
        "enum": [
          "cordon",
          "uncordon",
          "drain",
          "undrain",
          "revoke",
          "rotate",
          "self_test"
        ]
      },
      "RunnerAdminPatchRequest": {
        "type": "object",
        "description": "`PATCH /v1/admin/runners/{id}` body.\n\nEither an `action` alone, or an edit: `assigned_policy`, `labels`, or both,\napplied together or not at all. Anything else is a `400`.",
        "properties": {
          "action": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunnerAdminAction",
                "description": "A state transition, token rotation, or self-test request. Sent alone."
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AssignedPolicy",
                "description": "A policy re-assignment, which reaches the host on its next heartbeat."
              },
              {
                "type": "null"
              }
            ]
          },
          "labels": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replaces all runner labels, each at most 1,048,576 characters. Duplicates are removed\nin their original order. An empty list clears labels."
          }
        },
        "additionalProperties": false
      },
      "RunnerAdminPatchResponse": {
        "type": "object",
        "description": "`PATCH /v1/admin/runners/{id}` reply.",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "assigned_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AssignedPolicy",
                "description": "The assignment as stored, on the policy-update path."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "The runner that changed."
          },
          "labels": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The labels as stored, each once, when the request carried labels."
          },
          "selftest_requested_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the self-test was requested. The runner receives it on its next heartbeat and\nreports later; this timestamp does not indicate success."
          },
          "status": {
            "$ref": "#/components/schemas/AdminState",
            "description": "Its operator state after the change."
          }
        },
        "additionalProperties": false
      },
      "RunnerCordon": {
        "type": "object",
        "description": "Automatic quarantine; operator status remains independently visible.",
        "required": [
          "reason",
          "cordoned_at"
        ],
        "properties": {
          "cordoned_at": {
            "type": "string",
            "format": "date-time",
            "description": "Committed quarantine instant."
          },
          "reason": {
            "$ref": "#/components/schemas/CordonReason",
            "description": "Trigger that blocks new work."
          }
        }
      },
      "RunnerDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RunnerItem",
            "description": "The fields shared with the runner list, flattened on the wire."
          },
          {
            "type": "object",
            "required": [
              "active_run_count",
              "active_fleet_count"
            ],
            "properties": {
              "active_fleet_count": {
                "type": "integer",
                "format": "int64",
                "description": "Fleets represented by live runs."
              },
              "active_run_count": {
                "type": "integer",
                "format": "int64",
                "description": "Live runs currently held."
              },
              "selftest": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SelftestReport",
                    "description": "Latest complete self-test report."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "selftest_completed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Latest self-test completion instant."
              },
              "selftest_requested_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Outstanding self-test request instant."
              }
            }
          }
        ],
        "description": "One runner with its live counters."
      },
      "RunnerEventItem": {
        "type": "object",
        "description": "One row of runner history.",
        "required": [
          "id",
          "runner_id",
          "event_type",
          "occurred_at",
          "metadata"
        ],
        "properties": {
          "event_type": {
            "$ref": "#/components/schemas/RunnerEventType",
            "description": "What happened."
          },
          "id": {
            "type": "string",
            "description": "The row's identifier."
          },
          "metadata": {
            "description": "Event-specific detail. Free-form by design."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "When."
          },
          "runner_id": {
            "type": "string",
            "description": "The runner it describes."
          }
        },
        "additionalProperties": false
      },
      "RunnerEventType": {
        "type": "string",
        "description": "Append-only runner history values.",
        "enum": [
          "runner_registered",
          "runner_online",
          "runner_offline",
          "run_acquired",
          "run_released",
          "runner_cordoned",
          "runner_uncordoned",
          "runner_draining",
          "runner_drained",
          "runner_undrained",
          "runner_revoked",
          "runner_token_rotated",
          "runner_policy_assigned"
        ]
      },
      "RunnerEventsResponse": {
        "type": "object",
        "description": "A page of runner history.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunnerEventItem"
            },
            "description": "The rows in this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page, or null at the end."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total rows matching the query."
          }
        },
        "additionalProperties": false
      },
      "RunnerItem": {
        "type": "object",
        "description": "One runner in the newest-first operator list.",
        "required": [
          "id",
          "host_id",
          "sandbox_tier",
          "status",
          "liveness",
          "labels",
          "last_seen_at",
          "created_at",
          "assigned_policy",
          "degraded",
          "host"
        ],
        "properties": {
          "achievable": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CapabilityReport",
                "description": "Capability report most recently supplied by the host."
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_policy": {
            "$ref": "#/components/schemas/AssignedPolicy",
            "description": "Policy currently assigned to the host."
          },
          "cordon": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunnerCordon",
                "description": "Automatic quarantine; absent when the daemon permits new work."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Enrolment instant."
          },
          "degraded": {
            "type": "boolean",
            "description": "Whether the assignment exceeds the reported capability."
          },
          "degraded_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored explanation for a degraded verdict."
          },
          "host": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HostFacts"
              }
            ],
            "description": "The host's processors, memory and free sandbox disk, as its beats last\nread them; a fact no beat has read is absent. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "host_id": {
            "type": "string",
            "description": "Stable host identity supplied at enrolment."
          },
          "id": {
            "type": "string",
            "description": "Canonical runner identifier."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Placement labels."
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last heartbeat instant."
          },
          "liveness": {
            "$ref": "#/components/schemas/RunnerLiveness",
            "description": "Runtime state derived from heartbeat and runs."
          },
          "sandbox_tier": {
            "type": "string",
            "description": "Assigned isolation tier spelling."
          },
          "status": {
            "$ref": "#/components/schemas/AdminState",
            "description": "Operator-controlled admission state."
          },
          "tenant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tenant that registered this runner. Absent for a platform runner."
          }
        },
        "additionalProperties": false
      },
      "RunnerLiveness": {
        "type": "string",
        "description": "Derived runtime liveness, computed by the fleet read and NEVER stored —\nstoring it would drift from the values it is derived from.",
        "enum": [
          "registered",
          "busy",
          "online",
          "offline"
        ]
      },
      "RunnerNetworkPolicy": {
        "type": "string",
        "description": "Outgoing network access policy assigned to a runner.",
        "enum": [
          "allow_all",
          "deny_all_egress",
          "allow_list_egress"
        ]
      },
      "RunnerPatchReply": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RunnerAdminPatchResponse",
            "description": "The state after an action or an edit."
          },
          {
            "$ref": "#/components/schemas/RunnerTokenRotatedResponse",
            "description": "The replacement token after a `rotate`, shown once."
          }
        ],
        "description": "The `200` of a runner PATCH, admin or tenant.\n\nThe runner's state after an action or an edit, or its replacement token\nafter a `rotate`. Untagged: the two shapes already differ (`status` against\n`runner_token`), so the wire carries no tag and publishes as `oneOf`.\n`Debug` delegates to each shape's own, which redacts the token\n(`redact.rs`)."
      },
      "RunnerRunItem": {
        "type": "object",
        "description": "One run in a runner's newest-first operator history.",
        "required": [
          "id",
          "fleet_id",
          "destination",
          "workspace_id",
          "turn_id",
          "outcome",
          "kind",
          "fencing_token",
          "provider",
          "model",
          "posture",
          "metered_input_tokens",
          "metered_cached_tokens",
          "metered_output_tokens",
          "run_expires_at",
          "created_at"
        ],
        "properties": {
          "actor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actor recorded on the fleet turn, absent once the turn row is gone."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Assignment instant."
          },
          "destination": {
            "$ref": "#/components/schemas/RunDestination",
            "description": "Whether the caller can open the fleet. Never inferred from the name."
          },
          "event_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet turn type, absent once the turn row is gone."
          },
          "failure_detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Terminal failure explanation, when one was stored."
          },
          "failure_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Terminal failure classification, when one was stored."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic holder generation."
          },
          "fleet_id": {
            "type": "string",
            "description": "Fleet whose turn was held."
          },
          "fleet_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current display name, absent if the fleet row is gone."
          },
          "id": {
            "type": "string",
            "description": "Run identifier and external pagination cursor."
          },
          "kind": {
            "$ref": "#/components/schemas/RunKind",
            "description": "Whether this was the first assignment or a reassignment."
          },
          "metered_cached_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Metered cached input tokens."
          },
          "metered_input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Metered non-cached input tokens."
          },
          "metered_output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Metered output tokens."
          },
          "model": {
            "type": "string",
            "description": "The provider's own name for the model the run used."
          },
          "outcome": {
            "$ref": "#/components/schemas/RunOutcome",
            "description": "Server-derived closed outcome."
          },
          "posture": {
            "type": "string",
            "description": "The credential posture the run used."
          },
          "provider": {
            "type": "string",
            "description": "The provider the run used."
          },
          "run_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Holder deadline."
          },
          "turn_id": {
            "type": "string",
            "description": "Fleet turn identifier."
          },
          "wall_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Settled wall time, absent before settlement."
          },
          "workspace_id": {
            "type": "string",
            "description": "Workspace owning the fleet turn."
          }
        },
        "additionalProperties": false
      },
      "RunnerRunsResponse": {
        "type": "object",
        "description": "One page of a runner's work-assignment history.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunnerRunItem"
            },
            "description": "Rows in newest-first order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last run identifier when another page may exist."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Filtered total independent of the page boundary."
          }
        },
        "additionalProperties": false
      },
      "RunnerTokenRotatedResponse": {
        "type": "object",
        "description": "Successful runner-token rotation.\n\nThe replacement token is returned once. The daemon stores only its digest,\nso no later read can recover this value.",
        "required": [
          "id",
          "runner_token"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The runner whose credential changed."
          },
          "runner_token": {
            "type": "string",
            "description": "The replacement bearer token. Secret — reveal once, then discard."
          }
        },
        "additionalProperties": false
      },
      "RunnersResponse": {
        "type": "object",
        "description": "One page of runners.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunnerItem"
            },
            "description": "Rows in newest-first order."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor to send as `starting_after` on the next request."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total runner rows independent of the boundary."
          }
        },
        "additionalProperties": false
      },
      "SandboxEngine": {
        "type": "string",
        "description": "The engine that builds a runner's sandboxes.",
        "enum": [
          "firecracker"
        ]
      },
      "SandboxTier": {
        "type": "string",
        "description": "The isolation strength assigned to a runner, named for the engine that\ndelivers it.",
        "enum": [
          "firecracker"
        ]
      },
      "ScheduleCreateRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/schedules` request.",
        "required": [
          "fencing_token",
          "item_id",
          "call_number",
          "cron",
          "message"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The call's number within its run, from 1, as its record names it.",
            "minimum": 0
          },
          "cron": {
            "type": "string",
            "description": "A five-field cron expression."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "The item this call is: a `UUIDv7` the runner mints once per call.\nA retry sends it again and gets the first result."
          },
          "message": {
            "type": "string",
            "description": "What the fleet is asked to do when it fires."
          },
          "once": {
            "type": "boolean",
            "description": "Whether it retires after its first fire."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The zone the expression is read in; UTC when absent."
          }
        },
        "additionalProperties": false
      },
      "SchedulePatch": {
        "type": "object",
        "description": "The fields a schedule edit changes. An unknown field is refused.",
        "properties": {
          "cron": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement five-field expression."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement scheduled message."
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Status",
                "description": "Replacement firing intent."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement timezone name."
          }
        },
        "additionalProperties": false
      },
      "SchedulePatchRequest": {
        "type": "object",
        "description": "Changes to a fleet-created schedule. The attempt number is required; omitted schedule\nfields keep their current values.",
        "required": [
          "fencing_token",
          "item_id",
          "call_number"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The call's number within its run, from 1, as its record names it.",
            "minimum": 0
          },
          "cron": {
            "type": [
              "string",
              "null"
            ],
            "description": "A new expression."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "The item this call is: a `UUIDv7` the runner mints once per call.\nA retry sends it again and gets the first result."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "A new message."
          },
          "paused": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether it should stop firing."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "A new zone."
          }
        },
        "additionalProperties": false
      },
      "ScheduleRun": {
        "type": "object",
        "description": "What running a schedule now admitted.",
        "required": [
          "turn_id"
        ],
        "properties": {
          "turn_id": {
            "type": "string",
            "description": "The event that is the new run. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        }
      },
      "ScheduleRunRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/schedules/{schedule_id}/runs`\nrequest: run the schedule now.",
        "required": [
          "fencing_token",
          "item_id",
          "call_number"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The call's number within its run, from 1, as its record names it.",
            "minimum": 0
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "The item this call is: a `UUIDv7` the runner mints once per call.\nA retry sends it again and gets the first result."
          }
        },
        "additionalProperties": false
      },
      "ScheduleWrite": {
        "type": "object",
        "description": "What a caller sends to create a schedule.",
        "required": [
          "cron",
          "message"
        ],
        "properties": {
          "cron": {
            "type": "string",
            "description": "The expression it fires on."
          },
          "message": {
            "type": "string",
            "description": "What the fleet is asked to do when it fires."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The zone that expression is read in. Absent means UTC."
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "description": "Search the public web for the given run.",
        "required": [
          "fencing_token",
          "call_number",
          "query"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The model's one-based tool call number.",
            "minimum": 1
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The current holder's fence.",
            "minimum": 0
          },
          "query": {
            "type": "string",
            "description": "Search terms submitted to the platform's configured vendors.",
            "maxLength": 1048576,
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "additionalProperties": false
      },
      "SearchResponse": {
        "type": "object",
        "description": "The first vendor's successful search.",
        "required": [
          "vendor",
          "results"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "description": "Matching pages in relevance order."
          },
          "vendor": {
            "type": "string",
            "description": "The vendor that answered."
          }
        }
      },
      "SearchResult": {
        "type": "object",
        "description": "One web source in vendor order.",
        "required": [
          "url",
          "excerpts"
        ],
        "properties": {
          "excerpts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Relevant passages from this page."
          },
          "published": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publication date, when supplied."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page title, when known."
          },
          "url": {
            "type": "string",
            "description": "Source URL."
          }
        }
      },
      "SecretFleet": {
        "type": "object",
        "description": "One fleet a secret is available to.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The fleet's identifier."
          },
          "name": {
            "type": "string",
            "description": "Its current name."
          }
        }
      },
      "SecretSummary": {
        "type": "object",
        "description": "One credential as the list shows it.",
        "required": [
          "name",
          "created_at",
          "kind"
        ],
        "properties": {
          "available_to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/SecretFleet"
            },
            "description": "Fleets in this workspace holding an approved grant for this secret.\nPresent only when the caller may read fleets; an empty list means no\nfleet uses it."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The custom endpoint, where one may be displayed."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was first stored."
          },
          "kind": {
            "type": "string",
            "description": "The server's classification. A client reads this and never re-derives it."
          },
          "name": {
            "type": "string",
            "description": "The name the secret is stored and interpolated under."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider label, for the kinds that carry one."
          }
        }
      },
      "SecretsResponse": {
        "type": "object",
        "description": "`GET /v1/workspaces/{workspace_id}/secrets` — every secret the workspace holds.",
        "required": [
          "secrets"
        ],
        "properties": {
          "secrets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecretSummary"
            },
            "description": "The rows, by name."
          }
        }
      },
      "SelfResponse": {
        "type": "object",
        "description": "`GET /v1/runners/me` reply — the runner's own registration row, read-only.\n\nReading this does NOT bump liveness, so inspecting a host can never mask a\ndead runner.",
        "required": [
          "id",
          "status",
          "host_id",
          "sandbox_tier",
          "last_seen_at",
          "assigned_policy",
          "degraded"
        ],
        "properties": {
          "achievable": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CapabilityReport",
                "description": "What the host reported it can actually enforce."
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_policy": {
            "$ref": "#/components/schemas/AssignedPolicy",
            "description": "The policy currently assigned to it."
          },
          "degraded": {
            "type": "boolean",
            "description": "Whether the row reads degraded."
          },
          "degraded_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it reads degraded."
          },
          "host_id": {
            "type": "string",
            "description": "The host it runs on."
          },
          "id": {
            "type": "string",
            "description": "The runner's identifier."
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "The last beat; the Unix epoch when never seen."
          },
          "sandbox_tier": {
            "type": "string",
            "description": "The tier it was assigned."
          },
          "status": {
            "type": "string",
            "description": "Operator-facing state."
          }
        }
      },
      "SelftestCheck": {
        "type": "object",
        "description": "One self-test check's verdict.\n\n`detail` is prose even when `ok`: every passing check carries a line, and a\nwhitespace-free cause reads to an operator as a leaked internal identifier.",
        "required": [
          "name",
          "ok",
          "detail"
        ],
        "properties": {
          "detail": {
            "type": "string",
            "description": "Why, in prose."
          },
          "name": {
            "type": "string",
            "description": "What was checked."
          },
          "ok": {
            "type": "boolean",
            "description": "Whether it passed."
          }
        },
        "additionalProperties": false
      },
      "SelftestReport": {
        "type": "object",
        "description": "One probe run and the verdict it reached.\n\nThe tier and policy travel with the verdict. Compare them against the\nrunner's current values to tell a stale result from a live one.",
        "required": [
          "checks",
          "all_ok",
          "sandbox_tier",
          "network_policy"
        ],
        "properties": {
          "all_ok": {
            "type": "boolean",
            "description": "Whether every check passed."
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SelftestCheck"
            },
            "description": "Every check the probe ran."
          },
          "network_policy": {
            "type": "string",
            "description": "Outgoing network access policy in effect during the self-test."
          },
          "sandbox_tier": {
            "type": "string",
            "description": "The tier in force when the probe ran."
          }
        },
        "additionalProperties": false
      },
      "SharedMemory": {
        "type": "object",
        "description": "An entry another fleet in the workspace published, and who wrote it.",
        "required": [
          "key",
          "content",
          "category",
          "writer_fleet_id",
          "writer_fleet_name",
          "updated_at"
        ],
        "properties": {
          "category": {
            "type": "string",
            "description": "The writer's retention category."
          },
          "content": {
            "type": "string",
            "description": "What its writer remembered."
          },
          "key": {
            "type": "string",
            "description": "The key its writer stored it under."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last written."
          },
          "writer_fleet_id": {
            "type": "string",
            "description": "The fleet that wrote it, and the only fleet that may change it."
          },
          "writer_fleet_name": {
            "type": "string",
            "description": "That fleet's name in the workspace."
          }
        }
      },
      "SignedNanos": {
        "type": "string",
        "description": "A whole number of nanos (10⁻⁹ US dollars) as a decimal string, negative for a debt.",
        "pattern": "^(0|-?[1-9][0-9]*)$"
      },
      "Status": {
        "type": "string",
        "description": "Human-editable schedule intent; deletion keeps its separate resource verb.",
        "enum": [
          "active",
          "paused"
        ]
      },
      "SteerAccepted": {
        "type": "object",
        "description": "What a steer returns once agentsfleet accepts the request.\n\nThe response carries the id the run is found under. Filter the live turn\ntail on `turn_id` to follow the message you just sent.",
        "required": [
          "status",
          "turn_id",
          "replayed",
          "disposition"
        ],
        "properties": {
          "disposition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SteerDisposition"
              }
            ],
            "description": "Where the message went. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "folded_into_turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The run the message joined, when `disposition` is `folded`. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "replayed": {
            "type": "boolean",
            "description": "Whether an earlier send of the same `operation_id` already admitted this\nmessage. When `true`, `turn_id` is that send's turn, which may have\nrun already. `false` when this call admitted it."
          },
          "status": {
            "type": "string",
            "description": "Always `accepted`."
          },
          "turn_id": {
            "type": "string",
            "description": "The canonical turn id the steer became."
          }
        }
      },
      "SteerDisposition": {
        "type": "string",
        "description": "Where an accepted steer went.\n\n`started`: nothing was waiting and no run was live, so it starts a run.\n`folded`: the fleet's live run takes it at its next safe boundary.\n`queued`: it runs after the work ahead of it.",
        "enum": [
          "started",
          "folded",
          "queued"
        ]
      },
      "SteerRequest": {
        "type": "object",
        "description": "`POST /v1/workspaces/{ws}/fleets/{id}/messages` — an operator's steer.\n\nUnknown fields are refused with 400. A field this endpoint does not read is\na typo, or a feature it lacks. Ignoring it would let a client believe a\nsetting took effect.",
        "required": [
          "message"
        ],
        "properties": {
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageImage"
            },
            "description": "Images accompanying the message."
          },
          "message": {
            "type": "string",
            "description": "What to say to the fleet: 1 to 1,048,576 characters, with no NUL\ncharacter.\n\nCounted on the decoded text, which is what reaches the stream. The\nescaped form a client sends is not what counts against the limit."
          },
          "operation_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your retry identifier, 1 to 2,647 bytes with no NUL character (U+0000).\n\nReuse it with the same message and sender for one run and charge. Reuse with different\ntext or sender returns 409 `UZ-AGT-016`. Each person is one sender; workspace API keys\nshare one sender. Omit it to create a new message on every request. Safe retries\nremain valid after stopping or pausing the fleet."
          }
        },
        "additionalProperties": false
      },
      "StoreSecretRequest": {
        "type": "object",
        "description": "Stores one secret under a name you choose.\n\nagentsfleet ignores fields it does not know, instead of refusing the\nrequest.",
        "required": [
          "name",
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "The object to seal. agentsfleet reads nothing inside it beyond its\nshape.\n\nSend any well-formed JSON object."
          },
          "name": {
            "type": "string",
            "description": "The name a fleet interpolates as `${secrets.<name>.<field>}`."
          }
        },
        "additionalProperties": false
      },
      "StoredModelEntry": {
        "type": "object",
        "description": "What a create and a model change both answer with.\n\nOne shape for both verbs because both say the same thing — which entry now\nstands — and the status code is what distinguishes them.",
        "required": [
          "id",
          "model_id",
          "secret_ref",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was first stored."
          },
          "id": {
            "type": "string",
            "description": "The entry's identity."
          },
          "model_id": {
            "type": "string",
            "description": "The model it configures."
          },
          "secret_ref": {
            "type": "string",
            "description": "The vault key name backing it."
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace holding the credential. Absent if that workspace is unavailable.",
            "x-stability": "stable"
          }
        }
      },
      "StoredSecretResponse": {
        "type": "object",
        "description": "What a create and a replace both answer with.\n\nOne shape for both verbs because both say the same thing — which name now\nholds a secret — and the status code is what distinguishes them.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name the secret is stored under."
          }
        }
      },
      "TaggedCheckpointFile": {
        "type": "object",
        "description": "One bounded file represented by immutable encrypted chunks in order.",
        "required": [
          "path",
          "executable",
          "size",
          "objects",
          "kind"
        ],
        "properties": {
          "executable": {
            "type": "boolean",
            "description": "Ordinary file executable bit."
          },
          "kind": {
            "type": "string",
            "enum": [
              "file"
            ]
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Native chunk identities, in byte order."
          },
          "path": {
            "type": "string",
            "description": "Declared workspace-relative path; never followed during restoration."
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "description": "Logical length; empty files require no objects.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "TenantProviderRequest": {
        "type": "object",
        "description": "`PUT /v1/tenants/me/provider`.",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/ProviderMode",
            "description": "Whose key to dial with."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model to select, if the tenant is changing it."
          },
          "secret_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "The credential to dial with, required under self-managed mode."
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace holding the credential, required under self-managed mode."
          }
        },
        "additionalProperties": false
      },
      "TenantProviderResponse": {
        "type": "object",
        "description": "`GET /v1/tenants/me/provider`, and what a write answers with.",
        "required": [
          "mode",
          "provider",
          "model",
          "context_cap_tokens",
          "platform_default_available"
        ],
        "properties": {
          "context_cap_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "The context window the catalogue prices this model at.",
            "minimum": 0
          },
          "mode": {
            "$ref": "#/components/schemas/ProviderMode",
            "description": "Whose key this tenant's runs dial with."
          },
          "model": {
            "type": "string",
            "description": "The model identifier as the provider spells it."
          },
          "platform_default_available": {
            "type": "boolean",
            "description": "Whether an active platform-default row exists at all."
          },
          "provider": {
            "type": "string",
            "description": "The provider the model belongs to."
          },
          "secret_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "The credential dialled under self-managed mode."
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace holding the self-managed credential. Absent in platform mode\nor when the stored workspace is unavailable.",
            "x-stability": "stable"
          }
        }
      },
      "ThreadResponse": {
        "type": "object",
        "description": "A page of one fleet's chat thread, bodies included.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurnDetail"
            },
            "description": "The turns on this page, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` when this one ends the walk."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How many turns the thread holds in total. Never populated.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ToolCallDetail": {
        "type": "object",
        "description": "`GET …/turns/{turn_id}/items/{item_id}` reply: one call, in full.",
        "required": [
          "call_id",
          "kind",
          "status",
          "arguments",
          "truncated_arguments",
          "output",
          "output_line_count",
          "truncated"
        ],
        "properties": {
          "arguments": {
            "type": "object",
            "description": "Every argument the call was made with, secret values masked. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "call_id": {
            "type": "string",
            "description": "Tool call identifier from the conversation, in `{fence}:{n}` format. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileChange"
            },
            "description": "For an edit: each file it changed and the lines it added and\nremoved. Absent for any other call."
          },
          "kind": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ItemKind"
              }
            ],
            "description": "What kind of thing the call was. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "output": {
            "type": "string",
            "description": "Everything the call returned. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "output_line_count": {
            "type": "integer",
            "format": "int64",
            "description": "How many lines the whole output had, before any cut. Beta: this field may change shape before it is stable.",
            "minimum": 0,
            "x-stability": "beta"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebSource"
            },
            "description": "Pages returned by this call, in their original order."
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ItemStatus"
              }
            ],
            "description": "How it ended. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "tool": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tool it called. Absent for an item that called none. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether the output was cut to fit one post. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "truncated_arguments": {
            "type": "boolean",
            "description": "Whether the arguments were dropped because they alone would not fit\none post. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          }
        },
        "additionalProperties": false
      },
      "ToolCallRecord": {
        "type": "object",
        "description": "One finished call as the runner records it.",
        "required": [
          "call_number",
          "arguments",
          "truncated_arguments",
          "output",
          "output_line_count",
          "truncated",
          "turn_id",
          "kind",
          "tool",
          "status"
        ],
        "properties": {
          "arguments": {
            "type": "object",
            "description": "Every argument the call was made with, secret values masked, with no\nNUL character."
          },
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "Call number within its run, starting at 1. This is `n` in the `{fence}:{n}` identifier\nused by activity and saved records.",
            "maximum": 9223372036854775807,
            "minimum": 1
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileChange"
            },
            "description": "For an edit: each file it changed and the lines it added and removed.\nAbsent for any other call."
          },
          "kind": {
            "$ref": "#/components/schemas/ItemKind",
            "description": "What kind of thing the call was."
          },
          "output": {
            "type": "string",
            "description": "Everything the call returned, with no NUL character. Cut only when\nthe record would not otherwise fit one post."
          },
          "output_line_count": {
            "type": "integer",
            "format": "int64",
            "description": "How many lines the whole output had, before any cut.",
            "minimum": 0
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebSource"
            },
            "description": "Pages returned by this call, in their original order."
          },
          "status": {
            "$ref": "#/components/schemas/ItemStatus",
            "description": "How it ended."
          },
          "tool": {
            "type": "string",
            "description": "The tool it called; never empty."
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether the runner cut the output to fit one post."
          },
          "truncated_arguments": {
            "type": "boolean",
            "description": "Whether the runner dropped the arguments, which alone would not fit\none post."
          },
          "turn_id": {
            "type": "string",
            "description": "The turn that was newest when the call's step began: the run's own,\nor one a person sent while it worked and its conversation read. A turn\nthe run does not serve is refused."
          }
        },
        "additionalProperties": false
      },
      "ToolCallRecordsRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/items` request.",
        "required": [
          "fencing_token",
          "calls"
        ],
        "properties": {
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolCallRecord"
            },
            "description": "The finished calls to keep. A call posted again replaces its record."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ToolCallRecordsStored": {
        "type": "object",
        "description": "What a post kept.",
        "required": [
          "stored_count",
          "skipped_count"
        ],
        "properties": {
          "skipped_count": {
            "type": "integer",
            "description": "Records refused for their shape or for naming a turn the run does not\nserve. Beta: this field may change shape before it is stable.",
            "minimum": 0,
            "x-stability": "beta"
          },
          "stored_count": {
            "type": "integer",
            "description": "Records written or replaced. Beta: this field may change shape before it is stable.",
            "minimum": 0,
            "x-stability": "beta"
          }
        }
      },
      "ToolCallStatus": {
        "type": "string",
        "description": "How one tool call ended.\n\nEvery call ends exactly once. A call the run never finished, after a crash,\na kill or a timeout, ends `interrupted`. So no call is left running in a\nbrowser or missing from the record.",
        "enum": [
          "succeeded",
          "failed",
          "interrupted"
        ]
      },
      "ToolTrace": {
        "type": "object",
        "description": "Every call one run made, oldest first.\n\nNo count or size caps the list: the report's frame\n(`crate::protocol::MESSAGE_BYTES_MAX`) bounds it, and each row keeps only\nits short preview.",
        "required": [
          "calls"
        ],
        "properties": {
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolTraceCall"
            },
            "description": "Every call the run made."
          },
          "sources_in_items": {
            "type": "boolean",
            "description": "The final report needed the room taken by duplicate citations. Settlement\nrestores them from this run's numbered items in the same transaction."
          }
        },
        "additionalProperties": false
      },
      "ToolTraceCall": {
        "type": "object",
        "description": "One call in a run's trace.",
        "required": [
          "call_id",
          "name",
          "arguments",
          "status",
          "duration_ms"
        ],
        "properties": {
          "arguments": {
            "type": "object",
            "description": "The arguments the call was made with, secret values masked. At most\n2048 bytes encoded, no string or key inside longer than 256 bytes, and\nno NUL character anywhere."
          },
          "call_id": {
            "type": "string",
            "description": "Call number starting at 1, as a decimal string. Other formats are dropped. The server\nadds `{fence}:` to match the activity stream's identifier."
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileChange"
            },
            "description": "For an edit: each file it changed and the lines it added and removed.\nAbsent for any other call, and for an edit that failed."
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "How long the call took, in milliseconds.",
            "minimum": 0
          },
          "exit_code": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The process's exit code, for a call that ran one."
          },
          "name": {
            "type": "string",
            "description": "Which tool."
          },
          "output_head": {
            "type": [
              "string",
              "null"
            ],
            "description": "The output's first lines, at most 5 lines and 1024 bytes. Absent when\nthe call returned nothing."
          },
          "output_line_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How many lines the whole output had.",
            "minimum": 0
          },
          "output_tail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The output's last lines, at most 5 lines and 1024 bytes. Absent when\nthe head already holds the whole output."
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebSource"
            },
            "description": "Pages returned by this call, in their original order."
          },
          "status": {
            "$ref": "#/components/schemas/ToolCallStatus",
            "description": "How the call ended."
          }
        },
        "additionalProperties": false
      },
      "Trigger": {
        "type": "object",
        "description": "One trigger: a webhook source, the GitHub App subscription, or one Slack\nchannel. The fleet adds it by tool; a person lists and removes it.",
        "required": [
          "id",
          "kind",
          "source",
          "created_at"
        ],
        "properties": {
          "channel": {
            "type": [
              "string",
              "null"
            ],
            "description": "A mention's channel identifier, or `null`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the fleet added it, such as `2026-10-24T05:00:00.000Z`."
          },
          "events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The event names that wake the fleet, or `null` for every event."
          },
          "id": {
            "type": "string",
            "description": "The trigger's identity: what a remove names."
          },
          "kind": {
            "$ref": "#/components/schemas/TriggerKind",
            "description": "What wakes the fleet."
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The repositories whose App events wake the fleet, or `null`."
          },
          "source": {
            "type": "string",
            "description": "A webhook's source slug, `github` for an App event, `slack` for a mention."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "A webhook's delivery address, `/v1/webhooks/{fleet_id}/{source}` on this\ndeployment, or `null` for another kind."
          }
        }
      },
      "TriggerAddRequest": {
        "type": "object",
        "description": "`POST /v1/runners/me/runs/{run_id}/triggers` request.",
        "required": [
          "fencing_token",
          "item_id",
          "call_number",
          "kind"
        ],
        "properties": {
          "call_number": {
            "type": "integer",
            "format": "int64",
            "description": "The call's number within its run, from 1, as its record names it.",
            "minimum": 0
          },
          "channel": {
            "type": [
              "string",
              "null"
            ],
            "description": "A mention's channel identifier."
          },
          "events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The event names that wake the fleet; absent wakes it on every event."
          },
          "fencing_token": {
            "type": "integer",
            "format": "int64",
            "description": "The run's fencing token; a holder the fleet has superseded is refused.",
            "minimum": 0
          },
          "item_id": {
            "type": "string",
            "description": "The item this call is: a `UUIDv7` the runner mints once per call.\nA retry sends it again and gets the first result."
          },
          "kind": {
            "$ref": "#/components/schemas/TriggerKind",
            "description": "What wakes the fleet."
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The repositories whose App events wake the fleet, as `owner/name`."
          },
          "secret_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workspace vault key holding a webhook's signing secret."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "A webhook's source slug, the last segment of its URL; `github` for an\nApp event and `slack` for a mention when absent."
          },
          "verifier": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TriggerVerifier",
                "description": "A webhook's signing recipe, for a source outside the built-in registry."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TriggerKind": {
        "type": "string",
        "description": "What wakes the fleet: a signed delivery to its own URL, an event from the\nworkspace's GitHub App, or a mention in one Slack channel.",
        "enum": [
          "webhook",
          "app_event",
          "mention"
        ]
      },
      "TriggerVerifier": {
        "type": "object",
        "description": "How a webhook delivery from a source outside the built-in registry proves\nitself. It names a signing recipe, and the header that carries the signature\nwhen the recipe signs the body alone.",
        "required": [
          "scheme"
        ],
        "properties": {
          "header": {
            "type": [
              "string",
              "null"
            ],
            "description": "The signature header, for a recipe that signs the body alone."
          },
          "scheme": {
            "type": "string",
            "description": "The recipe, such as `body-hex-sha256` or `svix-v1`."
          }
        },
        "additionalProperties": false
      },
      "TriggersResponse": {
        "type": "object",
        "description": "`GET …/fleets/{fleet_id}/triggers`, and the run verb's list.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trigger"
            },
            "description": "The fleet's triggers, oldest first."
          }
        }
      },
      "Turn": {
        "type": "object",
        "description": "One earlier exchange in the conversation: what was asked, the tool calls\nits run made, and what the fleet answered.",
        "required": [
          "sequence",
          "message",
          "answer"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "Who or what produced this turn, as stored on the thread."
          },
          "answer": {
            "type": "string",
            "description": "The fleet's answer, or the fixed text a reply-less or failed run reads as."
          },
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EarlierCall"
            },
            "description": "Every tool call the turn's run made, in the order it made them, as\n`thread.items` keeps them; empty for a turn that called none."
          },
          "event_type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TurnKind",
                "description": "How the turn entered the system. Earlier assignments may omit this field."
              },
              {
                "type": "null"
              }
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageImage"
            },
            "description": "Images that accompanied the person's message."
          },
          "message": {
            "type": "string",
            "description": "The turn's message, as `turn::message_of` reads it."
          },
          "sequence": {
            "type": "integer",
            "format": "int64",
            "description": "The turn's place in its thread (`thread.turns.sequence`). A saved\nsummary's watermark counts in it, and a run skips the turns a loaded\nsummary covers.",
            "minimum": 0
          }
        }
      },
      "TurnDetail": {
        "type": "object",
        "description": "One turn as the expanded view renders it — bodies included.",
        "required": [
          "fleet_id",
          "turn_id",
          "workspace_id",
          "actor",
          "event_type",
          "status",
          "request_json",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "Who or what produced the turn."
          },
          "cost_nanos": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "What this turn actually cost, summed over its telemetry rows."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row was created."
          },
          "durable_task_activity": {
            "$ref": "#/components/schemas/DurableTaskActivityHistory",
            "description": "Retained public task progress, separate from private conversation state."
          },
          "event_type": {
            "type": "string",
            "description": "How the turn entered the system, as stored."
          },
          "failure_detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The operator-readable cause line, absent when none was carried."
          },
          "failure_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "What refused or failed the run, absent on a clean one."
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet this turn belongs to."
          },
          "request_json": {
            "type": "string",
            "description": "The trigger payload as stored, serialized to text."
          },
          "response_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's full answer.\n\n`null` while a run is in flight, and on a run that failed before\nproducing one."
          },
          "resumes_turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The turn this one continues, set on a continuation."
          },
          "status": {
            "type": "string",
            "description": "Where the turn's run got to, as stored."
          },
          "tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens the run spent, absent until a runner reports."
          },
          "tool_calls": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ToolTrace",
                "description": "Recorded tool calls, including arguments and outcomes. Null means records are\nunavailable, not that no tools ran."
              },
              {
                "type": "null"
              }
            ],
            "description": "Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "turn_id": {
            "type": "string",
            "description": "The canonical turn identifier — the stream entry id that produced it."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row last changed."
          },
          "wall_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall milliseconds the run took, absent until a runner reports."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace the fleet belongs to."
          }
        },
        "additionalProperties": false
      },
      "TurnEnvelope": {
        "type": "object",
        "description": "A turn and its original request body. The runner reads `request_json`; API responses\nreturn it unchanged.",
        "required": [
          "turn_id",
          "fleet_id",
          "workspace_id",
          "actor",
          "event_type",
          "request_json",
          "created_at"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "Who or what produced the turn."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the turn was created."
          },
          "event_type": {
            "$ref": "#/components/schemas/TurnKind",
            "description": "How the turn entered the system."
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet this turn belongs to."
          },
          "request_json": {
            "type": "string",
            "description": "Original request body, returned unchanged."
          },
          "turn_id": {
            "type": "string",
            "description": "The canonical turn identifier, the same on every surface that shows\nthe turn."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace the fleet belongs to."
          }
        }
      },
      "TurnKind": {
        "type": "string",
        "description": "How a turn entered the system.",
        "enum": [
          "chat",
          "webhook",
          "cron",
          "continuation"
        ]
      },
      "TurnPatch": {
        "type": "object",
        "description": "`PATCH …/turns/{turn_id}`: stop the turn.",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/TurnStatusChange",
            "description": "The status to set; `cancelled` is the only one."
          }
        },
        "additionalProperties": false
      },
      "TurnResume": {
        "type": "object",
        "description": "Assignments carry only this descriptor. A fenced read supplies private state and a pin.",
        "required": [
          "checkpoint_id",
          "generation",
          "format_version",
          "scope",
          "manifest_root",
          "history_digest"
        ],
        "properties": {
          "checkpoint_id": {
            "$ref": "#/components/schemas/CheckpointOperationId",
            "description": "Immutable event-owned generation identity."
          },
          "format_version": {
            "type": "integer",
            "format": "int32",
            "description": "Unsupported formats refuse before any model or tool call.",
            "minimum": 0
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Allocated monotonically, including failed and retired generations.",
            "minimum": 0
          },
          "history_digest": {
            "type": "string",
            "description": "Digest of the exact root bytes returned by the native reader."
          },
          "manifest_root": {
            "type": "string",
            "description": "Digest of the complete ordered manifest."
          },
          "scope": {
            "$ref": "#/components/schemas/TurnScope",
            "description": "Scope the frozen files and private root authenticate."
          }
        },
        "additionalProperties": false
      },
      "TurnScope": {
        "type": "object",
        "description": "Immutable compatibility witnesses from the issued run and its capture owner.",
        "required": [
          "workspace_id",
          "fleet_id",
          "turn_id",
          "workspace"
        ],
        "properties": {
          "fleet_id": {
            "$ref": "#/components/schemas/CheckpointOperationId",
            "description": "Fleet owning the stable event."
          },
          "turn_id": {
            "$ref": "#/components/schemas/CheckpointOperationId",
            "description": "Stable root event across every replacement run."
          },
          "workspace": {
            "$ref": "#/components/schemas/TurnWorkspace",
            "description": "API-only or complete files; a building workspace has no saved variant."
          },
          "workspace_id": {
            "$ref": "#/components/schemas/CheckpointOperationId",
            "description": "Workspace containing the event and encrypted objects."
          }
        },
        "additionalProperties": false
      },
      "TurnStatusChange": {
        "type": "string",
        "description": "The status a caller may set on a turn.",
        "enum": [
          "cancelled"
        ]
      },
      "TurnSummary": {
        "type": "object",
        "description": "One turn as the operator surface renders it.",
        "required": [
          "fleet_id",
          "turn_id",
          "workspace_id",
          "actor",
          "event_type",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "Who or what produced the turn."
          },
          "cost_nanos": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Nanos",
                "description": "What this turn actually cost, summed over its telemetry rows."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row was created."
          },
          "event_type": {
            "type": "string",
            "description": "How the turn entered the system, as stored."
          },
          "failure_detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The operator-readable cause line, absent when none was carried."
          },
          "failure_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "What refused or failed the run, absent on a clean one."
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet this turn belongs to."
          },
          "resumes_turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The turn this one continues, set on a continuation."
          },
          "status": {
            "type": "string",
            "description": "Where the turn's run got to, as stored."
          },
          "tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens the run spent, absent until a runner reports."
          },
          "turn_id": {
            "type": "string",
            "description": "The canonical turn identifier — the stream entry id that produced it."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the row last changed."
          },
          "wall_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall milliseconds the run took, absent until a runner reports."
          },
          "workspace_id": {
            "type": "string",
            "description": "The workspace the fleet belongs to."
          }
        },
        "additionalProperties": false
      },
      "TurnWorkspace": {
        "oneOf": [
          {
            "type": "object",
            "description": "No sandbox was needed or built for this run.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "api_only"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "A complete supported workspace captured under this toolbox, in this\nsandbox.",
            "required": [
              "toolbox_digest",
              "sandbox",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "files"
                ]
              },
              "sandbox": {
                "$ref": "#/components/schemas/CheckpointSandbox",
                "description": "The sandbox the files were taken in, which a restore lands them\nonly in."
              },
              "toolbox_digest": {
                "type": "string",
                "description": "Verified host-local toolbox; its bytes are excluded from the snapshot."
              }
            }
          }
        ],
        "description": "An API-only run explicitly owns no workspace files."
      },
      "TurnsResponse": {
        "type": "object",
        "description": "A page of turn history.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurnSummary"
            },
            "description": "The turns on this page, newest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last one."
          }
        },
        "additionalProperties": false
      },
      "UpdateModelEntryRequest": {
        "type": "object",
        "description": "`PATCH /v1/tenants/me/models/{id}` — point an entry at another model.",
        "required": [
          "model_id"
        ],
        "properties": {
          "model_id": {
            "type": "string",
            "description": "The model to point at."
          }
        },
        "additionalProperties": false
      },
      "VerifySessionRequest": {
        "type": "object",
        "description": "`POST /v1/auth/sessions/{session_id}/verify` — the code is presented.",
        "required": [
          "verification_code"
        ],
        "properties": {
          "verification_code": {
            "type": "string",
            "description": "The six digits a person read out of the browser."
          }
        },
        "additionalProperties": false
      },
      "VerifySessionResponse": {
        "type": "object",
        "description": "What a redeemed login hands back.",
        "required": [
          "dashboard_public_key",
          "ciphertext",
          "nonce"
        ],
        "properties": {
          "ciphertext": {
            "type": "string",
            "description": "The sealed credential."
          },
          "dashboard_public_key": {
            "type": "string",
            "description": "The dashboard's public key."
          },
          "nonce": {
            "type": "string",
            "description": "The nonce used to encrypt this credential."
          }
        }
      },
      "View": {
        "type": "object",
        "description": "One schedule, as the tenant surface renders it.",
        "required": [
          "schedule_id",
          "fleet_id",
          "cron",
          "timezone",
          "message",
          "source",
          "once",
          "status",
          "sync",
          "etag",
          "description",
          "run_state",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "cron": {
            "type": "string",
            "description": "The expression it fires on."
          },
          "description": {
            "type": "string",
            "description": "The expression in words, with the zone it is read in, for example\n`At 9:00 AM (Asia/Kolkata)`."
          },
          "etag": {
            "type": "string",
            "description": "The schedule's current `ETag`; send it in `If-Match` to change it."
          },
          "fleet_id": {
            "type": "string",
            "description": "The fleet it wakes."
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last push failed, when one did."
          },
          "message": {
            "type": "string",
            "description": "What the fleet is asked to do."
          },
          "next_run_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it next runs, computed by the server from the expression and its\nzone. Null unless `run_state` is `scheduled`."
          },
          "once": {
            "type": "boolean",
            "description": "Whether it retires after its first fire. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "run_state": {
            "$ref": "#/components/schemas/RunState",
            "description": "Whether the schedule will run, as the server reads it now."
          },
          "schedule_id": {
            "type": "string",
            "description": "Its identity."
          },
          "source": {
            "type": "string",
            "description": "Who made it: `api` for a person, `trigger` for the fleet's own\ndocument, `fleet` for the fleet while it ran. Only a `fleet` schedule\ncan be changed by the fleet. Beta: this field may change shape before it is stable.",
            "x-stability": "beta"
          },
          "status": {
            "type": "string",
            "description": "What the operator wants it to be doing."
          },
          "sync": {
            "type": "string",
            "description": "How far agentsfleet has brought the external scheduler in line.\n\nA schedule can save without registering. This field shows you that\nstate."
          },
          "timezone": {
            "type": "string",
            "description": "The zone that expression is read in."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last changed."
          }
        }
      },
      "Visibility": {
        "type": "string",
        "description": "Who reads a stored entry: its own fleet, or every fleet in the workspace\ngranted to read shared memory.",
        "enum": [
          "fleet",
          "workspace"
        ]
      },
      "WaitingInvite": {
        "type": "object",
        "description": "One invite waiting for the caller's address.",
        "required": [
          "id",
          "account",
          "expires_at"
        ],
        "properties": {
          "account": {
            "$ref": "#/components/schemas/WorkspaceAccount",
            "description": "The account accepting it joins."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it stops being acceptable."
          },
          "id": {
            "type": "string",
            "description": "The invite's identifier, which the accept route names."
          }
        }
      },
      "WebSource": {
        "type": "object",
        "description": "A sanitized page citation shared by a completion, a trace row and its saved item.",
        "required": [
          "url"
        ],
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Displayable page title, when supplied."
          },
          "url": {
            "type": "string",
            "description": "Displayable URL, stripped of credentials, query and fragment by the runner."
          }
        },
        "additionalProperties": false
      },
      "WorkspaceAccount": {
        "type": "object",
        "description": "The account a listed workspace belongs to.",
        "required": [
          "tenant_id",
          "owner_name"
        ],
        "properties": {
          "owner_name": {
            "type": "string",
            "description": "What a person calls the account: its owner's display name, or the\naccount's own name when the owner has none."
          },
          "tenant_id": {
            "type": "string",
            "description": "The account's tenant."
          }
        }
      },
      "WorkspaceMember": {
        "type": "object",
        "description": "One member of a workspace's account, as its thread names senders.\n\nNo address: every member of an account can read this list, and a name is\nall a thread needs.",
        "required": [
          "user_id",
          "role",
          "actor"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "The actor their messages record, `steer:<subject>`: what a thread\nrow's `actor` equals when this member sent it."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their name, `null` when the identity provider supplied none."
          },
          "role": {
            "type": "string",
            "description": "Their role: `owner` or `member`."
          },
          "user_id": {
            "type": "string",
            "description": "The member's user identifier."
          }
        }
      },
      "WorkspaceModel": {
        "type": "object",
        "description": "A priced explicit selection owned by the workspace's billing account.",
        "required": [
          "ref",
          "is_default",
          "label",
          "provider",
          "model",
          "context_window_tokens",
          "eligibility",
          "pricing"
        ],
        "properties": {
          "context_window_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Catalogue context bound."
          },
          "eligibility": {
            "$ref": "#/components/schemas/Eligibility",
            "description": "Supported purposes."
          },
          "is_default": {
            "type": "boolean",
            "description": "Whether this is the default model for new fleets in the workspace.",
            "x-stability": "stable"
          },
          "label": {
            "type": "string",
            "description": "Display label."
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Maximum output tokens; omitted when model settings are not configured."
          },
          "model": {
            "type": "string",
            "description": "Provider model identifier."
          },
          "pricing": {
            "$ref": "#/components/schemas/ModelPricing",
            "description": "Exact current rates."
          },
          "provider": {
            "type": "string",
            "description": "Approved provider identifier."
          },
          "ref": {
            "type": "string",
            "description": "Model selection reference, including an explicit shared platform default. Use it\nunchanged as a fleet's `model_ref`."
          }
        }
      },
      "WorkspaceSummary": {
        "type": "object",
        "description": "One workspace as the list shows it.",
        "required": [
          "id",
          "created_at",
          "account",
          "role"
        ],
        "properties": {
          "account": {
            "$ref": "#/components/schemas/WorkspaceAccount",
            "description": "The account it belongs to, which is how a dashboard groups the list."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created; the walk's sort key."
          },
          "id": {
            "type": "string",
            "description": "The workspace's identifier."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its name — `null` on rows older than naming, emitted either way for\nthe tenant module's null rule."
          },
          "role": {
            "type": "string",
            "description": "The caller's role in that account: `owner` or `member`."
          }
        }
      },
      "WorkspacesResponse": {
        "type": "object",
        "description": "`GET /v1/tenants/me/workspaces` — one page of the workspaces across every\naccount the caller holds.",
        "required": [
          "items",
          "tenant_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceSummary"
            },
            "description": "The rows on this page, oldest first."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the next page resumes, or `null` on the last page."
          },
          "tenant_id": {
            "type": "string",
            "description": "The caller's own account — the authoritative resolution, carried so a\nclient can pin its local state to the right person. Items from accounts\nthe caller joined name theirs in `account`."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Always `null`: the walk never counts, and the key stays because a\nclient may already branch on its presence."
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Send a dashboard session token, an account API key (`agt_t`), or a command-line credential (`afc_`) as a Bearer token. Each endpoint lists accepted credential types."
      },
      "RunnerBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "agt_r",
        "description": "Runner token beginning with agt_r, returned once by POST /v1/admin/runners"
      }
    }
  }
}
