{
  "components": {
    "schemas": {
      "AccountActionResponse": {
        "properties": {
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          }
        },
        "title": "AccountActionResponse",
        "type": "object"
      },
      "AccountActivity": {
        "properties": {
          "has_pull_requests": {
            "title": "Has Pull Requests",
            "type": "boolean"
          },
          "has_sessions": {
            "title": "Has Sessions",
            "type": "boolean"
          },
          "has_v1_traffic": {
            "title": "Has V1 Traffic",
            "type": "boolean"
          }
        },
        "required": [
          "has_pull_requests",
          "has_sessions",
          "has_v1_traffic"
        ],
        "title": "AccountActivity",
        "type": "object"
      },
      "AccountAuditLogEvent": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "details": {
            "additionalProperties": true,
            "title": "Details",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/CustomerAuditLogEventType"
          }
        },
        "required": [
          "id",
          "created_at",
          "type",
          "details"
        ],
        "title": "AccountAuditLogEvent",
        "type": "object"
      },
      "AccountAuditLogResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/AccountAuditLogEvent"
            },
            "title": "Events",
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "title": "AccountAuditLogResponse",
        "type": "object"
      },
      "AccountBudgetWindow": {
        "properties": {
          "exhausted": {
            "title": "Exhausted",
            "type": "boolean"
          },
          "fraction_used": {
            "title": "Fraction Used",
            "type": "number"
          },
          "limit_usd": {
            "title": "Limit Usd",
            "type": "number"
          },
          "platform_max_usd": {
            "title": "Platform Max Usd",
            "type": "number"
          },
          "remaining_usd": {
            "title": "Remaining Usd",
            "type": "number"
          },
          "spent_usd": {
            "title": "Spent Usd",
            "type": "number"
          },
          "window_days": {
            "description": "Trailing window length: 1, 7 or 28 days.",
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "window_days",
          "spent_usd",
          "limit_usd",
          "remaining_usd",
          "fraction_used",
          "exhausted",
          "platform_max_usd"
        ],
        "title": "AccountBudgetWindow",
        "type": "object"
      },
      "AccountOnboarding": {
        "additionalProperties": false,
        "description": "How the installed account plans to use Ellipsis.",
        "properties": {
          "cli_logged_in": {
            "default": false,
            "description": "True once a member approves a CLI login for this account.",
            "title": "Cli Logged In",
            "type": "boolean"
          },
          "finished": {
            "default": false,
            "description": "True once a member finishes onboarding for this account.",
            "title": "Finished",
            "type": "boolean"
          },
          "other_use_case": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Use Case"
          },
          "use_cases": {
            "items": {
              "$ref": "#/components/schemas/AccountOnboardingUseCase"
            },
            "title": "Use Cases",
            "type": "array"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required for organizations; saved as null for personal accounts. Separate from the account's billing contact email.",
            "title": "Work Email"
          }
        },
        "title": "AccountOnboarding",
        "type": "object"
      },
      "AccountOnboardingResponse": {
        "properties": {
          "onboarding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountOnboarding"
              },
              {
                "type": "null"
              }
            ]
          },
          "slack_invitation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountOnboardingSlackInvitation"
              },
              {
                "type": "null"
              }
            ],
            "description": "Invitation outcome when a signed-in user saves an organization work email. Sent means this request confirmed a new invitation; saving answers still succeeds if Slack is unavailable. Null for reads and other updates."
          }
        },
        "required": [
          "onboarding"
        ],
        "title": "AccountOnboardingResponse",
        "type": "object"
      },
      "AccountOnboardingSlackInvitation": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "enum": [
              "sent",
              "already_sent",
              "connected",
              "failed",
              "unknown"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "AccountOnboardingSlackInvitation",
        "type": "object"
      },
      "AccountOnboardingUseCase": {
        "enum": [
          "development",
          "automations",
          "software-factories",
          "code-review",
          "slack-agents",
          "other"
        ],
        "title": "AccountOnboardingUseCase",
        "type": "string"
      },
      "AccountResponse": {
        "properties": {
          "account_id": {
            "title": "Account Id",
            "type": "integer"
          },
          "account_login": {
            "title": "Account Login",
            "type": "string"
          },
          "can_start_sessions": {
            "title": "Can Start Sessions",
            "type": "boolean"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          }
        },
        "required": [
          "account_id",
          "account_login",
          "contact_email",
          "can_start_sessions"
        ],
        "title": "AccountResponse",
        "type": "object"
      },
      "AccountSettings": {
        "properties": {
          "analytics": {
            "$ref": "#/components/schemas/AnalyticsSettings-Output"
          },
          "budget_ceiling": {
            "$ref": "#/components/schemas/BudgetCeiling",
            "description": "The organization's spend ceilings."
          },
          "data_retention": {
            "$ref": "#/components/schemas/DataRetentionSettings-Output"
          },
          "mention": {
            "$ref": "#/components/schemas/MentionSettings",
            "description": "Effective read-only GitHub mention policy from github.yaml, with schema defaults."
          },
          "notifications": {
            "$ref": "#/components/schemas/NotificationSettings"
          }
        },
        "required": [
          "mention",
          "analytics",
          "data_retention",
          "notifications"
        ],
        "title": "AccountSettings",
        "type": "object"
      },
      "Agent": {
        "description": "An agent: a saved agent definition that runs on its trigger or\nwhen invoked, plus where it syncs from and the state of that sync.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Output",
            "description": "The agent definition itself, in the same schema as its YAML file: identity, trigger, input contract, and the session block."
          },
          "created_at": {
            "description": "When the agent was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The raw ellipsis.name display text from the config file.",
            "title": "Display Name"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the agent, when the edit came from a known user."
          },
          "id": {
            "description": "Unique identifier of the agent.",
            "title": "Id",
            "type": "string"
          },
          "last_session_created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When that most recent session was created.",
            "title": "Last Session Created At"
          },
          "last_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most recent session this agent started, or null if it has never run.",
            "title": "Last Session Id"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means the agent is not running the YAML currently on the branch.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last commit the agent was synced from.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "$ref": "#/components/schemas/ConfigManagedBy",
            "description": "Which writer owns this agent. \"github\" agents are defined by a file in a repository and are changed by editing that file; \"api\" agents have no file and are changed through this API."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent's account-unique addressable name (a slug of its display name); usable anywhere an agent is referenced, interchangeably with the id.",
            "title": "Name"
          },
          "pending_pull_request_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The open pull request that adds this agent's file. Non-null means the agent is not live yet: it starts running once the pull request merges and syncs.",
            "title": "Pending Pull Request Url"
          },
          "sha": {
            "description": "The definition's content identity: the version fingerprint frozen onto each session that runs it.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubSourceDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository, path, and branch the agent syncs from. Null only transiently, before the creating pull request's file lands on the branch."
          },
          "updated_at": {
            "description": "When the agent was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sha",
          "created_at",
          "updated_at",
          "managed_by",
          "config"
        ],
        "title": "Agent",
        "type": "object"
      },
      "AgentConfig-Input": {
        "additionalProperties": false,
        "description": "A saved agent, as written in its YAML file: identity\n(`ellipsis`), when it runs (`trigger`), what goes in (`input`), and the\n`session:` block every session it starts is frozen from. Field order is\nthe canonical key order for files and `to_yaml` exports.",
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/AgentIdentity-Input"
          },
          "input": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InputContract-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "session": {
            "$ref": "#/components/schemas/SessionConfig-Input"
          },
          "trigger": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "cron": "#/components/schemas/CronTrigger-Input",
                    "react": "#/components/schemas/ReactTrigger-Input"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CronTrigger-Input"
                  },
                  {
                    "$ref": "#/components/schemas/ReactTrigger-Input"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger"
          }
        },
        "required": [
          "ellipsis",
          "session"
        ],
        "title": "AgentConfig",
        "type": "object"
      },
      "AgentConfig-Output": {
        "additionalProperties": false,
        "description": "A saved agent, as written in its YAML file: identity\n(`ellipsis`), when it runs (`trigger`), what goes in (`input`), and the\n`session:` block every session it starts is frozen from. Field order is\nthe canonical key order for files and `to_yaml` exports.",
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/AgentIdentity-Output"
          },
          "input": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InputContract-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "session": {
            "$ref": "#/components/schemas/SessionConfig-Output"
          },
          "trigger": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "cron": "#/components/schemas/CronTrigger-Output",
                    "react": "#/components/schemas/ReactTrigger-Output"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CronTrigger-Output"
                  },
                  {
                    "$ref": "#/components/schemas/ReactTrigger-Output"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger"
          }
        },
        "required": [
          "ellipsis",
          "input",
          "session",
          "trigger"
        ],
        "title": "AgentConfig",
        "type": "object"
      },
      "AgentIdentity-Input": {
        "additionalProperties": false,
        "description": "The Ellipsis product namespace for a config file: which schema this is\n(`version`), the human-facing identity (`name`/`description`), freeform\norganizational `metadata`, and whether the agent is `enabled`. The\npresence of a top-level `ellipsis:` mapping is what marks a YAML file as\nan Ellipsis agent (vs arbitrary YAML that merely lives under a\nconfig directory) \u2014 see `yaml_is_ellipsis_config`.\n\n`enabled` is agent behavior, not freeform metadata, so it stays inside\nthe config `sha` (only `metadata` is sha-excluded).",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "agent",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Input"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AgentIdentity",
        "type": "object"
      },
      "AgentIdentity-Output": {
        "additionalProperties": false,
        "description": "The Ellipsis product namespace for a config file: which schema this is\n(`version`), the human-facing identity (`name`/`description`), freeform\norganizational `metadata`, and whether the agent is `enabled`. The\npresence of a top-level `ellipsis:` mapping is what marks a YAML file as\nan Ellipsis agent (vs arbitrary YAML that merely lives under a\nconfig directory) \u2014 see `yaml_is_ellipsis_config`.\n\n`enabled` is agent behavior, not freeform metadata, so it stays inside\nthe config `sha` (only `metadata` is sha-excluded).",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "agent",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "description",
          "enabled",
          "kind",
          "metadata",
          "name",
          "version"
        ],
        "title": "AgentIdentity",
        "type": "object"
      },
      "AgentMetricsResponse": {
        "description": "An agent's session distribution and trailing spend.",
        "properties": {
          "samples": {
            "description": "One entry per finished session, unordered.",
            "items": {
              "$ref": "#/components/schemas/AgentSessionSample"
            },
            "title": "Samples",
            "type": "array"
          },
          "spend_windows": {
            "description": "Trailing spend versus the budget, one entry per window (1, 7, and 28 days).",
            "items": {
              "$ref": "#/components/schemas/ConfigSpendWindow"
            },
            "title": "Spend Windows",
            "type": "array"
          }
        },
        "required": [
          "samples",
          "spend_windows"
        ],
        "title": "AgentMetricsResponse",
        "type": "object"
      },
      "AgentResponse": {
        "description": "One agent.",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/Agent",
            "description": "The agent."
          }
        },
        "required": [
          "agent"
        ],
        "title": "AgentResponse",
        "type": "object"
      },
      "AgentSessionSample": {
        "description": "One finished session of the agent, reduced to the three figures\nthe distributions are drawn from.",
        "properties": {
          "cost": {
            "description": "What the session cost, in millicents.",
            "title": "Cost",
            "type": "integer"
          },
          "duration_seconds": {
            "description": "Wall-clock seconds from the session's creation to its last update.",
            "title": "Duration Seconds",
            "type": "number"
          },
          "tokens_total": {
            "description": "Tokens the session consumed across every lane, including prompt-cache reads and writes.",
            "title": "Tokens Total",
            "type": "integer"
          }
        },
        "required": [
          "duration_seconds",
          "cost",
          "tokens_total"
        ],
        "title": "AgentSessionSample",
        "type": "object"
      },
      "AgentTemplate": {
        "description": "A built-in agent template: a ready-to-use agent plus the\nmetadata that describes it in the template gallery.",
        "properties": {
          "description": {
            "description": "A short description of the template.",
            "title": "Description",
            "type": "string"
          },
          "name": {
            "description": "The template's display name.",
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "description": "The template's unique identifier.",
            "title": "Slug",
            "type": "string"
          },
          "summary": {
            "description": "A one-line summary of the template.",
            "title": "Summary",
            "type": "string"
          },
          "tags": {
            "description": "Gallery tags for the template.",
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "use_case": {
            "description": "The use case the template is designed for.",
            "title": "Use Case",
            "type": "string"
          },
          "yaml": {
            "description": "The complete, schema-valid agent YAML, ready to write to disk.",
            "title": "Yaml",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "tags",
          "summary",
          "use_case",
          "yaml"
        ],
        "title": "AgentTemplate",
        "type": "object"
      },
      "AgentTemplatesListResponse": {
        "description": "The built-in agent templates.",
        "properties": {
          "templates": {
            "description": "The available templates.",
            "items": {
              "$ref": "#/components/schemas/AgentTemplate"
            },
            "title": "Templates",
            "type": "array"
          },
          "walkthrough_yaml": {
            "description": "A fully-populated example agent, for display in setup walkthroughs. Not a template to run as-is.",
            "title": "Walkthrough Yaml",
            "type": "string"
          }
        },
        "required": [
          "templates",
          "walkthrough_yaml"
        ],
        "title": "AgentTemplatesListResponse",
        "type": "object"
      },
      "AgentsListResponse": {
        "description": "The caller's agents.",
        "properties": {
          "agents": {
            "description": "Agents.",
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "title": "Agents",
            "type": "array"
          }
        },
        "required": [
          "agents"
        ],
        "title": "AgentsListResponse",
        "type": "object"
      },
      "Alert": {
        "description": "One thing Ellipsis told (or will tell) your team about \u2014 e.g. a budget\nthreshold being crossed.",
        "properties": {
          "body": {
            "description": "The alert body, in Markdown.",
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "description": "When the alert was raised.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "cta_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The label for the call-to-action link.",
            "title": "Cta Label"
          },
          "cta_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An optional call-to-action link \u2014 where this alert should send the reader.",
            "title": "Cta Url"
          },
          "id": {
            "description": "The alert's unique identifier.",
            "title": "Id",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the alert was resolved.",
            "title": "Resolved At"
          },
          "resolved_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account id of the person who dismissed the alert, when a human resolved it.",
            "title": "Resolved By"
          },
          "severity": {
            "$ref": "#/components/schemas/AlertSeverity",
            "description": "The alert's severity. Cosmetic only; it does not affect routing."
          },
          "source": {
            "$ref": "#/components/schemas/AlertSource"
          },
          "status": {
            "$ref": "#/components/schemas/AlertStatus",
            "description": "The alert's lifecycle state."
          },
          "title": {
            "description": "A one-line, plain-text title.",
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "description": "When the alert last changed.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "source",
          "severity",
          "title",
          "body",
          "status"
        ],
        "title": "Alert",
        "type": "object"
      },
      "AlertResponse": {
        "description": "One alert.",
        "properties": {
          "alert": {
            "$ref": "#/components/schemas/Alert",
            "description": "The alert."
          }
        },
        "required": [
          "alert"
        ],
        "title": "AlertResponse",
        "type": "object"
      },
      "AlertSeverity": {
        "description": "Cosmetic only (badge tone, Slack emoji, email subject prefix). Routing\nis decided by the category, never by severity.",
        "enum": [
          "info",
          "warning"
        ],
        "title": "AlertSeverity",
        "type": "string"
      },
      "AlertSource": {
        "description": "What raised the alert.",
        "enum": [
          "budget"
        ],
        "title": "AlertSource",
        "type": "string"
      },
      "AlertStatus": {
        "description": "The alert's lifecycle state: open until a human dismisses it or the\nsystem resolves it (the condition cleared or the alert went stale).",
        "enum": [
          "open",
          "dismissed",
          "expired"
        ],
        "title": "AlertStatus",
        "type": "string"
      },
      "AlertsListResponse": {
        "description": "A page of alerts for the caller's organization.",
        "properties": {
          "alerts": {
            "description": "The matching alerts.",
            "items": {
              "$ref": "#/components/schemas/Alert"
            },
            "title": "Alerts",
            "type": "array"
          },
          "has_more": {
            "default": false,
            "description": "Whether more results exist past this page.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` to fetch the next page. Null on the last page. Opaque \u2014 echo it back rather than parsing it.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "alerts"
        ],
        "title": "AlertsListResponse",
        "type": "object"
      },
      "AnalyticsMetricsBucket": {
        "description": "Pull-request and review activity on one UTC day. Each count keys on the\nrelevant event's own timestamp: PRs on when they were opened, merged, or\nclosed; review verdicts on when the review was submitted; review comments\non when the comment was created. The \"shipped\" rollup (additions,\ndeletions, commits, active contributors) covers PRs merged that day.",
        "properties": {
          "active_contributors": {
            "description": "Distinct authors who merged a pull request this day.",
            "title": "Active Contributors",
            "type": "integer"
          },
          "additions": {
            "description": "Lines added across pull requests merged this day.",
            "title": "Additions",
            "type": "integer"
          },
          "approved": {
            "description": "Approving reviews submitted this day.",
            "title": "Approved",
            "type": "integer"
          },
          "changes_requested": {
            "description": "Changes-requested reviews submitted this day.",
            "title": "Changes Requested",
            "type": "integer"
          },
          "commented": {
            "description": "Comment-only reviews submitted this day.",
            "title": "Commented",
            "type": "integer"
          },
          "commits": {
            "description": "Commits across pull requests merged this day.",
            "title": "Commits",
            "type": "integer"
          },
          "date": {
            "description": "The UTC day, formatted YYYY-MM-DD.",
            "title": "Date",
            "type": "string"
          },
          "deletions": {
            "description": "Lines deleted across pull requests merged this day.",
            "title": "Deletions",
            "type": "integer"
          },
          "prs_closed": {
            "description": "Pull requests closed without merging this day.",
            "title": "Prs Closed",
            "type": "integer"
          },
          "prs_merged": {
            "description": "Pull requests merged this day.",
            "title": "Prs Merged",
            "type": "integer"
          },
          "prs_opened": {
            "description": "Pull requests opened this day.",
            "title": "Prs Opened",
            "type": "integer"
          },
          "review_comments": {
            "description": "Inline review comments created this day.",
            "title": "Review Comments",
            "type": "integer"
          },
          "reviews": {
            "description": "Reviews submitted this day.",
            "title": "Reviews",
            "type": "integer"
          },
          "time_to_merge_hours": {
            "$ref": "#/components/schemas/DurationPercentiles",
            "description": "Time-to-merge percentiles over pull requests merged this day."
          }
        },
        "required": [
          "date",
          "prs_opened",
          "prs_merged",
          "prs_closed",
          "reviews",
          "approved",
          "changes_requested",
          "commented",
          "review_comments",
          "additions",
          "deletions",
          "commits",
          "active_contributors",
          "time_to_merge_hours"
        ],
        "title": "AnalyticsMetricsBucket",
        "type": "object"
      },
      "AnalyticsMetricsTotals": {
        "description": "Window-wide totals for the analytics overview.",
        "properties": {
          "active_contributors": {
            "description": "Distinct authors who merged a pull request in the window.",
            "title": "Active Contributors",
            "type": "integer"
          },
          "additions": {
            "description": "Lines added across pull requests merged in the window.",
            "title": "Additions",
            "type": "integer"
          },
          "approved": {
            "description": "Approving reviews in the window.",
            "title": "Approved",
            "type": "integer"
          },
          "changes_requested": {
            "description": "Changes-requested reviews in the window.",
            "title": "Changes Requested",
            "type": "integer"
          },
          "commented": {
            "description": "Comment-only reviews in the window.",
            "title": "Commented",
            "type": "integer"
          },
          "commits": {
            "description": "Commits across pull requests merged in the window.",
            "title": "Commits",
            "type": "integer"
          },
          "deletions": {
            "description": "Lines deleted across pull requests merged in the window.",
            "title": "Deletions",
            "type": "integer"
          },
          "median_time_to_first_review_hours": {
            "description": "Median hours from opening a pull request to its first review, over pull requests reviewed in the window.",
            "title": "Median Time To First Review Hours",
            "type": "number"
          },
          "median_time_to_merge_hours": {
            "description": "Median hours from opening to merging, over pull requests merged in the window.",
            "title": "Median Time To Merge Hours",
            "type": "number"
          },
          "open_prs": {
            "description": "Pull requests opened in the window that are still open or draft.",
            "title": "Open Prs",
            "type": "integer"
          },
          "prs_closed": {
            "description": "Pull requests closed without merging in the window.",
            "title": "Prs Closed",
            "type": "integer"
          },
          "prs_merged": {
            "description": "Pull requests merged in the window.",
            "title": "Prs Merged",
            "type": "integer"
          },
          "prs_opened": {
            "description": "Pull requests opened in the window.",
            "title": "Prs Opened",
            "type": "integer"
          },
          "prs_reviewed": {
            "description": "Distinct pull requests that received at least one review in the window.",
            "title": "Prs Reviewed",
            "type": "integer"
          },
          "review_comments": {
            "description": "Inline review comments created in the window.",
            "title": "Review Comments",
            "type": "integer"
          },
          "reviews": {
            "description": "Reviews submitted in the window.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "prs_opened",
          "prs_merged",
          "prs_closed",
          "reviews",
          "prs_reviewed",
          "approved",
          "changes_requested",
          "commented",
          "review_comments",
          "additions",
          "deletions",
          "commits",
          "active_contributors",
          "open_prs",
          "median_time_to_merge_hours",
          "median_time_to_first_review_hours"
        ],
        "title": "AnalyticsMetricsTotals",
        "type": "object"
      },
      "AnalyticsRepoUsage": {
        "description": "Per-repository shipped activity: pull requests merged in the window and\nthe lines they carried.",
        "properties": {
          "active_contributors": {
            "description": "Distinct authors who merged a pull request in this repository.",
            "title": "Active Contributors",
            "type": "integer"
          },
          "additions": {
            "description": "Lines added across merged pull requests in this repository.",
            "title": "Additions",
            "type": "integer"
          },
          "ai_attributed_prs": {
            "description": "Merged pull requests whose author is a bot.",
            "title": "Ai Attributed Prs",
            "type": "integer"
          },
          "deletions": {
            "description": "Lines deleted across merged pull requests in this repository.",
            "title": "Deletions",
            "type": "integer"
          },
          "prs_merged": {
            "description": "Pull requests merged in this repository in the window.",
            "title": "Prs Merged",
            "type": "integer"
          },
          "repo_full_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repo Full Name",
            "type": "string"
          },
          "reviews": {
            "description": "Reviews submitted in this repository in the window.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "repo_full_name",
          "prs_merged",
          "reviews",
          "active_contributors",
          "ai_attributed_prs",
          "additions",
          "deletions"
        ],
        "title": "AnalyticsRepoUsage",
        "type": "object"
      },
      "AnalyticsSettings-Input": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "title": "AnalyticsSettings",
        "type": "object"
      },
      "AnalyticsSettings-Output": {
        "properties": {
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "AnalyticsSettings",
        "type": "object"
      },
      "ApiKeyApi": {
        "description": "A key as shown in listings -- never includes the secret.",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "last_used_at",
          "revoked_at"
        ],
        "title": "ApiKeyApi",
        "type": "object"
      },
      "AttributionType": {
        "enum": [
          "github_user",
          "linear_user",
          "slack_user",
          "api_key"
        ],
        "title": "AttributionType",
        "type": "string"
      },
      "AuthorFacet": {
        "description": "An author filter option, counted over the unfiltered window.",
        "properties": {
          "login": {
            "description": "The author's GitHub login.",
            "title": "Login",
            "type": "string"
          },
          "prs": {
            "description": "Unfiltered pull-request count for this author in the window.",
            "title": "Prs",
            "type": "integer"
          }
        },
        "required": [
          "login",
          "prs"
        ],
        "title": "AuthorFacet",
        "type": "object"
      },
      "AutoRechargeCard": {
        "properties": {
          "brand": {
            "description": "Card network as Stripe names it, e.g. visa.",
            "title": "Brand",
            "type": "string"
          },
          "exp_month": {
            "title": "Exp Month",
            "type": "integer"
          },
          "exp_year": {
            "title": "Exp Year",
            "type": "integer"
          },
          "last4": {
            "description": "Last four digits of the card number.",
            "title": "Last4",
            "type": "string"
          }
        },
        "required": [
          "brand",
          "last4",
          "exp_month",
          "exp_year"
        ],
        "title": "AutoRechargeCard",
        "type": "object"
      },
      "AutoRechargeSettings": {
        "properties": {
          "amount_cents": {
            "description": "Credit bought on each recharge, before the platform fee.",
            "title": "Amount Cents",
            "type": "integer"
          },
          "card": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutoRechargeCard"
              },
              {
                "type": "null"
              }
            ],
            "description": "The saved card, or null when no card is saved."
          },
          "consecutive_failures": {
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "enabled": {
            "description": "Off by default. Saving a card does not enable recharge.",
            "title": "Enabled",
            "type": "boolean"
          },
          "last_attempted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Attempted At"
          },
          "min_threshold_cents": {
            "title": "Min Threshold Cents",
            "type": "integer"
          },
          "threshold_cents": {
            "title": "Threshold Cents",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "card",
          "threshold_cents",
          "amount_cents",
          "consecutive_failures",
          "last_attempted_at",
          "min_threshold_cents"
        ],
        "title": "AutoRechargeSettings",
        "type": "object"
      },
      "AutoRechargeUpdate": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "minimum": 500.0,
            "title": "Amount Cents",
            "type": "integer"
          },
          "enabled": {
            "description": "Explicit opt-in; enabling requires a saved card.",
            "title": "Enabled",
            "type": "boolean"
          },
          "threshold_cents": {
            "minimum": 500.0,
            "title": "Threshold Cents",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "threshold_cents",
          "amount_cents"
        ],
        "title": "AutoRechargeUpdate",
        "type": "object"
      },
      "BillingCheckout": {
        "properties": {
          "url": {
            "description": "Stripe-hosted URL to open to complete this flow.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "BillingCheckout",
        "type": "object"
      },
      "BillingPeriodOption": {
        "description": "One selectable billing period. Dates are yyyy-MM-dd (UTC); period_end is\nthe exclusive boundary (the next period's first day).",
        "properties": {
          "is_current": {
            "title": "Is Current",
            "type": "boolean"
          },
          "period_end": {
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "title": "Period Start",
            "type": "string"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "is_current"
        ],
        "title": "BillingPeriodOption",
        "type": "object"
      },
      "BillingStatus": {
        "properties": {
          "workflows_block_reason": {
            "anyOf": [
              {
                "enum": [
                  "canceled",
                  "out_of_credit",
                  "blocked",
                  "contact_email_required",
                  "subscription_or_credit_required",
                  "automations_require_credit"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account gate's reason for blocking new sessions, or null. `automations_require_credit` blocks only programmatic sessions (API keys, reacts, crons): sessions a person starts still run on their subscription. Does not include viewer-specific blocks or scoped spend limits.",
            "title": "Workflows Block Reason"
          }
        },
        "required": [
          "workflows_block_reason"
        ],
        "title": "BillingStatus",
        "type": "object"
      },
      "BudgetAlertThresholds": {
        "additionalProperties": false,
        "description": "Independent dollar notification thresholds; null disables a window.",
        "properties": {
          "usd_1d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 1D"
          },
          "usd_28d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 28D"
          },
          "usd_7d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 7D"
          }
        },
        "title": "BudgetAlertThresholds",
        "type": "object"
      },
      "BudgetAlerts": {
        "additionalProperties": false,
        "description": "Notifications only. These thresholds do not stop paid requests.",
        "properties": {
          "absolute_thresholds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetAlertThresholds"
              },
              {
                "type": "null"
              }
            ]
          },
          "percent_thresholds": {
            "items": {
              "maximum": 100.0,
              "minimum": 1.0,
              "type": "integer"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Percent Thresholds",
            "type": "array"
          }
        },
        "required": [
          "percent_thresholds",
          "absolute_thresholds"
        ],
        "title": "BudgetAlerts",
        "type": "object"
      },
      "BudgetCeiling": {
        "description": "The organization's spend ceilings, in US dollars.",
        "properties": {
          "session": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most a single session may be budgeted, in US dollars. A session request or agent asking for more is refused with 400. Null means the platform ceiling applies.",
            "title": "Session"
          }
        },
        "title": "BudgetCeiling",
        "type": "object"
      },
      "BudgetConfig-Input": {
        "additionalProperties": false,
        "description": "A saved agent's spend limits: the per-session cap plus its total spend\nover the trailing 1, 7, and 28 days.",
        "properties": {
          "day": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last day, in US dollars.",
            "title": "Day"
          },
          "month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last 28 days, in US dollars.",
            "title": "Month"
          },
          "session": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most one session may spend, in US dollars.",
            "title": "Session"
          },
          "week": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last 7 days, in US dollars.",
            "title": "Week"
          }
        },
        "title": "BudgetConfig",
        "type": "object"
      },
      "BudgetConfig-Output": {
        "additionalProperties": false,
        "description": "A saved agent's spend limits: the per-session cap plus its total spend\nover the trailing 1, 7, and 28 days.",
        "properties": {
          "day": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last day, in US dollars.",
            "title": "Day"
          },
          "month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last 28 days, in US dollars.",
            "title": "Month"
          },
          "session": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most one session may spend, in US dollars.",
            "title": "Session"
          },
          "week": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most the agent may spend over the last 7 days, in US dollars.",
            "title": "Week"
          }
        },
        "required": [
          "day",
          "month",
          "session",
          "week"
        ],
        "title": "BudgetConfig",
        "type": "object"
      },
      "BudgetLimits": {
        "additionalProperties": false,
        "description": "Spending ceilings over trailing 1, 7 and 28 days, in US dollars.",
        "properties": {
          "usd_1d": {
            "minimum": 1.0,
            "multipleOf": 0.01,
            "title": "Usd 1D",
            "type": "number"
          },
          "usd_28d": {
            "minimum": 1.0,
            "multipleOf": 0.01,
            "title": "Usd 28D",
            "type": "number"
          },
          "usd_7d": {
            "minimum": 1.0,
            "multipleOf": 0.01,
            "title": "Usd 7D",
            "type": "number"
          }
        },
        "required": [
          "usd_1d",
          "usd_7d",
          "usd_28d"
        ],
        "title": "BudgetLimits",
        "type": "object"
      },
      "BudgetOverrides": {
        "additionalProperties": false,
        "description": "Per-window overrides in US dollars. Null inherits the developer default.",
        "properties": {
          "usd_1d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 1D"
          },
          "usd_28d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 28D"
          },
          "usd_7d": {
            "anyOf": [
              {
                "minimum": 1.0,
                "multipleOf": 0.01,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd 7D"
          }
        },
        "title": "BudgetOverrides",
        "type": "object"
      },
      "BudgetPolicy": {
        "additionalProperties": false,
        "description": "Limits on actual Ellipsis credit debits, not allocations of credit.\n\nDeveloper keys are attribution_type:attribution_id; API keys use their\nstable key ID, never the secret. Unattributed and Ellipsis bot activity is\nexempt only from developer limits. A null developer default disables that\nscope while preserving overrides for later use.",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/BudgetLimits"
          },
          "default_session_usd": {
            "minimum": 1.0,
            "multipleOf": 0.01,
            "title": "Default Session Usd",
            "type": "number"
          },
          "developer_defaults": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "developer_overrides": {
            "additionalProperties": {
              "$ref": "#/components/schemas/BudgetOverrides"
            },
            "title": "Developer Overrides",
            "type": "object"
          }
        },
        "required": [
          "default_session_usd",
          "account",
          "developer_defaults",
          "developer_overrides"
        ],
        "title": "BudgetPolicy",
        "type": "object"
      },
      "BudgetSummary": {
        "description": "Prepaid credit and the actual trailing budgets enforced by the proxy.\n\nBudget windows roll continuously; they are not monthly credit renewals.\nAmounts preserve sub-cent precision and may be negative after overshoot.\nOne admitted request can exceed a limit. Concurrent paid requests are bounded by\nthe account and per-session platform allowances.",
        "properties": {
          "alerts": {
            "$ref": "#/components/schemas/BudgetAlerts"
          },
          "as_of": {
            "format": "date-time",
            "title": "As Of",
            "type": "string"
          },
          "credit_balance_usd": {
            "title": "Credit Balance Usd",
            "type": "number"
          },
          "credit_exhausted": {
            "title": "Credit Exhausted",
            "type": "boolean"
          },
          "developer_limits": {
            "$ref": "#/components/schemas/DeveloperBudgets"
          },
          "per_run": {
            "$ref": "#/components/schemas/SessionBudgetDefault"
          },
          "policy": {
            "$ref": "#/components/schemas/BudgetPolicy"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/AccountBudgetWindow"
            },
            "title": "Windows",
            "type": "array"
          }
        },
        "required": [
          "as_of",
          "credit_balance_usd",
          "credit_exhausted",
          "policy",
          "alerts",
          "per_run",
          "windows",
          "developer_limits"
        ],
        "title": "BudgetSummary",
        "type": "object"
      },
      "BudgetUpdate": {
        "additionalProperties": false,
        "description": "Replace the supplied policy and/or alerts; omitted sections are preserved.",
        "properties": {
          "alerts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetAlerts"
              },
              {
                "type": "null"
              }
            ]
          },
          "policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetPolicy"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "BudgetUpdate",
        "type": "object"
      },
      "CheckRunAction": {
        "description": "What a completed check run did. `failed` covers the conclusions that\nmean the check did not pass on its own merits (`failure`, `timed_out`); a\ncancelled, skipped, neutral or stale check is not a failure and never\nfires (see FAILED_CHECK_RUN_CONCLUSIONS).",
        "enum": [
          "failed"
        ],
        "title": "CheckRunAction",
        "type": "string"
      },
      "ClaudeAssistantEvent": {
        "additionalProperties": true,
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "message": {
            "$ref": "#/components/schemas/ClaudeAssistantMessage"
          },
          "parent_tool_use_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Tool Use Id"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "type": {
            "const": "assistant",
            "default": "assistant",
            "title": "Type",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "message",
          "type"
        ],
        "title": "ClaudeAssistantEvent",
        "type": "object"
      },
      "ClaudeAssistantMessage": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "items": {
              "discriminator": {
                "mapping": {
                  "server_tool_result": "#/components/schemas/SdkServerToolResultBlock",
                  "server_tool_use": "#/components/schemas/SdkServerToolUseBlock",
                  "text": "#/components/schemas/SdkTextBlock",
                  "thinking": "#/components/schemas/SdkThinkingBlock",
                  "tool_result": "#/components/schemas/SdkToolResultBlock",
                  "tool_use": "#/components/schemas/SdkToolUseBlock"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SdkTextBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkThinkingBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkToolUseBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkToolResultBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkServerToolUseBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkServerToolResultBlock"
                }
              ]
            },
            "title": "Content",
            "type": "array"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "role": {
            "const": "assistant",
            "title": "Role",
            "type": "string"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          },
          "stop_sequence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequence"
          },
          "type": {
            "const": "message",
            "title": "Type",
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeNativeUsage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "content",
          "model",
          "role",
          "type"
        ],
        "title": "ClaudeAssistantMessage",
        "type": "object"
      },
      "ClaudeConfig-Input": {
        "additionalProperties": false,
        "description": "Native Claude Code options for an explicitly selected harness.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EffortLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallback_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Model"
          },
          "max_turns": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Turns"
          },
          "model": {
            "description": "The model the session runs on: an alias or canonical id from the models table. Required.",
            "title": "Model",
            "type": "string"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SettingsRef-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "model"
        ],
        "title": "ClaudeConfig",
        "type": "object"
      },
      "ClaudeConfig-Output": {
        "additionalProperties": false,
        "description": "Native Claude Code options for an explicitly selected harness.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EffortLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallback_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Model"
          },
          "max_turns": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Turns"
          },
          "model": {
            "description": "The model the session runs on: an alias or canonical id from the models table. Required.",
            "title": "Model",
            "type": "string"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SettingsRef-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "effort",
          "fallback_model",
          "max_turns",
          "model",
          "prompt",
          "settings"
        ],
        "title": "ClaudeConfig",
        "type": "object"
      },
      "ClaudeConversationResetEvent": {
        "additionalProperties": true,
        "properties": {
          "new_conversation_id": {
            "title": "New Conversation Id",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "type": {
            "const": "conversation_reset",
            "default": "conversation_reset",
            "title": "Type",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "new_conversation_id",
          "type"
        ],
        "title": "ClaudeConversationResetEvent",
        "type": "object"
      },
      "ClaudeNativeSessionRecord": {
        "description": "Complete native Claude Code message, before SDK projection.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "claude_code",
            "default": "claude_code",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "discriminator": {
              "mapping": {
                "assistant": "#/components/schemas/ClaudeAssistantEvent",
                "conversation_reset": "#/components/schemas/ClaudeConversationResetEvent",
                "rate_limit_event": "#/components/schemas/ClaudeRateLimitEvent",
                "result": "#/components/schemas/ClaudeResultEvent",
                "system": "#/components/schemas/ClaudeSystemEvent",
                "user": "#/components/schemas/ClaudeUserEvent"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/ClaudeAssistantEvent"
              },
              {
                "$ref": "#/components/schemas/ClaudeUserEvent"
              },
              {
                "$ref": "#/components/schemas/ClaudeSystemEvent"
              },
              {
                "$ref": "#/components/schemas/ClaudeResultEvent"
              },
              {
                "$ref": "#/components/schemas/ClaudeRateLimitEvent"
              },
              {
                "$ref": "#/components/schemas/ClaudeConversationResetEvent"
              }
            ],
            "title": "Payload"
          },
          "record_format": {
            "const": "claude_jsonl@1",
            "default": "claude_jsonl@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "Original record type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "claude_code",
            "default": "claude_code",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "ClaudeNativeSessionRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "ClaudeNativeUsage": {
        "additionalProperties": true,
        "properties": {
          "cache_creation": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Creation"
          },
          "cache_creation_input_tokens": {
            "default": 0,
            "title": "Cache Creation Input Tokens",
            "type": "integer"
          },
          "cache_read_input_tokens": {
            "default": 0,
            "title": "Cache Read Input Tokens",
            "type": "integer"
          },
          "input_tokens": {
            "default": 0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "title": "Output Tokens",
            "type": "integer"
          }
        },
        "required": [],
        "title": "ClaudeNativeUsage",
        "type": "object"
      },
      "ClaudeOverrides": {
        "additionalProperties": false,
        "description": "The Claude Code options an agent session request may replace. Every\nfield is optional: an omitted field keeps the agent's value.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EffortLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallback_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Model"
          },
          "max_turns": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Turns"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SettingsRef-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ClaudeOverrides",
        "type": "object"
      },
      "ClaudeRateLimitEvent": {
        "additionalProperties": true,
        "properties": {
          "rate_limit_info": {
            "$ref": "#/components/schemas/ClaudeRateLimitInfo"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "type": {
            "const": "rate_limit_event",
            "default": "rate_limit_event",
            "title": "Type",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "rate_limit_info",
          "type"
        ],
        "title": "ClaudeRateLimitEvent",
        "type": "object"
      },
      "ClaudeRateLimitInfo": {
        "additionalProperties": true,
        "properties": {
          "overageDisabledReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overagedisabledreason"
          },
          "overageResetsAt": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overageresetsat"
          },
          "overageStatus": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overagestatus"
          },
          "rateLimitType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ratelimittype"
          },
          "resetsAt": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resetsat"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "utilization": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utilization"
          }
        },
        "required": [
          "status"
        ],
        "title": "ClaudeRateLimitInfo",
        "type": "object"
      },
      "ClaudeResultEvent": {
        "additionalProperties": true,
        "properties": {
          "duration_api_ms": {
            "title": "Duration Api Ms",
            "type": "integer"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "errors": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Errors"
          },
          "is_error": {
            "title": "Is Error",
            "type": "boolean"
          },
          "modelUsage": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modelusage"
          },
          "num_turns": {
            "title": "Num Turns",
            "type": "integer"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          },
          "structured_output": {
            "title": "Structured Output"
          },
          "subtype": {
            "title": "Subtype",
            "type": "string"
          },
          "total_cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Cost Usd"
          },
          "type": {
            "const": "result",
            "default": "result",
            "title": "Type",
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeNativeUsage"
              },
              {
                "type": "null"
              }
            ]
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "duration_api_ms",
          "duration_ms",
          "is_error",
          "num_turns",
          "subtype",
          "type"
        ],
        "title": "ClaudeResultEvent",
        "type": "object"
      },
      "ClaudeSessionRecord": {
        "description": "Historical Claude SDK projection, retained for existing session history.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "claude_sdk",
            "default": "claude_sdk",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "discriminator": {
              "mapping": {
                "assistant": "#/components/schemas/LegacyAssistantPayload",
                "rate_limit": "#/components/schemas/SdkRateLimitRecord",
                "result": "#/components/schemas/LegacyResultPayload",
                "system": "#/components/schemas/SdkSystemRecord",
                "user": "#/components/schemas/SdkUserRecord"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/LegacyAssistantPayload"
              },
              {
                "$ref": "#/components/schemas/SdkUserRecord"
              },
              {
                "$ref": "#/components/schemas/SdkSystemRecord"
              },
              {
                "$ref": "#/components/schemas/LegacyResultPayload"
              },
              {
                "$ref": "#/components/schemas/SdkRateLimitRecord"
              }
            ],
            "title": "Payload"
          },
          "record_format": {
            "const": "claude_sdk@1",
            "default": "claude_sdk@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "Original record type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "claude_code",
            "default": "claude_code",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "ClaudeSessionRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "ClaudeSystemEvent": {
        "additionalProperties": true,
        "properties": {
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "subtype": {
            "title": "Subtype",
            "type": "string"
          },
          "type": {
            "const": "system",
            "default": "system",
            "title": "Type",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "subtype",
          "type"
        ],
        "title": "ClaudeSystemEvent",
        "type": "object"
      },
      "ClaudeUserEvent": {
        "additionalProperties": true,
        "properties": {
          "isReplay": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isreplay"
          },
          "message": {
            "$ref": "#/components/schemas/ClaudeUserMessage"
          },
          "parent_tool_use_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Tool Use Id"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "type": {
            "const": "user",
            "default": "user",
            "title": "Type",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "message",
          "type"
        ],
        "title": "ClaudeUserEvent",
        "type": "object"
      },
      "ClaudeUserMessage": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "discriminator": {
                    "mapping": {
                      "server_tool_result": "#/components/schemas/SdkServerToolResultBlock",
                      "server_tool_use": "#/components/schemas/SdkServerToolUseBlock",
                      "text": "#/components/schemas/SdkTextBlock",
                      "thinking": "#/components/schemas/SdkThinkingBlock",
                      "tool_result": "#/components/schemas/SdkToolResultBlock",
                      "tool_use": "#/components/schemas/SdkToolUseBlock"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SdkTextBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkThinkingBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkToolResultBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkServerToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkServerToolResultBlock"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "role": {
            "const": "user",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "content",
          "role"
        ],
        "title": "ClaudeUserMessage",
        "type": "object"
      },
      "CliAuthPollRequest": {
        "description": "A device-flow poll from the CLI.",
        "properties": {
          "device_code": {
            "description": "The device code returned by POST /v1/auth/cli/start.",
            "title": "Device Code",
            "type": "string"
          }
        },
        "required": [
          "device_code"
        ],
        "title": "CliAuthPollRequest",
        "type": "object"
      },
      "CodeReviewCommentStatus": {
        "enum": [
          "eligible",
          "posted",
          "outside_range",
          "not_in_diff"
        ],
        "title": "CodeReviewCommentStatus",
        "type": "string"
      },
      "CodeReviewSessionStatus": {
        "enum": [
          "running",
          "completed",
          "failed"
        ],
        "title": "CodeReviewSessionStatus",
        "type": "string"
      },
      "CodeReviewStatus": {
        "enum": [
          "running",
          "posting",
          "posted",
          "empty",
          "failed"
        ],
        "title": "CodeReviewStatus",
        "type": "string"
      },
      "CodexAgentMessage": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "phase": {
            "anyOf": [
              {
                "enum": [
                  "commentary",
                  "final_answer"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "agentMessage",
            "default": "agentMessage",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text",
          "type"
        ],
        "title": "CodexAgentMessage",
        "type": "object"
      },
      "CodexAgentMessageItem": {
        "additionalProperties": true,
        "description": "The agent said something to the user \u2014 Codex's assistant-text item.",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "text": {
            "default": "",
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "agent_message",
            "default": "agent_message",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexAgentMessageItem",
        "type": "object"
      },
      "CodexAppServerError": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "error",
            "default": "error",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexErrorParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexAppServerError",
        "type": "object"
      },
      "CodexAppServerItem": {
        "discriminator": {
          "mapping": {
            "agentMessage": "#/components/schemas/CodexAgentMessage",
            "commandExecution": "#/components/schemas/CodexCommandExecution",
            "contextCompaction": "#/components/schemas/CodexContextCompaction",
            "fileChange": "#/components/schemas/CodexFileChange",
            "mcpToolCall": "#/components/schemas/CodexMcpToolCall",
            "plan": "#/components/schemas/CodexPlan",
            "reasoning": "#/components/schemas/CodexReasoning",
            "userMessage": "#/components/schemas/CodexUserMessage",
            "webSearch": "#/components/schemas/CodexWebSearch"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/CodexUserMessage"
          },
          {
            "$ref": "#/components/schemas/CodexAgentMessage"
          },
          {
            "$ref": "#/components/schemas/CodexReasoning"
          },
          {
            "$ref": "#/components/schemas/CodexPlan"
          },
          {
            "$ref": "#/components/schemas/CodexCommandExecution"
          },
          {
            "$ref": "#/components/schemas/CodexFileChange"
          },
          {
            "$ref": "#/components/schemas/CodexWebSearch"
          },
          {
            "$ref": "#/components/schemas/CodexMcpToolCall"
          },
          {
            "$ref": "#/components/schemas/CodexContextCompaction"
          }
        ]
      },
      "CodexAppServerNotification": {
        "discriminator": {
          "mapping": {
            "error": "#/components/schemas/CodexAppServerError",
            "item/completed": "#/components/schemas/CodexItemCompleted",
            "item/started": "#/components/schemas/CodexItemStarted",
            "thread/started": "#/components/schemas/CodexThreadStarted",
            "thread/tokenUsage/updated": "#/components/schemas/CodexTokenUsageUpdated",
            "turn/completed": "#/components/schemas/CodexTurnCompleted",
            "turn/started": "#/components/schemas/CodexTurnStarted"
          },
          "propertyName": "method"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/CodexThreadStarted"
          },
          {
            "$ref": "#/components/schemas/CodexTurnStarted"
          },
          {
            "$ref": "#/components/schemas/CodexTurnCompleted"
          },
          {
            "$ref": "#/components/schemas/CodexItemStarted"
          },
          {
            "$ref": "#/components/schemas/CodexItemCompleted"
          },
          {
            "$ref": "#/components/schemas/CodexTokenUsageUpdated"
          },
          {
            "$ref": "#/components/schemas/CodexAppServerError"
          }
        ]
      },
      "CodexAppServerSessionRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "codex_app_server",
            "default": "codex_app_server",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/CodexAppServerNotification"
          },
          "record_format": {
            "const": "codex_app_server@1",
            "default": "codex_app_server@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "Original record type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "codex",
            "default": "codex",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "CodexAppServerSessionRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "CodexCommandExecution": {
        "additionalProperties": true,
        "properties": {
          "aggregatedOutput": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aggregatedoutput"
          },
          "command": {
            "title": "Command",
            "type": "string"
          },
          "commandActions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Commandactions",
            "type": "array"
          },
          "cwd": {
            "title": "Cwd",
            "type": "string"
          },
          "durationMs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Durationms"
          },
          "exitCode": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exitcode"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "processId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processid"
          },
          "status": {
            "enum": [
              "inProgress",
              "completed",
              "failed",
              "declined"
            ],
            "title": "Status",
            "type": "string"
          },
          "type": {
            "const": "commandExecution",
            "default": "commandExecution",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "command",
          "commandActions",
          "cwd",
          "id",
          "status",
          "type"
        ],
        "title": "CodexCommandExecution",
        "type": "object"
      },
      "CodexCommandExecutionItem": {
        "additionalProperties": true,
        "properties": {
          "aggregated_output": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aggregated Output"
          },
          "command": {
            "default": "",
            "title": "Command",
            "type": "string"
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Code"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "type": {
            "const": "command_execution",
            "default": "command_execution",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexCommandExecutionItem",
        "type": "object"
      },
      "CodexConfig-Input": {
        "additionalProperties": false,
        "description": "Native options supported by the current Codex adapter.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexEffortLevel"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasoning effort for every turn. Omit to use the model default."
          },
          "model": {
            "description": "The model the session runs on: a Responses-capable id from the models table. Required.",
            "title": "Model",
            "type": "string"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          }
        },
        "required": [
          "model"
        ],
        "title": "CodexConfig",
        "type": "object"
      },
      "CodexConfig-Output": {
        "additionalProperties": false,
        "description": "Native options supported by the current Codex adapter.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexEffortLevel"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasoning effort for every turn. Omit to use the model default."
          },
          "model": {
            "description": "The model the session runs on: a Responses-capable id from the models table. Required.",
            "title": "Model",
            "type": "string"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          }
        },
        "required": [
          "effort",
          "model",
          "prompt"
        ],
        "title": "CodexConfig",
        "type": "object"
      },
      "CodexContextCompaction": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "type": {
            "const": "contextCompaction",
            "default": "contextCompaction",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "CodexContextCompaction",
        "type": "object"
      },
      "CodexEffortLevel": {
        "enum": [
          "none",
          "low",
          "medium",
          "high",
          "xhigh",
          "max"
        ],
        "title": "CodexEffortLevel",
        "type": "string"
      },
      "CodexErrorEvent": {
        "additionalProperties": true,
        "properties": {
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "type": {
            "const": "error",
            "default": "error",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexErrorEvent",
        "type": "object"
      },
      "CodexErrorItem": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "type": {
            "const": "error",
            "default": "error",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexErrorItem",
        "type": "object"
      },
      "CodexErrorParams": {
        "additionalProperties": true,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/CodexTurnError"
          },
          "threadId": {
            "title": "Threadid",
            "type": "string"
          },
          "turnId": {
            "title": "Turnid",
            "type": "string"
          },
          "willRetry": {
            "title": "Willretry",
            "type": "boolean"
          }
        },
        "required": [
          "error",
          "threadId",
          "turnId",
          "willRetry"
        ],
        "title": "CodexErrorParams",
        "type": "object"
      },
      "CodexFileChange": {
        "additionalProperties": true,
        "properties": {
          "changes": {
            "items": {
              "$ref": "#/components/schemas/CodexFileUpdate"
            },
            "title": "Changes",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "inProgress",
              "completed",
              "failed",
              "declined"
            ],
            "title": "Status",
            "type": "string"
          },
          "type": {
            "const": "fileChange",
            "default": "fileChange",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "changes",
          "id",
          "status",
          "type"
        ],
        "title": "CodexFileChange",
        "type": "object"
      },
      "CodexFileChangeItem": {
        "additionalProperties": true,
        "properties": {
          "changes": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changes"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "type": {
            "const": "file_change",
            "default": "file_change",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexFileChangeItem",
        "type": "object"
      },
      "CodexFileUpdate": {
        "additionalProperties": true,
        "properties": {
          "diff": {
            "title": "Diff",
            "type": "string"
          },
          "kind": {
            "additionalProperties": true,
            "title": "Kind",
            "type": "object"
          },
          "path": {
            "title": "Path",
            "type": "string"
          }
        },
        "required": [
          "diff",
          "kind",
          "path"
        ],
        "title": "CodexFileUpdate",
        "type": "object"
      },
      "CodexItemCompleted": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "item/completed",
            "default": "item/completed",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexItemParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexItemCompleted",
        "type": "object"
      },
      "CodexItemCompletedEvent": {
        "additionalProperties": true,
        "properties": {
          "item": {
            "discriminator": {
              "mapping": {
                "agent_message": "#/components/schemas/CodexAgentMessageItem",
                "command_execution": "#/components/schemas/CodexCommandExecutionItem",
                "error": "#/components/schemas/CodexErrorItem",
                "file_change": "#/components/schemas/CodexFileChangeItem",
                "mcp_tool_call": "#/components/schemas/CodexMcpToolCallItem",
                "reasoning": "#/components/schemas/CodexReasoningItem",
                "todo_list": "#/components/schemas/CodexTodoListItem",
                "web_search": "#/components/schemas/CodexWebSearchItem"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/CodexAgentMessageItem"
              },
              {
                "$ref": "#/components/schemas/CodexReasoningItem"
              },
              {
                "$ref": "#/components/schemas/CodexCommandExecutionItem"
              },
              {
                "$ref": "#/components/schemas/CodexFileChangeItem"
              },
              {
                "$ref": "#/components/schemas/CodexMcpToolCallItem"
              },
              {
                "$ref": "#/components/schemas/CodexWebSearchItem"
              },
              {
                "$ref": "#/components/schemas/CodexTodoListItem"
              },
              {
                "$ref": "#/components/schemas/CodexErrorItem"
              }
            ],
            "title": "Item"
          },
          "type": {
            "const": "item.completed",
            "default": "item.completed",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "item",
          "type"
        ],
        "title": "CodexItemCompletedEvent",
        "type": "object"
      },
      "CodexItemParams": {
        "additionalProperties": true,
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CodexAppServerItem"
          },
          "threadId": {
            "title": "Threadid",
            "type": "string"
          },
          "turnId": {
            "title": "Turnid",
            "type": "string"
          }
        },
        "required": [
          "item",
          "threadId",
          "turnId"
        ],
        "title": "CodexItemParams",
        "type": "object"
      },
      "CodexItemStarted": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "item/started",
            "default": "item/started",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexItemParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexItemStarted",
        "type": "object"
      },
      "CodexItemStartedEvent": {
        "additionalProperties": true,
        "properties": {
          "item": {
            "discriminator": {
              "mapping": {
                "agent_message": "#/components/schemas/CodexAgentMessageItem",
                "command_execution": "#/components/schemas/CodexCommandExecutionItem",
                "error": "#/components/schemas/CodexErrorItem",
                "file_change": "#/components/schemas/CodexFileChangeItem",
                "mcp_tool_call": "#/components/schemas/CodexMcpToolCallItem",
                "reasoning": "#/components/schemas/CodexReasoningItem",
                "todo_list": "#/components/schemas/CodexTodoListItem",
                "web_search": "#/components/schemas/CodexWebSearchItem"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/CodexAgentMessageItem"
              },
              {
                "$ref": "#/components/schemas/CodexReasoningItem"
              },
              {
                "$ref": "#/components/schemas/CodexCommandExecutionItem"
              },
              {
                "$ref": "#/components/schemas/CodexFileChangeItem"
              },
              {
                "$ref": "#/components/schemas/CodexMcpToolCallItem"
              },
              {
                "$ref": "#/components/schemas/CodexWebSearchItem"
              },
              {
                "$ref": "#/components/schemas/CodexTodoListItem"
              },
              {
                "$ref": "#/components/schemas/CodexErrorItem"
              }
            ],
            "title": "Item"
          },
          "type": {
            "const": "item.started",
            "default": "item.started",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "item",
          "type"
        ],
        "title": "CodexItemStartedEvent",
        "type": "object"
      },
      "CodexItemUpdatedEvent": {
        "additionalProperties": true,
        "properties": {
          "item": {
            "discriminator": {
              "mapping": {
                "agent_message": "#/components/schemas/CodexAgentMessageItem",
                "command_execution": "#/components/schemas/CodexCommandExecutionItem",
                "error": "#/components/schemas/CodexErrorItem",
                "file_change": "#/components/schemas/CodexFileChangeItem",
                "mcp_tool_call": "#/components/schemas/CodexMcpToolCallItem",
                "reasoning": "#/components/schemas/CodexReasoningItem",
                "todo_list": "#/components/schemas/CodexTodoListItem",
                "web_search": "#/components/schemas/CodexWebSearchItem"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/CodexAgentMessageItem"
              },
              {
                "$ref": "#/components/schemas/CodexReasoningItem"
              },
              {
                "$ref": "#/components/schemas/CodexCommandExecutionItem"
              },
              {
                "$ref": "#/components/schemas/CodexFileChangeItem"
              },
              {
                "$ref": "#/components/schemas/CodexMcpToolCallItem"
              },
              {
                "$ref": "#/components/schemas/CodexWebSearchItem"
              },
              {
                "$ref": "#/components/schemas/CodexTodoListItem"
              },
              {
                "$ref": "#/components/schemas/CodexErrorItem"
              }
            ],
            "title": "Item"
          },
          "type": {
            "const": "item.updated",
            "default": "item.updated",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "item",
          "type"
        ],
        "title": "CodexItemUpdatedEvent",
        "type": "object"
      },
      "CodexLocalImageInput": {
        "additionalProperties": true,
        "properties": {
          "detail": {
            "anyOf": [
              {
                "enum": [
                  "auto",
                  "low",
                  "high",
                  "original"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "type": {
            "const": "localImage",
            "default": "localImage",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "path",
          "type"
        ],
        "title": "CodexLocalImageInput",
        "type": "object"
      },
      "CodexMcpToolCall": {
        "additionalProperties": true,
        "properties": {
          "appContext": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexMcpToolCallAppContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "arguments": {
            "title": "Arguments"
          },
          "durationMs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Durationms"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexMcpToolCallError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "mcpAppResourceUri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mcpappresourceuri"
          },
          "pluginId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pluginid"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexMcpToolCallResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "server": {
            "title": "Server",
            "type": "string"
          },
          "status": {
            "enum": [
              "inProgress",
              "completed",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tool": {
            "title": "Tool",
            "type": "string"
          },
          "type": {
            "const": "mcpToolCall",
            "default": "mcpToolCall",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "arguments",
          "id",
          "server",
          "status",
          "tool",
          "type"
        ],
        "title": "CodexMcpToolCall",
        "type": "object"
      },
      "CodexMcpToolCallAppContext": {
        "additionalProperties": true,
        "properties": {
          "actionName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actionname"
          },
          "appName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appname"
          },
          "connectorId": {
            "title": "Connectorid",
            "type": "string"
          },
          "linkId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkid"
          },
          "resourceUri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resourceuri"
          }
        },
        "required": [
          "connectorId"
        ],
        "title": "CodexMcpToolCallAppContext",
        "type": "object"
      },
      "CodexMcpToolCallError": {
        "additionalProperties": true,
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "CodexMcpToolCallError",
        "type": "object"
      },
      "CodexMcpToolCallItem": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "server": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tool": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool"
          },
          "type": {
            "const": "mcp_tool_call",
            "default": "mcp_tool_call",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexMcpToolCallItem",
        "type": "object"
      },
      "CodexMcpToolCallResult": {
        "additionalProperties": true,
        "properties": {
          "_meta": {
            "title": "Meta"
          },
          "content": {
            "items": {},
            "title": "Content",
            "type": "array"
          },
          "structuredContent": {
            "title": "Structuredcontent"
          }
        },
        "required": [
          "content"
        ],
        "title": "CodexMcpToolCallResult",
        "type": "object"
      },
      "CodexOverrides": {
        "additionalProperties": false,
        "description": "The Codex options an agent session request may replace. Every field is\noptional: an omitted field keeps the agent's value.\n\nOptions and capabilities expand only when their runtime behavior is tested.\nUnknown options are rejected instead of silently ignored.",
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexEffortLevel"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasoning effort for every turn. Omit to use the model default."
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
            "title": "Prompt"
          }
        },
        "title": "CodexOverrides",
        "type": "object"
      },
      "CodexPlan": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "plan",
            "default": "plan",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text",
          "type"
        ],
        "title": "CodexPlan",
        "type": "object"
      },
      "CodexReasoning": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Content",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "summary": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Summary",
            "type": "array"
          },
          "type": {
            "const": "reasoning",
            "default": "reasoning",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "CodexReasoning",
        "type": "object"
      },
      "CodexReasoningItem": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "type": {
            "const": "reasoning",
            "default": "reasoning",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexReasoningItem",
        "type": "object"
      },
      "CodexSessionRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "codex",
            "default": "codex",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "discriminator": {
              "mapping": {
                "error": "#/components/schemas/CodexErrorEvent",
                "item.completed": "#/components/schemas/CodexItemCompletedEvent",
                "item.started": "#/components/schemas/CodexItemStartedEvent",
                "item.updated": "#/components/schemas/CodexItemUpdatedEvent",
                "thread.started": "#/components/schemas/CodexThreadStartedEvent",
                "turn.completed": "#/components/schemas/CodexTurnCompletedEvent",
                "turn.failed": "#/components/schemas/CodexTurnFailedEvent",
                "turn.started": "#/components/schemas/CodexTurnStartedEvent"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/CodexThreadStartedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexTurnStartedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexTurnCompletedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexTurnFailedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexErrorEvent"
              },
              {
                "$ref": "#/components/schemas/CodexItemStartedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexItemUpdatedEvent"
              },
              {
                "$ref": "#/components/schemas/CodexItemCompletedEvent"
              }
            ],
            "title": "Payload"
          },
          "record_format": {
            "const": "codex_jsonl@1",
            "default": "codex_jsonl@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "Original record type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "codex",
            "default": "codex",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "CodexSessionRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "CodexTextInput": {
        "additionalProperties": true,
        "properties": {
          "text": {
            "title": "Text",
            "type": "string"
          },
          "text_elements": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Text Elements",
            "type": "array"
          },
          "type": {
            "const": "text",
            "default": "text",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "title": "CodexTextInput",
        "type": "object"
      },
      "CodexThread": {
        "additionalProperties": true,
        "properties": {
          "cliVersion": {
            "title": "Cliversion",
            "type": "string"
          },
          "cwd": {
            "title": "Cwd",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "modelProvider": {
            "title": "Modelprovider",
            "type": "string"
          },
          "turns": {
            "items": {
              "$ref": "#/components/schemas/CodexTurn"
            },
            "title": "Turns",
            "type": "array"
          }
        },
        "required": [
          "cliVersion",
          "cwd",
          "id",
          "modelProvider",
          "turns"
        ],
        "title": "CodexThread",
        "type": "object"
      },
      "CodexThreadStarted": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "thread/started",
            "default": "thread/started",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexThreadStartedParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexThreadStarted",
        "type": "object"
      },
      "CodexThreadStartedEvent": {
        "additionalProperties": true,
        "properties": {
          "thread_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread Id"
          },
          "type": {
            "const": "thread.started",
            "default": "thread.started",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexThreadStartedEvent",
        "type": "object"
      },
      "CodexThreadStartedParams": {
        "additionalProperties": true,
        "properties": {
          "thread": {
            "$ref": "#/components/schemas/CodexThread"
          }
        },
        "required": [
          "thread"
        ],
        "title": "CodexThreadStartedParams",
        "type": "object"
      },
      "CodexThreadTokenUsage": {
        "additionalProperties": true,
        "properties": {
          "last": {
            "$ref": "#/components/schemas/CodexTokenUsageBreakdown"
          },
          "modelContextWindow": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modelcontextwindow"
          },
          "total": {
            "$ref": "#/components/schemas/CodexTokenUsageBreakdown"
          }
        },
        "required": [
          "last",
          "total"
        ],
        "title": "CodexThreadTokenUsage",
        "type": "object"
      },
      "CodexTodoListItem": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "items": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items"
          },
          "type": {
            "const": "todo_list",
            "default": "todo_list",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexTodoListItem",
        "type": "object"
      },
      "CodexTokenUsageBreakdown": {
        "additionalProperties": true,
        "properties": {
          "cacheWriteInputTokens": {
            "default": 0,
            "title": "Cachewriteinputtokens",
            "type": "integer"
          },
          "cachedInputTokens": {
            "title": "Cachedinputtokens",
            "type": "integer"
          },
          "inputTokens": {
            "title": "Inputtokens",
            "type": "integer"
          },
          "outputTokens": {
            "title": "Outputtokens",
            "type": "integer"
          },
          "reasoningOutputTokens": {
            "title": "Reasoningoutputtokens",
            "type": "integer"
          },
          "totalTokens": {
            "title": "Totaltokens",
            "type": "integer"
          }
        },
        "required": [
          "cachedInputTokens",
          "inputTokens",
          "outputTokens",
          "reasoningOutputTokens",
          "totalTokens"
        ],
        "title": "CodexTokenUsageBreakdown",
        "type": "object"
      },
      "CodexTokenUsageParams": {
        "additionalProperties": true,
        "properties": {
          "threadId": {
            "title": "Threadid",
            "type": "string"
          },
          "tokenUsage": {
            "$ref": "#/components/schemas/CodexThreadTokenUsage"
          },
          "turnId": {
            "title": "Turnid",
            "type": "string"
          }
        },
        "required": [
          "threadId",
          "tokenUsage",
          "turnId"
        ],
        "title": "CodexTokenUsageParams",
        "type": "object"
      },
      "CodexTokenUsageUpdated": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "thread/tokenUsage/updated",
            "default": "thread/tokenUsage/updated",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexTokenUsageParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexTokenUsageUpdated",
        "type": "object"
      },
      "CodexTurn": {
        "additionalProperties": true,
        "properties": {
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexTurnError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CodexAppServerItem"
            },
            "title": "Items",
            "type": "array"
          },
          "status": {
            "enum": [
              "inProgress",
              "completed",
              "failed",
              "interrupted"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "items",
          "status"
        ],
        "title": "CodexTurn",
        "type": "object"
      },
      "CodexTurnCompleted": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "turn/completed",
            "default": "turn/completed",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexTurnParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexTurnCompleted",
        "type": "object"
      },
      "CodexTurnCompletedEvent": {
        "additionalProperties": true,
        "properties": {
          "type": {
            "const": "turn.completed",
            "default": "turn.completed",
            "title": "Type",
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexUsage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexTurnCompletedEvent",
        "type": "object"
      },
      "CodexTurnError": {
        "additionalProperties": true,
        "properties": {
          "additionalDetails": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additionaldetails"
          },
          "codexErrorInfo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Codexerrorinfo"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "CodexTurnError",
        "type": "object"
      },
      "CodexTurnFailedEvent": {
        "additionalProperties": true,
        "properties": {
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "type": {
            "const": "turn.failed",
            "default": "turn.failed",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexTurnFailedEvent",
        "type": "object"
      },
      "CodexTurnParams": {
        "additionalProperties": true,
        "properties": {
          "threadId": {
            "title": "Threadid",
            "type": "string"
          },
          "turn": {
            "$ref": "#/components/schemas/CodexTurn"
          }
        },
        "required": [
          "threadId",
          "turn"
        ],
        "title": "CodexTurnParams",
        "type": "object"
      },
      "CodexTurnStarted": {
        "additionalProperties": true,
        "properties": {
          "method": {
            "const": "turn/started",
            "default": "turn/started",
            "title": "Method",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/CodexTurnParams"
          }
        },
        "required": [
          "method",
          "params"
        ],
        "title": "CodexTurnStarted",
        "type": "object"
      },
      "CodexTurnStartedEvent": {
        "additionalProperties": true,
        "properties": {
          "type": {
            "const": "turn.started",
            "default": "turn.started",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexTurnStartedEvent",
        "type": "object"
      },
      "CodexUsage": {
        "additionalProperties": true,
        "description": "The `usage` object on a `turn.completed` event \u2014 one turn's token counts.\n\nNote the field names differ from BOTH the Responses API and chat completions:\nCodex reports `cached_input_tokens` / `cache_write_input_tokens` where the\nResponses API says `input_tokens_details.cached_tokens`. These counts are for\ndisplay/records only \u2014 billing cost comes from the proxy's own ledger, which\nprices the provider's usage, so a drift here can never mis-bill.",
        "properties": {
          "cache_write_input_tokens": {
            "default": 0,
            "title": "Cache Write Input Tokens",
            "type": "integer"
          },
          "cached_input_tokens": {
            "default": 0,
            "title": "Cached Input Tokens",
            "type": "integer"
          },
          "input_tokens": {
            "default": 0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "title": "Output Tokens",
            "type": "integer"
          },
          "reasoning_output_tokens": {
            "default": 0,
            "title": "Reasoning Output Tokens",
            "type": "integer"
          }
        },
        "required": [],
        "title": "CodexUsage",
        "type": "object"
      },
      "CodexUserInput": {
        "discriminator": {
          "mapping": {
            "localImage": "#/components/schemas/CodexLocalImageInput",
            "text": "#/components/schemas/CodexTextInput"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/CodexTextInput"
          },
          {
            "$ref": "#/components/schemas/CodexLocalImageInput"
          }
        ]
      },
      "CodexUserMessage": {
        "additionalProperties": true,
        "properties": {
          "clientId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clientid"
          },
          "content": {
            "items": {
              "$ref": "#/components/schemas/CodexUserInput"
            },
            "title": "Content",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "type": {
            "const": "userMessage",
            "default": "userMessage",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "content",
          "id",
          "type"
        ],
        "title": "CodexUserMessage",
        "type": "object"
      },
      "CodexWebSearch": {
        "additionalProperties": true,
        "properties": {
          "action": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "type": {
            "const": "webSearch",
            "default": "webSearch",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "query",
          "type"
        ],
        "title": "CodexWebSearch",
        "type": "object"
      },
      "CodexWebSearchItem": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "type": {
            "const": "web_search",
            "default": "web_search",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "CodexWebSearchItem",
        "type": "object"
      },
      "ComputeConfig-Input": {
        "additionalProperties": false,
        "description": "Environment compute sizing. Every field is optional; an omitted field\ninherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value\noutside the platform bounds fails validation loudly (a sync error on the\nconfig) rather than being clamped silently.\n\n`memory` and `timeout` each accept a shorthand string (\"8GB\", \"30m\") or an\nexplicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /\n`timeout_seconds` properties resolve either form to the canonical integer\nthe environment is sized with.\n\n`timeout` is the max wall-clock the agent may run in one environment before\nit is stopped, capped at 1h (equal to the default, so today the knob only\nshortens a session; the cap matches the 1-hour validity of the session's\nGitHub token).\n\nCompute currently uses a temporary flat one-cent amount each time an\nenvironment is started for a session, subject to the account's existing\nfree-compute exemptions.",
        "properties": {
          "cpu": {
            "anyOf": [
              {
                "maximum": 32.0,
                "minimum": 2.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/MemorySize-Input"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "timeout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/Duration-Input"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout"
          }
        },
        "title": "ComputeConfig",
        "type": "object"
      },
      "ComputeConfig-Output": {
        "additionalProperties": false,
        "description": "Environment compute sizing. Every field is optional; an omitted field\ninherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value\noutside the platform bounds fails validation loudly (a sync error on the\nconfig) rather than being clamped silently.\n\n`memory` and `timeout` each accept a shorthand string (\"8GB\", \"30m\") or an\nexplicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /\n`timeout_seconds` properties resolve either form to the canonical integer\nthe environment is sized with.\n\n`timeout` is the max wall-clock the agent may run in one environment before\nit is stopped, capped at 1h (equal to the default, so today the knob only\nshortens a session; the cap matches the 1-hour validity of the session's\nGitHub token).\n\nCompute currently uses a temporary flat one-cent amount each time an\nenvironment is started for a session, subject to the account's existing\nfree-compute exemptions.",
        "properties": {
          "cpu": {
            "anyOf": [
              {
                "maximum": 32.0,
                "minimum": 2.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/MemorySize-Output"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "timeout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/Duration-Output"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout"
          }
        },
        "required": [
          "cpu",
          "memory",
          "timeout"
        ],
        "title": "ComputeConfig",
        "type": "object"
      },
      "ConfigManagedBy": {
        "description": "Which writer owns an agent: the repository file it is defined in, or\nthis API. Every agent has exactly one owner, fixed when it is created and\nchanged only by linking or unlinking it.",
        "enum": [
          "github",
          "api"
        ],
        "title": "ConfigManagedBy",
        "type": "string"
      },
      "ConfigMetadata-Input": {
        "additionalProperties": false,
        "properties": {
          "annotations": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Annotations",
            "type": "object"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          }
        },
        "title": "ConfigMetadata",
        "type": "object"
      },
      "ConfigMetadata-Output": {
        "additionalProperties": false,
        "properties": {
          "annotations": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "title": "Annotations",
            "type": "object"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          }
        },
        "required": [
          "annotations",
          "labels"
        ],
        "title": "ConfigMetadata",
        "type": "object"
      },
      "ConfigSpendWindow": {
        "description": "A saved agent or handler's trailing spend against its budget.",
        "properties": {
          "limit_usd": {
            "description": "The enforced configuration cap in US dollars: its own budget clamped to the platform maximum, or the maximum when unset. Account and developer limits also apply.",
            "title": "Limit Usd",
            "type": "number"
          },
          "platform_max_usd": {
            "description": "The platform ceiling for this window, in US dollars.",
            "title": "Platform Max Usd",
            "type": "number"
          },
          "spent_usd": {
            "description": "Recorded credit debits during the window across this configuration's sessions, in US dollars. Preserves sub-cent precision.",
            "title": "Spent Usd",
            "type": "number"
          },
          "window_days": {
            "description": "The trailing window, in days: 1, 7, or 28.",
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "window_days",
          "spent_usd",
          "limit_usd",
          "platform_max_usd"
        ],
        "title": "ConfigSpendWindow",
        "type": "object"
      },
      "ContributorUsage": {
        "description": "An author who merged a pull request in the window. The pull-request and\nline counts cover their merged pull requests; `reviews` counts reviews this\nperson also submitted.",
        "properties": {
          "additions": {
            "description": "Lines added across their merged pull requests.",
            "title": "Additions",
            "type": "integer"
          },
          "ai_attributed_prs": {
            "description": "Their merged pull requests authored by a bot identity.",
            "title": "Ai Attributed Prs",
            "type": "integer"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The contributor's GitHub avatar URL.",
            "title": "Avatar Url"
          },
          "deletions": {
            "description": "Lines deleted across their merged pull requests.",
            "title": "Deletions",
            "type": "integer"
          },
          "login": {
            "description": "The contributor's GitHub login.",
            "title": "Login",
            "type": "string"
          },
          "prs_merged": {
            "description": "Pull requests this contributor merged in the window.",
            "title": "Prs Merged",
            "type": "integer"
          },
          "reviews": {
            "description": "Reviews this contributor submitted in the window.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "login",
          "avatar_url",
          "prs_merged",
          "reviews",
          "additions",
          "deletions",
          "ai_attributed_prs"
        ],
        "title": "ContributorUsage",
        "type": "object"
      },
      "CreateAgentRequest": {
        "description": "Parameters for creating an agent.",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentConfig-Input",
            "description": "The agent's definition, in the same schema as a YAML file under .ellipsis/."
          }
        },
        "required": [
          "agent"
        ],
        "title": "CreateAgentRequest",
        "type": "object"
      },
      "CreateApiKeyRequest": {
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateApiKeyRequest",
        "type": "object"
      },
      "CreateApiKeyResponse": {
        "properties": {
          "api_key": {
            "$ref": "#/components/schemas/ApiKeyApi"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "secret"
        ],
        "title": "CreateApiKeyResponse",
        "type": "object"
      },
      "CreateEnvironmentRequest": {
        "description": "Parameters for creating an environment.",
        "properties": {
          "environment": {
            "$ref": "#/components/schemas/EnvironmentDocument-Input",
            "description": "The environment's definition."
          }
        },
        "required": [
          "environment"
        ],
        "title": "CreateEnvironmentRequest",
        "type": "object"
      },
      "CreateWebhookResponse": {
        "properties": {
          "secret": {
            "description": "The signing secret, returned only in this creation response. Save it now; it cannot be retrieved later.",
            "title": "Secret",
            "type": "string"
          },
          "webhook": {
            "$ref": "#/components/schemas/Webhook"
          }
        },
        "required": [
          "webhook",
          "secret"
        ],
        "title": "CreateWebhookResponse",
        "type": "object"
      },
      "CreditGrant": {
        "description": "Confirmed credit issuance or reversal, without internal payment identifiers.",
        "properties": {
          "amount_cents": {
            "description": "Granted credit; negative for a reversal.",
            "title": "Amount Cents",
            "type": "integer"
          },
          "category": {
            "$ref": "#/components/schemas/CreditGrantCategory"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/CreditGrantSource"
          }
        },
        "required": [
          "id",
          "created_at",
          "amount_cents",
          "category",
          "source",
          "name"
        ],
        "title": "CreditGrant",
        "type": "object"
      },
      "CreditGrantCategory": {
        "description": "`promotional` is free credit (signup, comps, migration make-good);\n`paid` is purchased credit.",
        "enum": [
          "promotional",
          "paid"
        ],
        "title": "CreditGrantCategory",
        "type": "string"
      },
      "CreditGrantSource": {
        "description": "Why the grant was issued \u2014 for analytics and audit, not for enforcement.",
        "enum": [
          "signup",
          "adhoc",
          "purchase",
          "auto_recharge",
          "migration",
          "refund_reversal",
          "yc_deal"
        ],
        "title": "CreditGrantSource",
        "type": "string"
      },
      "CreditGrantsResponse": {
        "properties": {
          "grants": {
            "items": {
              "$ref": "#/components/schemas/CreditGrant"
            },
            "title": "Grants",
            "type": "array"
          },
          "total_granted_cents": {
            "description": "Sum of grants before usage. Read the current balance from /v1/account/budget.",
            "title": "Total Granted Cents",
            "type": "integer"
          }
        },
        "required": [
          "grants",
          "total_granted_cents"
        ],
        "title": "CreditGrantsResponse",
        "type": "object"
      },
      "CreditPurchaseOptions": {
        "properties": {
          "fee_fraction": {
            "description": "Platform fee added to purchased credit.",
            "title": "Fee Fraction",
            "type": "number"
          },
          "max_amount_cents": {
            "title": "Max Amount Cents",
            "type": "integer"
          },
          "min_amount_cents": {
            "title": "Min Amount Cents",
            "type": "integer"
          },
          "preset_amounts_cents": {
            "description": "Suggested purchase amounts.",
            "items": {
              "type": "integer"
            },
            "title": "Preset Amounts Cents",
            "type": "array"
          }
        },
        "required": [
          "min_amount_cents",
          "max_amount_cents",
          "fee_fraction",
          "preset_amounts_cents"
        ],
        "title": "CreditPurchaseOptions",
        "type": "object"
      },
      "CreditPurchaseReceipt": {
        "properties": {
          "amount_paid_cents": {
            "description": "Amount collected for a completed credit purchase, including the platform fee.",
            "title": "Amount Paid Cents",
            "type": "integer"
          }
        },
        "required": [
          "amount_paid_cents"
        ],
        "title": "CreditPurchaseReceipt",
        "type": "object"
      },
      "CreditPurchaseRequest": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "Credit to buy. The platform fee is added at checkout.",
            "minimum": 500.0,
            "title": "Amount Cents",
            "type": "integer"
          }
        },
        "required": [
          "amount_cents"
        ],
        "title": "CreditPurchaseRequest",
        "type": "object"
      },
      "CronTrigger-Input": {
        "additionalProperties": false,
        "properties": {
          "schedule": {
            "title": "Schedule",
            "type": "string"
          },
          "type": {
            "const": "cron",
            "default": "cron",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "schedule"
        ],
        "title": "CronTrigger",
        "type": "object"
      },
      "CronTrigger-Output": {
        "additionalProperties": false,
        "properties": {
          "schedule": {
            "title": "Schedule",
            "type": "string"
          },
          "type": {
            "const": "cron",
            "default": "cron",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "schedule",
          "type"
        ],
        "title": "CronTrigger",
        "type": "object"
      },
      "CustomerAuditLogEventType": {
        "enum": [
          "system_limits_updated",
          "webhook_state_changed",
          "github_installation_created",
          "github_installation_removed",
          "github_installation_suspended",
          "github_installation_unsuspended",
          "credit_granted",
          "refund_issued",
          "auto_recharge_updated"
        ],
        "title": "CustomerAuditLogEventType",
        "type": "string"
      },
      "DataRetentionSettings-Input": {
        "properties": {
          "api_requests_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserved; API request retention is not yet enforced.",
            "title": "Api Requests Days"
          },
          "environment_snapshots_days": {
            "description": "Retention of newly created reusable environment snapshots, up to 28 days from creation. Paused session workspaces have a separate lifetime.",
            "maximum": 28.0,
            "minimum": 7.0,
            "title": "Environment Snapshots Days",
            "type": "integer"
          },
          "session_logs_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Logs Days"
          },
          "webhooks_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserved; webhook retention is not yet enforced.",
            "title": "Webhooks Days"
          }
        },
        "title": "DataRetentionSettings",
        "type": "object"
      },
      "DataRetentionSettings-Output": {
        "properties": {
          "api_requests_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserved; API request retention is not yet enforced.",
            "title": "Api Requests Days"
          },
          "environment_snapshots_days": {
            "default": 28,
            "description": "Retention of newly created reusable environment snapshots, up to 28 days from creation. Paused session workspaces have a separate lifetime.",
            "maximum": 28.0,
            "minimum": 7.0,
            "title": "Environment Snapshots Days",
            "type": "integer"
          },
          "session_logs_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Logs Days"
          },
          "webhooks_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserved; webhook retention is not yet enforced.",
            "title": "Webhooks Days"
          }
        },
        "required": [
          "environment_snapshots_days",
          "session_logs_days",
          "webhooks_days",
          "api_requests_days"
        ],
        "title": "DataRetentionSettings",
        "type": "object"
      },
      "DeveloperBudget": {
        "properties": {
          "attribution_id": {
            "title": "Attribution Id",
            "type": "string"
          },
          "attribution_type": {
            "$ref": "#/components/schemas/AttributionType"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "developer_key": {
            "title": "Developer Key",
            "type": "string"
          },
          "login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Login"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "API key name, when the key still exists.",
            "title": "Name"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/DeveloperBudgetWindow"
            },
            "title": "Windows",
            "type": "array"
          }
        },
        "required": [
          "developer_key",
          "attribution_type",
          "attribution_id",
          "login",
          "avatar_url",
          "name",
          "windows"
        ],
        "title": "DeveloperBudget",
        "type": "object"
      },
      "DeveloperBudgetDefaultWindow": {
        "properties": {
          "limit_usd": {
            "title": "Limit Usd",
            "type": "number"
          },
          "platform_max_usd": {
            "title": "Platform Max Usd",
            "type": "number"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "window_days",
          "limit_usd",
          "platform_max_usd"
        ],
        "title": "DeveloperBudgetDefaultWindow",
        "type": "object"
      },
      "DeveloperBudgetWindow": {
        "properties": {
          "exhausted": {
            "title": "Exhausted",
            "type": "boolean"
          },
          "limit_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usd"
          },
          "override_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Usd"
          },
          "remaining_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Usd"
          },
          "spent_usd": {
            "title": "Spent Usd",
            "type": "number"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "window_days",
          "spent_usd",
          "limit_usd",
          "override_usd",
          "remaining_usd",
          "exhausted"
        ],
        "title": "DeveloperBudgetWindow",
        "type": "object"
      },
      "DeveloperBudgets": {
        "properties": {
          "defaults": {
            "items": {
              "$ref": "#/components/schemas/DeveloperBudgetDefaultWindow"
            },
            "title": "Defaults",
            "type": "array"
          },
          "developers": {
            "description": "Developers with recent usage or overrides, plus active API keys.",
            "items": {
              "$ref": "#/components/schemas/DeveloperBudget"
            },
            "title": "Developers",
            "type": "array"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "defaults",
          "developers"
        ],
        "title": "DeveloperBudgets",
        "type": "object"
      },
      "DeveloperUsageBreakdown": {
        "description": "Cost for one developer (a distinct attribution_type + attribution_id)\nover the whole period, split into the four billed categories (millicents).\nAgent sessions only.",
        "properties": {
          "attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attribution Id"
          },
          "attribution_login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attribution Login"
          },
          "attribution_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attribution Type"
          },
          "cost_cpu_millicents": {
            "title": "Cost Cpu Millicents",
            "type": "integer"
          },
          "cost_fee_millicents": {
            "title": "Cost Fee Millicents",
            "type": "integer"
          },
          "cost_memory_millicents": {
            "title": "Cost Memory Millicents",
            "type": "integer"
          },
          "cost_tokens_millicents": {
            "title": "Cost Tokens Millicents",
            "type": "integer"
          },
          "runs": {
            "title": "Runs",
            "type": "integer"
          },
          "tokens": {
            "title": "Tokens",
            "type": "integer"
          }
        },
        "required": [
          "attribution_type",
          "attribution_id",
          "attribution_login",
          "tokens",
          "cost_tokens_millicents",
          "cost_cpu_millicents",
          "cost_memory_millicents",
          "cost_fee_millicents",
          "runs"
        ],
        "title": "DeveloperUsageBreakdown",
        "type": "object"
      },
      "Duration-Input": {
        "additionalProperties": false,
        "description": "A duration as explicit units, summed. Set any of `hours`/`minutes`/\n`seconds` (at least one). The alternative to the `30m`-style shorthand\nstring wherever a duration is accepted.",
        "properties": {
          "hours": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hours"
          },
          "minutes": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minutes"
          },
          "seconds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seconds"
          }
        },
        "title": "Duration",
        "type": "object"
      },
      "Duration-Output": {
        "additionalProperties": false,
        "description": "A duration as explicit units, summed. Set any of `hours`/`minutes`/\n`seconds` (at least one). The alternative to the `30m`-style shorthand\nstring wherever a duration is accepted.",
        "properties": {
          "hours": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hours"
          },
          "minutes": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minutes"
          },
          "seconds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seconds"
          }
        },
        "required": [
          "hours",
          "minutes",
          "seconds"
        ],
        "title": "Duration",
        "type": "object"
      },
      "DurationPercentiles": {
        "description": "Percentiles of a duration distribution, in hours. p0 = fastest,\np100 = slowest; the spread shows how merge latency varies.",
        "properties": {
          "p0": {
            "description": "The fastest value, in hours.",
            "title": "P0",
            "type": "number"
          },
          "p100": {
            "description": "The slowest value, in hours.",
            "title": "P100",
            "type": "number"
          },
          "p25": {
            "description": "The 25th-percentile value, in hours.",
            "title": "P25",
            "type": "number"
          },
          "p50": {
            "description": "The median value, in hours.",
            "title": "P50",
            "type": "number"
          },
          "p75": {
            "description": "The 75th-percentile value, in hours.",
            "title": "P75",
            "type": "number"
          }
        },
        "required": [
          "p0",
          "p25",
          "p50",
          "p75",
          "p100"
        ],
        "title": "DurationPercentiles",
        "type": "object"
      },
      "EffortLevel": {
        "enum": [
          "low",
          "medium",
          "high",
          "xhigh",
          "max"
        ],
        "title": "EffortLevel",
        "type": "string"
      },
      "EllipsisGrant-Input": {
        "additionalProperties": false,
        "description": "One grant entry: a level, optionally narrowed to instances whose\nnatural key (a file's name, a secret's name, a config's name, a session's\nid) matches any of the `match` globs.",
        "properties": {
          "level": {
            "$ref": "#/components/schemas/Level"
          },
          "match": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match"
          }
        },
        "required": [
          "level"
        ],
        "title": "EllipsisGrant",
        "type": "object"
      },
      "EllipsisGrant-Output": {
        "additionalProperties": false,
        "description": "One grant entry: a level, optionally narrowed to instances whose\nnatural key (a file's name, a secret's name, a config's name, a session's\nid) matches any of the `match` globs.",
        "properties": {
          "level": {
            "$ref": "#/components/schemas/Level"
          },
          "match": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match"
          }
        },
        "required": [
          "level",
          "match"
        ],
        "title": "EllipsisGrant",
        "type": "object"
      },
      "EllipsisPermissions-Input": {
        "additionalProperties": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/Level"
            },
            {
              "$ref": "#/components/schemas/EllipsisGrant-Input"
            },
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Level"
                  },
                  {
                    "$ref": "#/components/schemas/EllipsisGrant-Input"
                  }
                ]
              },
              "type": "array"
            }
          ]
        },
        "description": "`permissions.ellipsis` as a map: resource \u2192 level | grant | list of\ngrants. Levels are hierarchical (read < write < delete), so `write`\nincludes `read`. An unlisted resource is denied. The whole block is\nintersected with the platform's session token ceiling at token mint \u2014 it can\nnarrow what a session token may do, never exceed it.",
        "propertyNames": {
          "$ref": "#/components/schemas/Resource"
        },
        "title": "EllipsisPermissions",
        "type": "object"
      },
      "EllipsisPermissions-Output": {
        "additionalProperties": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/Level"
            },
            {
              "$ref": "#/components/schemas/EllipsisGrant-Output"
            },
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Level"
                  },
                  {
                    "$ref": "#/components/schemas/EllipsisGrant-Output"
                  }
                ]
              },
              "type": "array"
            }
          ]
        },
        "description": "`permissions.ellipsis` as a map: resource \u2192 level | grant | list of\ngrants. Levels are hierarchical (read < write < delete), so `write`\nincludes `read`. An unlisted resource is denied. The whole block is\nintersected with the platform's session token ceiling at token mint \u2014 it can\nnarrow what a session token may do, never exceed it.",
        "propertyNames": {
          "$ref": "#/components/schemas/Resource"
        },
        "title": "EllipsisPermissions",
        "type": "object"
      },
      "Environment": {
        "description": "A saved environment: the machine agents run in (repositories,\nvariables, MCP servers, image, compute, hooks), defined once and\nreferenced by name or id from agents and session starts.",
        "properties": {
          "created_at": {
            "description": "When the environment was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the environment, when known."
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentDocument-Output",
            "description": "The environment definition itself, as parsed from its YAML."
          },
          "id": {
            "description": "Unique identifier of the environment.",
            "title": "Id",
            "type": "string"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means sessions run the last good definition, not the YAML currently on the branch.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last commit the environment was synced from.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "$ref": "#/components/schemas/ConfigManagedBy",
            "description": "\"github\" environments are defined by a file in a repository and are changed by editing that file; \"api\" environments have no file and are changed through this API."
          },
          "name": {
            "description": "The environment's customer-unique addressable name; usable anywhere an environment is referenced, interchangeably with the id.",
            "title": "Name",
            "type": "string"
          },
          "sha": {
            "description": "The environment's content identity fingerprint.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubSourceDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository, path, and branch the environment syncs from. Null for environments managed through the API."
          },
          "updated_at": {
            "description": "When the environment was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "sha",
          "created_at",
          "updated_at",
          "managed_by",
          "environment"
        ],
        "title": "Environment",
        "type": "object"
      },
      "EnvironmentBaseBuild-Input": {
        "additionalProperties": false,
        "description": "Create a reusable base, optionally using only selected repository files.",
        "properties": {
          "inputs": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact files relative to the workspace directory `/sandbox`, including the repository name. Only these files are available during build_base and their contents and modes determine reuse. Omit to use all repositories and invalidate on any source change; [] means no repository files.",
            "title": "Inputs"
          },
          "run": {
            "description": "Shell script to run in the workspace directory `/sandbox`.",
            "minLength": 1,
            "title": "Run",
            "type": "string"
          }
        },
        "required": [
          "run"
        ],
        "title": "EnvironmentBaseBuild",
        "type": "object"
      },
      "EnvironmentBaseBuild-Output": {
        "additionalProperties": false,
        "description": "Create a reusable base, optionally using only selected repository files.",
        "properties": {
          "inputs": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact files relative to the workspace directory `/sandbox`, including the repository name. Only these files are available during build_base and their contents and modes determine reuse. Omit to use all repositories and invalidate on any source change; [] means no repository files.",
            "title": "Inputs"
          },
          "run": {
            "description": "Shell script to run in the workspace directory `/sandbox`.",
            "minLength": 1,
            "title": "Run",
            "type": "string"
          }
        },
        "required": [
          "inputs",
          "run"
        ],
        "title": "EnvironmentBaseBuild",
        "type": "object"
      },
      "EnvironmentConfig-Input": {
        "additionalProperties": false,
        "description": "Everything about the environment the agent runs in: which\n`repositories` are cloned into it, which environment `variables` it gets,\nits `compute` sizing, and lifecycle `hooks`.\nWhat the agent may *do* from that environment is the top-level\n`permissions:` block, not this one.\n\nEach `variables` entry names a variable to inject; with an inline `value` it\nis hardcoded, without one it is resolved from the account's secrets\nstore. Only the named variables reach this agent; the rest of the account's\nstored variables never do. This is how a config brings in the config and\ncredentials a custom CLI needs.",
        "properties": {
          "compute": {
            "$ref": "#/components/schemas/ComputeConfig-Input"
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Input"
          },
          "mcp_servers": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/McpServerRef"
                },
                {
                  "$ref": "#/components/schemas/McpStdioServer-Input"
                },
                {
                  "$ref": "#/components/schemas/McpRemoteServer-Input"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/RepositoryRef-Input"
            },
            "title": "Repositories",
            "type": "array"
          },
          "variables": {
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariable-Input"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "title": "EnvironmentConfig",
        "type": "object"
      },
      "EnvironmentConfig-Output": {
        "additionalProperties": false,
        "description": "Everything about the environment the agent runs in: which\n`repositories` are cloned into it, which environment `variables` it gets,\nits `compute` sizing, and lifecycle `hooks`.\nWhat the agent may *do* from that environment is the top-level\n`permissions:` block, not this one.\n\nEach `variables` entry names a variable to inject; with an inline `value` it\nis hardcoded, without one it is resolved from the account's secrets\nstore. Only the named variables reach this agent; the rest of the account's\nstored variables never do. This is how a config brings in the config and\ncredentials a custom CLI needs.",
        "properties": {
          "compute": {
            "$ref": "#/components/schemas/ComputeConfig-Output",
            "default": {}
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Output",
            "default": {}
          },
          "mcp_servers": {
            "default": [],
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/McpServerRef"
                },
                {
                  "$ref": "#/components/schemas/McpStdioServer-Output"
                },
                {
                  "$ref": "#/components/schemas/McpRemoteServer-Output"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "repositories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RepositoryRef-Output"
            },
            "title": "Repositories",
            "type": "array"
          },
          "variables": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariable-Output"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "compute",
          "hooks",
          "mcp_servers",
          "repositories",
          "variables"
        ],
        "title": "EnvironmentConfig",
        "type": "object"
      },
      "EnvironmentDocument-Input": {
        "additionalProperties": false,
        "description": "A parsed environment document: identity plus the environment body.\n\nThe body fields are flattened to the top level of the file (not nested\nunder an `environment:` key) \u2014 the file *is* the environment, so nesting\nwould be ceremony. `to_environment()` projects the body for substitution\ninto an agent.",
        "properties": {
          "compute": {
            "$ref": "#/components/schemas/ComputeConfig-Input"
          },
          "ellipsis": {
            "$ref": "#/components/schemas/EnvironmentIdentity-Input"
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Input"
          },
          "mcp_servers": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/McpServerRef"
                },
                {
                  "$ref": "#/components/schemas/McpStdioServer-Input"
                },
                {
                  "$ref": "#/components/schemas/McpRemoteServer-Input"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/RepositoryRef-Input"
            },
            "title": "Repositories",
            "type": "array"
          },
          "variables": {
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariable-Input"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "ellipsis"
        ],
        "title": "EnvironmentDocument",
        "type": "object"
      },
      "EnvironmentDocument-Output": {
        "additionalProperties": false,
        "description": "A parsed environment document: identity plus the environment body.\n\nThe body fields are flattened to the top level of the file (not nested\nunder an `environment:` key) \u2014 the file *is* the environment, so nesting\nwould be ceremony. `to_environment()` projects the body for substitution\ninto an agent.",
        "properties": {
          "compute": {
            "$ref": "#/components/schemas/ComputeConfig-Output",
            "default": {}
          },
          "ellipsis": {
            "$ref": "#/components/schemas/EnvironmentIdentity-Output"
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Output",
            "default": {}
          },
          "mcp_servers": {
            "default": [],
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/McpServerRef"
                },
                {
                  "$ref": "#/components/schemas/McpStdioServer-Output"
                },
                {
                  "$ref": "#/components/schemas/McpRemoteServer-Output"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "repositories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RepositoryRef-Output"
            },
            "title": "Repositories",
            "type": "array"
          },
          "variables": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariable-Output"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "ellipsis"
        ],
        "title": "EnvironmentDocument",
        "type": "object"
      },
      "EnvironmentHooks-Input": {
        "additionalProperties": false,
        "description": "Environment lifecycle scripts, in order: build_base, after_checkout,\nbefore_start. The first two produce reusable snapshots; before_start runs\nbefore an agent starts or resumes its session. Scripts run as the environment's\nuser in the workspace directory `/sandbox`. A nonzero exit fails the session.\n\nLegacy post_start/post_clone scripts remain supported for existing configs;\nboth run after workspace preparation, before the agent starts or resumes.\nThey cannot be combined with the new lifecycle fields.",
        "properties": {
          "after_checkout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentScript"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared environment. Skipped when that prepared environment is reused.",
            "title": "After Checkout"
          },
          "before_start": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentScript"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Run before the agent starts or resumes a session, after the environment is ready. This hook is not cached and adds to session startup time.",
            "title": "Before Start"
          },
          "build_base": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentBaseBuild-Input"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.",
            "title": "Build Base"
          },
          "post_clone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.",
            "title": "Post Clone"
          },
          "post_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legacy session startup script. Use before_start in new configurations.",
            "title": "Post Start"
          }
        },
        "title": "EnvironmentHooks",
        "type": "object"
      },
      "EnvironmentHooks-Output": {
        "additionalProperties": false,
        "description": "Environment lifecycle scripts, in order: build_base, after_checkout,\nbefore_start. The first two produce reusable snapshots; before_start runs\nbefore an agent starts or resumes its session. Scripts run as the environment's\nuser in the workspace directory `/sandbox`. A nonzero exit fails the session.\n\nLegacy post_start/post_clone scripts remain supported for existing configs;\nboth run after workspace preparation, before the agent starts or resumes.\nThey cannot be combined with the new lifecycle fields.",
        "properties": {
          "after_checkout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentScript"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared environment. Skipped when that prepared environment is reused.",
            "title": "After Checkout"
          },
          "before_start": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentScript"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Run before the agent starts or resumes a session, after the environment is ready. This hook is not cached and adds to session startup time.",
            "title": "Before Start"
          },
          "build_base": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentBaseBuild-Output"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.",
            "title": "Build Base"
          },
          "post_clone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.",
            "title": "Post Clone"
          },
          "post_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legacy session startup script. Use before_start in new configurations.",
            "title": "Post Start"
          }
        },
        "required": [
          "after_checkout",
          "before_start",
          "build_base",
          "post_clone",
          "post_start"
        ],
        "title": "EnvironmentHooks",
        "type": "object"
      },
      "EnvironmentIdentity-Input": {
        "additionalProperties": false,
        "description": "The Ellipsis namespace of an environment file. `kind: environment` is\nwhat routes a synced YAML here instead of to the agent parser,\nwhich requires `kind: agent`.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "const": "environment",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Input"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "required": [
          "kind"
        ],
        "title": "EnvironmentIdentity",
        "type": "object"
      },
      "EnvironmentIdentity-Output": {
        "additionalProperties": false,
        "description": "The Ellipsis namespace of an environment file. `kind: environment` is\nwhat routes a synced YAML here instead of to the agent parser,\nwhich requires `kind: agent`.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "const": "environment",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "required": [
          "kind"
        ],
        "title": "EnvironmentIdentity",
        "type": "object"
      },
      "EnvironmentOutputPayload": {
        "additionalProperties": true,
        "description": "environment_output: one chunk of output from preparing the environment,\nincluding the customer's own hooks. Many fire per turn; `chunk` orders them\nwithin a step.",
        "properties": {
          "chunk": {
            "title": "Chunk",
            "type": "integer"
          },
          "lines": {
            "items": {
              "type": "string"
            },
            "title": "Lines",
            "type": "array"
          },
          "phase": {
            "title": "Phase",
            "type": "string"
          },
          "step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step"
          },
          "stream": {
            "default": "stdout",
            "title": "Stream",
            "type": "string"
          }
        },
        "required": [
          "phase",
          "chunk",
          "lines"
        ],
        "title": "EnvironmentOutputPayload",
        "type": "object"
      },
      "EnvironmentOutputRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/EnvironmentOutputPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "environment_output",
            "default": "environment_output",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "EnvironmentOutputRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "EnvironmentPhasePayload": {
        "additionalProperties": true,
        "description": "environment_phase: one transition of environment preparation, so clients\ncan narrate progress live and locate failures. Phases are an OPEN\nvocabulary; `detail` carries phase-specific extras additively.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "phase": {
            "title": "Phase",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step"
          }
        },
        "required": [
          "phase",
          "status"
        ],
        "title": "EnvironmentPhasePayload",
        "type": "object"
      },
      "EnvironmentPhaseRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/EnvironmentPhasePayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "environment_phase",
            "default": "environment_phase",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "EnvironmentPhaseRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "EnvironmentReadyPayload": {
        "additionalProperties": true,
        "description": "environment_ready: the environment is prepared and the agent is about\nto start.",
        "properties": {
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "repositories": {
            "items": {
              "type": "string"
            },
            "title": "Repositories",
            "type": "array"
          }
        },
        "required": [
          "repositories"
        ],
        "title": "EnvironmentReadyPayload",
        "type": "object"
      },
      "EnvironmentReadyRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/EnvironmentReadyPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "environment_ready",
            "default": "environment_ready",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "EnvironmentReadyRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "EnvironmentResponse": {
        "description": "One saved environment.",
        "properties": {
          "environment": {
            "$ref": "#/components/schemas/Environment",
            "description": "The saved environment."
          }
        },
        "required": [
          "environment"
        ],
        "title": "EnvironmentResponse",
        "type": "object"
      },
      "EnvironmentScript": {
        "additionalProperties": false,
        "description": "An inline shell script run as the environment's user, with the workspace\ndirectory `/sandbox` as cwd.",
        "properties": {
          "run": {
            "description": "Shell script to run in the workspace directory `/sandbox`.",
            "minLength": 1,
            "title": "Run",
            "type": "string"
          }
        },
        "required": [
          "run"
        ],
        "title": "EnvironmentScript",
        "type": "object"
      },
      "EnvironmentSource": {
        "description": "How a session's environment was chosen. None (the field is nullable)\nwhen the config carried an inline environment block and no resolution ran \u2014\nan inline environment is not a reference, so there is nothing to record.\n\nNot derivable from the row: `environment_id` says WHICH environment, not\nhow it was chosen, and is null for the built-in basic environment.",
        "enum": [
          "request",
          "agent",
          "repo_default",
          "account_default",
          "platform_default"
        ],
        "title": "EnvironmentSource",
        "type": "string"
      },
      "EnvironmentVariable-Input": {
        "additionalProperties": false,
        "description": "One environment variable injected into the session's environment.\n\n`value`, when set, is a literal injected as-is \u2014 use it for non-secret\nconfig (LOG_LEVEL, an API base URL). When `value` is omitted the value is\nresolved at run time from the account's secrets store (dashboard\n/ `PUT /v1/secrets`) by `name`, so a secret can be injected without\never putting it in the config file. Either way the variable only reaches\nagents that name it.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name"
        ],
        "title": "EnvironmentVariable",
        "type": "object"
      },
      "EnvironmentVariable-Output": {
        "additionalProperties": false,
        "description": "One environment variable injected into the session's environment.\n\n`value`, when set, is a literal injected as-is \u2014 use it for non-secret\nconfig (LOG_LEVEL, an API base URL). When `value` is omitted the value is\nresolved at run time from the account's secrets store (dashboard\n/ `PUT /v1/secrets`) by `name`, so a secret can be injected without\never putting it in the config file. Either way the variable only reaches\nagents that name it.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "title": "EnvironmentVariable",
        "type": "object"
      },
      "EnvironmentsListResponse": {
        "description": "The caller's saved environments.",
        "properties": {
          "environments": {
            "description": "Saved environments.",
            "items": {
              "$ref": "#/components/schemas/Environment"
            },
            "title": "Environments",
            "type": "array"
          }
        },
        "required": [
          "environments"
        ],
        "title": "EnvironmentsListResponse",
        "type": "object"
      },
      "ErrorInfo": {
        "properties": {
          "code": {
            "description": "Stable machine-readable error code. Open vocabulary \u2014 handle unknown codes by HTTP status. Known values: account_blocked, budget_exceeds_ceiling, conflict, contact_email_required, failed_dependency, forbidden, internal_error, invalid_cursor, invalid_request, not_found, rate_limit_exceeded, rate_limited, session_budget_exhausted, session_closed, session_finished, session_harness_single_turn, session_mention_surface, session_non_interactive, session_not_spawner, unauthorized, unavailable, unsupported_session_combination, user_credential_required, webhook_limit_reached, webhook_not_pending, webhook_ping_rate_limited, webhook_unverified, webhooks_unavailable.",
            "title": "Code",
            "type": "string"
          },
          "message": {
            "description": "Human-readable explanation. Wording may change at any time; switch on `code`, never on this text.",
            "title": "Message",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present on internal server errors: quote it when contacting support to identify the exact failure.",
            "title": "Request Id"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorInfo",
        "type": "object"
      },
      "ErrorResponse": {
        "description": "The error envelope every /v1 error returns.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorInfo"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "FeeScheduleResponse": {
        "properties": {
          "fee_schedule": {
            "$ref": "#/components/schemas/PublicFeeSchedule"
          }
        },
        "required": [
          "fee_schedule"
        ],
        "title": "FeeScheduleResponse",
        "type": "object"
      },
      "FundingSource": {
        "enum": [
          "ellipsis",
          "claude_subscription",
          "codex_subscription",
          "unknown"
        ],
        "title": "FundingSource",
        "type": "string"
      },
      "FundingSourceUsage": {
        "description": "Actual credit debits and separately rated token usage for one funding source.\n\nRated usage is our estimate at the recorded model rate, not an external\nprovider invoice. Missing measurements are reported explicitly, not as free\nrequests. Compute and carried-forward charges contribute to credit debits.",
        "properties": {
          "charged_millicents": {
            "default": 0,
            "title": "Charged Millicents",
            "type": "integer"
          },
          "funding_source": {
            "$ref": "#/components/schemas/FundingSource"
          },
          "pending_requests": {
            "default": 0,
            "title": "Pending Requests",
            "type": "integer"
          },
          "rated_token_cost_millicents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rated Token Cost Millicents"
          },
          "requests": {
            "default": 0,
            "title": "Requests",
            "type": "integer"
          },
          "token_charged_millicents": {
            "default": 0,
            "title": "Token Charged Millicents",
            "type": "integer"
          },
          "tokens": {
            "default": 0,
            "title": "Tokens",
            "type": "integer"
          },
          "unresolved_requests": {
            "default": 0,
            "title": "Unresolved Requests",
            "type": "integer"
          }
        },
        "required": [
          "funding_source"
        ],
        "title": "FundingSourceUsage",
        "type": "object"
      },
      "GetAnalyticsMetricsResponse": {
        "description": "Organization-wide pull-request and review analytics, aggregated\nserver-side over the requested window and filters, with filter facets\nderived from the unfiltered pull-request set.",
        "properties": {
          "available_authors": {
            "description": "Author filter options from the unfiltered window.",
            "items": {
              "$ref": "#/components/schemas/AuthorFacet"
            },
            "title": "Available Authors",
            "type": "array"
          },
          "available_repos": {
            "description": "Repository filter options from the unfiltered window.",
            "items": {
              "$ref": "#/components/schemas/RepoFacet"
            },
            "title": "Available Repos",
            "type": "array"
          },
          "contributors": {
            "description": "Per-contributor breakdown, most merged pull requests first.",
            "items": {
              "$ref": "#/components/schemas/ContributorUsage"
            },
            "title": "Contributors",
            "type": "array"
          },
          "repositories": {
            "description": "Per-repository breakdown, most merged pull requests first.",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRepoUsage"
            },
            "title": "Repositories",
            "type": "array"
          },
          "reviewers": {
            "description": "Per-reviewer breakdown, most reviews first.",
            "items": {
              "$ref": "#/components/schemas/ReviewerUsage"
            },
            "title": "Reviewers",
            "type": "array"
          },
          "series": {
            "description": "Per-day activity buckets covering the window.",
            "items": {
              "$ref": "#/components/schemas/AnalyticsMetricsBucket"
            },
            "title": "Series",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/AnalyticsMetricsTotals",
            "description": "Window-wide totals."
          }
        },
        "required": [
          "series",
          "totals",
          "repositories",
          "contributors",
          "reviewers",
          "available_repos",
          "available_authors"
        ],
        "title": "GetAnalyticsMetricsResponse",
        "type": "object"
      },
      "GetAnalyticsPullRequestsResponse": {
        "description": "Pull-request analytics for the requested window: per-day trends with\nhuman/bot splits, window totals, filter facets, and the most recent pull\nrequests.",
        "properties": {
          "facets": {
            "$ref": "#/components/schemas/PullRequestFacets",
            "description": "Available filter options, from the unfiltered window."
          },
          "recent": {
            "description": "The most recent pull requests, newest first, capped.",
            "items": {
              "$ref": "#/components/schemas/RecentPullRequest"
            },
            "title": "Recent",
            "type": "array"
          },
          "series": {
            "description": "Per-day activity buckets covering the window.",
            "items": {
              "$ref": "#/components/schemas/PullRequestsDayBucket"
            },
            "title": "Series",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/PullRequestsTotals",
            "description": "Window-wide totals."
          },
          "truncated": {
            "description": "True when the window hit the scan limit and the figures undercount.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "series",
          "totals",
          "facets",
          "recent",
          "truncated"
        ],
        "title": "GetAnalyticsPullRequestsResponse",
        "type": "object"
      },
      "GetAnalyticsReviewsResponse": {
        "description": "Review analytics for the requested window: the review and inline-comment\nfeeds, per-day trends, full-set totals, and filter facets.",
        "properties": {
          "facets": {
            "$ref": "#/components/schemas/ReviewFacets",
            "description": "Available filter options."
          },
          "review_comments": {
            "description": "The inline-comment feed, newest first, capped.",
            "items": {
              "$ref": "#/components/schemas/ReviewCommentListItem"
            },
            "title": "Review Comments",
            "type": "array"
          },
          "reviews": {
            "description": "The review feed, newest first, capped.",
            "items": {
              "$ref": "#/components/schemas/ReviewListItem"
            },
            "title": "Reviews",
            "type": "array"
          },
          "series": {
            "description": "Per-day activity buckets covering the window.",
            "items": {
              "$ref": "#/components/schemas/ReviewsDayBucket"
            },
            "title": "Series",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/ReviewsTotals",
            "description": "Window-wide totals."
          }
        },
        "required": [
          "reviews",
          "review_comments",
          "series",
          "totals",
          "facets"
        ],
        "title": "GetAnalyticsReviewsResponse",
        "type": "object"
      },
      "GetIntegrationsResponse": {
        "description": "Everything connected for the calling account, in one call. A key is\nnull (or an empty list for sentry) when that integration isn't connected,\nso callers can see the full universe of integrations, not just the\nconnected ones.",
        "properties": {
          "github": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubIntegrationSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub App installation, or null if the app was uninstalled."
          },
          "jira": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JiraIntegrationSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connected Jira site, or null if not connected."
          },
          "linear": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinearIntegrationSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connected Linear organization, or null if not connected."
          },
          "sentry": {
            "default": [],
            "description": "The connected Sentry organizations; empty if none are connected.",
            "items": {
              "$ref": "#/components/schemas/SentryOrganizationSummary"
            },
            "title": "Sentry",
            "type": "array"
          },
          "slack": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SlackIntegrationSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connected Slack workspace, or null if not connected."
          }
        },
        "title": "GetIntegrationsResponse",
        "type": "object"
      },
      "GetSessionLogResponse": {
        "description": "The session log manifest: the complete, ordered, downloadable history\nof the session \u2014 every record (agent output, tool calls, thinking,\nlifecycle events, environment output, message events), archived into\nseq-ranged segments. For a running session `latest_feed_seq` may exceed\n`archived_through_feed_seq`; `has_more` tells the client whether the\nmanifest is the whole story yet.",
        "properties": {
          "archived_through_feed_seq": {
            "description": "The highest feed_seq covered by an archived segment (0 when none yet).",
            "title": "Archived Through Feed Seq",
            "type": "integer"
          },
          "earliest_feed_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The retention head: the first feed_seq still available, or null when nothing has been recorded yet.",
            "title": "Earliest Feed Seq"
          },
          "format": {
            "default": "ellipsis_session_log@1",
            "description": "The session log format identifier.",
            "title": "Format",
            "type": "string"
          },
          "has_more": {
            "description": "Whether records exist past the archived segments \u2014 true for a running session whose newest records are not archived yet.",
            "title": "Has More",
            "type": "boolean"
          },
          "latest_feed_seq": {
            "description": "The feed head: the last allocated feed_seq.",
            "title": "Latest Feed Seq",
            "type": "integer"
          },
          "segments": {
            "description": "The archived segments, in feed_seq order.",
            "items": {
              "$ref": "#/components/schemas/SessionLogSegment"
            },
            "title": "Segments",
            "type": "array"
          },
          "session_id": {
            "description": "Identifier of the session.",
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "earliest_feed_seq",
          "archived_through_feed_seq",
          "latest_feed_seq",
          "has_more",
          "segments"
        ],
        "title": "GetSessionLogResponse",
        "type": "object"
      },
      "GetUsageOverTimeResponse": {
        "properties": {
          "agent_by_model": {
            "items": {
              "$ref": "#/components/schemas/ModelUsageBreakdown"
            },
            "title": "Agent By Model",
            "type": "array"
          },
          "billing_periods": {
            "items": {
              "$ref": "#/components/schemas/BillingPeriodOption"
            },
            "title": "Billing Periods",
            "type": "array"
          },
          "by_funding_source": {
            "items": {
              "$ref": "#/components/schemas/FundingSourceUsage"
            },
            "title": "By Funding Source",
            "type": "array"
          },
          "by_model": {
            "items": {
              "$ref": "#/components/schemas/ModelUsageBreakdown"
            },
            "title": "By Model",
            "type": "array"
          },
          "daily": {
            "items": {
              "$ref": "#/components/schemas/UsageDailyPoint"
            },
            "title": "Daily",
            "type": "array"
          },
          "developer_spend": {
            "items": {
              "$ref": "#/components/schemas/DeveloperUsageBreakdown"
            },
            "title": "Developer Spend",
            "type": "array"
          },
          "period_end": {
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "title": "Period Start",
            "type": "string"
          },
          "prior_total_cost_millicents": {
            "title": "Prior Total Cost Millicents",
            "type": "integer"
          },
          "prior_total_tokens": {
            "title": "Prior Total Tokens",
            "type": "integer"
          },
          "total_cost_millicents": {
            "title": "Total Cost Millicents",
            "type": "integer"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "required": [
          "billing_periods",
          "period_start",
          "period_end",
          "total_tokens",
          "total_cost_millicents",
          "prior_total_tokens",
          "prior_total_cost_millicents",
          "daily",
          "by_model",
          "agent_by_model",
          "developer_spend"
        ],
        "title": "GetUsageOverTimeResponse",
        "type": "object"
      },
      "GithubAccountFilter-Input": {
        "anyOf": [
          {
            "additionalProperties": false,
            "description": "One include-minus-exclude set of GitHub accounts: an account matches iff\nit is in `include` (`true` = all, a list = exactly those, `false`/`[]` =\nnone) AND not in `exclude`. A bare bool or list is shorthand for `include`,\nso `users: true` and `users: [priya-shah]` both parse.",
            "properties": {
              "exclude": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Exclude",
                "type": "array"
              },
              "include": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  {
                    "type": "boolean"
                  }
                ],
                "default": true,
                "title": "Include"
              }
            },
            "title": "GithubAccountFilter",
            "type": "object"
          },
          {
            "type": "boolean"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ]
      },
      "GithubAccountFilter-Output": {
        "anyOf": [
          {
            "additionalProperties": false,
            "description": "One include-minus-exclude set of GitHub accounts: an account matches iff\nit is in `include` (`true` = all, a list = exactly those, `false`/`[]` =\nnone) AND not in `exclude`. A bare bool or list is shorthand for `include`,\nso `users: true` and `users: [priya-shah]` both parse.",
            "properties": {
              "exclude": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Exclude",
                "type": "array"
              },
              "include": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  {
                    "type": "boolean"
                  }
                ],
                "default": true,
                "title": "Include"
              }
            },
            "required": [
              "exclude",
              "include"
            ],
            "title": "GithubAccountFilter",
            "type": "object"
          },
          {
            "type": "boolean"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ]
      },
      "GithubAccountSelector-Input": {
        "additionalProperties": false,
        "description": "A selector of GitHub accounts \u2014 the `for:` audience gate on react\nsurfaces, classified on the stable entity author (the pusher for `push`,\nthe PR author for a pull request). `users` selects human\naccounts, `bots` selects bot accounts; each is a `GithubAccountFilter`\n(include minus exclude, with bare bool/list shorthand).\n\n`teams` narrows further to members of any of the listed GitHub teams of\nthe installation's organization, by slug (`platform` for\n`@org/platform`). It applies on top of `users`: the author must pass the\nusers filter AND belong to a listed team. A bot is never a team member,\nso a selector with `teams` never admits one. Membership is resolved live\nat match time (see `TriggerEventContext.is_author_team_member`), and the\nconfig sync refuses a team that does not exist when the file is\naccepted.",
        "properties": {
          "bots": {
            "$ref": "#/components/schemas/GithubAccountFilter-Input"
          },
          "teams": {
            "items": {
              "type": "string"
            },
            "title": "Teams",
            "type": "array"
          },
          "users": {
            "$ref": "#/components/schemas/GithubAccountFilter-Input"
          }
        },
        "title": "GithubAccountSelector",
        "type": "object"
      },
      "GithubAccountSelector-Output": {
        "additionalProperties": false,
        "description": "A selector of GitHub accounts \u2014 the `for:` audience gate on react\nsurfaces, classified on the stable entity author (the pusher for `push`,\nthe PR author for a pull request). `users` selects human\naccounts, `bots` selects bot accounts; each is a `GithubAccountFilter`\n(include minus exclude, with bare bool/list shorthand).\n\n`teams` narrows further to members of any of the listed GitHub teams of\nthe installation's organization, by slug (`platform` for\n`@org/platform`). It applies on top of `users`: the author must pass the\nusers filter AND belong to a listed team. A bot is never a team member,\nso a selector with `teams` never admits one. Membership is resolved live\nat match time (see `TriggerEventContext.is_author_team_member`), and the\nconfig sync refuses a team that does not exist when the file is\naccepted.",
        "properties": {
          "bots": {
            "$ref": "#/components/schemas/GithubAccountFilter-Output"
          },
          "teams": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Teams",
            "type": "array"
          },
          "users": {
            "$ref": "#/components/schemas/GithubAccountFilter-Output"
          }
        },
        "required": [
          "bots",
          "teams",
          "users"
        ],
        "title": "GithubAccountSelector",
        "type": "object"
      },
      "GithubAccountSnippet": {
        "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
        "properties": {
          "avatar_url": {
            "title": "Avatar Url",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "login": {
            "title": "Login",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "type": {
            "$ref": "#/components/schemas/GithubAccountType"
          }
        },
        "required": [
          "avatar_url",
          "id",
          "login",
          "name",
          "type"
        ],
        "title": "GithubAccountSnippet",
        "type": "object"
      },
      "GithubAccountType": {
        "enum": [
          "User",
          "Organization",
          "Bot",
          "Mannequin"
        ],
        "title": "GithubAccountType",
        "type": "string"
      },
      "GithubCheckRunEvent": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/CheckRunAction"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "conclusion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conclusion"
          },
          "head_sha": {
            "title": "Head Sha",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pull_request_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pull Request Number"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "type": {
            "const": "github.check_run",
            "default": "github.check_run",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "branch",
          "conclusion",
          "head_sha",
          "name",
          "pull_request_number",
          "repository",
          "type",
          "url"
        ],
        "title": "GithubCheckRunEvent",
        "type": "object"
      },
      "GithubConfig": {
        "additionalProperties": false,
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/GithubConfigEllipsis"
          },
          "github": {
            "$ref": "#/components/schemas/GithubRoutes"
          },
          "session": {
            "$ref": "#/components/schemas/IntegrationSessionConfig"
          }
        },
        "required": [
          "ellipsis",
          "github",
          "session"
        ],
        "title": "GithubConfig",
        "type": "object"
      },
      "GithubConfigEllipsis": {
        "additionalProperties": false,
        "description": "The product namespace of a GitHub routing file, with an explicit kind.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "github",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "GithubConfigEllipsis",
        "type": "object"
      },
      "GithubHandler": {
        "description": "The account's github.yaml handler.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/GithubConfig",
            "description": "The last valid github.yaml definition."
          },
          "created_at": {
            "description": "When the handler was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the handler, when known."
          },
          "id": {
            "description": "Unique identifier of the saved handler.",
            "title": "Id",
            "type": "string"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest recorded sync error, or null after a successful sync. A failed update preserves the last valid config and raw_yaml.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The commit associated with the latest recorded sync attempt. When last_sync_error is set, this may be the rejected revision rather than the revision of config and raw_yaml.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "const": "github",
            "default": "github",
            "description": "Handlers are managed by editing their files in GitHub.",
            "title": "Managed By",
            "type": "string"
          },
          "raw_yaml": {
            "description": "The original YAML of the last valid handler definition.",
            "title": "Raw Yaml",
            "type": "string"
          },
          "service": {
            "const": "github",
            "default": "github",
            "title": "Service",
            "type": "string"
          },
          "sha": {
            "description": "Content fingerprint of the last valid handler definition.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "$ref": "#/components/schemas/GithubSourceDetails",
            "description": "The repository, path, and branch the handler syncs from."
          },
          "updated_at": {
            "description": "When the saved record was last updated, including failed syncs.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sha",
          "created_at",
          "updated_at",
          "raw_yaml",
          "source_details",
          "config"
        ],
        "title": "GithubHandler",
        "type": "object"
      },
      "GithubIntegrationSummary": {
        "description": "The account's GitHub App installation. Always present in practice: an\naccount *is* a GitHub account, so `null` means the app was uninstalled.",
        "properties": {
          "account_login": {
            "description": "The GitHub login of the installed account.",
            "title": "Account Login",
            "type": "string"
          },
          "account_type": {
            "$ref": "#/components/schemas/GithubAccountType",
            "description": "Whether the account is an organization or a personal user."
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "needs_permissions_update": {
            "title": "Needs Permissions Update",
            "type": "boolean"
          },
          "repository_count": {
            "description": "How many repositories the installation can access.",
            "title": "Repository Count",
            "type": "integer"
          },
          "repository_selection": {
            "$ref": "#/components/schemas/RepositorySelection",
            "description": "Whether the installation covers all repositories or a selected subset."
          },
          "suspended": {
            "description": "Whether the installation is currently suspended on GitHub.",
            "title": "Suspended",
            "type": "boolean"
          },
          "suspended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended At"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "needs_permissions_update",
          "account_login",
          "account_type",
          "repository_selection",
          "suspended",
          "repository_count"
        ],
        "title": "GithubIntegrationSummary",
        "type": "object"
      },
      "GithubIssueEvent": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/IssueAction"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "type": {
            "const": "github.issue",
            "default": "github.issue",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "number",
          "repository",
          "title",
          "type",
          "url"
        ],
        "title": "GithubIssueEvent",
        "type": "object"
      },
      "GithubMember": {
        "description": "A member of the GitHub organization (or the account itself for a\npersonal account) \u2014 the universe of `author_id` values for session/log\nqueries. `slack` is set when this account is linked to a Slack workspace\nuser.",
        "properties": {
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's GitHub avatar URL.",
            "title": "Avatar Url"
          },
          "id": {
            "description": "The member's GitHub account id.",
            "title": "Id",
            "type": "integer"
          },
          "login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's GitHub login.",
            "title": "Login"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's display name, if known.",
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's role in the organization. Null for a personal (user) account, which has no organization roles."
          },
          "slack": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkedSlackIdentity"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Slack identity linked to this member, when one is known."
          },
          "subscriptions": {
            "description": "The subscriptions this member has connected, one per provider, in a stable order. Empty when none is saved.",
            "items": {
              "$ref": "#/components/schemas/MemberSubscription"
            },
            "title": "Subscriptions",
            "type": "array"
          }
        },
        "required": [
          "id"
        ],
        "title": "GithubMember",
        "type": "object"
      },
      "GithubMembersListResponse": {
        "description": "The members of the account's GitHub organization.",
        "properties": {
          "members": {
            "description": "The organization's members, sorted by login.",
            "items": {
              "$ref": "#/components/schemas/GithubMember"
            },
            "title": "Members",
            "type": "array"
          }
        },
        "required": [
          "members"
        ],
        "title": "GithubMembersListResponse",
        "type": "object"
      },
      "GithubMentionAudience": {
        "additionalProperties": false,
        "properties": {
          "private": {
            "$ref": "#/components/schemas/GithubMentionAuthors"
          },
          "public": {
            "$ref": "#/components/schemas/GithubMentionAuthors"
          }
        },
        "title": "GithubMentionAudience",
        "type": "object"
      },
      "GithubMentionAuthors": {
        "additionalProperties": false,
        "properties": {
          "bots": {
            "default": false,
            "title": "Bots",
            "type": "boolean"
          },
          "users": {
            "default": true,
            "title": "Users",
            "type": "boolean"
          }
        },
        "title": "GithubMentionAuthors",
        "type": "object"
      },
      "GithubMentionPolicy": {
        "additionalProperties": false,
        "properties": {
          "allow_leading_ellipsis": {
            "default": true,
            "title": "Allow Leading Ellipsis",
            "type": "boolean"
          },
          "for": {
            "$ref": "#/components/schemas/GithubMentionAudience"
          },
          "require_leading_mention": {
            "default": false,
            "title": "Require Leading Mention",
            "type": "boolean"
          }
        },
        "title": "GithubMentionPolicy",
        "type": "object"
      },
      "GithubPermissions-Input": {
        "additionalProperties": false,
        "description": "The agent's GitHub access: the scope of the installation token minted for\nits session's environment \u2014 the credential `git` and `gh` authenticate\nwith.\n\nBy default the token carries the installation's full permissions on all of\nthe installation's repositories. `permissions` narrows what it may do:\nthe string `read_only` grants read access to contents, issues, metadata and\npull requests; a map requests explicit levels per GitHub App permission\nscope (e.g. `{contents: read, pull_requests: write}`) and may never exceed\nwhat the installation granted. `repositories` scopes the token to exactly\nthe listed repos, by name (they must belong to the installation).\n\nRestriction is enforced by GitHub, not by Ellipsis: the token itself is\nminted with the reduced scope, so nothing running in the environment can\nexceed it.",
        "properties": {
          "permissions": {
            "anyOf": [
              {
                "const": "read_only",
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permissions"
          },
          "repositories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repositories"
          }
        },
        "title": "GithubPermissions",
        "type": "object"
      },
      "GithubPermissions-Output": {
        "additionalProperties": false,
        "description": "The agent's GitHub access: the scope of the installation token minted for\nits session's environment \u2014 the credential `git` and `gh` authenticate\nwith.\n\nBy default the token carries the installation's full permissions on all of\nthe installation's repositories. `permissions` narrows what it may do:\nthe string `read_only` grants read access to contents, issues, metadata and\npull requests; a map requests explicit levels per GitHub App permission\nscope (e.g. `{contents: read, pull_requests: write}`) and may never exceed\nwhat the installation granted. `repositories` scopes the token to exactly\nthe listed repos, by name (they must belong to the installation).\n\nRestriction is enforced by GitHub, not by Ellipsis: the token itself is\nminted with the reduced scope, so nothing running in the environment can\nexceed it.",
        "properties": {
          "permissions": {
            "anyOf": [
              {
                "const": "read_only",
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permissions"
          },
          "repositories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repositories"
          }
        },
        "required": [
          "permissions",
          "repositories"
        ],
        "title": "GithubPermissions",
        "type": "object"
      },
      "GithubPullRequestEvent": {
        "properties": {
          "action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PullRequestAction"
              },
              {
                "const": "review_commented",
                "type": "string"
              }
            ],
            "title": "Action"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "branch": {
            "title": "Branch",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "type": {
            "const": "github.pull_request",
            "default": "github.pull_request",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "branch",
          "number",
          "repository",
          "title",
          "type",
          "url"
        ],
        "title": "GithubPullRequestEvent",
        "type": "object"
      },
      "GithubPushEvent": {
        "properties": {
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "title": "After",
            "type": "string"
          },
          "before": {
            "title": "Before",
            "type": "string"
          },
          "branch": {
            "title": "Branch",
            "type": "string"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "type": {
            "const": "github.push",
            "default": "github.push",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "actor",
          "after",
          "before",
          "branch",
          "repository",
          "type",
          "url"
        ],
        "title": "GithubPushEvent",
        "type": "object"
      },
      "GithubReleaseEvent": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ReleaseAction"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "prerelease": {
            "title": "Prerelease",
            "type": "boolean"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "tag": {
            "title": "Tag",
            "type": "string"
          },
          "type": {
            "const": "github.release",
            "default": "github.release",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "name",
          "prerelease",
          "repository",
          "tag",
          "type",
          "url"
        ],
        "title": "GithubReleaseEvent",
        "type": "object"
      },
      "GithubRepositoriesListResponse": {
        "description": "The repositories connected to the account's GitHub installation.",
        "properties": {
          "backfill_complete": {
            "default": false,
            "title": "Backfill Complete",
            "type": "boolean"
          },
          "backfill_statuses": {
            "items": {
              "$ref": "#/components/schemas/RepositoryBackfillStatus"
            },
            "title": "Backfill Statuses",
            "type": "array"
          },
          "repositories": {
            "description": "The connected repositories.",
            "items": {
              "$ref": "#/components/schemas/GithubRepository"
            },
            "title": "Repositories",
            "type": "array"
          }
        },
        "required": [
          "repositories"
        ],
        "title": "GithubRepositoriesListResponse",
        "type": "object"
      },
      "GithubRepository": {
        "description": "A repository connected to the account's GitHub installation \u2014 a valid\ntarget for `repository` when creating an agent and for the\nrepository lists inside an agent.",
        "properties": {
          "default_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository's default branch.",
            "title": "Default Branch"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository's description on GitHub.",
            "title": "Description"
          },
          "full_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Full Name",
            "type": "string"
          },
          "html_url": {
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "description": "The repository's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "The repository name, without the owner.",
            "title": "Name",
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/GithubAccountSnippet"
          },
          "private": {
            "description": "Whether the repository is private.",
            "title": "Private",
            "type": "boolean"
          }
        },
        "required": [
          "owner",
          "html_url",
          "id",
          "name",
          "full_name",
          "private"
        ],
        "title": "GithubRepository",
        "type": "object"
      },
      "GithubRoutes": {
        "additionalProperties": false,
        "description": "Which repositories one agent answers @ellipsis in. `\"*\"` means every one.\n\n`repositories` must be non-empty: an entry claiming nothing would be a config\na customer wrote, committed, and that answers nowhere \u2014 the silent-config\nfailure this file exists to avoid.",
        "properties": {
          "mentions": {
            "$ref": "#/components/schemas/GithubMentionPolicy"
          },
          "repositories": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Repositories",
            "type": "array"
          }
        },
        "title": "GithubRoutes",
        "type": "object"
      },
      "GithubSourceDetails": {
        "description": "Identifies the file a GitHub-sourced agent is synced from.\n\nIdentified by the repository ID (not owner/name) so repository and org renames\ndon't orphan the config; resolve display names from gh_repositories at\nread time.",
        "properties": {
          "branch": {
            "title": "Branch",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repo_id": {
            "title": "Repo Id",
            "type": "integer"
          }
        },
        "required": [
          "repo_id",
          "path",
          "branch"
        ],
        "title": "GithubSourceDetails",
        "type": "object"
      },
      "GithubUser": {
        "description": "This is a full user account. It's the most amount of info we need to represent a GitHub user.\n\nRepresents both a public and private user.",
        "properties": {
          "avatar_url": {
            "title": "Avatar Url",
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bio"
          },
          "blog": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blog"
          },
          "business_plus": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Plus"
          },
          "collaborators": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collaborators"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "disk_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Usage"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "events_url": {
            "title": "Events Url",
            "type": "string"
          },
          "followers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followers"
          },
          "followers_url": {
            "title": "Followers Url",
            "type": "string"
          },
          "following": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Following"
          },
          "following_url": {
            "title": "Following Url",
            "type": "string"
          },
          "gists_url": {
            "title": "Gists Url",
            "type": "string"
          },
          "gravatar_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gravatar Id"
          },
          "hireable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hireable"
          },
          "html_url": {
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "ldap_dn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ldap Dn"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "login": {
            "title": "Login",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "notification_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notification Email"
          },
          "organizations_url": {
            "title": "Organizations Url",
            "type": "string"
          },
          "owned_private_repos": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owned Private Repos"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "private_gists": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Private Gists"
          },
          "public_gists": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Gists"
          },
          "public_repos": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Repos"
          },
          "received_events_url": {
            "title": "Received Events Url",
            "type": "string"
          },
          "repos_url": {
            "title": "Repos Url",
            "type": "string"
          },
          "site_admin": {
            "title": "Site Admin",
            "type": "boolean"
          },
          "starred_url": {
            "title": "Starred Url",
            "type": "string"
          },
          "subscriptions_url": {
            "title": "Subscriptions Url",
            "type": "string"
          },
          "total_private_repos": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Private Repos"
          },
          "twitter_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter Username"
          },
          "two_factor_authentication": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Two Factor Authentication"
          },
          "type": {
            "$ref": "#/components/schemas/GithubAccountType",
            "default": "User"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "user_view_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User View Type"
          }
        },
        "required": [
          "id",
          "login",
          "avatar_url",
          "html_url",
          "node_id",
          "url",
          "followers_url",
          "following_url",
          "gists_url",
          "starred_url",
          "subscriptions_url",
          "organizations_url",
          "repos_url",
          "events_url",
          "received_events_url",
          "site_admin"
        ],
        "title": "GithubUser",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "Handler": {
        "discriminator": {
          "mapping": {
            "github": "#/components/schemas/GithubHandler",
            "linear": "#/components/schemas/LinearHandler",
            "sentry": "#/components/schemas/SentryHandler",
            "slack": "#/components/schemas/SlackHandler"
          },
          "propertyName": "service"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/SlackHandler"
          },
          {
            "$ref": "#/components/schemas/GithubHandler"
          },
          {
            "$ref": "#/components/schemas/LinearHandler"
          },
          {
            "$ref": "#/components/schemas/SentryHandler"
          }
        ]
      },
      "HandlerMetricsResponse": {
        "description": "Session counts and spend attributed to one saved handler.",
        "properties": {
          "cost": {
            "description": "Accumulated cost of the selected sessions in millicents (100,000 per US dollar), including LLM, CPU, memory, and fees.",
            "title": "Cost",
            "type": "integer"
          },
          "end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive session creation-time bound, or null for no upper bound.",
            "title": "End"
          },
          "handler_id": {
            "description": "The saved handler whose sessions are counted.",
            "title": "Handler Id",
            "type": "string"
          },
          "sessions": {
            "$ref": "#/components/schemas/HandlerSessionCounts",
            "description": "Current outcomes of sessions created in the window; outcome counts sum to total."
          },
          "spend_windows": {
            "description": "Current trailing 1-, 7-, and 28-day credit debits and enforced handler budgets. Based on usage timestamps across all this handler's sessions and revisions, independently of the start/end session creation filters.",
            "items": {
              "$ref": "#/components/schemas/ConfigSpendWindow"
            },
            "title": "Spend Windows",
            "type": "array"
          },
          "start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive session creation-time bound, or null for no lower bound.",
            "title": "Start"
          }
        },
        "required": [
          "handler_id",
          "start",
          "end",
          "sessions",
          "cost",
          "spend_windows"
        ],
        "title": "HandlerMetricsResponse",
        "type": "object"
      },
      "HandlerService": {
        "description": "The service whose events a handler responds to.",
        "enum": [
          "slack",
          "github",
          "linear",
          "sentry"
        ],
        "title": "HandlerService",
        "type": "string"
      },
      "HandlerSessionCounts": {
        "description": "Current session outcomes for the requested creation-time window.",
        "properties": {
          "active": {
            "description": "Unfinished sessions, including open conversations awaiting another message.",
            "title": "Active",
            "type": "integer"
          },
          "cancelled": {
            "description": "Sessions cancelled before completion.",
            "title": "Cancelled",
            "type": "integer"
          },
          "completed": {
            "description": "Sessions that closed without an error or stop.",
            "title": "Completed",
            "type": "integer"
          },
          "failed": {
            "description": "Sessions that ended with an error.",
            "title": "Failed",
            "type": "integer"
          },
          "stopped": {
            "description": "Sessions stopped by a user.",
            "title": "Stopped",
            "type": "integer"
          },
          "total": {
            "description": "All sessions attributed to this saved handler.",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "active",
          "completed",
          "failed",
          "stopped",
          "cancelled"
        ],
        "title": "HandlerSessionCounts",
        "type": "object"
      },
      "HandlersListResponse": {
        "properties": {
          "handlers": {
            "description": "The account's synced handlers in Slack, GitHub, Linear, Sentry order.",
            "items": {
              "$ref": "#/components/schemas/Handler"
            },
            "title": "Handlers",
            "type": "array"
          }
        },
        "required": [
          "handlers"
        ],
        "title": "HandlersListResponse",
        "type": "object"
      },
      "Harness": {
        "enum": [
          "claude_code",
          "codex"
        ],
        "title": "Harness",
        "type": "string"
      },
      "Identity": {
        "description": "The identity behind the caller's credential.",
        "properties": {
          "api_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The API key id, when the credential is an API key.",
            "title": "Api Key Id"
          },
          "customer_id": {
            "description": "The caller's account id.",
            "title": "Customer Id",
            "type": "string"
          },
          "customer_login": {
            "description": "The caller's account login (a GitHub org or user login).",
            "title": "Customer Login",
            "type": "string"
          },
          "gh_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubUser"
              },
              {
                "type": "null"
              }
            ],
            "description": "The full GitHub user account behind user_id, when available. Lets callers (e.g. the CLI) show a human login instead of a numeric id."
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The session id, when the credential is a session token.",
            "title": "Session Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user id behind the credential, when it has one.",
            "title": "User Id"
          }
        },
        "required": [
          "customer_id",
          "customer_login",
          "user_id",
          "gh_user",
          "api_key_id",
          "session_id"
        ],
        "title": "Identity",
        "type": "object"
      },
      "ImageAttachment": {
        "description": "One image on a request body, base64 inline (the Claude Code paste\nshape). Shared by `POST /v1/sessions` and `POST /v1/sessions/{id}/messages`.",
        "properties": {
          "data": {
            "description": "The raw image bytes, base64-encoded. 5 MiB cap.",
            "title": "Data",
            "type": "string"
          },
          "media_type": {
            "description": "The image's MIME type: image/png, image/jpeg, image/gif, or image/webp. The bytes must match.",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/gif",
              "image/webp"
            ],
            "title": "Media Type",
            "type": "string"
          }
        },
        "required": [
          "media_type",
          "data"
        ],
        "title": "ImageAttachment",
        "type": "object"
      },
      "IngestTranscriptRequest": {
        "description": "A batch of raw transcript lines pushed from inside a session's\nenvironment.",
        "properties": {
          "lines": {
            "description": "Raw on-disk transcript lines starting at `offset`.",
            "items": {
              "type": "string"
            },
            "title": "Lines",
            "type": "array"
          },
          "offset": {
            "description": "The line offset the batch starts at.",
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "lines"
        ],
        "title": "IngestTranscriptRequest",
        "type": "object"
      },
      "InputContract-Input": {
        "additionalProperties": false,
        "description": "The typed input contract: what goes INTO a session (the trigger is\nwhen it happens; this is what goes in).\n\n`json_schema` validates customer data sent as `input` to\n`POST /v1/agents/{id}/sessions` and stored as `session.input`.\nInvocations require input when a schema is declared. React agents\ncannot declare schemas: the platform defines their event payloads.\n\n`message` is the initial-message template: exact `{{path}}` substitution\nover the caller payload (or, on a react agent, over the surface's\npublished fields), no conditionals/loops/filters. Refs are validated at\ndeploy time against the governing field set (see AgentConfig's\n`_check_input`).",
        "properties": {
          "json_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Json Schema"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "title": "InputContract",
        "type": "object"
      },
      "InputContract-Output": {
        "additionalProperties": false,
        "description": "The typed input contract: what goes INTO a session (the trigger is\nwhen it happens; this is what goes in).\n\n`json_schema` validates customer data sent as `input` to\n`POST /v1/agents/{id}/sessions` and stored as `session.input`.\nInvocations require input when a schema is declared. React agents\ncannot declare schemas: the platform defines their event payloads.\n\n`message` is the initial-message template: exact `{{path}}` substitution\nover the caller payload (or, on a react agent, over the surface's\npublished fields), no conditionals/loops/filters. Refs are validated at\ndeploy time against the governing field set (see AgentConfig's\n`_check_input`).",
        "properties": {
          "json_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Json Schema"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "required": [
          "json_schema",
          "message"
        ],
        "title": "InputContract",
        "type": "object"
      },
      "IntegrationSessionConfig": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "codex"
                ]
              }
            ]
          }
        ],
        "properties": {
          "budget": {
            "$ref": "#/components/schemas/BudgetConfig-Output"
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex input and native options. Set exactly one of claude_code or codex."
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/EnvironmentConfig-Output"
              }
            ],
            "title": "Environment"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Metadata",
            "type": "object"
          },
          "permissions": {
            "$ref": "#/components/schemas/PermissionsConfig-Output"
          },
          "skills": {
            "items": {
              "$ref": "#/components/schemas/SkillRef-Output"
            },
            "title": "Skills",
            "type": "array"
          }
        },
        "title": "IntegrationSessionConfig",
        "type": "object"
      },
      "IssueAction": {
        "enum": [
          "opened",
          "closed",
          "commented"
        ],
        "title": "IssueAction",
        "type": "string"
      },
      "JiraIntegrationSummary": {
        "description": "The account's connected Jira site.",
        "properties": {
          "cloud_id": {
            "description": "The Jira cloud site id.",
            "title": "Cloud Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "scope": {
            "items": {
              "type": "string"
            },
            "title": "Scope",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "updated_at",
          "scope",
          "cloud_id"
        ],
        "title": "JiraIntegrationSummary",
        "type": "object"
      },
      "LegacyAssistantPayload": {
        "additionalProperties": true,
        "properties": {
          "cache_creation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SdkCacheCreation"
              },
              {
                "type": "null"
              }
            ]
          },
          "content": {
            "default": [],
            "items": {
              "discriminator": {
                "mapping": {
                  "server_tool_result": "#/components/schemas/SdkServerToolResultBlock",
                  "server_tool_use": "#/components/schemas/SdkServerToolUseBlock",
                  "text": "#/components/schemas/SdkTextBlock",
                  "thinking": "#/components/schemas/SdkThinkingBlock",
                  "tool_result": "#/components/schemas/SdkToolResultBlock",
                  "tool_use": "#/components/schemas/SdkToolUseBlock"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SdkTextBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkThinkingBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkToolUseBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkToolResultBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkServerToolUseBlock"
                },
                {
                  "$ref": "#/components/schemas/SdkServerToolResultBlock"
                }
              ]
            },
            "title": "Content",
            "type": "array"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "kind": {
            "const": "assistant",
            "default": "assistant",
            "title": "Kind",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "parent_tool_use_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Tool Use Id"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyNativeUsage"
              },
              {
                "type": "null"
              }
            ]
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "kind",
          "model"
        ],
        "title": "LegacyAssistantPayload",
        "type": "object"
      },
      "LegacyNativeUsage": {
        "additionalProperties": true,
        "description": "Native usage extensions remain data, independent of strict accounting.",
        "properties": {
          "cache_creation_input_tokens": {
            "default": 0,
            "title": "Cache Creation Input Tokens",
            "type": "integer"
          },
          "cache_read_input_tokens": {
            "default": 0,
            "title": "Cache Read Input Tokens",
            "type": "integer"
          },
          "cost_usd": {
            "default": 0,
            "title": "Cost Usd",
            "type": "number"
          },
          "input_tokens": {
            "default": 0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "num_turns": {
            "default": 0,
            "title": "Num Turns",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "title": "Output Tokens",
            "type": "integer"
          }
        },
        "title": "LegacyNativeUsage",
        "type": "object"
      },
      "LegacyResultPayload": {
        "additionalProperties": true,
        "properties": {
          "api_error_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Error Status"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_api_ms": {
            "title": "Duration Api Ms",
            "type": "integer"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "errors": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Errors"
          },
          "is_error": {
            "title": "Is Error",
            "type": "boolean"
          },
          "kind": {
            "const": "result",
            "default": "result",
            "title": "Kind",
            "type": "string"
          },
          "model_usage": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Usage"
          },
          "num_turns": {
            "title": "Num Turns",
            "type": "integer"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          },
          "structured_output": {
            "title": "Structured Output"
          },
          "subtype": {
            "title": "Subtype",
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyNativeUsage"
              },
              {
                "type": "null"
              }
            ]
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "duration_api_ms",
          "duration_ms",
          "is_error",
          "kind",
          "num_turns",
          "subtype"
        ],
        "title": "LegacyResultPayload",
        "type": "object"
      },
      "Level": {
        "description": "What may be done to a resource. Strictly ordered: a grant at one level\nincludes every level below it (write-only would be a phantom capability \u2014\nno real client can create what it cannot read back).",
        "enum": [
          "read",
          "write",
          "delete"
        ],
        "title": "Level",
        "type": "string"
      },
      "LinearConfig": {
        "additionalProperties": false,
        "description": "A single integration session, with filters separate from the session settings.",
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/LinearConfigEllipsis"
          },
          "linear": {
            "$ref": "#/components/schemas/LinearRoutes"
          },
          "session": {
            "$ref": "#/components/schemas/IntegrationSessionConfig"
          }
        },
        "required": [
          "ellipsis",
          "linear",
          "session"
        ],
        "title": "LinearConfig",
        "type": "object"
      },
      "LinearConfigEllipsis": {
        "additionalProperties": false,
        "description": "The product namespace of a Linear routing file, with an explicit kind.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "linear",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "LinearConfigEllipsis",
        "type": "object"
      },
      "LinearHandler": {
        "description": "The account's linear.yaml handler.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/LinearConfig",
            "description": "The last valid linear.yaml definition."
          },
          "created_at": {
            "description": "When the handler was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the handler, when known."
          },
          "id": {
            "description": "Unique identifier of the saved handler.",
            "title": "Id",
            "type": "string"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest recorded sync error, or null after a successful sync. A failed update preserves the last valid config and raw_yaml.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The commit associated with the latest recorded sync attempt. When last_sync_error is set, this may be the rejected revision rather than the revision of config and raw_yaml.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "const": "github",
            "default": "github",
            "description": "Handlers are managed by editing their files in GitHub.",
            "title": "Managed By",
            "type": "string"
          },
          "raw_yaml": {
            "description": "The original YAML of the last valid handler definition.",
            "title": "Raw Yaml",
            "type": "string"
          },
          "service": {
            "const": "linear",
            "default": "linear",
            "title": "Service",
            "type": "string"
          },
          "sha": {
            "description": "Content fingerprint of the last valid handler definition.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "$ref": "#/components/schemas/GithubSourceDetails",
            "description": "The repository, path, and branch the handler syncs from."
          },
          "updated_at": {
            "description": "When the saved record was last updated, including failed syncs.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sha",
          "created_at",
          "updated_at",
          "raw_yaml",
          "source_details",
          "config"
        ],
        "title": "LinearHandler",
        "type": "object"
      },
      "LinearIntegrationSummary": {
        "description": "The account's connected Linear organization and its teams.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "organization_id": {
            "description": "The Linear organization id.",
            "title": "Organization Id",
            "type": "string"
          },
          "teams": {
            "description": "The organization's teams.",
            "items": {
              "$ref": "#/components/schemas/LinearTeam"
            },
            "title": "Teams",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "updated_at",
          "organization_id",
          "teams"
        ],
        "title": "LinearIntegrationSummary",
        "type": "object"
      },
      "LinearIssueAction": {
        "enum": [
          "opened"
        ],
        "title": "LinearIssueAction",
        "type": "string"
      },
      "LinearIssueEvent": {
        "properties": {
          "action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinearIssueAction"
              },
              {
                "const": "commented",
                "type": "string"
              }
            ],
            "title": "Action"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "type": {
            "const": "linear.issue",
            "default": "linear.issue",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "identifier",
          "number",
          "title",
          "type",
          "url"
        ],
        "title": "LinearIssueEvent",
        "type": "object"
      },
      "LinearRoutes": {
        "additionalProperties": false,
        "description": "Which Linear issues one agent answers @ellipsis on.\n\n`teams` names teams by key (`ENG`) or by name (`Engineering`); `projects`\nnames projects. `\"*\"` under `teams` means every issue. At least one axis\nmust be set.",
        "properties": {
          "projects": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Projects",
            "type": "array"
          },
          "teams": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Teams",
            "type": "array"
          }
        },
        "title": "LinearRoutes",
        "type": "object"
      },
      "LinearTeam": {
        "description": "One team in the connected Linear organization.",
        "properties": {
          "id": {
            "description": "The Linear team id.",
            "title": "Id",
            "type": "string"
          },
          "is_enabled": {
            "description": "Whether Ellipsis is enabled for this team.",
            "title": "Is Enabled",
            "type": "boolean"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The team's short key (issue prefix).",
            "title": "Key"
          },
          "name": {
            "description": "The team's display name.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "is_enabled"
        ],
        "title": "LinearTeam",
        "type": "object"
      },
      "LinearTeamUpdate": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_enabled": {
            "title": "Is Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "is_enabled"
        ],
        "title": "LinearTeamUpdate",
        "type": "object"
      },
      "LinearTeamsListResponse": {
        "description": "The teams in the connected Linear organization.",
        "properties": {
          "organization_id": {
            "description": "The Linear organization id.",
            "title": "Organization Id",
            "type": "string"
          },
          "teams": {
            "description": "The organization's teams.",
            "items": {
              "$ref": "#/components/schemas/LinearTeam"
            },
            "title": "Teams",
            "type": "array"
          }
        },
        "required": [
          "organization_id",
          "teams"
        ],
        "title": "LinearTeamsListResponse",
        "type": "object"
      },
      "LinkAgentRequest": {
        "description": "Where to put the file of an agent being moved into a repository.",
        "properties": {
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "File path within the repo. Omit for the default .ellipsis/agents/<slug>.yaml; if set it must be a location the sync scans (a .yaml/.yml file under .ellipsis/ at any depth; in the repository named .ellipsis the repo root is that directory).",
            "title": "Path"
          },
          "repository": {
            "description": "Repository name within the caller's account; the owner is always the account, so pass a bare name (e.g. \"my-service\"), not \"owner/my-service\".",
            "title": "Repository",
            "type": "string"
          }
        },
        "required": [
          "repository"
        ],
        "title": "LinkAgentRequest",
        "type": "object"
      },
      "LinkAgentResponse": {
        "description": "The agent and the pull request that would put it in a repository.",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/Agent",
            "description": "The agent, still managed through the API until the pull request merges."
          },
          "path": {
            "description": "The file path the definition will be written to.",
            "title": "Path",
            "type": "string"
          },
          "pull_request_url": {
            "description": "The pull request that adds the file. The agent becomes managed by that file once it merges.",
            "title": "Pull Request Url",
            "type": "string"
          }
        },
        "required": [
          "agent",
          "path",
          "pull_request_url"
        ],
        "title": "LinkAgentResponse",
        "type": "object"
      },
      "LinkedGithubIdentity": {
        "description": "The GitHub identity linked to a Slack member.",
        "properties": {
          "id": {
            "description": "The linked GitHub account id.",
            "title": "Id",
            "type": "integer"
          },
          "login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The linked GitHub login, if known.",
            "title": "Login"
          }
        },
        "required": [
          "id"
        ],
        "title": "LinkedGithubIdentity",
        "type": "object"
      },
      "LinkedSlackIdentity": {
        "description": "The Slack identity linked to a GitHub member.",
        "properties": {
          "slack_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The linked Slack user's email, if known.",
            "title": "Slack Email"
          },
          "slack_user_id": {
            "description": "The linked Slack user id.",
            "title": "Slack User Id",
            "type": "string"
          }
        },
        "required": [
          "slack_user_id"
        ],
        "title": "LinkedSlackIdentity",
        "type": "object"
      },
      "ListApiKeysResponse": {
        "properties": {
          "api_keys": {
            "items": {
              "$ref": "#/components/schemas/ApiKeyApi"
            },
            "title": "Api Keys",
            "type": "array"
          }
        },
        "required": [
          "api_keys"
        ],
        "title": "ListApiKeysResponse",
        "type": "object"
      },
      "ListUserTokensResponse": {
        "properties": {
          "user_tokens": {
            "items": {
              "$ref": "#/components/schemas/UserTokenApi"
            },
            "title": "User Tokens",
            "type": "array"
          }
        },
        "required": [
          "user_tokens"
        ],
        "title": "ListUserTokensResponse",
        "type": "object"
      },
      "McpRemoteServer-Input": {
        "additionalProperties": false,
        "description": "A bring-your-own remote MCP server: the harness talks HTTP to `url`.\nNothing runs in the environment image. `headers` carry static auth (e.g.\n`Authorization: Bearer ${TOKEN}`); values may embed `${NAME}` secret\nreferences, resolved at run time from the account's secrets store.",
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "url"
        ],
        "title": "McpRemoteServer",
        "type": "object"
      },
      "McpRemoteServer-Output": {
        "additionalProperties": false,
        "description": "A bring-your-own remote MCP server: the harness talks HTTP to `url`.\nNothing runs in the environment image. `headers` carry static auth (e.g.\n`Authorization: Bearer ${TOKEN}`); values may embed `${NAME}` secret\nreferences, resolved at run time from the account's secrets store.",
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "title": "Headers",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "headers",
          "name",
          "url"
        ],
        "title": "McpRemoteServer",
        "type": "object"
      },
      "McpServerRef": {
        "additionalProperties": false,
        "description": "One built-in MCP server this agent attaches by name (`linear`/`slack`).\nA name reference over the connected built-in set \u2014 the platform manages the\nserver's transport and credentials. A session gets a built-in server only\nwhen its config names it here or the session started from that server's\nown surface. For a server the platform does not provide, define it instead\n(`McpStdioServer` / `McpRemoteServer`).",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "McpServerRef",
        "type": "object"
      },
      "McpStdioServer-Input": {
        "additionalProperties": false,
        "description": "A bring-your-own stdio MCP server: the harness spawns `command` inside\nthe environment and speaks JSON-RPC over its stdin/stdout. The command must\nbe runnable in the environment image \u2014 install its runtime via `hooks.build_base` /\n`hooks.after_checkout` if the managed environment lacks it.\n\n`env` values may embed `${NAME}` references, resolved at run time from the\naccount's secrets store (see `mcp_secret_refs`); everything else is passed\nliterally.",
        "properties": {
          "args": {
            "items": {
              "type": "string"
            },
            "title": "Args",
            "type": "array"
          },
          "command": {
            "title": "Command",
            "type": "string"
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Env",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "command"
        ],
        "title": "McpStdioServer",
        "type": "object"
      },
      "McpStdioServer-Output": {
        "additionalProperties": false,
        "description": "A bring-your-own stdio MCP server: the harness spawns `command` inside\nthe environment and speaks JSON-RPC over its stdin/stdout. The command must\nbe runnable in the environment image \u2014 install its runtime via `hooks.build_base` /\n`hooks.after_checkout` if the managed environment lacks it.\n\n`env` values may embed `${NAME}` references, resolved at run time from the\naccount's secrets store (see `mcp_secret_refs`); everything else is passed\nliterally.",
        "properties": {
          "args": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Args",
            "type": "array"
          },
          "command": {
            "title": "Command",
            "type": "string"
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "title": "Env",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "args",
          "command",
          "env",
          "name"
        ],
        "title": "McpStdioServer",
        "type": "object"
      },
      "MemberSubscription": {
        "description": "One subscription a member has connected. Never carries the token or\nits last characters; those stay on the owner's `/v1/user/subscription_tokens`\nroutes.",
        "properties": {
          "enabled": {
            "description": "Whether the subscription is routing. Only the owner's successful verify sets it.",
            "title": "Enabled",
            "type": "boolean"
          },
          "provider": {
            "$ref": "#/components/schemas/SubscriptionProvider",
            "description": "The harness the subscription drives."
          },
          "updated_at": {
            "description": "When the owner last saved or verified the subscription.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "enabled",
          "updated_at"
        ],
        "title": "MemberSubscription",
        "type": "object"
      },
      "MemorySize-Input": {
        "additionalProperties": false,
        "description": "A memory size as explicit units, summed (binary: 1GB = 1024MB = 1024MiB).\nSet any of `gb`/`mb` (at least one). The alternative to the `8GB`-style\nshorthand string.",
        "properties": {
          "gb": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gb"
          },
          "mb": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mb"
          }
        },
        "title": "MemorySize",
        "type": "object"
      },
      "MemorySize-Output": {
        "additionalProperties": false,
        "description": "A memory size as explicit units, summed (binary: 1GB = 1024MB = 1024MiB).\nSet any of `gb`/`mb` (at least one). The alternative to the `8GB`-style\nshorthand string.",
        "properties": {
          "gb": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gb"
          },
          "mb": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mb"
          }
        },
        "required": [
          "gb",
          "mb"
        ],
        "title": "MemorySize",
        "type": "object"
      },
      "MentionSettings": {
        "properties": {
          "require_leading_mention": {
            "default": false,
            "title": "Require Leading Mention",
            "type": "boolean"
          },
          "trigger_on_bot_mention_private_repo": {
            "default": false,
            "title": "Trigger On Bot Mention Private Repo",
            "type": "boolean"
          },
          "trigger_on_bot_mention_public_repo": {
            "default": false,
            "title": "Trigger On Bot Mention Public Repo",
            "type": "boolean"
          },
          "trigger_on_leading_ellipsis_symbol": {
            "default": true,
            "title": "Trigger On Leading Ellipsis Symbol",
            "type": "boolean"
          },
          "trigger_on_user_mention_private_repo": {
            "default": true,
            "title": "Trigger On User Mention Private Repo",
            "type": "boolean"
          },
          "trigger_on_user_mention_public_repo": {
            "default": true,
            "title": "Trigger On User Mention Public Repo",
            "type": "boolean"
          }
        },
        "title": "MentionSettings",
        "type": "object"
      },
      "MessageDeliveredPayload": {
        "additionalProperties": true,
        "description": "message_delivered: the agent started on the message.",
        "properties": {
          "message_id": {
            "title": "Message Id",
            "type": "string"
          },
          "turn_id": {
            "title": "Turn Id",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "turn_id"
        ],
        "title": "MessageDeliveredPayload",
        "type": "object"
      },
      "MessageDeliveredRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/MessageDeliveredPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "message_delivered",
            "default": "message_delivered",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "MessageDeliveredRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "MessageReceivedPayload": {
        "additionalProperties": true,
        "description": "message_received: a message landed in the session inbox and its turn was\ncreated. `turn_id` is the turn that will answer it.",
        "properties": {
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "closes_session": {
            "default": false,
            "title": "Closes Session",
            "type": "boolean"
          },
          "message_id": {
            "title": "Message Id",
            "type": "string"
          },
          "sender_attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Attribution Id"
          },
          "sender_attribution_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Attribution Type"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Turn Id"
          }
        },
        "required": [
          "message_id",
          "body"
        ],
        "title": "MessageReceivedPayload",
        "type": "object"
      },
      "MessageReceivedRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/MessageReceivedPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "message_received",
            "default": "message_received",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "MessageReceivedRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "MessageRequeuedPayload": {
        "additionalProperties": true,
        "description": "message_requeued: a turn was interrupted before answering, so the\nmessage goes back to the inbox with a new pending turn.",
        "properties": {
          "message_id": {
            "title": "Message Id",
            "type": "string"
          },
          "requeued_turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requeued Turn Id"
          },
          "turn_id": {
            "title": "Turn Id",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "turn_id"
        ],
        "title": "MessageRequeuedPayload",
        "type": "object"
      },
      "MessageRequeuedRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/MessageRequeuedPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "message_requeued",
            "default": "message_requeued",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "MessageRequeuedRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "Model": {
        "properties": {
          "aliases": {
            "description": "Other ids that select this model, such as claude-opus for the newest Opus. A session started with an alias runs on id. Empty for most models.",
            "items": {
              "type": "string"
            },
            "title": "Aliases",
            "type": "array"
          },
          "capabilities": {
            "description": "Capabilities supported by this harness/model on the Ellipsis-managed provider route.",
            "items": {
              "$ref": "#/components/schemas/SessionCapability"
            },
            "title": "Capabilities",
            "type": "array"
          },
          "default_reasoning_effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EffortLevel"
              },
              {
                "$ref": "#/components/schemas/CodexEffortLevel"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial reasoning effort for model pickers, or null when effort cannot be configured. This is one of reasoning_efforts, not an additional slider position. Submit this value as harness.effort to apply it explicitly instead of inheriting native harness settings.",
            "title": "Default Reasoning Effort"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "harness": {
            "$ref": "#/components/schemas/Harness",
            "description": "The harness certified to run this model."
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "manufacturer": {
            "$ref": "#/components/schemas/ModelManufacturer"
          },
          "rate_card": {
            "$ref": "#/components/schemas/ModelRateCardApi"
          },
          "reasoning_efforts": {
            "description": "Selectable reasoning efforts, in increasing order. An empty list means reasoning effort cannot be configured. The string 'none' is an explicit effort level, not an omitted setting.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EffortLevel"
                },
                {
                  "$ref": "#/components/schemas/CodexEffortLevel"
                }
              ]
            },
            "title": "Reasoning Efforts",
            "type": "array"
          }
        },
        "required": [
          "id",
          "aliases",
          "display_name",
          "harness",
          "capabilities",
          "manufacturer",
          "rate_card"
        ],
        "title": "Model",
        "type": "object"
      },
      "ModelManufacturer": {
        "description": "Who BUILT a model. Never who serves it.\n\nServing path is irrelevant here. Anthropic built every Claude model, so all of\nthem are ANTHROPIC even though OpenRouter is what actually serves them.\nLikewise the `gpt-5.6-*` rows are OPENAI (OpenAI's models, resold to us by\nOpenRouter), and GLM is ZAI (Z.ai's model, served by DeepInfra via\nOpenRouter).\n\nSo this is deliberately NOT derived from `EgressRoute.provider`: routing is an\ninfrastructure fact that changes when we move a model between providers, while\nthe manufacturer is a property of the model itself and never changes.\n\nThe frontend renders a vendor logo per model, which is why it needs the maker.\nKeying that UI off the egress provider would put OpenRouter's logo on every\nmodel.",
        "enum": [
          "anthropic",
          "openai",
          "zai",
          "minimax",
          "moonshot"
        ],
        "title": "ModelManufacturer",
        "type": "string"
      },
      "ModelRateCardApi": {
        "properties": {
          "cache_read_millicents_per_1m_tokens": {
            "title": "Cache Read Millicents Per 1M Tokens",
            "type": "integer"
          },
          "cache_write_1h_millicents_per_1m_tokens": {
            "title": "Cache Write 1H Millicents Per 1M Tokens",
            "type": "integer"
          },
          "cache_write_5m_millicents_per_1m_tokens": {
            "title": "Cache Write 5M Millicents Per 1M Tokens",
            "type": "integer"
          },
          "input_millicents_per_1m_tokens": {
            "title": "Input Millicents Per 1M Tokens",
            "type": "integer"
          },
          "output_millicents_per_1m_tokens": {
            "title": "Output Millicents Per 1M Tokens",
            "type": "integer"
          }
        },
        "required": [
          "input_millicents_per_1m_tokens",
          "cache_write_5m_millicents_per_1m_tokens",
          "cache_write_1h_millicents_per_1m_tokens",
          "cache_read_millicents_per_1m_tokens",
          "output_millicents_per_1m_tokens"
        ],
        "title": "ModelRateCardApi",
        "type": "object"
      },
      "ModelUsageBreakdown": {
        "description": "Usage and cost for one model over the whole period, split into the four\nbilled categories.",
        "properties": {
          "cost_cpu_millicents": {
            "description": "CPU cost, in millicents.",
            "title": "Cost Cpu Millicents",
            "type": "integer"
          },
          "cost_fee_millicents": {
            "description": "Platform fee, in millicents.",
            "title": "Cost Fee Millicents",
            "type": "integer"
          },
          "cost_memory_millicents": {
            "description": "Memory cost, in millicents.",
            "title": "Cost Memory Millicents",
            "type": "integer"
          },
          "cost_tokens_millicents": {
            "description": "LLM token cost, in millicents (1000 = $0.01).",
            "title": "Cost Tokens Millicents",
            "type": "integer"
          },
          "model_id": {
            "description": "The model's identifier.",
            "title": "Model Id",
            "type": "string"
          },
          "tokens": {
            "description": "All tokens used on this model over the period.",
            "title": "Tokens",
            "type": "integer"
          }
        },
        "required": [
          "model_id",
          "tokens",
          "cost_tokens_millicents",
          "cost_cpu_millicents",
          "cost_memory_millicents",
          "cost_fee_millicents"
        ],
        "title": "ModelUsageBreakdown",
        "type": "object"
      },
      "ModelsListResponse": {
        "properties": {
          "models": {
            "items": {
              "$ref": "#/components/schemas/Model"
            },
            "title": "Models",
            "type": "array"
          }
        },
        "required": [
          "models"
        ],
        "title": "ModelsListResponse",
        "type": "object"
      },
      "NotificationCategory": {
        "description": "Coarse routing key for outbound notifications. Every alert source maps\nto exactly one category (AlertSource -> category lives with the alerts\nservice). Only BILLING exists in v1; the field exists so adding a second\ncategory later is a new enum value, not a schema change.",
        "enum": [
          "billing"
        ],
        "title": "NotificationCategory",
        "type": "string"
      },
      "NotificationEmailContact": {
        "properties": {
          "categories": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NotificationCategory"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "email": {
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "NotificationEmailContact",
        "type": "object"
      },
      "NotificationSettings": {
        "properties": {
          "email_contacts": {
            "items": {
              "$ref": "#/components/schemas/NotificationEmailContact"
            },
            "title": "Email Contacts",
            "type": "array"
          }
        },
        "title": "NotificationSettings",
        "type": "object"
      },
      "OrganizationRole": {
        "enum": [
          "admin",
          "member"
        ],
        "title": "OrganizationRole",
        "type": "string"
      },
      "OrganizationSettings": {
        "description": "The organization-wide session settings: the ceilings every session in\nthe account resolves against.",
        "properties": {
          "budget_ceiling": {
            "$ref": "#/components/schemas/BudgetCeiling",
            "description": "The organization's spend ceilings."
          }
        },
        "title": "OrganizationSettings",
        "type": "object"
      },
      "OutputConfig": {
        "additionalProperties": false,
        "description": "JSON Schema for the harness's structured result, when certified.",
        "properties": {
          "json_schema": {
            "additionalProperties": true,
            "title": "Json Schema",
            "type": "object"
          }
        },
        "required": [
          "json_schema"
        ],
        "title": "OutputConfig",
        "type": "object"
      },
      "PatchAccountOnboardingRequest": {
        "additionalProperties": false,
        "description": "Save supplied answers; omitted answers stay unchanged.",
        "properties": {
          "finished": {
            "title": "Finished",
            "type": "boolean"
          },
          "other_use_case": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Use Case"
          },
          "use_cases": {
            "items": {
              "$ref": "#/components/schemas/AccountOnboardingUseCase"
            },
            "minItems": 1,
            "title": "Use Cases",
            "type": "array"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "title": "PatchAccountOnboardingRequest",
        "type": "object"
      },
      "PatchAccountRequest": {
        "additionalProperties": false,
        "properties": {
          "can_start_sessions": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Can Start Sessions"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          }
        },
        "title": "PatchAccountRequest",
        "type": "object"
      },
      "PatchAccountSettingsRequest": {
        "additionalProperties": false,
        "description": "Replace supplied sections; omitted or null sections stay unchanged.",
        "properties": {
          "analytics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnalyticsSettings-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_ceiling": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetCeiling"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_retention": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DataRetentionSettings-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "notifications": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSettings"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "PatchAccountSettingsRequest",
        "type": "object"
      },
      "PermissionsConfig-Input": {
        "additionalProperties": false,
        "description": "What the agent is allowed to touch, per credential the platform mints\ninto its session's environment. Distinct from `environment:`, which is\nwhere the agent runs; this is what it may do from there.\n\n`ellipsis` scopes the session's Ellipsis API token (`ELLIPSIS_API_TOKEN`,\nwhat the `ellipsis` CLI running inside the session authenticates with).\n`true` / the string `all` (the default) grant the full session token\nceiling \u2014 everything a session token can ever do. A map narrows it per\nresource (see `EllipsisPermissions`); the minted token carries\nthe intersection, so a config can only ever reduce access. `false` fails\nvalidation \u2014 an agent with no API token cannot report its own progress.\n\n`github` scopes the session's GitHub installation token (`GH_TOKEN`) \u2014\nsee `GithubPermissions`. GitHub enforces it at mint time.",
        "properties": {
          "ellipsis": {
            "anyOf": [
              {
                "enum": [
                  true,
                  "all"
                ]
              },
              {
                "$ref": "#/components/schemas/EllipsisPermissions-Input"
              }
            ],
            "title": "Ellipsis"
          },
          "github": {
            "$ref": "#/components/schemas/GithubPermissions-Input"
          }
        },
        "title": "PermissionsConfig",
        "type": "object"
      },
      "PermissionsConfig-Output": {
        "additionalProperties": false,
        "description": "What the agent is allowed to touch, per credential the platform mints\ninto its session's environment. Distinct from `environment:`, which is\nwhere the agent runs; this is what it may do from there.\n\n`ellipsis` scopes the session's Ellipsis API token (`ELLIPSIS_API_TOKEN`,\nwhat the `ellipsis` CLI running inside the session authenticates with).\n`true` / the string `all` (the default) grant the full session token\nceiling \u2014 everything a session token can ever do. A map narrows it per\nresource (see `EllipsisPermissions`); the minted token carries\nthe intersection, so a config can only ever reduce access. `false` fails\nvalidation \u2014 an agent with no API token cannot report its own progress.\n\n`github` scopes the session's GitHub installation token (`GH_TOKEN`) \u2014\nsee `GithubPermissions`. GitHub enforces it at mint time.",
        "properties": {
          "ellipsis": {
            "anyOf": [
              {
                "enum": [
                  true,
                  "all"
                ]
              },
              {
                "$ref": "#/components/schemas/EllipsisPermissions-Output"
              }
            ],
            "default": true,
            "title": "Ellipsis"
          },
          "github": {
            "$ref": "#/components/schemas/GithubPermissions-Output",
            "default": {}
          }
        },
        "required": [
          "ellipsis",
          "github"
        ],
        "title": "PermissionsConfig",
        "type": "object"
      },
      "PlatformSessionRecord": {
        "discriminator": {
          "mapping": {
            "environment_output": "#/components/schemas/EnvironmentOutputRecord",
            "environment_phase": "#/components/schemas/EnvironmentPhaseRecord",
            "environment_ready": "#/components/schemas/EnvironmentReadyRecord",
            "message_delivered": "#/components/schemas/MessageDeliveredRecord",
            "message_received": "#/components/schemas/MessageReceivedRecord",
            "message_requeued": "#/components/schemas/MessageRequeuedRecord",
            "session_closed": "#/components/schemas/SessionClosedRecord",
            "turn_ended": "#/components/schemas/TurnEndedRecord",
            "turn_started": "#/components/schemas/TurnStartedRecord"
          },
          "propertyName": "record_type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/SessionClosedRecord"
          },
          {
            "$ref": "#/components/schemas/MessageReceivedRecord"
          },
          {
            "$ref": "#/components/schemas/MessageDeliveredRecord"
          },
          {
            "$ref": "#/components/schemas/MessageRequeuedRecord"
          },
          {
            "$ref": "#/components/schemas/TurnStartedRecord"
          },
          {
            "$ref": "#/components/schemas/TurnEndedRecord"
          },
          {
            "$ref": "#/components/schemas/EnvironmentPhaseRecord"
          },
          {
            "$ref": "#/components/schemas/EnvironmentOutputRecord"
          },
          {
            "$ref": "#/components/schemas/EnvironmentReadyRecord"
          }
        ]
      },
      "PollCliAuthResponse": {
        "description": "The state of a device-code flow. Poll until `status` leaves `pending`.",
        "properties": {
          "access_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The user token, present only on the single `approved` response. Store it; it cannot be fetched again.",
            "title": "Access Token"
          },
          "status": {
            "description": "pending (keep polling) | approved (access_token is present, exactly once) | denied | expired | already_claimed (the token was already handed out).",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "PollCliAuthResponse",
        "type": "object"
      },
      "PromptBlockedReason": {
        "description": "Why direct prompting is refused. Absent when prompting is allowed.",
        "enum": [
          "mention_surface",
          "non_interactive",
          "harness_single_turn",
          "budget_exhausted",
          "closed"
        ],
        "title": "PromptBlockedReason",
        "type": "string"
      },
      "PublicFeeSchedule": {
        "description": "Rates in US dollars; purchase_fee_fraction is a fraction, e.g. 0.10.",
        "properties": {
          "cpu_usd_per_core_hour": {
            "title": "Cpu Usd Per Core Hour",
            "type": "number"
          },
          "memory_usd_per_gib_hour": {
            "title": "Memory Usd Per Gib Hour",
            "type": "number"
          },
          "purchase_fee_fraction": {
            "title": "Purchase Fee Fraction",
            "type": "number"
          },
          "signup_credit_usd": {
            "title": "Signup Credit Usd",
            "type": "number"
          }
        },
        "required": [
          "signup_credit_usd",
          "purchase_fee_fraction",
          "cpu_usd_per_core_hour",
          "memory_usd_per_gib_hour"
        ],
        "title": "PublicFeeSchedule",
        "type": "object"
      },
      "PullRequestAction": {
        "enum": [
          "opened",
          "pushed",
          "merged",
          "closed",
          "review_submitted",
          "commented"
        ],
        "title": "PullRequestAction",
        "type": "string"
      },
      "PullRequestAuthorFacet": {
        "description": "An author filter option, counted over the unfiltered window.",
        "properties": {
          "account_type": {
            "description": "The author's GitHub account type (e.g. \"User\" or \"Bot\").",
            "title": "Account Type",
            "type": "string"
          },
          "author_id": {
            "description": "The author's GitHub account id.",
            "title": "Author Id",
            "type": "integer"
          },
          "avatar_url": {
            "description": "The author's avatar URL.",
            "title": "Avatar Url",
            "type": "string"
          },
          "login": {
            "description": "The author's GitHub login.",
            "title": "Login",
            "type": "string"
          },
          "prs": {
            "description": "Unfiltered pull-request count in the window.",
            "title": "Prs",
            "type": "integer"
          }
        },
        "required": [
          "author_id",
          "login",
          "avatar_url",
          "account_type",
          "prs"
        ],
        "title": "PullRequestAuthorFacet",
        "type": "object"
      },
      "PullRequestFacets": {
        "description": "The available filter options, derived from the unfiltered window.",
        "properties": {
          "account_types": {
            "description": "Author account types present in the window.",
            "items": {
              "type": "string"
            },
            "title": "Account Types",
            "type": "array"
          },
          "authors": {
            "description": "Author filter options.",
            "items": {
              "$ref": "#/components/schemas/PullRequestAuthorFacet"
            },
            "title": "Authors",
            "type": "array"
          },
          "repos": {
            "description": "Repository filter options.",
            "items": {
              "$ref": "#/components/schemas/PullRequestRepoFacet"
            },
            "title": "Repos",
            "type": "array"
          }
        },
        "required": [
          "repos",
          "authors",
          "account_types"
        ],
        "title": "PullRequestFacets",
        "type": "object"
      },
      "PullRequestRepoFacet": {
        "description": "A repository filter option, counted over the unfiltered window so\noptions never vanish when filters are applied.",
        "properties": {
          "prs": {
            "description": "Unfiltered pull-request count in the window.",
            "title": "Prs",
            "type": "integer"
          },
          "repository_id": {
            "description": "The repository's GitHub id.",
            "title": "Repository Id",
            "type": "integer"
          },
          "repository_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repository Name",
            "type": "string"
          }
        },
        "required": [
          "repository_id",
          "repository_name",
          "prs"
        ],
        "title": "PullRequestRepoFacet",
        "type": "object"
      },
      "PullRequestsDayBucket": {
        "description": "Pull-request activity on one UTC day. `prs`, `lines`, `authors`, and\n`commits` count pull requests created that day; `merged` and `merge_time`\ncover pull requests merged that day; `closed` counts pull requests closed\nwithout merging that day.\n\nEach count of created pull requests also splits bots from humans: `*_bot` counts pull\nrequests whose author is a bot (a Bot account or a `[bot]` login),\n`*_human` is everything else, so the pair always sums to the total.",
        "properties": {
          "authors": {
            "description": "Distinct pull-request authors active this day, humans and bots.",
            "title": "Authors",
            "type": "integer"
          },
          "authors_bot": {
            "description": "Distinct bot authors active this day.",
            "title": "Authors Bot",
            "type": "integer"
          },
          "authors_human": {
            "description": "Distinct human authors active this day.",
            "title": "Authors Human",
            "type": "integer"
          },
          "closed": {
            "description": "Pull requests closed without merging this day.",
            "title": "Closed",
            "type": "integer"
          },
          "commits": {
            "description": "Total commits across pull requests created this day.",
            "title": "Commits",
            "type": "integer"
          },
          "commits_bot": {
            "description": "Commits across pull requests created by bot authors.",
            "title": "Commits Bot",
            "type": "integer"
          },
          "commits_human": {
            "description": "Commits across pull requests created by human authors.",
            "title": "Commits Human",
            "type": "integer"
          },
          "date": {
            "description": "The UTC day, formatted YYYY-MM-DD.",
            "title": "Date",
            "type": "string"
          },
          "lines": {
            "description": "Lines added plus deleted across pull requests created this day.",
            "title": "Lines",
            "type": "integer"
          },
          "lines_bot": {
            "description": "Lines across pull requests created by bot authors.",
            "title": "Lines Bot",
            "type": "integer"
          },
          "lines_human": {
            "description": "Lines across pull requests created by human authors.",
            "title": "Lines Human",
            "type": "integer"
          },
          "merge_time": {
            "$ref": "#/components/schemas/DurationPercentiles",
            "description": "Time-to-merge percentiles, in hours, for pull requests merged this day."
          },
          "merged": {
            "description": "Pull requests merged this day.",
            "title": "Merged",
            "type": "integer"
          },
          "prs": {
            "description": "Pull requests created this day.",
            "title": "Prs",
            "type": "integer"
          },
          "prs_bot": {
            "description": "Pull requests created this day by bot authors.",
            "title": "Prs Bot",
            "type": "integer"
          },
          "prs_human": {
            "description": "Pull requests created this day by human authors.",
            "title": "Prs Human",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "prs",
          "prs_human",
          "prs_bot",
          "merged",
          "closed",
          "lines",
          "lines_human",
          "lines_bot",
          "commits",
          "commits_human",
          "commits_bot",
          "authors",
          "authors_human",
          "authors_bot",
          "merge_time"
        ],
        "title": "PullRequestsDayBucket",
        "type": "object"
      },
      "PullRequestsTotals": {
        "description": "Window-wide pull-request totals.",
        "properties": {
          "active_authors": {
            "description": "Distinct pull-request authors in the window.",
            "title": "Active Authors",
            "type": "integer"
          },
          "commits": {
            "description": "Total commits across pull requests in the window.",
            "title": "Commits",
            "type": "integer"
          },
          "lines": {
            "description": "Lines added plus deleted across pull requests in the window.",
            "title": "Lines",
            "type": "integer"
          },
          "merge_time_p50_hours": {
            "description": "Median hours to merge over all merged pull requests in the window; 0 when none merged.",
            "title": "Merge Time P50 Hours",
            "type": "number"
          },
          "merged": {
            "description": "Pull requests merged in the window.",
            "title": "Merged",
            "type": "integer"
          },
          "prs": {
            "description": "Pull requests created in the window.",
            "title": "Prs",
            "type": "integer"
          }
        },
        "required": [
          "prs",
          "merged",
          "lines",
          "commits",
          "active_authors",
          "merge_time_p50_hours"
        ],
        "title": "PullRequestsTotals",
        "type": "object"
      },
      "PutSecretsRequest": {
        "description": "Store secrets for the account's session environments. Each secret is\nupserted by\n    name: existing names are overwritten.",
        "properties": {
          "secrets": {
            "description": "The secrets to store.",
            "items": {
              "$ref": "#/components/schemas/SecretInput"
            },
            "title": "Secrets",
            "type": "array"
          }
        },
        "required": [
          "secrets"
        ],
        "title": "PutSecretsRequest",
        "type": "object"
      },
      "PutSubscriptionTokenRequest": {
        "description": "The token to store. Write-only: it is never read back.",
        "properties": {
          "token": {
            "description": "For `claude`, the OAuth token from `claude setup-token`. For `codex`, the JSON contents of auth.json from a ChatGPT login, including tokens.access_token and tokens.account_id.",
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "PutSubscriptionTokenRequest",
        "type": "object"
      },
      "ReactCheckRun-Input": {
        "additionalProperties": false,
        "description": "A CI/CD check completing on a commit \u2014 a `check_run` from GitHub\nActions or any other app that reports checks. `names` narrows to the check\nruns whose name matches (exact, or a prefix ending in `*`); `branch` is the\ncheck suite's head branch. The `for:` audience is the commit's author (the\npull request author when the check is attached to one), never the CI app\nthat completed the check \u2014 a check run's sender is always a bot.\n\nDelivery needs the Ellipsis GitHub App's `checks` permission on the\ninstallation; without it GitHub sends no check events and the webhook\nhandler refuses the ones it does see.",
        "properties": {
          "branch": {
            "items": {
              "type": "string"
            },
            "title": "Branch",
            "type": "array"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "names": {
            "items": {
              "type": "string"
            },
            "title": "Names",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/CheckRunAction"
            },
            "title": "On",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Input"
          }
        },
        "title": "ReactCheckRun",
        "type": "object"
      },
      "ReactCheckRun-Output": {
        "additionalProperties": false,
        "description": "A CI/CD check completing on a commit \u2014 a `check_run` from GitHub\nActions or any other app that reports checks. `names` narrows to the check\nruns whose name matches (exact, or a prefix ending in `*`); `branch` is the\ncheck suite's head branch. The `for:` audience is the commit's author (the\npull request author when the check is attached to one), never the CI app\nthat completed the check \u2014 a check run's sender is always a bot.\n\nDelivery needs the Ellipsis GitHub App's `checks` permission on the\ninstallation; without it GitHub sends no check events and the webhook\nhandler refuses the ones it does see.",
        "properties": {
          "branch": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Branch",
            "type": "array"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "names": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Names",
            "type": "array"
          },
          "on": {
            "default": [
              "failed"
            ],
            "items": {
              "$ref": "#/components/schemas/CheckRunAction"
            },
            "title": "On",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Output"
          }
        },
        "required": [
          "branch",
          "for",
          "names",
          "on",
          "repositories"
        ],
        "title": "ReactCheckRun",
        "type": "object"
      },
      "ReactIssue-Input": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/IssueAction"
            },
            "title": "On",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Input"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactIssue",
        "type": "object"
      },
      "ReactIssue-Output": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/IssueAction"
            },
            "title": "On",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Output"
          }
        },
        "required": [
          "for",
          "labels",
          "on",
          "repositories"
        ],
        "title": "ReactIssue",
        "type": "object"
      },
      "ReactLinearIssue-Input": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/LinearIssueAction"
            },
            "title": "On",
            "type": "array"
          }
        },
        "title": "ReactLinearIssue",
        "type": "object"
      },
      "ReactLinearIssue-Output": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "on": {
            "default": [
              "opened"
            ],
            "items": {
              "$ref": "#/components/schemas/LinearIssueAction"
            },
            "title": "On",
            "type": "array"
          }
        },
        "required": [
          "for",
          "on"
        ],
        "title": "ReactLinearIssue",
        "type": "object"
      },
      "ReactPullRequest-Input": {
        "additionalProperties": false,
        "properties": {
          "base": {
            "items": {
              "type": "string"
            },
            "title": "Base",
            "type": "array"
          },
          "draft": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draft"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "head": {
            "items": {
              "type": "string"
            },
            "title": "Head",
            "type": "array"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/PullRequestAction"
            },
            "title": "On",
            "type": "array"
          },
          "paths": {
            "items": {
              "type": "string"
            },
            "title": "Paths",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Input"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactPullRequest",
        "type": "object"
      },
      "ReactPullRequest-Output": {
        "additionalProperties": false,
        "properties": {
          "base": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Base",
            "type": "array"
          },
          "draft": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draft"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "head": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Head",
            "type": "array"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/PullRequestAction"
            },
            "title": "On",
            "type": "array"
          },
          "paths": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Paths",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Output"
          }
        },
        "required": [
          "base",
          "draft",
          "for",
          "head",
          "labels",
          "on",
          "paths",
          "repositories"
        ],
        "title": "ReactPullRequest",
        "type": "object"
      },
      "ReactPush-Input": {
        "additionalProperties": false,
        "properties": {
          "branch": {
            "items": {
              "type": "string"
            },
            "title": "Branch",
            "type": "array"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "paths": {
            "items": {
              "type": "string"
            },
            "title": "Paths",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Input"
          }
        },
        "title": "ReactPush",
        "type": "object"
      },
      "ReactPush-Output": {
        "additionalProperties": false,
        "properties": {
          "branch": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Branch",
            "type": "array"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "paths": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Paths",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Output"
          }
        },
        "required": [
          "branch",
          "for",
          "paths",
          "repositories"
        ],
        "title": "ReactPush",
        "type": "object"
      },
      "ReactRelease-Input": {
        "additionalProperties": false,
        "description": "A GitHub release being published \u2014 a release or prerelease published\ndirectly, or a draft published later. `tag` narrows to the release tags\nthat match (exact, or a prefix ending in `*`, so `v*`); `prerelease`\nselects prereleases or full releases, like `draft` on pull requests. The\n`for:` audience is the release's author, which for a release cut by CI is\na bot and needs `bots` to opt in.",
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Input"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/ReleaseAction"
            },
            "title": "On",
            "type": "array"
          },
          "prerelease": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prerelease"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Input"
          },
          "tag": {
            "items": {
              "type": "string"
            },
            "title": "Tag",
            "type": "array"
          }
        },
        "title": "ReactRelease",
        "type": "object"
      },
      "ReactRelease-Output": {
        "additionalProperties": false,
        "description": "A GitHub release being published \u2014 a release or prerelease published\ndirectly, or a draft published later. `tag` narrows to the release tags\nthat match (exact, or a prefix ending in `*`, so `v*`); `prerelease`\nselects prereleases or full releases, like `draft` on pull requests. The\n`for:` audience is the release's author, which for a release cut by CI is\na bot and needs `bots` to opt in.",
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector-Output"
          },
          "on": {
            "default": [
              "published"
            ],
            "items": {
              "$ref": "#/components/schemas/ReleaseAction"
            },
            "title": "On",
            "type": "array"
          },
          "prerelease": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prerelease"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter-Output"
          },
          "tag": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tag",
            "type": "array"
          }
        },
        "required": [
          "for",
          "on",
          "prerelease",
          "repositories",
          "tag"
        ],
        "title": "ReactRelease",
        "type": "object"
      },
      "ReactSentry-Input": {
        "additionalProperties": false,
        "properties": {
          "on": {
            "items": {
              "$ref": "#/components/schemas/SentryAction"
            },
            "title": "On",
            "type": "array"
          },
          "projects": {
            "items": {
              "type": "string"
            },
            "title": "Projects",
            "type": "array"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactSentry",
        "type": "object"
      },
      "ReactSentry-Output": {
        "additionalProperties": false,
        "properties": {
          "on": {
            "items": {
              "$ref": "#/components/schemas/SentryAction"
            },
            "title": "On",
            "type": "array"
          },
          "projects": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Projects",
            "type": "array"
          }
        },
        "required": [
          "on",
          "projects"
        ],
        "title": "ReactSentry",
        "type": "object"
      },
      "ReactSlackChannel": {
        "additionalProperties": false,
        "properties": {},
        "title": "ReactSlackChannel",
        "type": "object"
      },
      "ReactTrigger-Input": {
        "additionalProperties": false,
        "properties": {
          "check_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactCheckRun-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactIssue-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "linear_issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactLinearIssue-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "pull_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPullRequest-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "push": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPush-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactRelease-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "sentry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSentry-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "slack_channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSlackChannel"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "const": "react",
            "default": "react",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "ReactTrigger",
        "type": "object"
      },
      "ReactTrigger-Output": {
        "additionalProperties": false,
        "properties": {
          "check_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactCheckRun-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactIssue-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "linear_issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactLinearIssue-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "pull_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPullRequest-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "push": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPush-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactRelease-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "sentry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSentry-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "slack_channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSlackChannel"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "const": "react",
            "default": "react",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "check_run",
          "issue",
          "linear_issue",
          "pull_request",
          "push",
          "release",
          "sentry",
          "slack_channel",
          "type"
        ],
        "title": "ReactTrigger",
        "type": "object"
      },
      "RecentPullRequest": {
        "description": "One pull request in the recent-activity table.",
        "properties": {
          "additions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lines added, when known.",
            "title": "Additions"
          },
          "changed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of changed files, when known.",
            "title": "Changed Files"
          },
          "commits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of commits, when known.",
            "title": "Commits"
          },
          "created_at": {
            "description": "When the pull request was opened.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deletions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lines deleted, when known.",
            "title": "Deletions"
          },
          "head_ref": {
            "description": "The head branch name.",
            "title": "Head Ref",
            "type": "string"
          },
          "head_sha": {
            "description": "The head commit SHA.",
            "title": "Head Sha",
            "type": "string"
          },
          "html_url": {
            "description": "The pull request's URL on GitHub.",
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "description": "The pull request's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "merged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the pull request was merged, or null.",
            "title": "Merged At"
          },
          "number": {
            "description": "The pull request number.",
            "title": "Number",
            "type": "integer"
          },
          "repository_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repository Name",
            "type": "string"
          },
          "status": {
            "description": "The derived status: open, draft, merged, or closed.",
            "title": "Status",
            "type": "string"
          },
          "title": {
            "description": "The pull request title.",
            "title": "Title",
            "type": "string"
          },
          "user_avatar_url": {
            "description": "The author's avatar URL.",
            "title": "User Avatar Url",
            "type": "string"
          },
          "user_login": {
            "description": "The author's GitHub login.",
            "title": "User Login",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "status",
          "repository_name",
          "head_sha",
          "head_ref",
          "user_login",
          "user_avatar_url",
          "additions",
          "deletions",
          "changed_files",
          "commits",
          "created_at",
          "merged_at",
          "html_url"
        ],
        "title": "RecentPullRequest",
        "type": "object"
      },
      "ReleaseAction": {
        "description": "What happened to a GitHub release. `published` is the one moment a\nrelease becomes visible: a release or prerelease published directly, or a\ndraft published later. Edits, deletions, and unpublishes never fire.",
        "enum": [
          "published"
        ],
        "title": "ReleaseAction",
        "type": "string"
      },
      "RepoFacet": {
        "description": "A repository filter option, counted over the unfiltered window so\noptions never vanish when filters are applied.",
        "properties": {
          "prs": {
            "description": "Unfiltered pull-request count for this repository in the window.",
            "title": "Prs",
            "type": "integer"
          },
          "repo_full_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repo Full Name",
            "type": "string"
          }
        },
        "required": [
          "repo_full_name",
          "prs"
        ],
        "title": "RepoFacet",
        "type": "object"
      },
      "RepositoryBackfillStatus": {
        "properties": {
          "backfill_complete": {
            "title": "Backfill Complete",
            "type": "boolean"
          },
          "repository_id": {
            "title": "Repository Id",
            "type": "integer"
          }
        },
        "required": [
          "repository_id",
          "backfill_complete"
        ],
        "title": "RepositoryBackfillStatus",
        "type": "object"
      },
      "RepositoryFilter-Input": {
        "anyOf": [
          {
            "additionalProperties": false,
            "description": "The watch scope of a trigger, by repository name (owner defaults to the\naccount). Include minus exclude: `include: []` (the default) covers every\nrepository of the installation, so `exclude`-only means \"all except these\"\nand keeps covering repositories added to the org later. A bare list is\nshorthand for `include`.",
            "properties": {
              "exclude": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Exclude",
                "type": "array"
              },
              "include": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Include",
                "type": "array"
              }
            },
            "title": "RepositoryFilter",
            "type": "object"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ]
      },
      "RepositoryFilter-Output": {
        "anyOf": [
          {
            "additionalProperties": false,
            "description": "The watch scope of a trigger, by repository name (owner defaults to the\naccount). Include minus exclude: `include: []` (the default) covers every\nrepository of the installation, so `exclude`-only means \"all except these\"\nand keeps covering repositories added to the org later. A bare list is\nshorthand for `include`.",
            "properties": {
              "exclude": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Exclude",
                "type": "array"
              },
              "include": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "title": "Include",
                "type": "array"
              }
            },
            "required": [
              "exclude",
              "include"
            ],
            "title": "RepositoryFilter",
            "type": "object"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ]
      },
      "RepositoryRef-Input": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          }
        },
        "required": [
          "name"
        ],
        "title": "RepositoryRef",
        "type": "object"
      },
      "RepositoryRef-Output": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          }
        },
        "required": [
          "name",
          "owner",
          "ref"
        ],
        "title": "RepositoryRef",
        "type": "object"
      },
      "RepositorySelection": {
        "enum": [
          "all",
          "selected"
        ],
        "title": "RepositorySelection",
        "type": "string"
      },
      "Resource": {
        "description": "Everything a credential can be granted access to, one value per /v1\nresource family. `TOKENS` is reserved for the future token-management\nroutes; nothing maps to it yet.",
        "enum": [
          "account",
          "alerts",
          "sessions",
          "configs",
          "defaults",
          "environments",
          "secrets",
          "templates",
          "integrations",
          "reviews",
          "tokens",
          "webhooks",
          "user"
        ],
        "title": "Resource",
        "type": "string"
      },
      "Review": {
        "properties": {
          "base_sha": {
            "title": "Base Sha",
            "type": "string"
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/ReviewComment"
            },
            "title": "Comments",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finalized_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finalized At"
          },
          "github_review_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub review id once posted.",
            "title": "Github Review Id"
          },
          "head_sha": {
            "description": "The commit the review is anchored at.",
            "title": "Head Sha",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "pull_request": {
            "$ref": "#/components/schemas/ReviewPullRequest"
          },
          "repository": {
            "$ref": "#/components/schemas/ReviewRepository"
          },
          "reviewers": {
            "items": {
              "$ref": "#/components/schemas/ReviewReviewer"
            },
            "title": "Reviewers",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/CodeReviewStatus",
            "description": "running: reviewers are working. posted: one GitHub review was posted. empty: no reviewer had anything to say, so nothing was posted. failed: no reviewer finished or GitHub refused the review."
          }
        },
        "required": [
          "id",
          "repository",
          "pull_request",
          "base_sha",
          "head_sha",
          "status",
          "created_at",
          "reviewers",
          "comments"
        ],
        "title": "Review",
        "type": "object"
      },
      "ReviewActor": {
        "description": "A GitHub account as it appears on a review or its parent pull\nrequest.",
        "properties": {
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account's avatar URL.",
            "title": "Avatar Url"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account's GitHub id.",
            "title": "Id"
          },
          "login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account's GitHub login.",
            "title": "Login"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account type (e.g. \"User\" or \"Bot\").",
            "title": "Type"
          }
        },
        "required": [
          "id",
          "login",
          "type",
          "avatar_url"
        ],
        "title": "ReviewActor",
        "type": "object"
      },
      "ReviewAuthorFacet": {
        "description": "A reviewer filter option for the reviews view.",
        "properties": {
          "account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reviewer's account type (e.g. \"User\" or \"Bot\").",
            "title": "Account Type"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reviewer's avatar URL.",
            "title": "Avatar Url"
          },
          "login": {
            "description": "The reviewer's GitHub login.",
            "title": "Login",
            "type": "string"
          },
          "reviews": {
            "description": "Reviews this person submitted.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "login",
          "avatar_url",
          "account_type",
          "reviews"
        ],
        "title": "ReviewAuthorFacet",
        "type": "object"
      },
      "ReviewComment": {
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "line": {
            "title": "Line",
            "type": "integer"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "reviewer": {
            "description": "The reviewer that returned this comment.",
            "title": "Reviewer",
            "type": "string"
          },
          "side": {
            "title": "Side",
            "type": "string"
          },
          "start_line": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Line"
          },
          "start_side": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Side"
          },
          "status": {
            "$ref": "#/components/schemas/CodeReviewCommentStatus",
            "description": "posted: in the GitHub review. outside_range: on a line this reviewer had already covered. not_in_diff: on a line the pull request does not change. eligible: will post."
          }
        },
        "required": [
          "id",
          "reviewer",
          "path",
          "line",
          "side",
          "body",
          "status"
        ],
        "title": "ReviewComment",
        "type": "object"
      },
      "ReviewCommentListItem": {
        "description": "One inline review comment in the comment feed.",
        "properties": {
          "author": {
            "$ref": "#/components/schemas/ReviewActor",
            "description": "Who authored the comment."
          },
          "base_ref": {
            "description": "The parent pull request's base branch.",
            "title": "Base Ref",
            "type": "string"
          },
          "body_preview": {
            "description": "The start of the comment body, trimmed for the feed.",
            "title": "Body Preview",
            "type": "string"
          },
          "created_at": {
            "description": "When the comment was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "html_url": {
            "description": "The comment's URL on GitHub.",
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "description": "The comment's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "path": {
            "description": "The file path the comment is anchored to.",
            "title": "Path",
            "type": "string"
          },
          "pr_html_url": {
            "description": "The parent pull request's URL on GitHub.",
            "title": "Pr Html Url",
            "type": "string"
          },
          "pr_number": {
            "description": "The parent pull request's number.",
            "title": "Pr Number",
            "type": "integer"
          },
          "pr_status": {
            "description": "The parent pull request's status: open, draft, merged, or closed.",
            "title": "Pr Status",
            "type": "string"
          },
          "pr_title": {
            "description": "The parent pull request's title.",
            "title": "Pr Title",
            "type": "string"
          },
          "repo_full_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repo Full Name",
            "type": "string"
          },
          "thumbs_down": {
            "description": "Thumbs-down reactions on the comment.",
            "title": "Thumbs Down",
            "type": "integer"
          },
          "thumbs_up": {
            "description": "Thumbs-up reactions on the comment.",
            "title": "Thumbs Up",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "created_at",
          "html_url",
          "path",
          "body_preview",
          "author",
          "thumbs_up",
          "thumbs_down",
          "pr_number",
          "pr_title",
          "pr_html_url",
          "pr_status",
          "repo_full_name",
          "base_ref"
        ],
        "title": "ReviewCommentListItem",
        "type": "object"
      },
      "ReviewFacets": {
        "description": "The available filter options for the reviews view.",
        "properties": {
          "authors": {
            "description": "Reviewer filter options.",
            "items": {
              "$ref": "#/components/schemas/ReviewAuthorFacet"
            },
            "title": "Authors",
            "type": "array"
          },
          "repos": {
            "description": "Repository filter options.",
            "items": {
              "$ref": "#/components/schemas/ReviewRepoFacet"
            },
            "title": "Repos",
            "type": "array"
          }
        },
        "required": [
          "repos",
          "authors"
        ],
        "title": "ReviewFacets",
        "type": "object"
      },
      "ReviewListItem": {
        "description": "One pull-request review in the review feed.",
        "properties": {
          "base_ref": {
            "description": "The parent pull request's base branch.",
            "title": "Base Ref",
            "type": "string"
          },
          "comment_count": {
            "description": "Inline review comments tied to this review.",
            "title": "Comment Count",
            "type": "integer"
          },
          "has_body": {
            "description": "Whether the review carried a summary body, as opposed to inline comments only.",
            "title": "Has Body",
            "type": "boolean"
          },
          "html_url": {
            "description": "The review's URL on GitHub.",
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "description": "The review's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "pr_author": {
            "$ref": "#/components/schemas/ReviewActor",
            "description": "The parent pull request's author."
          },
          "pr_html_url": {
            "description": "The parent pull request's URL on GitHub.",
            "title": "Pr Html Url",
            "type": "string"
          },
          "pr_number": {
            "description": "The parent pull request's number.",
            "title": "Pr Number",
            "type": "integer"
          },
          "pr_status": {
            "description": "The parent pull request's status: open, draft, merged, or closed.",
            "title": "Pr Status",
            "type": "string"
          },
          "pr_title": {
            "description": "The parent pull request's title.",
            "title": "Pr Title",
            "type": "string"
          },
          "repo_full_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repo Full Name",
            "type": "string"
          },
          "reviewer": {
            "$ref": "#/components/schemas/ReviewActor",
            "description": "Who submitted the review."
          },
          "state": {
            "description": "The review verdict: APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED, or another GitHub review state.",
            "title": "State",
            "type": "string"
          },
          "submitted_at": {
            "description": "When the review was submitted.",
            "format": "date-time",
            "title": "Submitted At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "submitted_at",
          "html_url",
          "has_body",
          "comment_count",
          "reviewer",
          "pr_number",
          "pr_title",
          "pr_html_url",
          "pr_status",
          "pr_author",
          "repo_full_name",
          "base_ref"
        ],
        "title": "ReviewListItem",
        "type": "object"
      },
      "ReviewPullRequest": {
        "properties": {
          "additions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lines added, as GitHub last reported them.",
            "title": "Additions"
          },
          "author": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewPullRequestAuthor"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who opened the pull request; null until Ellipsis has stored it."
          },
          "changed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Files changed, as GitHub last reported them.",
            "title": "Changed Files"
          },
          "deletions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lines deleted, as GitHub last reported them.",
            "title": "Deletions"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null until Ellipsis has stored the pull request.",
            "title": "Title"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pull request on GitHub; null when the repository is no longer on the account.",
            "title": "Url"
          }
        },
        "required": [
          "number",
          "url"
        ],
        "title": "ReviewPullRequest",
        "type": "object"
      },
      "ReviewPullRequestAuthor": {
        "properties": {
          "avatar_url": {
            "title": "Avatar Url",
            "type": "string"
          },
          "id": {
            "description": "The account's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "login": {
            "title": "Login",
            "type": "string"
          },
          "type": {
            "description": "\"User\", \"Organization\", or \"Bot\".",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "login",
          "avatar_url",
          "type"
        ],
        "title": "ReviewPullRequestAuthor",
        "type": "object"
      },
      "ReviewRepoFacet": {
        "description": "A repository filter option for the reviews view.",
        "properties": {
          "repository_name": {
            "description": "The repository's full \"owner/name\" identifier.",
            "title": "Repository Name",
            "type": "string"
          },
          "reviews": {
            "description": "Reviews in this repository.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "repository_name",
          "reviews"
        ],
        "title": "ReviewRepoFacet",
        "type": "object"
      },
      "ReviewRepository": {
        "properties": {
          "id": {
            "description": "The GitHub repository id.",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "The repository name.",
            "title": "Name",
            "type": "string"
          },
          "owner": {
            "description": "The repository owner's login.",
            "title": "Owner",
            "type": "string"
          }
        },
        "required": [
          "id",
          "owner",
          "name"
        ],
        "title": "ReviewRepository",
        "type": "object"
      },
      "ReviewReviewer": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the reviewer produced nothing.",
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "name": {
            "description": "The reviewer's name from the code review file.",
            "title": "Name",
            "type": "string"
          },
          "range_base_sha": {
            "description": "The commit this reviewer's range started from: its watermark, or the pull request base on a first review.",
            "title": "Range Base Sha",
            "type": "string"
          },
          "reviewed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Files in the reviewer's range diff; null until the reviewer finished.",
            "title": "Reviewed Files"
          },
          "reviewed_lines": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Changed lines in the reviewer's range diff, on the new side; null until the reviewer finished.",
            "title": "Reviewed Lines"
          },
          "session_id": {
            "description": "The session that ran this reviewer.",
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CodeReviewSessionStatus"
          }
        },
        "required": [
          "name",
          "session_id",
          "range_base_sha",
          "status"
        ],
        "title": "ReviewReviewer",
        "type": "object"
      },
      "ReviewSummary": {
        "properties": {
          "base_sha": {
            "title": "Base Sha",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finalized_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finalized At"
          },
          "github_review_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub review id once posted.",
            "title": "Github Review Id"
          },
          "head_sha": {
            "description": "The commit the review is anchored at.",
            "title": "Head Sha",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "pull_request": {
            "$ref": "#/components/schemas/ReviewPullRequest"
          },
          "repository": {
            "$ref": "#/components/schemas/ReviewRepository"
          },
          "status": {
            "$ref": "#/components/schemas/CodeReviewStatus",
            "description": "running: reviewers are working. posted: one GitHub review was posted. empty: no reviewer had anything to say, so nothing was posted. failed: no reviewer finished or GitHub refused the review."
          }
        },
        "required": [
          "id",
          "repository",
          "pull_request",
          "base_sha",
          "head_sha",
          "status",
          "created_at"
        ],
        "title": "ReviewSummary",
        "type": "object"
      },
      "ReviewerUsage": {
        "description": "A person who reviewed pull requests in the window.",
        "properties": {
          "approved": {
            "description": "Their approving reviews.",
            "title": "Approved",
            "type": "integer"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reviewer's GitHub avatar URL.",
            "title": "Avatar Url"
          },
          "changes_requested": {
            "description": "Their changes-requested reviews.",
            "title": "Changes Requested",
            "type": "integer"
          },
          "comments": {
            "description": "Inline review comments this person authored.",
            "title": "Comments",
            "type": "integer"
          },
          "lines_reviewed": {
            "description": "Lines added plus deleted across the distinct pull requests they reviewed.",
            "title": "Lines Reviewed",
            "type": "integer"
          },
          "login": {
            "description": "The reviewer's GitHub login.",
            "title": "Login",
            "type": "string"
          },
          "reviews": {
            "description": "Reviews this person submitted in the window.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "login",
          "avatar_url",
          "reviews",
          "approved",
          "changes_requested",
          "comments",
          "lines_reviewed"
        ],
        "title": "ReviewerUsage",
        "type": "object"
      },
      "ReviewsDayBucket": {
        "description": "Review activity on one UTC day. Verdict counts and distinct-reviewer\ncounts come from the review feed (which is capped); comment counts come\nfrom the full, uncapped comment metrics.",
        "properties": {
          "approved": {
            "description": "Approving reviews this day.",
            "title": "Approved",
            "type": "integer"
          },
          "changes_requested": {
            "description": "Changes-requested reviews this day.",
            "title": "Changes Requested",
            "type": "integer"
          },
          "commented": {
            "description": "Comment-only reviews this day.",
            "title": "Commented",
            "type": "integer"
          },
          "comments": {
            "description": "Inline review comments created this day.",
            "title": "Comments",
            "type": "integer"
          },
          "comments_bot": {
            "description": "Inline review comments by bot authors this day.",
            "title": "Comments Bot",
            "type": "integer"
          },
          "comments_human": {
            "description": "Inline review comments by human authors this day.",
            "title": "Comments Human",
            "type": "integer"
          },
          "date": {
            "description": "The UTC day, formatted YYYY-MM-DD.",
            "title": "Date",
            "type": "string"
          },
          "reviewers_bot": {
            "description": "Distinct bot reviewers this day.",
            "title": "Reviewers Bot",
            "type": "integer"
          },
          "reviewers_human": {
            "description": "Distinct human reviewers this day.",
            "title": "Reviewers Human",
            "type": "integer"
          },
          "reviewers_total": {
            "description": "Distinct reviewers this day.",
            "title": "Reviewers Total",
            "type": "integer"
          },
          "reviews": {
            "description": "All reviews submitted this day, regardless of verdict.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "reviews",
          "approved",
          "commented",
          "changes_requested",
          "reviewers_human",
          "reviewers_bot",
          "reviewers_total",
          "comments",
          "comments_human",
          "comments_bot"
        ],
        "title": "ReviewsDayBucket",
        "type": "object"
      },
      "ReviewsListResponse": {
        "properties": {
          "has_more": {
            "default": false,
            "description": "Whether more results exist past this page.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` to fetch the next page. Null on the last page. Opaque \u2014 echo it back rather than parsing it.",
            "title": "Next Cursor"
          },
          "reviews": {
            "items": {
              "$ref": "#/components/schemas/ReviewSummary"
            },
            "title": "Reviews",
            "type": "array"
          }
        },
        "required": [
          "reviews"
        ],
        "title": "ReviewsListResponse",
        "type": "object"
      },
      "ReviewsTotals": {
        "description": "Window-wide review totals, computed over the full set rather than the\ncapped feeds.",
        "properties": {
          "comments": {
            "description": "Inline review comments created in the window.",
            "title": "Comments",
            "type": "integer"
          },
          "comments_bot": {
            "description": "Inline review comments by bot authors.",
            "title": "Comments Bot",
            "type": "integer"
          },
          "comments_human": {
            "description": "Inline review comments by human authors.",
            "title": "Comments Human",
            "type": "integer"
          },
          "prs": {
            "description": "Distinct pull requests that received a review in the window.",
            "title": "Prs",
            "type": "integer"
          },
          "reviewers": {
            "description": "Distinct reviewers in the window.",
            "title": "Reviewers",
            "type": "integer"
          },
          "reviews": {
            "description": "Reviews submitted in the window (full count, not the capped feed).",
            "title": "Reviews",
            "type": "integer"
          },
          "thumbs_down": {
            "description": "Thumbs-down reactions across the window's review comments.",
            "title": "Thumbs Down",
            "type": "integer"
          },
          "thumbs_up": {
            "description": "Thumbs-up reactions across the window's review comments.",
            "title": "Thumbs Up",
            "type": "integer"
          }
        },
        "required": [
          "reviews",
          "reviewers",
          "prs",
          "comments",
          "comments_human",
          "comments_bot",
          "thumbs_up",
          "thumbs_down"
        ],
        "title": "ReviewsTotals",
        "type": "object"
      },
      "RunBudget": {
        "additionalProperties": false,
        "description": "Spend limit for one session.",
        "properties": {
          "session": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most one session may spend, in US dollars.",
            "title": "Session"
          }
        },
        "title": "RunBudget",
        "type": "object"
      },
      "SandboxCacheTier": {
        "description": "Which image-cache tier a sandbox creation took \u2014 the customer-facing\nnames for `create_sandbox_from_default`'s exact / latest / default tiers.\nRides on `Sandbox.cache_tier` and the sandbox_ready lifecycle record.",
        "enum": [
          "exact",
          "incremental",
          "full"
        ],
        "title": "SandboxCacheTier",
        "type": "string"
      },
      "SandboxPort": {
        "properties": {
          "port": {
            "title": "Port",
            "type": "integer"
          },
          "tcp_host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tcp Host"
          },
          "tcp_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tcp Port"
          },
          "tls_host": {
            "title": "Tls Host",
            "type": "string"
          },
          "tls_port": {
            "title": "Tls Port",
            "type": "integer"
          },
          "tunnel_url": {
            "title": "Tunnel Url",
            "type": "string"
          },
          "unencrypted_host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unencrypted Host"
          },
          "unencrypted_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unencrypted Port"
          }
        },
        "required": [
          "port",
          "tunnel_url",
          "tls_host",
          "tls_port"
        ],
        "title": "SandboxPort",
        "type": "object"
      },
      "SandboxRepository": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner_id": {
            "title": "Owner Id",
            "type": "integer"
          },
          "owner_name": {
            "title": "Owner Name",
            "type": "string"
          },
          "sha": {
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "owner_id",
          "owner_name",
          "id",
          "name",
          "sha"
        ],
        "title": "SandboxRepository",
        "type": "object"
      },
      "SandboxSource": {
        "enum": [
          "session",
          "image_refresh",
          "test",
          "script"
        ],
        "title": "SandboxSource",
        "type": "string"
      },
      "SandboxStatus": {
        "enum": [
          "scheduled",
          "building",
          "running",
          "released",
          "terminating",
          "terminated",
          "failed"
        ],
        "title": "SandboxStatus",
        "type": "string"
      },
      "SandboxType": {
        "enum": [
          "claude_code"
        ],
        "title": "SandboxType",
        "type": "string"
      },
      "SdkCacheCreation": {
        "additionalProperties": false,
        "description": "The cache-write breakdown by TTL. Load-bearing for billing, not\ninformational: the 5m and 1h lanes have different rate-card prices\n(`normalized_usage_from_anthropic`), so collapsing them into one\n`cache_creation_input_tokens` total silently misprices every session with 1h\ncaching on.",
        "properties": {
          "ephemeral_1h_input_tokens": {
            "default": 0,
            "title": "Ephemeral 1H Input Tokens",
            "type": "integer"
          },
          "ephemeral_5m_input_tokens": {
            "default": 0,
            "title": "Ephemeral 5M Input Tokens",
            "type": "integer"
          }
        },
        "title": "SdkCacheCreation",
        "type": "object"
      },
      "SdkRateLimitRecord": {
        "additionalProperties": true,
        "properties": {
          "kind": {
            "const": "rate_limit",
            "default": "rate_limit",
            "title": "Kind",
            "type": "string"
          },
          "rate_limit_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit Type"
          },
          "resets_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resets At"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "utilization": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utilization"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "kind",
          "status"
        ],
        "title": "SdkRateLimitRecord",
        "type": "object"
      },
      "SdkServerToolResultBlock": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "additionalProperties": true,
            "default": {},
            "title": "Content",
            "type": "object"
          },
          "tool_use_id": {
            "title": "Tool Use Id",
            "type": "string"
          },
          "type": {
            "const": "server_tool_result",
            "default": "server_tool_result",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "tool_use_id",
          "type"
        ],
        "title": "SdkServerToolResultBlock",
        "type": "object"
      },
      "SdkServerToolUseBlock": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input": {
            "additionalProperties": true,
            "default": {},
            "title": "Input",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "const": "server_tool_use",
            "default": "server_tool_use",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "title": "SdkServerToolUseBlock",
        "type": "object"
      },
      "SdkSystemRecord": {
        "additionalProperties": true,
        "description": "Everything the CLI reports out-of-band: init, compact_boundary, task\nlifecycle, hook events, api_error. `data` is the raw payload \u2014 this is the\none open shape in the schema, because the CLI's system subtypes are an\nopen set we do not want to fail a session over.",
        "properties": {
          "data": {
            "additionalProperties": true,
            "default": {},
            "title": "Data",
            "type": "object"
          },
          "kind": {
            "const": "system",
            "default": "system",
            "title": "Kind",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "subtype": {
            "title": "Subtype",
            "type": "string"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "kind",
          "subtype"
        ],
        "title": "SdkSystemRecord",
        "type": "object"
      },
      "SdkTextBlock": {
        "additionalProperties": true,
        "properties": {
          "text": {
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "text",
            "default": "text",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "title": "SdkTextBlock",
        "type": "object"
      },
      "SdkThinkingBlock": {
        "additionalProperties": true,
        "properties": {
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "thinking": {
            "title": "Thinking",
            "type": "string"
          },
          "type": {
            "const": "thinking",
            "default": "thinking",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "signature",
          "thinking",
          "type"
        ],
        "title": "SdkThinkingBlock",
        "type": "object"
      },
      "SdkToolResultBlock": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "is_error": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Error"
          },
          "tool_use_id": {
            "title": "Tool Use Id",
            "type": "string"
          },
          "type": {
            "const": "tool_result",
            "default": "tool_result",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "tool_use_id",
          "type"
        ],
        "title": "SdkToolResultBlock",
        "type": "object"
      },
      "SdkToolUseBlock": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input": {
            "additionalProperties": true,
            "default": {},
            "title": "Input",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "const": "tool_use",
            "default": "tool_use",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "title": "SdkToolUseBlock",
        "type": "object"
      },
      "SdkUserRecord": {
        "additionalProperties": true,
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "discriminator": {
                    "mapping": {
                      "server_tool_result": "#/components/schemas/SdkServerToolResultBlock",
                      "server_tool_use": "#/components/schemas/SdkServerToolUseBlock",
                      "text": "#/components/schemas/SdkTextBlock",
                      "thinking": "#/components/schemas/SdkThinkingBlock",
                      "tool_result": "#/components/schemas/SdkToolResultBlock",
                      "tool_use": "#/components/schemas/SdkToolUseBlock"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SdkTextBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkThinkingBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkToolResultBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkServerToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/SdkServerToolResultBlock"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "kind": {
            "const": "user",
            "default": "user",
            "title": "Kind",
            "type": "string"
          },
          "parent_tool_use_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Tool Use Id"
          },
          "uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uuid"
          }
        },
        "required": [
          "content",
          "kind"
        ],
        "title": "SdkUserRecord",
        "type": "object"
      },
      "Secret": {
        "description": "A stored variable WITHOUT its value. Values are write-only: once\n    uploaded they are injected into session environments but never returned to\na caller.",
        "properties": {
          "created_at": {
            "description": "When the variable was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "name": {
            "description": "The variable name.",
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "description": "When the variable's value was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "Secret",
        "type": "object"
      },
      "SecretInput": {
        "description": "One environment variable to store.",
        "properties": {
          "name": {
            "description": "The variable name. Must start with a letter or underscore and contain only letters, digits, and underscores.",
            "title": "Name",
            "type": "string"
          },
          "value": {
            "description": "The variable value. Write-only: it is injected into session environments but never returned by the API.",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "title": "SecretInput",
        "type": "object"
      },
      "SecretsListResponse": {
        "description": "The account's environment variables, names and timestamps only \u2014\nvalues are never returned.",
        "properties": {
          "secrets": {
            "description": "The stored secrets.",
            "items": {
              "$ref": "#/components/schemas/Secret"
            },
            "title": "Secrets",
            "type": "array"
          }
        },
        "required": [
          "secrets"
        ],
        "title": "SecretsListResponse",
        "type": "object"
      },
      "SendSessionMessageRequest": {
        "description": "A human message posted into a durable session's conversation.\nDelivered to the live agent at the next turn boundary, or starts an\nagent for it when none is warm.",
        "properties": {
          "idempotency_key": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional retry-safety key, unique per (session, key): a retry with the same key returns the original message \u2014 no duplicate message, no double turn, no double spend. The SDK auto-generates one per send.",
            "title": "Idempotency Key"
          },
          "images": {
            "description": "Images attached to the message, base64 inline. Requires the model's images capability, which is not currently certified. Each becomes an `[Image #N]` placeholder in the stored body and an image block on the next turn. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
            "items": {
              "$ref": "#/components/schemas/ImageAttachment"
            },
            "title": "Images",
            "type": "array"
          },
          "message": {
            "description": "The message text. May be empty when `images` is not.",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "SendSessionMessageRequest",
        "type": "object"
      },
      "SendTestNotificationEmailRequest": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "SendTestNotificationEmailRequest",
        "type": "object"
      },
      "SentryAction": {
        "enum": [
          "issue_alert",
          "metric_alert"
        ],
        "title": "SentryAction",
        "type": "string"
      },
      "SentryAlertEvent": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/SentryAction"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_slug": {
            "title": "Organization Slug",
            "type": "string"
          },
          "project_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Slug"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "type": {
            "const": "sentry.alert",
            "default": "sentry.alert",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "required": [
          "action",
          "actor",
          "organization_slug",
          "project_slug",
          "title",
          "type",
          "url"
        ],
        "title": "SentryAlertEvent",
        "type": "object"
      },
      "SentryConfig": {
        "additionalProperties": false,
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/SentryConfigEllipsis"
          },
          "sentry": {
            "$ref": "#/components/schemas/SentryRoutes"
          },
          "session": {
            "$ref": "#/components/schemas/IntegrationSessionConfig"
          }
        },
        "required": [
          "ellipsis",
          "sentry",
          "session"
        ],
        "title": "SentryConfig",
        "type": "object"
      },
      "SentryConfigEllipsis": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "sentry",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "SentryConfigEllipsis",
        "type": "object"
      },
      "SentryHandler": {
        "description": "The account's sentry.yaml handler.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SentryConfig",
            "description": "The last valid sentry.yaml definition."
          },
          "created_at": {
            "description": "When the handler was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the handler, when known."
          },
          "id": {
            "description": "Unique identifier of the saved handler.",
            "title": "Id",
            "type": "string"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest recorded sync error, or null after a successful sync. A failed update preserves the last valid config and raw_yaml.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The commit associated with the latest recorded sync attempt. When last_sync_error is set, this may be the rejected revision rather than the revision of config and raw_yaml.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "const": "github",
            "default": "github",
            "description": "Handlers are managed by editing their files in GitHub.",
            "title": "Managed By",
            "type": "string"
          },
          "raw_yaml": {
            "description": "The original YAML of the last valid handler definition.",
            "title": "Raw Yaml",
            "type": "string"
          },
          "service": {
            "const": "sentry",
            "default": "sentry",
            "title": "Service",
            "type": "string"
          },
          "sha": {
            "description": "Content fingerprint of the last valid handler definition.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "$ref": "#/components/schemas/GithubSourceDetails",
            "description": "The repository, path, and branch the handler syncs from."
          },
          "updated_at": {
            "description": "When the saved record was last updated, including failed syncs.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sha",
          "created_at",
          "updated_at",
          "raw_yaml",
          "source_details",
          "config"
        ],
        "title": "SentryHandler",
        "type": "object"
      },
      "SentryOrganizationSummary": {
        "description": "One connected Sentry organization.",
        "properties": {
          "integration_id": {
            "description": "The Sentry integration id.",
            "title": "Integration Id",
            "type": "string"
          },
          "organization_slug": {
            "description": "The Sentry organization's slug.",
            "title": "Organization Slug",
            "type": "string"
          }
        },
        "required": [
          "integration_id",
          "organization_slug"
        ],
        "title": "SentryOrganizationSummary",
        "type": "object"
      },
      "SentryOrganizationsListResponse": {
        "description": "The connected Sentry organizations; empty if none are connected.",
        "properties": {
          "organizations": {
            "description": "The connected Sentry organizations.",
            "items": {
              "$ref": "#/components/schemas/SentryOrganizationSummary"
            },
            "title": "Organizations",
            "type": "array"
          }
        },
        "required": [
          "organizations"
        ],
        "title": "SentryOrganizationsListResponse",
        "type": "object"
      },
      "SentryRoutes": {
        "additionalProperties": false,
        "properties": {
          "on": {
            "default": [
              "issue_alert",
              "metric_alert"
            ],
            "items": {
              "$ref": "#/components/schemas/SentryAction"
            },
            "minItems": 1,
            "title": "On",
            "type": "array"
          },
          "organizations": {
            "default": [
              "*"
            ],
            "items": {
              "type": "string"
            },
            "title": "Organizations",
            "type": "array"
          },
          "projects": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Projects",
            "type": "array"
          }
        },
        "required": [
          "projects"
        ],
        "title": "SentryRoutes",
        "type": "object"
      },
      "Session": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code",
                  "codex"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "claude_code",
                  "codex"
                ]
              }
            ]
          }
        ],
        "description": "An agent session: one conversation with an agent. Returned by\n`GET /v1/sessions/{id}` and carried by the session stream's\n`session`/`snapshot` frames; REST and stream never disagree about what a\nsession looks like.",
        "properties": {
          "agent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionAgent"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent the session was started from, or null for a raw session started with POST /v1/sessions."
          },
          "archived": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionArchived"
              },
              {
                "type": "null"
              }
            ],
            "description": "When and by whom the session was archived; null when unarchived. Archiving does not stop or close a session."
          },
          "attribution": {
            "$ref": "#/components/schemas/SessionAttribution",
            "description": "The principal this session is attributed to."
          },
          "budget": {
            "default": 0,
            "description": "The spend budget enforced for this session, in US dollars, after resolving defaults and ceilings.",
            "title": "Budget",
            "type": "number"
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex input and native options. Set exactly one of claude_code or codex."
          },
          "conversation": {
            "$ref": "#/components/schemas/SessionConversation",
            "description": "Whether the session can take more messages, and whether an agent is warm to answer one."
          },
          "cost": {
            "$ref": "#/components/schemas/SessionCost",
            "description": "What the session has cost so far, in millicents, broken down by leg and carrying its own total."
          },
          "created_at": {
            "description": "When the session was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/SessionEnvironment",
            "description": "The full environment configuration frozen when the session was created, with the saved environment's id and how it was chosen."
          },
          "event": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "github.check_run": "#/components/schemas/GithubCheckRunEvent",
                    "github.issue": "#/components/schemas/GithubIssueEvent",
                    "github.pull_request": "#/components/schemas/GithubPullRequestEvent",
                    "github.push": "#/components/schemas/GithubPushEvent",
                    "github.release": "#/components/schemas/GithubReleaseEvent",
                    "linear.issue": "#/components/schemas/LinearIssueEvent",
                    "sentry.alert": "#/components/schemas/SentryAlertEvent",
                    "slack.channel_created": "#/components/schemas/SlackChannelCreatedEvent",
                    "slack.message": "#/components/schemas/SlackMessageEvent"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/GithubPullRequestEvent"
                  },
                  {
                    "$ref": "#/components/schemas/GithubIssueEvent"
                  },
                  {
                    "$ref": "#/components/schemas/GithubPushEvent"
                  },
                  {
                    "$ref": "#/components/schemas/GithubCheckRunEvent"
                  },
                  {
                    "$ref": "#/components/schemas/GithubReleaseEvent"
                  },
                  {
                    "$ref": "#/components/schemas/LinearIssueEvent"
                  },
                  {
                    "$ref": "#/components/schemas/SlackMessageEvent"
                  },
                  {
                    "$ref": "#/components/schemas/SlackChannelCreatedEvent"
                  },
                  {
                    "$ref": "#/components/schemas/SentryAlertEvent"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The typed external event that started the session; null for direct and scheduled starts.",
            "title": "Event"
          },
          "git": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionGit"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured."
          },
          "handler": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionHandler"
              },
              {
                "type": "null"
              }
            ],
            "description": "The saved handler and its effective display name when this session started, frozen at creation. Null for built-in responders, legacy sessions, and sessions started without a handler."
          },
          "id": {
            "description": "Unique identifier of the session.",
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Caller-supplied metadata key-value pairs.",
            "title": "Metadata",
            "type": "object"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "The structured-output exit contract for this session."
          },
          "parent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionParent"
              },
              {
                "type": "null"
              }
            ],
            "description": "The predecessor session this session continues; null when there is none."
          },
          "permissions": {
            "$ref": "#/components/schemas/PermissionsConfig-Output",
            "description": "What the session may touch, per minted credential."
          },
          "skills": {
            "description": "Skills installed for this session.",
            "items": {
              "$ref": "#/components/schemas/SkillRef-Output"
            },
            "title": "Skills",
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/SessionSource",
            "description": "Where the session came from (e.g. react, web, api, cli, mention, cron)."
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest live summary of the session's progress while it runs, and when it was generated."
          },
          "tokens": {
            "$ref": "#/components/schemas/SessionTokens",
            "description": "The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes."
          },
          "turn": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionTurn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The turn in progress, or the latest one when none is running. Null until the session has a message. Wait on it: the message you sent is answered when the turn with your message's `turn_id` reaches a final status."
          },
          "updated_at": {
            "description": "When the session was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "agent",
          "archived",
          "attribution",
          "budget",
          "claude_code",
          "codex",
          "conversation",
          "cost",
          "created_at",
          "environment",
          "event",
          "git",
          "handler",
          "id",
          "metadata",
          "output",
          "parent",
          "permissions",
          "skills",
          "source",
          "summary",
          "tokens",
          "turn",
          "updated_at"
        ],
        "title": "Session",
        "type": "object"
      },
      "SessionAgent": {
        "description": "The agent this session was started from: the definition frozen\nwhen the session was created, and the saved agent it came from as it\nexists NOW. They diverge legitimately \u2014 a YAML edit after the session\nstarted leaves the pointer describing something the session never ran.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Output",
            "description": "The agent definition the session was started from, frozen when the session was created."
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the saved agent this session's snapshot was taken from. Null for a routing-file agent or the built-in mention agent, which have no saved agent behind them. Points at the agent as it exists now, which may have changed since.",
            "title": "Id"
          }
        },
        "required": [
          "config",
          "id"
        ],
        "title": "SessionAgent",
        "type": "object"
      },
      "SessionAnalytics": {
        "properties": {
          "attributed_requests": {
            "title": "Attributed Requests",
            "type": "integer"
          },
          "attribution": {
            "description": "Estimated input content cost by serialized text size, allocated from measured input/cache spend. Repeated context is counted on every request. Output and compute remain separate. These estimates never affect billing.",
            "items": {
              "$ref": "#/components/schemas/SessionCostCategory"
            },
            "title": "Attribution",
            "type": "array"
          },
          "attribution_request_limit": {
            "description": "Maximum recent stored request bodies inspected. Older, missing, multimodal, or incomplete context is left unattributed.",
            "title": "Attribution Request Limit",
            "type": "integer"
          },
          "bucket_seconds": {
            "title": "Bucket Seconds",
            "type": "integer"
          },
          "charged_millicents": {
            "title": "Charged Millicents",
            "type": "integer"
          },
          "external_token_value_millicents": {
            "title": "External Token Value Millicents",
            "type": "integer"
          },
          "historical_entries": {
            "description": "Carried-forward billing totals without per-request measurements. Included in spend, excluded from the timeline and request counts.",
            "title": "Historical Entries",
            "type": "integer"
          },
          "pending_requests": {
            "title": "Pending Requests",
            "type": "integer"
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          },
          "series": {
            "items": {
              "$ref": "#/components/schemas/SessionUsageBucket"
            },
            "title": "Series",
            "type": "array"
          },
          "spend": {
            "description": "Measured token lanes priced using each request's saved rate card, plus compute. Rounding is reconciled to the ledger.",
            "items": {
              "$ref": "#/components/schemas/SessionSpendItem"
            },
            "title": "Spend",
            "type": "array"
          },
          "tools": {
            "description": "Tool invocations from retained session records. These counts are not tool call charges; third-party tool fees are not metered.",
            "items": {
              "$ref": "#/components/schemas/SessionToolCount"
            },
            "title": "Tools",
            "type": "array"
          },
          "unresolved_requests": {
            "title": "Unresolved Requests",
            "type": "integer"
          }
        },
        "required": [
          "requests",
          "historical_entries",
          "pending_requests",
          "unresolved_requests",
          "charged_millicents",
          "external_token_value_millicents",
          "bucket_seconds",
          "series",
          "spend",
          "attribution",
          "attributed_requests",
          "attribution_request_limit",
          "tools"
        ],
        "title": "SessionAnalytics",
        "type": "object"
      },
      "SessionArchived": {
        "description": "When the session was archived and the GitHub user who archived it.",
        "properties": {
          "at": {
            "description": "When the session was archived.",
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user who archived the session; null if unknown or unavailable."
          }
        },
        "required": [
          "at",
          "by"
        ],
        "title": "SessionArchived",
        "type": "object"
      },
      "SessionAttribution": {
        "description": "The principal a session is attributed to: what kind, its id, and \u2014 when\nthe kind is a GitHub user \u2014 the resolved display snippet.",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the principal the session is attributed to.",
            "title": "Id"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kind of principal the session is attributed to (e.g. a GitHub user or an API key)."
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user."
          }
        },
        "required": [
          "id",
          "type",
          "user"
        ],
        "title": "SessionAttribution",
        "type": "object"
      },
      "SessionBudgetDefault": {
        "properties": {
          "budget_usd": {
            "title": "Budget Usd",
            "type": "number"
          },
          "ceiling_usd": {
            "description": "Current effective session ceiling from /account/settings.",
            "title": "Ceiling Usd",
            "type": "number"
          },
          "platform_max_usd": {
            "title": "Platform Max Usd",
            "type": "number"
          }
        },
        "required": [
          "budget_usd",
          "platform_max_usd",
          "ceiling_usd"
        ],
        "title": "SessionBudgetDefault",
        "type": "object"
      },
      "SessionCapability": {
        "enum": [
          "coding",
          "interactive",
          "agent",
          "structured_input",
          "structured_output",
          "system_files",
          "images",
          "mcp",
          "skills",
          "settings",
          "fallback_model",
          "effort"
        ],
        "title": "SessionCapability",
        "type": "string"
      },
      "SessionClosedPayload": {
        "additionalProperties": true,
        "description": "session_closed: the conversation closed permanently.",
        "properties": {},
        "title": "SessionClosedPayload",
        "type": "object"
      },
      "SessionClosedRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/SessionClosedPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "session_closed",
            "default": "session_closed",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "SessionClosedRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "SessionConfig-Input": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "codex"
                ]
              }
            ]
          }
        ],
        "description": "What one session runs on: its selected harness, where it runs, what it\nmay touch, its skills, its exit contract, and its spend cap. Every session\nfreezes one of these (`sessions.session_config`); an agent\ncarries one under `session:` (`AgentConfig.session`); and\n`POST /v1/sessions` is this shape flattened onto the request body, plus the\nrun settings. Nothing in here is an agent's identity or trigger \u2014\nthose belong to `AgentConfig`.\n\nField order is the canonical key order for `session:` blocks and YAML\nexports: what runs (`claude_code` or `codex`), where (`environment`), what it may\ntouch (`permissions`), then the rest.",
        "properties": {
          "budget": {
            "$ref": "#/components/schemas/BudgetConfig-Input"
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex input and native options. Set exactly one of claude_code or codex."
          },
          "conversation": {
            "$ref": "#/components/schemas/SessionConversationConfig-Input"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/EnvironmentConfig-Input"
              }
            ],
            "title": "Environment"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Arbitrary string key/value metadata stored on every session.",
            "title": "Metadata",
            "type": "object"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/PermissionsConfig-Input"
          },
          "skills": {
            "items": {
              "$ref": "#/components/schemas/SkillRef-Input"
            },
            "title": "Skills",
            "type": "array"
          }
        },
        "title": "SessionConfig",
        "type": "object"
      },
      "SessionConfig-Output": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code",
                  "codex"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "claude_code",
                  "codex"
                ]
              }
            ]
          }
        ],
        "description": "What one session runs on: its selected harness, where it runs, what it\nmay touch, its skills, its exit contract, and its spend cap. Every session\nfreezes one of these (`sessions.session_config`); an agent\ncarries one under `session:` (`AgentConfig.session`); and\n`POST /v1/sessions` is this shape flattened onto the request body, plus the\nrun settings. Nothing in here is an agent's identity or trigger \u2014\nthose belong to `AgentConfig`.\n\nField order is the canonical key order for `session:` blocks and YAML\nexports: what runs (`claude_code` or `codex`), where (`environment`), what it may\ntouch (`permissions`), then the rest.",
        "properties": {
          "budget": {
            "$ref": "#/components/schemas/BudgetConfig-Output",
            "default": {}
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexConfig-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex input and native options. Set exactly one of claude_code or codex."
          },
          "conversation": {
            "$ref": "#/components/schemas/SessionConversationConfig-Output",
            "default": {
              "interactive": true
            }
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/EnvironmentConfig-Output"
              }
            ],
            "default": {
              "compute": {},
              "hooks": {},
              "mcp_servers": [],
              "repositories": [],
              "variables": []
            },
            "title": "Environment"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Arbitrary string key/value metadata stored on every session.",
            "title": "Metadata",
            "type": "object"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/PermissionsConfig-Output",
            "default": {
              "ellipsis": true,
              "github": {}
            }
          },
          "skills": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SkillRef-Output"
            },
            "title": "Skills",
            "type": "array"
          }
        },
        "required": [
          "budget",
          "claude_code",
          "codex",
          "conversation",
          "environment",
          "metadata",
          "output",
          "permissions",
          "skills"
        ],
        "title": "SessionConfig",
        "type": "object"
      },
      "SessionConversation": {
        "description": "Whether the session can take more messages, and how quickly it would\nanswer one.",
        "properties": {
          "interactive": {
            "description": "Whether the session stays open after its first turn.",
            "title": "Interactive",
            "type": "boolean"
          },
          "prompting": {
            "$ref": "#/components/schemas/SessionPrompting",
            "description": "The session's policy for direct messages. Caller authorization and message validation are checked separately."
          },
          "state": {
            "$ref": "#/components/schemas/SessionState",
            "description": "`open` while the session can take messages; `closed` is permanent."
          },
          "warm": {
            "description": "Whether an agent is ready to answer the next message right away. When false, the next message first prepares an environment, which takes longer. A hint only; clients need no logic on it.",
            "title": "Warm",
            "type": "boolean"
          }
        },
        "required": [
          "interactive",
          "prompting",
          "state",
          "warm"
        ],
        "title": "SessionConversation",
        "type": "object"
      },
      "SessionConversationConfig-Input": {
        "additionalProperties": false,
        "description": "Conversation settings for a session, set on a saved agent or sent when starting a session or running an agent.",
        "properties": {
          "interactive": {
            "description": "Whether the session stays open after its first turn. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
            "title": "Interactive",
            "type": "boolean"
          }
        },
        "title": "SessionConversationConfig",
        "type": "object"
      },
      "SessionConversationConfig-Output": {
        "additionalProperties": false,
        "description": "Conversation settings for a session, set on a saved agent or sent when starting a session or running an agent.",
        "properties": {
          "interactive": {
            "default": true,
            "description": "Whether the session stays open after its first turn. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
            "title": "Interactive",
            "type": "boolean"
          }
        },
        "required": [
          "interactive"
        ],
        "title": "SessionConversationConfig",
        "type": "object"
      },
      "SessionCost": {
        "description": "What a session (or one turn of it) cost, in millicents.\n\n`llm` is deliberately NOT called `tokens`: it would sit beside the `tokens`\nobject and read as \"the token count's cost\" rather than \"the cost of the\nLLM leg\".",
        "properties": {
          "cpu": {
            "default": 0,
            "description": "CPU spend in millicents.",
            "title": "Cpu",
            "type": "integer"
          },
          "fee": {
            "default": 0,
            "description": "Platform fee in millicents.",
            "title": "Fee",
            "type": "integer"
          },
          "llm": {
            "default": 0,
            "description": "LLM spend in millicents.",
            "title": "Llm",
            "type": "integer"
          },
          "memory": {
            "default": 0,
            "description": "Memory spend in millicents.",
            "title": "Memory",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "description": "The grand total in millicents: llm + cpu + memory + fee.",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "cpu",
          "fee",
          "llm",
          "memory",
          "total"
        ],
        "title": "SessionCost",
        "type": "object"
      },
      "SessionCostCategory": {
        "properties": {
          "charged_millicents": {
            "title": "Charged Millicents",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SessionSpendItem"
            },
            "title": "Items",
            "type": "array"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label",
          "charged_millicents",
          "items"
        ],
        "title": "SessionCostCategory",
        "type": "object"
      },
      "SessionDiffResponse": {
        "description": "A session's uncommitted changes, one patch per file.",
        "properties": {
          "files": {
            "description": "One unified-diff section per changed file, `diff --git` header included, exactly as git emitted it. Join to the per-file counts on `git.repos[].files` by (full_name, path). Empty when the tree was clean or no capture ran.",
            "items": {
              "$ref": "#/components/schemas/SessionGitPatchFile"
            },
            "title": "Files",
            "type": "array"
          },
          "omitted_paths": {
            "description": "Paths whose hunks were dropped to fit the storage cap, so a viewer can name what is missing instead of showing a silently partial diff.",
            "items": {
              "type": "string"
            },
            "title": "Omitted Paths",
            "type": "array"
          }
        },
        "required": [
          "files",
          "omitted_paths"
        ],
        "title": "SessionDiffResponse",
        "type": "object"
      },
      "SessionEnvironment": {
        "additionalProperties": false,
        "description": "The environment configuration frozen at session creation, enriched with\nthe saved environment's identity and how it was chosen.",
        "properties": {
          "compute": {
            "$ref": "#/components/schemas/ComputeConfig-Output",
            "default": {}
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Output",
            "default": {}
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the saved environment the session's config resolved. Null for an inline environment block or the built-in basic environment.",
            "title": "Id"
          },
          "mcp_servers": {
            "default": [],
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/McpServerRef"
                },
                {
                  "$ref": "#/components/schemas/McpStdioServer-Output"
                },
                {
                  "$ref": "#/components/schemas/McpRemoteServer-Output"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "repositories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RepositoryRef-Output"
            },
            "title": "Repositories",
            "type": "array"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentSource"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the environment was chosen (request, agent, platform_default; repo_default and account_default on sessions from before those ladders were removed). An inline request uses request; an inline environment declared in session configuration has no source."
          },
          "variables": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariable-Output"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "compute",
          "hooks",
          "id",
          "mcp_servers",
          "repositories",
          "source",
          "variables"
        ],
        "title": "SessionEnvironment",
        "type": "object"
      },
      "SessionEventActor": {
        "description": "The event's initiator, when known; never inferred from resource ownership.",
        "properties": {
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "is_bot": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Bot"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "avatar_url",
          "is_bot",
          "name"
        ],
        "title": "SessionEventActor",
        "type": "object"
      },
      "SessionGit": {
        "description": "Every repo the session touched. Small enough to ride on `sessions`\nand be returned by every session read.",
        "properties": {
          "repos": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SessionGitRepo"
            },
            "title": "Repos",
            "type": "array"
          }
        },
        "required": [
          "repos"
        ],
        "title": "SessionGit",
        "type": "object"
      },
      "SessionGitCommit": {
        "description": "One commit the session created in this repo (everything past the\nprovisioning checkout's sha), captured from the environment rather than the\ntranscript so it stays correct through amends, rebases, and commits made by\nscripts. The repo is the parent object, so it is not repeated here.",
        "properties": {
          "committed_at": {
            "format": "date-time",
            "title": "Committed At",
            "type": "string"
          },
          "pushed": {
            "title": "Pushed",
            "type": "boolean"
          },
          "sha": {
            "title": "Sha",
            "type": "string"
          },
          "subject": {
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "committed_at",
          "pushed",
          "sha",
          "subject"
        ],
        "title": "SessionGitCommit",
        "type": "object"
      },
      "SessionGitFile": {
        "description": "One file's uncommitted change, as `git diff HEAD --numstat` reports it\n(with intent-to-add, so a brand-new file still counts).",
        "properties": {
          "additions": {
            "title": "Additions",
            "type": "integer"
          },
          "deletions": {
            "title": "Deletions",
            "type": "integer"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "additions",
          "deletions",
          "path",
          "status"
        ],
        "title": "SessionGitFile",
        "type": "object"
      },
      "SessionGitPatchFile": {
        "description": "One file's patch, split out of `git diff HEAD` at capture time.\n\nStored per file rather than as one blob because that is how a viewer reads\nit: a row per changed file, opened one at a time. Counts and status are NOT\nrepeated here \u2014 they live on the matching SessionGitFile in\n`sessions.output_git`, which rides on every session read, so a surface\nlists the changed files (and their +/\u2212) before it fetches a single hunk. The\njoin key is (full_name, path).\n\n`patch` is the unified-diff section for this file, `diff --git` header\nincluded, exactly as git emitted it.",
        "properties": {
          "full_name": {
            "title": "Full Name",
            "type": "string"
          },
          "patch": {
            "title": "Patch",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          }
        },
        "required": [
          "full_name",
          "path",
          "patch"
        ],
        "title": "SessionGitPatchFile",
        "type": "object"
      },
      "SessionGitPr": {
        "description": "A pull request the session opened in this repo, written the moment the\ncreating tool call's result lands (see extract_session_prs.PrCreateWatcher).\nLive PR state (open/merged/closed) is not stored \u2014 it lives on gh_prs,\njoined via `gh_pr_id` (GET /frontend/agents/sessions/{id}/git). The repo is\nthe parent object, so it is not repeated here.",
        "properties": {
          "gh_pr_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gh Pr Id"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "gh_pr_id",
          "number",
          "title",
          "url"
        ],
        "title": "SessionGitPr",
        "type": "object"
      },
      "SessionGitRepo": {
        "description": "One checkout in the session's environment and everything the session did\nto it, split by whether it survived the environment.",
        "properties": {
          "commits": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SessionGitCommit"
            },
            "title": "Commits",
            "type": "array"
          },
          "commits_total": {
            "default": 0,
            "title": "Commits Total",
            "type": "integer"
          },
          "full_name": {
            "title": "Full Name",
            "type": "string"
          },
          "local_commit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Local Commit"
          },
          "local_uncommitted_files": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SessionGitFile"
            },
            "title": "Local Uncommitted Files",
            "type": "array"
          },
          "prs": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SessionGitPr"
            },
            "title": "Prs",
            "type": "array"
          },
          "remote_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remote Branch"
          },
          "remote_commit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remote Commit"
          }
        },
        "required": [
          "commits",
          "commits_total",
          "full_name",
          "local_commit",
          "local_uncommitted_files",
          "prs",
          "remote_branch",
          "remote_commit"
        ],
        "title": "SessionGitRepo",
        "type": "object"
      },
      "SessionGitRepoEntry": {
        "properties": {
          "commits": {
            "items": {
              "$ref": "#/components/schemas/SessionGitCommit"
            },
            "title": "Commits",
            "type": "array"
          },
          "commits_total": {
            "title": "Commits Total",
            "type": "integer"
          },
          "full_name": {
            "title": "Full Name",
            "type": "string"
          },
          "prs": {
            "items": {
              "$ref": "#/components/schemas/SessionPrEntry"
            },
            "title": "Prs",
            "type": "array"
          }
        },
        "required": [
          "full_name",
          "commits",
          "commits_total",
          "prs"
        ],
        "title": "SessionGitRepoEntry",
        "type": "object"
      },
      "SessionGitResponse": {
        "properties": {
          "repos": {
            "items": {
              "$ref": "#/components/schemas/SessionGitRepoEntry"
            },
            "title": "Repos",
            "type": "array"
          }
        },
        "required": [
          "repos"
        ],
        "title": "SessionGitResponse",
        "type": "object"
      },
      "SessionHandler": {
        "description": "The saved handler and its display name when the session started.",
        "properties": {
          "agent_name": {
            "description": "The handler's effective display name when the session started: ellipsis.name, or the service default (Slack, GitHub, Linear, or sentry).",
            "minLength": 1,
            "title": "Agent Name",
            "type": "string"
          },
          "id": {
            "description": "Identifier of the saved handler.",
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "service": {
            "$ref": "#/components/schemas/HandlerService",
            "description": "The service the handler responds to."
          },
          "sha": {
            "description": "Content fingerprint of the validated handler configuration used when the session started. This is not the Git commit SHA.",
            "minLength": 1,
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "agent_name",
          "id",
          "service",
          "sha"
        ],
        "title": "SessionHandler",
        "type": "object"
      },
      "SessionLogSegment": {
        "description": "One immutable archived segment of the session log: its feed_seq range\nplus a short-lived presigned download URL. Segments are gzip members \u2014\ndownload them in order and concatenate for the whole log.",
        "properties": {
          "bytes": {
            "description": "The segment's size in bytes.",
            "title": "Bytes",
            "type": "integer"
          },
          "download_url": {
            "description": "A short-lived presigned URL to download the segment. The URL is an unauthenticated credential for that one object until it expires \u2014 fetch the manifest, then download immediately.",
            "title": "Download Url",
            "type": "string"
          },
          "end_feed_seq": {
            "description": "The last feed_seq covered by this segment.",
            "title": "End Feed Seq",
            "type": "integer"
          },
          "expires_in": {
            "description": "How long the download URL stays valid, in seconds.",
            "title": "Expires In",
            "type": "integer"
          },
          "record_count": {
            "description": "How many records the segment contains.",
            "title": "Record Count",
            "type": "integer"
          },
          "start_feed_seq": {
            "description": "The first feed_seq covered by this segment.",
            "title": "Start Feed Seq",
            "type": "integer"
          }
        },
        "required": [
          "start_feed_seq",
          "end_feed_seq",
          "record_count",
          "bytes",
          "download_url",
          "expires_in"
        ],
        "title": "SessionLogSegment",
        "type": "object"
      },
      "SessionMessage": {
        "description": "One message in a session's inbox: what a queued message renders and\nretires on. The webhook provenance internals stay off the wire.",
        "properties": {
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display attribution of the message's sender.",
            "title": "Author"
          },
          "body": {
            "description": "The message text, with one `[Image #N]` placeholder per attached image.",
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the message was delivered to the agent, if it has been.",
            "title": "Delivered At"
          },
          "feed_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the message sits in the session's feed \u2014 placement metadata only, NOT a resume cursor (only records_append frames advance the cursor). Null for older rows.",
            "title": "Feed Seq"
          },
          "id": {
            "description": "Unique identifier of the message.",
            "title": "Id",
            "type": "string"
          },
          "images": {
            "description": "Images attached to the message, metadata only: index, media type, size. The bytes go to the model, never over the stream.",
            "items": {
              "$ref": "#/components/schemas/SessionMessageImage"
            },
            "title": "Images",
            "type": "array"
          },
          "sender_attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the principal that sent the message, if attributed.",
            "title": "Sender Attribution Id"
          },
          "sender_attribution_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kind of principal that sent the message, if attributed."
          },
          "session_id": {
            "description": "Identifier of the session the message belongs to.",
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SessionMessageStatus",
            "description": "Delivery status of the message."
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The turn created to answer this message. Wait on it: the message is answered when that turn reaches a final status.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "status",
          "body",
          "created_at"
        ],
        "title": "SessionMessage",
        "type": "object"
      },
      "SessionMessageImage": {
        "description": "One image on a message, metadata only. `index` is the N in the\n`[Image #N]` placeholder in the message body.",
        "properties": {
          "index": {
            "description": "1-based position: the N in `[Image #N]`.",
            "title": "Index",
            "type": "integer"
          },
          "media_type": {
            "description": "The image's MIME type.",
            "title": "Media Type",
            "type": "string"
          },
          "size_bytes": {
            "description": "Size of the decoded image, in bytes.",
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "index",
          "media_type",
          "size_bytes"
        ],
        "title": "SessionMessageImage",
        "type": "object"
      },
      "SessionMessageResponse": {
        "description": "One inbox message and the turn created to answer it.",
        "properties": {
          "message": {
            "$ref": "#/components/schemas/SessionMessage",
            "description": "The message."
          },
          "turn": {
            "$ref": "#/components/schemas/SessionTurn",
            "description": "The turn that will answer the message. Wait on it: poll GET /v1/sessions/{id}/turns/{turn_id} or watch the stream's session frames until its status is final."
          }
        },
        "required": [
          "message",
          "turn"
        ],
        "title": "SessionMessageResponse",
        "type": "object"
      },
      "SessionMessageStatus": {
        "enum": [
          "pending",
          "delivered"
        ],
        "title": "SessionMessageStatus",
        "type": "string"
      },
      "SessionParent": {
        "description": "The predecessor session this session continues.",
        "properties": {
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the predecessor session this session continues, if any.",
            "title": "Session Id"
          }
        },
        "required": [
          "session_id"
        ],
        "title": "SessionParent",
        "type": "object"
      },
      "SessionPrEntry": {
        "properties": {
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "pull_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionPullRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviews": {
            "items": {
              "$ref": "#/components/schemas/SessionPullRequestReview"
            },
            "title": "Reviews",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "number",
          "url",
          "title",
          "pull_request",
          "reviews"
        ],
        "title": "SessionPrEntry",
        "type": "object"
      },
      "SessionPrompting": {
        "description": "The prompt-affordance projection. `enabled` answers \"would a send work\",\nand when it wouldn't, `blocked_reason` + `detail` say why.\n\n`surface_name` is set only for MENTION_SURFACE, naming where to reply.",
        "properties": {
          "blocked_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptBlockedReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "surface_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Name"
          }
        },
        "required": [
          "blocked_reason",
          "detail",
          "enabled",
          "surface_name"
        ],
        "title": "SessionPrompting",
        "type": "object"
      },
      "SessionPullRequest": {
        "properties": {
          "additions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additions"
          },
          "base": {
            "$ref": "#/components/schemas/SessionPullRequestBranch"
          },
          "changed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed Files"
          },
          "commits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commits"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deletions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletions"
          },
          "draft": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draft"
          },
          "head": {
            "$ref": "#/components/schemas/SessionPullRequestBranch"
          },
          "html_url": {
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "merged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Merged At"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "html_url",
          "state",
          "draft",
          "merged_at",
          "created_at",
          "updated_at",
          "head",
          "base"
        ],
        "title": "SessionPullRequest",
        "type": "object"
      },
      "SessionPullRequestBranch": {
        "properties": {
          "ref": {
            "title": "Ref",
            "type": "string"
          },
          "sha": {
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "ref",
          "sha"
        ],
        "title": "SessionPullRequestBranch",
        "type": "object"
      },
      "SessionPullRequestReview": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "html_url": {
            "title": "Html Url",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "submitted_at": {
            "format": "date-time",
            "title": "Submitted At",
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user",
          "body",
          "state",
          "html_url",
          "submitted_at"
        ],
        "title": "SessionPullRequestReview",
        "type": "object"
      },
      "SessionPullRequestSummary": {
        "description": "What a session list row says about a PR the session opened: the live\nstate and the size of the change, read from gh_prs at response time and\nlooked up by gh_pr_id (the identity \u2014 repo, number, url \u2014 rides on the\nsession's output_git). Counts are None until GitHub reports them.",
        "properties": {
          "additions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additions"
          },
          "changed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed Files"
          },
          "commits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commits"
          },
          "deletions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletions"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "status": {
            "enum": [
              "open",
              "draft",
              "merged",
              "closed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "commits",
          "changed_files",
          "additions",
          "deletions"
        ],
        "title": "SessionPullRequestSummary",
        "type": "object"
      },
      "SessionRecord": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ClaudeSessionRecord"
          },
          {
            "$ref": "#/components/schemas/ClaudeNativeSessionRecord"
          },
          {
            "$ref": "#/components/schemas/CodexSessionRecord"
          },
          {
            "$ref": "#/components/schemas/CodexAppServerSessionRecord"
          },
          {
            "$ref": "#/components/schemas/PlatformSessionRecord"
          },
          {
            "$ref": "#/components/schemas/UnknownSessionRecord"
          }
        ]
      },
      "SessionRecordSearchHit": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "record_type": {
            "title": "Record Type",
            "type": "string"
          },
          "snippet": {
            "title": "Snippet",
            "type": "string"
          },
          "stream_seq": {
            "title": "Stream Seq",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "stream_seq",
          "record_type",
          "created_at",
          "snippet"
        ],
        "title": "SessionRecordSearchHit",
        "type": "object"
      },
      "SessionRecordsListResponse": {
        "description": "A session's stored transcript records, plus its pending inbox\nmessages.",
        "properties": {
          "earliest_feed_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The retention head: the lowest feed_seq still stored, or null when the session has no stored records.",
            "title": "Earliest Feed Seq"
          },
          "has_more": {
            "default": false,
            "description": "Whether more results exist past this page.",
            "title": "Has More",
            "type": "boolean"
          },
          "messages": {
            "default": [],
            "description": "The open inbox slice (pending rows only): queued messages not yet consumed by a turn. Delivered history comes from the records themselves.",
            "items": {
              "$ref": "#/components/schemas/SessionMessage"
            },
            "title": "Messages",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` to fetch the next page. Null on the last page. Opaque \u2014 echo it back rather than parsing it.",
            "title": "Next Cursor"
          },
          "records": {
            "description": "The session's records (transcript + lifecycle), ordered by feed_seq. Clients render each by (source, record_format, record_type). Pagination is opt-in (`cursor` + `limit`); a bare call returns the full retained transcript.",
            "items": {
              "$ref": "#/components/schemas/SessionRecord"
            },
            "title": "Records",
            "type": "array"
          }
        },
        "required": [
          "records"
        ],
        "title": "SessionRecordsListResponse",
        "type": "object"
      },
      "SessionResponse": {
        "description": "One session.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/Session",
            "description": "The session."
          }
        },
        "required": [
          "session"
        ],
        "title": "SessionResponse",
        "type": "object"
      },
      "SessionSearchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/SessionSearchResult"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "title": "SessionSearchResponse",
        "type": "object"
      },
      "SessionSearchResult": {
        "properties": {
          "matched": {
            "items": {
              "type": "string"
            },
            "title": "Matched",
            "type": "array"
          },
          "recap_snippet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recap Snippet"
          },
          "record_hit_count": {
            "title": "Record Hit Count",
            "type": "integer"
          },
          "record_hits": {
            "items": {
              "$ref": "#/components/schemas/SessionRecordSearchHit"
            },
            "title": "Record Hits",
            "type": "array"
          },
          "session": {
            "$ref": "#/components/schemas/Session"
          }
        },
        "required": [
          "session",
          "matched",
          "recap_snippet",
          "record_hits",
          "record_hit_count"
        ],
        "title": "SessionSearchResult",
        "type": "object"
      },
      "SessionSearchScope": {
        "description": "What text a search query is matched against: the session log's record\ntext, the session recaps (summaries), or both.",
        "enum": [
          "records",
          "recaps",
          "both"
        ],
        "title": "SessionSearchScope",
        "type": "string"
      },
      "SessionSource": {
        "description": "Where a session came from: the credential that started it (web app,\nAPI key, CLI) or the trigger that fired (react, mention, cron, code\nreview). Never taken from a request body.",
        "enum": [
          "react",
          "code_review",
          "web",
          "api",
          "cli",
          "mention",
          "cron"
        ],
        "title": "SessionSource",
        "type": "string"
      },
      "SessionSpendItem": {
        "properties": {
          "charged_millicents": {
            "default": 0,
            "title": "Charged Millicents",
            "type": "integer"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "rated_millicents": {
            "default": 0,
            "title": "Rated Millicents",
            "type": "integer"
          },
          "tokens": {
            "default": 0,
            "title": "Tokens",
            "type": "integer"
          }
        },
        "required": [
          "key",
          "label"
        ],
        "title": "SessionSpendItem",
        "type": "object"
      },
      "SessionState": {
        "description": "Whether the conversation can still take messages. `closed` is permanent:\na session with interactive false closes when its turn ends, and a conversation closes\nafter its closing message's turn.",
        "enum": [
          "open",
          "closed"
        ],
        "title": "SessionState",
        "type": "string"
      },
      "SessionStopped": {
        "description": "When a stop was requested and the GitHub user who requested it.",
        "properties": {
          "at": {
            "description": "When a stop was requested.",
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user who stopped the session, resolved at read time. Null if the user is unknown or unavailable."
          }
        },
        "required": [
          "at",
          "by"
        ],
        "title": "SessionStopped",
        "type": "object"
      },
      "SessionSummary": {
        "description": "A live one-line summary of what the session is doing, refreshed\nevery few steps while it runs.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When this summary line was generated. Null on summaries written before generation time was tracked.",
            "title": "Created At"
          },
          "description": {
            "description": "One-line description of what the session is doing.",
            "title": "Description",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "description"
        ],
        "title": "SessionSummary",
        "type": "object"
      },
      "SessionTokens": {
        "description": "The token counts a session (or turn) spent, and the model they went to.\n\n`total` INCLUDES the cache lanes, unlike the old flat `tokens_total` which\ncounted input+output+thinking only and left callers to add cache reads and\nwrites back themselves (the deleted `tokensTotalAll` helper). Cache tokens\ndominate an agent run's token bill, so a \"total\" that omits them is the\nwrong default and produced two competing totals in the dashboard.",
        "properties": {
          "cache_creation": {
            "default": 0,
            "description": "Tokens written to the prompt cache.",
            "title": "Cache Creation",
            "type": "integer"
          },
          "cache_read": {
            "default": 0,
            "description": "Tokens read from the prompt cache.",
            "title": "Cache Read",
            "type": "integer"
          },
          "input": {
            "default": 0,
            "description": "Input tokens used.",
            "title": "Input",
            "type": "integer"
          },
          "model": {
            "default": "",
            "description": "The model the token counts are attributed to.",
            "title": "Model",
            "type": "string"
          },
          "output": {
            "default": 0,
            "description": "Output tokens used.",
            "title": "Output",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "description": "Total tokens consumed, INCLUDING the prompt-cache reads and writes \u2014 the same basis the token cost is priced on.",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "cache_creation",
          "cache_read",
          "input",
          "model",
          "output",
          "total"
        ],
        "title": "SessionTokens",
        "type": "object"
      },
      "SessionToolCount": {
        "properties": {
          "calls": {
            "title": "Calls",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "calls"
        ],
        "title": "SessionToolCount",
        "type": "object"
      },
      "SessionTurn": {
        "description": "One message and the agent's answer to it. A turn is `pending` from the\nmoment its message is received until the agent starts on it, `running`\nwhile the agent works, then `completed`, `failed`, `stopped`, or\n`cancelled`.",
        "properties": {
          "cost": {
            "$ref": "#/components/schemas/SessionCost",
            "description": "What the turn cost so far, in millicents, broken down by leg."
          },
          "created_at": {
            "description": "When the turn's message was received.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A human-readable explanation of a failed, stopped, or cancelled turn.",
            "title": "Detail"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the turn reached its final status.",
            "title": "Ended At"
          },
          "id": {
            "description": "Unique identifier of the turn.",
            "title": "Id",
            "type": "string"
          },
          "index": {
            "description": "Position in the session, starting at 0.",
            "title": "Index",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TurnReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the turn failed or was cancelled; null on every other status."
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the agent started on the message.",
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/TurnStatus",
            "description": "Where the turn is."
          },
          "stopped": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionStopped"
              },
              {
                "type": "null"
              }
            ],
            "description": "When and by whom a stop was requested; null when none was."
          },
          "tokens": {
            "$ref": "#/components/schemas/SessionTokens",
            "description": "The tokens the turn spent and the model they went to."
          }
        },
        "required": [
          "cost",
          "created_at",
          "detail",
          "ended_at",
          "id",
          "index",
          "reason",
          "started_at",
          "status",
          "stopped",
          "tokens"
        ],
        "title": "SessionTurn",
        "type": "object"
      },
      "SessionTurnResponse": {
        "description": "One turn.",
        "properties": {
          "turn": {
            "$ref": "#/components/schemas/SessionTurn",
            "description": "The turn."
          }
        },
        "required": [
          "turn"
        ],
        "title": "SessionTurnResponse",
        "type": "object"
      },
      "SessionTurnsListResponse": {
        "description": "A session's turns and its whole inbox, oldest first.",
        "properties": {
          "messages": {
            "description": "Every message, delivered and pending, oldest first.",
            "items": {
              "$ref": "#/components/schemas/SessionMessage"
            },
            "title": "Messages",
            "type": "array"
          },
          "turns": {
            "description": "Every turn, ordered by index.",
            "items": {
              "$ref": "#/components/schemas/SessionTurn"
            },
            "title": "Turns",
            "type": "array"
          }
        },
        "required": [
          "turns",
          "messages"
        ],
        "title": "SessionTurnsListResponse",
        "type": "object"
      },
      "SessionUsageBucket": {
        "properties": {
          "cache_read_tokens": {
            "default": 0,
            "title": "Cache Read Tokens",
            "type": "integer"
          },
          "cache_write_tokens": {
            "default": 0,
            "title": "Cache Write Tokens",
            "type": "integer"
          },
          "charged_millicents": {
            "default": 0,
            "title": "Charged Millicents",
            "type": "integer"
          },
          "date": {
            "format": "date-time",
            "title": "Date",
            "type": "string"
          },
          "input_tokens": {
            "default": 0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "title": "Output Tokens",
            "type": "integer"
          },
          "requests": {
            "default": 0,
            "title": "Requests",
            "type": "integer"
          }
        },
        "required": [
          "date"
        ],
        "title": "SessionUsageBucket",
        "type": "object"
      },
      "SessionsListResponse": {
        "description": "A page of sessions in the lean wire shape.",
        "properties": {
          "has_more": {
            "default": false,
            "description": "Whether more results exist past this page.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` to fetch the next page. Null on the last page. Opaque \u2014 echo it back rather than parsing it.",
            "title": "Next Cursor"
          },
          "pull_requests": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SessionPullRequestSummary"
            },
            "title": "Pull Requests",
            "type": "object"
          },
          "sessions": {
            "description": "Lean wire rows \u2014 the same shape GET /v1/sessions/{id} and the stream's session frames carry. The heavy blobs (config snapshot, input/output) live on the detail endpoints.",
            "items": {
              "$ref": "#/components/schemas/Session"
            },
            "title": "Sessions",
            "type": "array"
          },
          "turn_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Turn Counts",
            "type": "object"
          }
        },
        "required": [
          "sessions"
        ],
        "title": "SessionsListResponse",
        "type": "object"
      },
      "SettingsRef-Input": {
        "additionalProperties": false,
        "description": "A config-declared Claude Code settings.json, resolved at run start and\npassed to `claude --settings <path>`. That is the CLI settings tier \u2014 BELOW\nEllipsis's managed-settings.json floor \u2014 so it customizes behavior (model\npermissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a\nsecurity setting. Lets a team point the cloud agent at the same settings file\nthey already use with Claude Code locally instead of re-encoding it as YAML.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepositoryRef-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path"
        ],
        "title": "SettingsRef",
        "type": "object"
      },
      "SettingsRef-Output": {
        "additionalProperties": false,
        "description": "A config-declared Claude Code settings.json, resolved at run start and\npassed to `claude --settings <path>`. That is the CLI settings tier \u2014 BELOW\nEllipsis's managed-settings.json floor \u2014 so it customizes behavior (model\npermissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a\nsecurity setting. Lets a team point the cloud agent at the same settings file\nthey already use with Claude Code locally instead of re-encoding it as YAML.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepositoryRef-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path",
          "repository"
        ],
        "title": "SettingsRef",
        "type": "object"
      },
      "SkillRef-Input": {
        "additionalProperties": false,
        "description": "A repository directory containing SKILL.md and supporting UTF-8 files.\nResolved at run start and installed in the selected harness's skill directory.\nExplicit skill references require a model with the skills capability.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepositoryRef-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path"
        ],
        "title": "SkillRef",
        "type": "object"
      },
      "SkillRef-Output": {
        "additionalProperties": false,
        "description": "A repository directory containing SKILL.md and supporting UTF-8 files.\nResolved at run start and installed in the selected harness's skill directory.\nExplicit skill references require a model with the skills capability.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepositoryRef-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path",
          "repository"
        ],
        "title": "SkillRef",
        "type": "object"
      },
      "SlackChannel": {
        "description": "One channel in the connected Slack workspace.",
        "properties": {
          "id": {
            "description": "The Slack channel id.",
            "title": "Id",
            "type": "string"
          },
          "is_member": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the Ellipsis app is a member of the channel.",
            "title": "Is Member"
          },
          "is_private": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the channel is private.",
            "title": "Is Private"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The channel name.",
            "title": "Name"
          }
        },
        "required": [
          "id"
        ],
        "title": "SlackChannel",
        "type": "object"
      },
      "SlackChannelCreatedEvent": {
        "properties": {
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "type": {
            "const": "slack.channel_created",
            "default": "slack.channel_created",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "actor",
          "channel_id",
          "channel_name",
          "type",
          "url"
        ],
        "title": "SlackChannelCreatedEvent",
        "type": "object"
      },
      "SlackChannelsListResponse": {
        "description": "The channels the Ellipsis app can see in the connected Slack\nworkspace.",
        "properties": {
          "channels": {
            "description": "The workspace's channels.",
            "items": {
              "$ref": "#/components/schemas/SlackChannel"
            },
            "title": "Channels",
            "type": "array"
          },
          "team_id": {
            "description": "The Slack workspace (team) id.",
            "title": "Team Id",
            "type": "string"
          },
          "team_name": {
            "description": "The Slack workspace name.",
            "title": "Team Name",
            "type": "string"
          }
        },
        "required": [
          "team_id",
          "team_name",
          "channels"
        ],
        "title": "SlackChannelsListResponse",
        "type": "object"
      },
      "SlackConfig": {
        "additionalProperties": false,
        "description": "A single integration session, with filters separate from the session settings.",
        "properties": {
          "ellipsis": {
            "$ref": "#/components/schemas/SlackConfigEllipsis"
          },
          "session": {
            "$ref": "#/components/schemas/IntegrationSessionConfig"
          },
          "slack": {
            "$ref": "#/components/schemas/SlackRoutes"
          }
        },
        "required": [
          "ellipsis",
          "slack",
          "session"
        ],
        "title": "SlackConfig",
        "type": "object"
      },
      "SlackConfigEllipsis": {
        "additionalProperties": false,
        "description": "The product namespace of a Slack routing file, with an explicit kind.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "kind": {
            "const": "slack",
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ConfigMetadata-Output",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "SlackConfigEllipsis",
        "type": "object"
      },
      "SlackHandler": {
        "description": "The account's slack.yaml handler.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SlackConfig",
            "description": "The last valid slack.yaml definition."
          },
          "created_at": {
            "description": "When the handler was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub account that last edited the handler, when known."
          },
          "id": {
            "description": "Unique identifier of the saved handler.",
            "title": "Id",
            "type": "string"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest recorded sync error, or null after a successful sync. A failed update preserves the last valid config and raw_yaml.",
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The commit associated with the latest recorded sync attempt. When last_sync_error is set, this may be the rejected revision rather than the revision of config and raw_yaml.",
            "title": "Last Synced Commit Sha"
          },
          "managed_by": {
            "const": "github",
            "default": "github",
            "description": "Handlers are managed by editing their files in GitHub.",
            "title": "Managed By",
            "type": "string"
          },
          "raw_yaml": {
            "description": "The original YAML of the last valid handler definition.",
            "title": "Raw Yaml",
            "type": "string"
          },
          "service": {
            "const": "slack",
            "default": "slack",
            "title": "Service",
            "type": "string"
          },
          "sha": {
            "description": "Content fingerprint of the last valid handler definition.",
            "title": "Sha",
            "type": "string"
          },
          "source_details": {
            "$ref": "#/components/schemas/GithubSourceDetails",
            "description": "The repository, path, and branch the handler syncs from."
          },
          "updated_at": {
            "description": "When the saved record was last updated, including failed syncs.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sha",
          "created_at",
          "updated_at",
          "raw_yaml",
          "source_details",
          "config"
        ],
        "title": "SlackHandler",
        "type": "object"
      },
      "SlackHelpChannel": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "id"
        ],
        "title": "SlackHelpChannel",
        "type": "object"
      },
      "SlackHelpInvite": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "joined_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Joined At"
          },
          "resend_available_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resend Available At"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "enum": [
              "sending",
              "sent",
              "accepted",
              "approval_pending",
              "joined",
              "failed",
              "expired",
              "declined",
              "unknown"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "email",
          "status"
        ],
        "title": "SlackHelpInvite",
        "type": "object"
      },
      "SlackHelpRequest": {
        "properties": {
          "emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "maxItems": 10,
            "minItems": 1,
            "title": "Emails",
            "type": "array"
          },
          "resend": {
            "description": "Explicitly resend an existing invitation after its cooldown. Accepted and joined invitations are not resent.",
            "title": "Resend",
            "type": "boolean"
          }
        },
        "required": [
          "emails"
        ],
        "title": "SlackHelpRequest",
        "type": "object"
      },
      "SlackHelpResponse": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/SlackHelpChannel"
          },
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/SlackHelpInvite"
            },
            "title": "Invitations",
            "type": "array"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          },
          "status": {
            "default": "unknown",
            "enum": [
              "pending",
              "connected",
              "archived",
              "unknown"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "ok",
          "channel"
        ],
        "title": "SlackHelpResponse",
        "type": "object"
      },
      "SlackIntegrationSummary": {
        "description": "The account's connected Slack workspace.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "operations_channel_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The channel configured as the operations channel, if one is set.",
            "title": "Operations Channel Id"
          },
          "team_id": {
            "description": "The Slack workspace (team) id.",
            "title": "Team Id",
            "type": "string"
          },
          "team_name": {
            "description": "The Slack workspace name.",
            "title": "Team Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "title": "SlackIntegrationSummary",
        "type": "object"
      },
      "SlackMember": {
        "description": "A human member of the connected Slack workspace. `github` is set when\nthis user is linked to a GitHub account.",
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's display name, if set.",
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's email, if visible.",
            "title": "Email"
          },
          "github": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkedGithubIdentity"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub identity linked to this member, when one is known."
          },
          "id": {
            "description": "The member's Slack user id.",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's Slack username.",
            "title": "Name"
          },
          "real_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's real name, if set.",
            "title": "Real Name"
          }
        },
        "required": [
          "id"
        ],
        "title": "SlackMember",
        "type": "object"
      },
      "SlackMembersListResponse": {
        "description": "The human members of the connected Slack workspace (bots excluded).",
        "properties": {
          "members": {
            "description": "The workspace's human members.",
            "items": {
              "$ref": "#/components/schemas/SlackMember"
            },
            "title": "Members",
            "type": "array"
          },
          "team_id": {
            "description": "The Slack workspace (team) id.",
            "title": "Team Id",
            "type": "string"
          },
          "team_name": {
            "description": "The Slack workspace name.",
            "title": "Team Name",
            "type": "string"
          }
        },
        "required": [
          "team_id",
          "team_name",
          "members"
        ],
        "title": "SlackMembersListResponse",
        "type": "object"
      },
      "SlackMessageEvent": {
        "properties": {
          "action": {
            "enum": [
              "message",
              "app_mention"
            ],
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionEventActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "message_ts": {
            "title": "Message Ts",
            "type": "string"
          },
          "thread_ts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread Ts"
          },
          "type": {
            "const": "slack.message",
            "default": "slack.message",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "channel_id",
          "channel_name",
          "message_ts",
          "thread_ts",
          "type",
          "url"
        ],
        "title": "SlackMessageEvent",
        "type": "object"
      },
      "SlackRoutes": {
        "additionalProperties": false,
        "description": "Which Slack conversations one agent answers.\n\n`channels` names channels (`\"#engineering\"`, or bare `engineering`);\n`direct_messages` names the GitHub logins whose DMs this agent takes. `\"*\"` on\neither means every one of them.\n\nAt least one axis must be set. An entry claiming nothing would be a config a\ncustomer wrote, committed, and that answers nowhere \u2014 the silent-config\nfailure this file exists to avoid.",
        "properties": {
          "channels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "direct_messages": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Direct Messages",
            "type": "array"
          }
        },
        "title": "SlackRoutes",
        "type": "object"
      },
      "StartAgentSessionRequest": {
        "additionalProperties": false,
        "description": "Start a session from a saved agent. The body takes the fields of POST\n/v1/sessions, all optional, plus `input`. The session starts from the\nagent's `session` settings: each field you send replaces the agent's value for that field,\nand each field you leave out keeps it. Lists, maps such as `metadata`, and\n`environment` are replaced whole, never merged, and naming the other\nharness replaces the agent's harness. `input` is required when the agent\ndeclares `input.json_schema` and rejected when it doesn't. Extra keys are a\n422.",
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunBudget"
              },
              {
                "type": "null"
              }
            ],
            "description": "Spend limit for this session: `session` is the most it may spend, in US dollars. Omitted, an agent session keeps the agent's limit and a raw session takes the organization's default. Above the organization's per-session ceiling is a 400. `day`, `week`, and `month` are agent-wide limits and are rejected with a 422."
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeOverrides"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code options for this session. Sent fields replace the agent's; naming Claude Code on a Codex agent replaces its harness and requires a model. Set at most one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexOverrides"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex options for this session. Sent fields replace the agent's; naming Codex on a Claude Code agent replaces its harness and requires a model. Set at most one of claude_code or codex."
          },
          "conversation": {
            "$ref": "#/components/schemas/SessionConversationConfig-Input",
            "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. State, warmth, prompting, and the turn are server-owned response fields."
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/EnvironmentConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the session runs. A STRING is a saved environment's name or `env_...` id, substituted wholesale. An OBJECT is the whole environment for this session, and `{}` is the bare environment. Nothing is merged: what you send is the whole environment. Omitted, a raw session runs in the built-in basic environment and an agent session keeps the agent's own environment.",
            "title": "Environment"
          },
          "force_rebuild": {
            "description": "Skip the image cache for this session's initial provision: a fresh full build whose snapshot then refreshes the cache for later sessions. The CLI's `--rebuild`.",
            "title": "Force Rebuild",
            "type": "boolean"
          },
          "images": {
            "description": "Images attached to the first message, base64 inline. Requires the model's images capability, which is not currently certified. Each becomes an `[Image #N]` placeholder in the prompt and an image block on turn 0. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
            "items": {
              "$ref": "#/components/schemas/ImageAttachment"
            },
            "title": "Images",
            "type": "array"
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The typed payload for an agent that declares input.json_schema. Required when the agent declares a schema; rejected when it does not. Validated against the schema and rendered through input.message, or as formatted JSON if no template is set, and added after the prompt. The rendered message must be non-empty.",
            "title": "Input"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Arbitrary string key/value metadata stored on the session. On an agent session it replaces the agent's metadata; keys are never merged.",
            "title": "Metadata",
            "type": "object"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "The structured-output exit contract for this session."
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PermissionsConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the session may touch, per minted credential."
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillRef-Input"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Skills installed for this session.",
            "title": "Skills"
          }
        },
        "title": "StartAgentSessionRequest",
        "type": "object"
      },
      "StartCliAuthResponse": {
        "description": "A freshly minted device-code flow: show the user code (or open the\ncomplete URI) and poll with the device code.",
        "properties": {
          "device_code": {
            "description": "The secret the CLI polls with. Never shown to the human.",
            "title": "Device Code",
            "type": "string"
          },
          "expires_in": {
            "description": "Seconds until the flow expires and a new one must be started.",
            "title": "Expires In",
            "type": "integer"
          },
          "interval": {
            "description": "Minimum seconds to wait between polls.",
            "title": "Interval",
            "type": "integer"
          },
          "user_code": {
            "description": "The short code the human enters (or confirms) in the dashboard.",
            "title": "User Code",
            "type": "string"
          },
          "verification_uri": {
            "description": "The dashboard page where the human approves the flow.",
            "title": "Verification Uri",
            "type": "string"
          },
          "verification_uri_complete": {
            "description": "The approval page with the user code pre-filled \u2014 open this directly.",
            "title": "Verification Uri Complete",
            "type": "string"
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "interval",
          "expires_in"
        ],
        "title": "StartCliAuthResponse",
        "type": "object"
      },
      "StartSessionRequest": {
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "claude_code": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "codex": {
                    "type": "null"
                  }
                },
                "required": [
                  "claude_code"
                ]
              },
              {
                "properties": {
                  "claude_code": {
                    "type": "null"
                  },
                  "codex": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "codex"
                ]
              }
            ]
          }
        ],
        "description": "Parameters for starting a raw session: where it runs, its first\nmessage, and the session's own settings. Flat, in the AgentConfig\nvocabulary: the `session:` block of an agent file pastes in as the request\nbody, except that the agent-wide `budget.day`, `week`, and `month` are\nrejected here. There is no agent behind a raw session; to start a\nsession from a saved agent, use POST /v1/agents/{agent_id}/sessions.\n\nExtra keys are a 422, not silently dropped: a retired field\n(`from_config_id`, `input`, `ellipsis`, `config_id`, `repositories`) must\nfail loudly on an old client, never no-op.",
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunBudget"
              },
              {
                "type": "null"
              }
            ],
            "description": "Spend limit for this session: `session` is the most it may spend, in US dollars. Omitted, an agent session keeps the agent's limit and a raw session takes the organization's default. Above the organization's per-session ceiling is a 400. `day`, `week`, and `month` are agent-wide limits and are rejected with a 422."
          },
          "claude_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClaudeConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CodexConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Codex input and native options. Set exactly one of claude_code or codex."
          },
          "conversation": {
            "$ref": "#/components/schemas/SessionConversationConfig-Input",
            "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. State, warmth, prompting, and the turn are server-owned response fields."
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/EnvironmentConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the session runs. A STRING is a saved environment's name or `env_...` id, substituted wholesale. An OBJECT is the whole environment for this session, and `{}` is the bare environment. Nothing is merged: what you send is the whole environment. Omitted, a raw session runs in the built-in basic environment and an agent session keeps the agent's own environment.",
            "title": "Environment"
          },
          "force_rebuild": {
            "description": "Skip the image cache for this session's initial provision: a fresh full build whose snapshot then refreshes the cache for later sessions. The CLI's `--rebuild`.",
            "title": "Force Rebuild",
            "type": "boolean"
          },
          "images": {
            "description": "Images attached to the first message, base64 inline. Requires the model's images capability, which is not currently certified. Each becomes an `[Image #N]` placeholder in the prompt and an image block on turn 0. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
            "items": {
              "$ref": "#/components/schemas/ImageAttachment"
            },
            "title": "Images",
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Arbitrary string key/value metadata stored on the session. On an agent session it replaces the agent's metadata; keys are never merged.",
            "title": "Metadata",
            "type": "object"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "The structured-output exit contract for this session."
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PermissionsConfig-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the session may touch, per minted credential."
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillRef-Input"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Skills installed for this session.",
            "title": "Skills"
          }
        },
        "title": "StartSessionRequest",
        "type": "object"
      },
      "StreamTicketResponse": {
        "description": "Open ws_url with ?ticket=<ticket> within 60 seconds.\n\nA ticket is bound to this stream and the issuing credential. The server\nchecks current authorization again when the WebSocket connects.",
        "properties": {
          "ticket": {
            "title": "Ticket",
            "type": "string"
          },
          "ws_url": {
            "title": "Ws Url",
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "ws_url"
        ],
        "title": "StreamTicketResponse",
        "type": "object"
      },
      "SubscriptionOverage": {
        "description": "The plan's paid overage balance, when it has one.",
        "properties": {
          "disabled_reason": {
            "default": "",
            "description": "Why overage is unavailable, in the provider's own words. Empty when it is available or no reason was given.",
            "title": "Disabled Reason",
            "type": "string"
          },
          "in_use": {
            "default": false,
            "description": "Whether calls are currently being served from the overage balance rather than the included windows.",
            "title": "In Use",
            "type": "boolean"
          },
          "resets_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the overage period rolls over. Null when not reported.",
            "title": "Resets At"
          },
          "status": {
            "default": "",
            "description": "The provider's verdict on the overage balance itself: `allowed`, `allowed_warning`, or `rejected`. Empty when not reported.",
            "title": "Status",
            "type": "string"
          },
          "surpassed_threshold": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the provider marks the overage balance as nearly spent. Null when not reported.",
            "title": "Surpassed Threshold"
          },
          "utilization": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fraction of the overage balance spent this period, 0 to 1. Null when not reported.",
            "title": "Utilization"
          }
        },
        "title": "SubscriptionOverage",
        "type": "object"
      },
      "SubscriptionProvider": {
        "description": "Named for the harness the token drives, not the vendor behind it: a\ndeveloper connects \"my Claude subscription\", and the path segment they\ntype is `claude`.",
        "enum": [
          "claude",
          "codex"
        ],
        "title": "SubscriptionProvider",
        "type": "string"
      },
      "SubscriptionToken": {
        "description": "One provider's subscription token, as the API publishes it. The token\nitself is never here \u2014 the store is write-only.",
        "properties": {
          "configured": {
            "default": false,
            "description": "Whether a token is saved for this provider. False means nothing is stored and the other fields are empty.",
            "title": "Configured",
            "type": "boolean"
          },
          "enabled": {
            "default": false,
            "description": "Whether the token is routing. Only a successful verify sets it; a failed verify clears it, so a revoked token stops routing.",
            "title": "Enabled",
            "type": "boolean"
          },
          "provider": {
            "$ref": "#/components/schemas/SubscriptionProvider",
            "description": "The harness the token drives."
          },
          "token_last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last four characters of the stored token, for display. The token itself is never returned.",
            "title": "Token Last4"
          }
        },
        "required": [
          "provider"
        ],
        "title": "SubscriptionToken",
        "type": "object"
      },
      "SubscriptionTokensListResponse": {
        "description": "Every provider, whether or not a token is saved for it.",
        "properties": {
          "tokens": {
            "description": "One entry per supported provider, in a stable order.",
            "items": {
              "$ref": "#/components/schemas/SubscriptionToken"
            },
            "title": "Tokens",
            "type": "array"
          }
        },
        "required": [
          "tokens"
        ],
        "title": "SubscriptionTokensListResponse",
        "type": "object"
      },
      "SubscriptionUsage": {
        "description": "The plan's last-observed rate-limit state.\n\nDisplay-only. Nothing routes, retries, or falls back on it, and it is only\nas fresh as the developer's last call through Ellipsis (`observed_at`) \u2014\nClaude Code run locally on the same plan moves the real windows without us\nseeing them.",
        "properties": {
          "five_hour": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionUsageWindow"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rolling five-hour session window."
          },
          "observed_at": {
            "description": "When the response carrying these windows was received.",
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "overage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionOverage"
              },
              {
                "type": "null"
              }
            ],
            "description": "The paid overage balance the plan draws from once its included windows are exhausted. Null for a plan with no overage."
          },
          "representative_claim": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which window the provider considers binding right now, e.g. `five_hour`. Null when not reported.",
            "title": "Representative Claim"
          },
          "seven_day": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionUsageWindow"
              },
              {
                "type": "null"
              }
            ],
            "description": "The weekly cap."
          },
          "status": {
            "description": "The provider's own verdict on the plan right now: `allowed`, `allowed_warning`, or `rejected`.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "observed_at"
        ],
        "title": "SubscriptionUsage",
        "type": "object"
      },
      "SubscriptionUsageResponse": {
        "description": "The usage reading, or nothing to show.",
        "properties": {
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionUsage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when no token is enabled for the provider, or when nothing has been observed yet."
          }
        },
        "title": "SubscriptionUsageResponse",
        "type": "object"
      },
      "SubscriptionUsageWindow": {
        "description": "One rate-limit window of the developer's plan.",
        "properties": {
          "resets_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the window rolls over and the allowance is restored. Null when the provider did not report it.",
            "title": "Resets At"
          },
          "surpassed_threshold": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the provider marks this window as nearly spent. Null when it did not report it, which is not the same as false.",
            "title": "Surpassed Threshold"
          },
          "utilization": {
            "description": "Fraction of the window consumed, 0 to 1.",
            "title": "Utilization",
            "type": "number"
          }
        },
        "required": [
          "utilization"
        ],
        "title": "SubscriptionUsageWindow",
        "type": "object"
      },
      "TokenRevokedResponse": {
        "properties": {
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          }
        },
        "title": "TokenRevokedResponse",
        "type": "object"
      },
      "TokensInfo": {
        "additionalProperties": false,
        "description": "Token/cost usage, per record (one API call's counts, aggregate fields at\ntheir zero defaults) or aggregated per turn/session\n(compute_spend_from_records derives num_turns and cost_usd).\n\nStrict on purpose: this is our own persisted schema, so an unknown key is a\nwriter bug (the num_turns=0 bug shipped because a Claude Code usage dict\nvalidated leniently against this model, silently zeroing every\nnon-overlapping field). Legacy keys were dropped from persisted blobs by\nthe 2026-07-26 tokens_info migration; per-model usage (CC's modelUsage,\nverbatim) is stored separately, not here.",
        "properties": {
          "cache_creation_input_tokens": {
            "default": 0,
            "title": "Cache Creation Input Tokens",
            "type": "integer"
          },
          "cache_read_input_tokens": {
            "default": 0,
            "title": "Cache Read Input Tokens",
            "type": "integer"
          },
          "cost_usd": {
            "default": 0,
            "title": "Cost Usd",
            "type": "number"
          },
          "input_tokens": {
            "default": 0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "num_turns": {
            "default": 0,
            "title": "Num Turns",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "title": "Output Tokens",
            "type": "integer"
          }
        },
        "title": "TokensInfo",
        "type": "object"
      },
      "TranscriptIngestResult": {
        "properties": {
          "completed_turns": {
            "title": "Completed Turns",
            "type": "integer"
          },
          "ingested": {
            "title": "Ingested",
            "type": "integer"
          },
          "next_offset": {
            "title": "Next Offset",
            "type": "integer"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          }
        },
        "required": [
          "ingested",
          "skipped",
          "next_offset",
          "completed_turns"
        ],
        "title": "TranscriptIngestResult",
        "type": "object"
      },
      "TurnEndedPayload": {
        "additionalProperties": true,
        "description": "turn_ended: the turn reached its final status. `status`, `reason`, and\n`detail` match the turn on the session object.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "turn_id": {
            "title": "Turn Id",
            "type": "string"
          },
          "turn_index": {
            "title": "Turn Index",
            "type": "integer"
          }
        },
        "required": [
          "turn_id",
          "turn_index",
          "status"
        ],
        "title": "TurnEndedPayload",
        "type": "object"
      },
      "TurnEndedRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/TurnEndedPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "turn_ended",
            "default": "turn_ended",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "TurnEndedRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "TurnReason": {
        "description": "Why a turn failed or was cancelled. Null on every other outcome.",
        "enum": [
          "error",
          "tool_call_failed",
          "budget_hit",
          "payment_required",
          "blocked",
          "contact_email_required",
          "lifecycle_hook_failed",
          "missing_repo_access",
          "missing_token_permissions",
          "missing_environment_variables",
          "missing_github_integration",
          "agent_unavailable",
          "upstream_unavailable",
          "unsupported_configuration",
          "execution_disabled",
          "interrupted"
        ],
        "title": "TurnReason",
        "type": "string"
      },
      "TurnStartedPayload": {
        "additionalProperties": true,
        "description": "turn_started: the agent started on the turn's message.",
        "properties": {
          "turn_id": {
            "title": "Turn Id",
            "type": "string"
          },
          "turn_index": {
            "title": "Turn Index",
            "type": "integer"
          }
        },
        "required": [
          "turn_id",
          "turn_index"
        ],
        "title": "TurnStartedPayload",
        "type": "object"
      },
      "TurnStartedRecord": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "platform",
            "default": "platform",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "$ref": "#/components/schemas/TurnStartedPayload"
          },
          "record_format": {
            "const": "ellipsis_lifecycle@1",
            "default": "ellipsis_lifecycle@1",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "const": "turn_started",
            "default": "turn_started",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "const": "lifecycle",
            "default": "lifecycle",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "TurnStartedRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "TurnStatus": {
        "description": "Where one turn is: queued for an agent, being answered, or over.\n\n`pending` covers everything before the agent starts on the message: queued\nbehind another turn, waiting to start, or preparing the environment.\n`stopped` and `cancelled` are their own outcomes; `reason` explains a\n`failed` or `cancelled` turn.",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed",
          "stopped",
          "cancelled"
        ],
        "title": "TurnStatus",
        "type": "string"
      },
      "UninstallGithubAppRequest": {
        "properties": {
          "confirm_account_login": {
            "title": "Confirm Account Login",
            "type": "string"
          }
        },
        "required": [
          "confirm_account_login"
        ],
        "title": "UninstallGithubAppRequest",
        "type": "object"
      },
      "UnknownSessionRecord": {
        "description": "Unrecognized or unparseable payload; the complete original stays readable.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "feed_seq": {
            "description": "Position in the session feed and the stream's resume cursor.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "const": "unknown",
            "default": "unknown",
            "title": "Kind",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "record_format": {
            "description": "Original versioned payload format.",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "Original record type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_id": {
            "description": "Session containing this record.",
            "title": "Session Id",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Message this record receives, delivers, requeues, or echoes.",
            "title": "Session Message Id"
          },
          "source": {
            "description": "Original producer. Unknown producers remain readable as unknown records.",
            "title": "Source",
            "type": "string"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn containing this record, when applicable.",
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "session_message_id",
          "feed_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "tools",
          "tokens_info",
          "cost",
          "duration",
          "model",
          "created_at",
          "kind"
        ],
        "title": "UnknownSessionRecord",
        "type": "object",
        "x-ellipsis-preserve-payload": true
      },
      "UpdateAgentRequest": {
        "description": "A replacement definition for an agent managed through the API.",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentConfig-Input",
            "description": "The agent's new definition. Replaces the previous one wholesale \u2014 this is not a partial update."
          }
        },
        "required": [
          "agent"
        ],
        "title": "UpdateAgentRequest",
        "type": "object"
      },
      "UpdateEnvironmentRequest": {
        "description": "A replacement definition for an environment managed through the API.",
        "properties": {
          "environment": {
            "$ref": "#/components/schemas/EnvironmentDocument-Input",
            "description": "The environment's new definition. Replaces the previous one wholesale \u2014 this is not a partial update."
          }
        },
        "required": [
          "environment"
        ],
        "title": "UpdateEnvironmentRequest",
        "type": "object"
      },
      "UpdateLinearSettingsRequest": {
        "properties": {
          "teams": {
            "items": {
              "$ref": "#/components/schemas/LinearTeamUpdate"
            },
            "title": "Teams",
            "type": "array"
          }
        },
        "required": [
          "teams"
        ],
        "title": "UpdateLinearSettingsRequest",
        "type": "object"
      },
      "UpdateSessionRequest": {
        "additionalProperties": false,
        "description": "Set the session's archive state.",
        "properties": {
          "archived": {
            "description": "True to archive the session; false to unarchive it.",
            "title": "Archived",
            "type": "boolean"
          }
        },
        "required": [
          "archived"
        ],
        "title": "UpdateSessionRequest",
        "type": "object"
      },
      "UsageDailyPoint": {
        "description": "One day's usage: tokens split by type, and cost split into the four\nbilled categories. `tokens` is the sum of the four token types.",
        "properties": {
          "cost_cpu_millicents": {
            "description": "CPU cost this day, in millicents.",
            "title": "Cost Cpu Millicents",
            "type": "integer"
          },
          "cost_fee_millicents": {
            "description": "Platform fee this day, in millicents.",
            "title": "Cost Fee Millicents",
            "type": "integer"
          },
          "cost_memory_millicents": {
            "description": "Memory cost this day, in millicents.",
            "title": "Cost Memory Millicents",
            "type": "integer"
          },
          "cost_tokens_millicents": {
            "description": "LLM token cost this day, in millicents (1000 = $0.01).",
            "title": "Cost Tokens Millicents",
            "type": "integer"
          },
          "date": {
            "description": "The UTC day, formatted yyyy-MM-dd.",
            "title": "Date",
            "type": "string"
          },
          "tokens": {
            "description": "All tokens used this day \u2014 the sum of the four token types.",
            "title": "Tokens",
            "type": "integer"
          },
          "tokens_cache_creation": {
            "description": "Cache-creation tokens used this day.",
            "title": "Tokens Cache Creation",
            "type": "integer"
          },
          "tokens_cache_read": {
            "description": "Cache-read tokens used this day.",
            "title": "Tokens Cache Read",
            "type": "integer"
          },
          "tokens_input": {
            "description": "Input tokens used this day.",
            "title": "Tokens Input",
            "type": "integer"
          },
          "tokens_output": {
            "description": "Output tokens used this day.",
            "title": "Tokens Output",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "tokens",
          "tokens_input",
          "tokens_output",
          "tokens_cache_read",
          "tokens_cache_creation",
          "cost_tokens_millicents",
          "cost_cpu_millicents",
          "cost_memory_millicents",
          "cost_fee_millicents"
        ],
        "title": "UsageDailyPoint",
        "type": "object"
      },
      "UserPlan": {
        "properties": {
          "collaborators": {
            "title": "Collaborators",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "private_repos": {
            "title": "Private Repos",
            "type": "integer"
          },
          "space": {
            "title": "Space",
            "type": "integer"
          }
        },
        "required": [
          "collaborators",
          "name",
          "space",
          "private_repos"
        ],
        "title": "UserPlan",
        "type": "object"
      },
      "UserTokenApi": {
        "description": "A user token as shown in listings -- never includes the secret.",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "expires_at",
          "last_used_at",
          "revoked_at"
        ],
        "title": "UserTokenApi",
        "type": "object"
      },
      "VM": {
        "properties": {
          "id": {
            "description": "Freestyle VM ID, shared across session resumes.",
            "title": "Id",
            "type": "string"
          },
          "latest_execution": {
            "$ref": "#/components/schemas/VMExecutionResponse",
            "description": "Most recent execution using this machine; its timestamps and costs describe that execution."
          },
          "status": {
            "description": "Last recorded machine state. Failed provisioning may leave the state unknown.",
            "enum": [
              "starting",
              "running",
              "paused",
              "deleting",
              "deleted",
              "unknown"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "latest_execution"
        ],
        "title": "VM",
        "type": "object"
      },
      "VMExecutionResponse": {
        "properties": {
          "cache_tier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxCacheTier"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_sandbox_cpu": {
            "title": "Cost Sandbox Cpu",
            "type": "integer"
          },
          "cost_sandbox_memory": {
            "title": "Cost Sandbox Memory",
            "type": "integer"
          },
          "cpu": {
            "title": "Cpu",
            "type": "number"
          },
          "encrypted_ports": {
            "items": {
              "type": "integer"
            },
            "title": "Encrypted Ports",
            "type": "array"
          },
          "environment_variable_keys": {
            "items": {
              "type": "string"
            },
            "title": "Environment Variable Keys",
            "type": "array"
          },
          "failed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed At"
          },
          "hooks": {
            "$ref": "#/components/schemas/EnvironmentHooks-Output",
            "default": {}
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "memory_mib": {
            "title": "Memory Mib",
            "type": "integer"
          },
          "phase_timings": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Phase Timings",
            "type": "object"
          },
          "post_clone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Clone"
          },
          "post_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Start"
          },
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/SandboxRepository"
            },
            "title": "Repositories",
            "type": "array"
          },
          "running_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Running At"
          },
          "scheduled_at": {
            "format": "date-time",
            "title": "Scheduled At",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/SandboxSource"
          },
          "source_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Session Id"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxStatus"
          },
          "terminated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Terminated At"
          },
          "terminating_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Terminating At"
          },
          "timeout_seconds": {
            "title": "Timeout Seconds",
            "type": "integer"
          },
          "tunnels": {
            "items": {
              "$ref": "#/components/schemas/SandboxPort"
            },
            "title": "Tunnels",
            "type": "array"
          },
          "type": {
            "$ref": "#/components/schemas/SandboxType"
          },
          "unencrypted_ports": {
            "items": {
              "type": "integer"
            },
            "title": "Unencrypted Ports",
            "type": "array"
          }
        },
        "required": [
          "id",
          "scheduled_at",
          "running_at",
          "terminating_at",
          "terminated_at",
          "failed_at",
          "type",
          "source",
          "source_session_id",
          "repositories",
          "status",
          "tunnels",
          "post_start",
          "post_clone",
          "environment_variable_keys",
          "timeout_seconds",
          "cpu",
          "memory_mib",
          "unencrypted_ports",
          "encrypted_ports",
          "cost_sandbox_cpu",
          "cost_sandbox_memory",
          "phase_timings",
          "cache_tier"
        ],
        "title": "VMExecutionResponse",
        "type": "object"
      },
      "VMImageListResponse": {
        "properties": {
          "images": {
            "items": {
              "$ref": "#/components/schemas/VMImageResponse"
            },
            "title": "Images",
            "type": "array"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          }
        },
        "required": [
          "images",
          "next_offset"
        ],
        "title": "VMImageListResponse",
        "type": "object"
      },
      "VMImageResponse": {
        "properties": {
          "cache_key": {
            "description": "Opaque environment cache key, including tenant and build inputs.",
            "title": "Cache Key",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/SandboxRepository"
            },
            "title": "Repositories",
            "type": "array"
          },
          "snapshot_id": {
            "description": "Freestyle snapshot backing this reusable VM image.",
            "title": "Snapshot Id",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/VMImageSource"
          },
          "status": {
            "enum": [
              "ready",
              "expired"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "snapshot_id",
          "created_at",
          "expires_at",
          "status",
          "source",
          "repositories",
          "cache_key"
        ],
        "title": "VMImageResponse",
        "type": "object"
      },
      "VMImageSource": {
        "enum": [
          "provisioning",
          "refresh",
          "build"
        ],
        "title": "VMImageSource",
        "type": "string"
      },
      "VMListResponse": {
        "properties": {
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          },
          "vms": {
            "items": {
              "$ref": "#/components/schemas/VM"
            },
            "title": "Vms",
            "type": "array"
          }
        },
        "required": [
          "vms",
          "next_offset"
        ],
        "title": "VMListResponse",
        "type": "object"
      },
      "VMMetrics": {
        "description": "One CPU, memory, swap, and disk reading from inside a VM.",
        "properties": {
          "cpu_count": {
            "description": "CPUs available to the VM.",
            "title": "Cpu Count",
            "type": "number"
          },
          "cpu_percent": {
            "description": "Share of all CPUs in use over the 5 seconds before the reading, from 0 to 100.",
            "title": "Cpu Percent",
            "type": "number"
          },
          "disk_total_bytes": {
            "title": "Disk Total Bytes",
            "type": "integer"
          },
          "disk_used_bytes": {
            "description": "Used space on the root filesystem.",
            "title": "Disk Used Bytes",
            "type": "integer"
          },
          "memory_cache_bytes": {
            "description": "Memory holding cached file data.",
            "title": "Memory Cache Bytes",
            "type": "integer"
          },
          "memory_total_bytes": {
            "title": "Memory Total Bytes",
            "type": "integer"
          },
          "memory_used_bytes": {
            "description": "Memory in use, excluding memory the kernel can reclaim from its file cache.",
            "title": "Memory Used Bytes",
            "type": "integer"
          },
          "sampled_at": {
            "format": "date-time",
            "title": "Sampled At",
            "type": "string"
          },
          "swap_total_bytes": {
            "title": "Swap Total Bytes",
            "type": "integer"
          },
          "swap_used_bytes": {
            "title": "Swap Used Bytes",
            "type": "integer"
          }
        },
        "required": [
          "sampled_at",
          "cpu_percent",
          "cpu_count",
          "memory_used_bytes",
          "memory_total_bytes",
          "memory_cache_bytes",
          "swap_used_bytes",
          "swap_total_bytes",
          "disk_used_bytes",
          "disk_total_bytes"
        ],
        "title": "VMMetrics",
        "type": "object"
      },
      "VMMetricsResponse": {
        "properties": {
          "metrics": {
            "items": {
              "$ref": "#/components/schemas/VMMetrics"
            },
            "title": "Metrics",
            "type": "array"
          }
        },
        "required": [
          "metrics"
        ],
        "title": "VMMetricsResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VerifySubscriptionTokenResponse": {
        "description": "The outcome of a live call on the stored token.",
        "properties": {
          "message": {
            "description": "Why, in a sentence a developer can act on.",
            "title": "Message",
            "type": "string"
          },
          "ok": {
            "description": "Whether the token answered. True means it is now routing; false means it is not, and `enabled` has been cleared.",
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "message"
        ],
        "title": "VerifySubscriptionTokenResponse",
        "type": "object"
      },
      "Webhook": {
        "properties": {
          "activated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "const": "session.create",
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookDelivery"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "$ref": "#/components/schemas/WebhookState",
            "description": "unverified until a ping returns HTTP 200; pending until Ellipsis approves; active receives subscribed events. Read-only."
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "description",
          "state",
          "created_at",
          "updated_at",
          "verified_at",
          "activated_at"
        ],
        "title": "Webhook",
        "type": "object"
      },
      "WebhookConfigRequest": {
        "additionalProperties": false,
        "examples": [
          {
            "events": [
              "session.create"
            ],
            "url": "https://example.com/hooks"
          }
        ],
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "description": "Explicit event subscriptions. Currently only session.create is supported. Pings are sent independently of subscriptions.",
            "examples": [
              [
                "session.create"
              ]
            ],
            "items": {
              "const": "session.create",
              "type": "string"
            },
            "maxItems": 1,
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "url": {
            "description": "The single public HTTPS URL to receive signed POST requests. Changing it requires verification and approval again.",
            "examples": [
              "https://example.com/hooks"
            ],
            "maxLength": 2048,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookConfigRequest",
        "type": "object"
      },
      "WebhookDeliveriesListResponse": {
        "properties": {
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "title": "Deliveries",
            "type": "array"
          },
          "has_more": {
            "default": false,
            "description": "Whether more results exist past this page.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` to fetch the next page. Null on the last page. Opaque \u2014 echo it back rather than parsing it.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "deliveries"
        ],
        "title": "WebhookDeliveriesListResponse",
        "type": "object"
      },
      "WebhookDelivery": {
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "event_id": {
            "description": "The stable event id shared by all destinations and retries.",
            "title": "Event Id",
            "type": "string"
          },
          "event_type": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Http Status"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "url": {
            "description": "The destination frozen when this delivery was created.",
            "title": "Url",
            "type": "string"
          },
          "webhook_id": {
            "title": "Webhook Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "webhook_id",
          "event_id",
          "event_type",
          "url",
          "status",
          "created_at",
          "completed_at",
          "attempt_count",
          "next_attempt_at",
          "last_http_status",
          "last_error"
        ],
        "title": "WebhookDelivery",
        "type": "object"
      },
      "WebhookDeliveryAttempt": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Status"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "started_at",
          "completed_at",
          "http_status",
          "duration_ms",
          "error"
        ],
        "title": "WebhookDeliveryAttempt",
        "type": "object"
      },
      "WebhookDeliveryDetail": {
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryAttempt"
            },
            "title": "Attempts",
            "type": "array"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "event_id": {
            "description": "The stable event id shared by all destinations and retries.",
            "title": "Event Id",
            "type": "string"
          },
          "event_type": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Http Status"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "payload": {
            "discriminator": {
              "mapping": {
                "session.create": "#/components/schemas/WebhookSessionCreateEvent",
                "webhook.ping": "#/components/schemas/WebhookPingEvent"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookSessionCreateEvent"
              },
              {
                "$ref": "#/components/schemas/WebhookPingEvent"
              }
            ],
            "title": "Payload"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "url": {
            "description": "The destination frozen when this delivery was created.",
            "title": "Url",
            "type": "string"
          },
          "webhook_id": {
            "title": "Webhook Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "webhook_id",
          "event_id",
          "event_type",
          "url",
          "status",
          "created_at",
          "completed_at",
          "attempt_count",
          "next_attempt_at",
          "last_http_status",
          "last_error",
          "payload",
          "attempts"
        ],
        "title": "WebhookDeliveryDetail",
        "type": "object"
      },
      "WebhookDeliveryResponse": {
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/WebhookDeliveryDetail"
          }
        },
        "required": [
          "delivery"
        ],
        "title": "WebhookDeliveryResponse",
        "type": "object"
      },
      "WebhookDeliveryStatus": {
        "enum": [
          "pending",
          "delivering",
          "retrying",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "title": "WebhookDeliveryStatus",
        "type": "string"
      },
      "WebhookEventType": {
        "enum": [
          "session.create",
          "webhook.ping"
        ],
        "title": "WebhookEventType",
        "type": "string"
      },
      "WebhookPingData": {
        "properties": {
          "webhook_id": {
            "title": "Webhook Id",
            "type": "string"
          }
        },
        "required": [
          "webhook_id"
        ],
        "title": "WebhookPingData",
        "type": "object"
      },
      "WebhookPingEvent": {
        "properties": {
          "api_version": {
            "const": "v1",
            "default": "v1",
            "title": "Api Version",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookPingData"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "type": {
            "const": "webhook.ping",
            "default": "webhook.ping",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "data"
        ],
        "title": "WebhookPingEvent",
        "type": "object"
      },
      "WebhookResponse": {
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/Webhook"
          }
        },
        "required": [
          "webhook"
        ],
        "title": "WebhookResponse",
        "type": "object"
      },
      "WebhookSessionCreateEvent": {
        "properties": {
          "api_version": {
            "const": "v1",
            "default": "v1",
            "title": "Api Version",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookSessionData"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "type": {
            "const": "session.create",
            "default": "session.create",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "data"
        ],
        "title": "WebhookSessionCreateEvent",
        "type": "object"
      },
      "WebhookSessionData": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/Session"
          }
        },
        "required": [
          "session"
        ],
        "title": "WebhookSessionData",
        "type": "object"
      },
      "WebhookState": {
        "enum": [
          "unverified",
          "pending",
          "active"
        ],
        "title": "WebhookState",
        "type": "string"
      },
      "WebhooksListResponse": {
        "properties": {
          "webhooks": {
            "items": {
              "$ref": "#/components/schemas/Webhook"
            },
            "title": "Webhooks",
            "type": "array"
          }
        },
        "required": [
          "webhooks"
        ],
        "title": "WebhooksListResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The Ellipsis REST API: start and drive agent sessions and manage configs, budgets, and platform resources. Authenticate every request with a bearer token (an API key from the dashboard, a CLI user token, or an session token). Errors return `{\"error\": {\"code\", \"message\"}}`; switch on `code`, never on the message text. Docs: https://www.ellipsis.dev/docs/api",
    "title": "Ellipsis REST API",
    "version": "2.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/account": {
      "patch": {
        "operationId": "update_customer",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Customer",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.update"
      }
    },
    "/v1/account/activity": {
      "get": {
        "description": "All-time per-surface activity flags: the dashboards' demo-data\nfallback reads these instead of inferring \"no history\" from a\nwindowed, filtered response.",
        "operationId": "get_customer_activity",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActivity"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Customer Activity",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.activity"
      }
    },
    "/v1/account/api-keys": {
      "get": {
        "operationId": "list_api_keys",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListApiKeysResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Api Keys",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:tokens.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "tokens"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.api_keys.list"
      },
      "post": {
        "description": "Create an organization key. Requires a verified GitHub administrator.\n\nAuthenticate as a dashboard user or with a user token. An organization\nAPI key cannot create other keys. The secret is returned only once.",
        "operationId": "create_api_key",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Api Key",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:tokens.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "tokens"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.api_keys.create"
      }
    },
    "/v1/account/api-keys/{api_key_id}": {
      "delete": {
        "description": "Revoke an organization key as a verified GitHub administrator.",
        "operationId": "revoke_api_key",
        "parameters": [
          {
            "in": "path",
            "name": "api_key_id",
            "required": true,
            "schema": {
              "title": "Api Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRevokedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revoke Api Key",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:tokens.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "tokens"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.api_keys.revoke"
      }
    },
    "/v1/account/audit-log": {
      "get": {
        "operationId": "get_customer_audit_log",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountAuditLogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Customer Audit Log",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.audit_log"
      }
    },
    "/v1/account/billing": {
      "get": {
        "description": "Explain whether your account can start sessions.\n\nUses the same account gate as session admission, including credit,\ncontact email, and personal subscription eligibility. Scoped\nspend limits are reported separately by /v1/account/budget.",
        "operationId": "get_account_billing",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Account Billing",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.status"
      }
    },
    "/v1/account/billing/auto-recharge": {
      "get": {
        "description": "Get your automatic credit recharge settings.\n\nAn account without saved settings returns disabled defaults and no\ncard. No payment-method identifier or card details are exposed.",
        "operationId": "get_auto_recharge",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoRechargeSettings"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Auto Recharge",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.auto_recharge.get"
      },
      "put": {
        "description": "Set your automatic credit recharge policy.\n\nRequires a human account administrator; API keys and session tokens\ncannot change this policy. Supply enabled explicitly. Saving amounts\nwith enabled=false keeps recharge off; enabling requires a saved card.\nA recharge buys amount_cents of credit and charges the platform fee\nin addition. Amounts and thresholds preserve exact cents.",
        "operationId": "update_auto_recharge",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRechargeUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoRechargeSettings"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Auto Recharge",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.auto_recharge.set"
      }
    },
    "/v1/account/billing/card-setup": {
      "post": {
        "description": "Save a card through Stripe's hosted setup flow.\n\nRequires a human account administrator. Open the returned URL to\nfinish setup and return to Billing. Saving a card does not enable\nauto-recharge or buy credit.",
        "operationId": "create_card_setup_session",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingCheckout"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Card Setup Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.card_setup"
      }
    },
    "/v1/account/billing/checkout": {
      "post": {
        "description": "Buy prepaid credit through Stripe's hosted checkout.\n\nRequires a human account administrator. Open the returned URL to\ncomplete payment. Credit is granted only after payment succeeds;\nthe platform fee is charged in addition to amount_cents. Returning\nto Billing carries the checkout session ID for receipt lookup.",
        "operationId": "create_credit_checkout_session",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditPurchaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingCheckout"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Credit Checkout Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.checkout"
      }
    },
    "/v1/account/billing/claim-signup-credit": {
      "post": {
        "description": "The \"Claim $100\" button. Runs the same idempotent billing\nbootstrap that otherwise fires lazily at the first session (Stripe\ncustomer + usage subscription + the signup grant). A repeat call is\na no-op that returns the current state.",
        "operationId": "claim_signup_credit",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Claim Signup Credit",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.claim_signup_credit"
      }
    },
    "/v1/account/billing/credit-grants": {
      "get": {
        "description": "List your confirmed credit grants and reversals.\n\nReturns only your account's grants. The total is before usage;\n/v1/account/budget reports the available balance.",
        "operationId": "list_credit_grants",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditGrantsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Credit Grants",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.grants"
      }
    },
    "/v1/account/billing/fee-schedule": {
      "get": {
        "description": "Get the account's rate card, in US dollars.",
        "operationId": "get_fee_schedule",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeScheduleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Fee Schedule",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.fee_schedule"
      }
    },
    "/v1/account/billing/purchase-options": {
      "get": {
        "description": "Get credit purchase bounds and the platform fee.\n\nAll amounts are integer US cents. The fee is added to the credit\namount; it does not reduce the credit granted.",
        "operationId": "get_credit_purchase_options",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditPurchaseOptions"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Credit Purchase Options",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.purchase_options"
      }
    },
    "/v1/account/billing/purchases/{checkout_id}": {
      "get": {
        "description": "Read the amount collected for a credit purchase.\n\nThe amount includes the platform fee and comes from Stripe. An\nincomplete, missing, or other-account purchase returns 404.",
        "operationId": "get_credit_purchase",
        "parameters": [
          {
            "in": "path",
            "name": "checkout_id",
            "required": true,
            "schema": {
              "title": "Checkout Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditPurchaseReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Credit Purchase",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.billing.purchase"
      }
    },
    "/v1/account/budget": {
      "get": {
        "description": "Get prepaid credit, actual trailing budgets, and developer/API-key limits.\n\nBudgets cover the trailing 1, 7 and 28 days; they do not replenish\nprepaid credit. Amounts include measured usage from active sessions.\nEach paid LLM request requires positive credit and budget headroom.\nAn admitted request can overshoot; concurrent paid requests are limited\nby your account and per-session allowances.",
        "operationId": "get_account_budget",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Account Budget",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.budget"
      },
      "patch": {
        "description": "Update spending policy or budget alerts as an account administrator.\n\nEach supplied section replaces that section; omitted sections are\npreserved. Set policy.developer_defaults to null to disable developer\nlimits. Null override windows inherit their default. API keys use\ntheir stable ID, not their secret. Changes apply to the next paid\nrequest, including sessions already running. API keys and session\ntokens cannot edit budgets. The session ceiling remains at\n/account/settings; purchasing credits is separate from budget policy.",
        "operationId": "update_account_budget",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Budget",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:defaults.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "defaults"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.update_budget"
      }
    },
    "/v1/account/models": {
      "get": {
        "description": "List selectable agent models.\n\nGrouped by manufacturer and model family, newest versions first\nwithin each family.\n\nReads the same registry as the dashboard's rate table, so a\nclient's model picker can never drift from what's offered. The\nselectable set is global.",
        "operationId": "list_account_models",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Account Models",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:templates.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "templates"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.models.list"
      }
    },
    "/v1/account/notifications/test-email": {
      "post": {
        "description": "Send the alert email template to one address with sample data,\nso a typo'd finance alias is caught by a human instead of failing\nsilently when a real alert fires.",
        "operationId": "send_test_notification_email",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestNotificationEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send Test Notification Email",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.notifications.test_email"
      }
    },
    "/v1/account/onboarding": {
      "get": {
        "description": "Read the account's saved onboarding answers, or null before setup.",
        "operationId": "get_account_onboarding",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOnboardingResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Account Onboarding",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.onboarding.get"
      },
      "patch": {
        "description": "Save supplied onboarding answers, preserving omitted answers.\n\nOrganizations can save their work email before selecting use cases.\nSaving use cases requires a valid organization work email and at\nleast one choice. When Other is the only choice, describe it.\nPersonal accounts save a null work email. This does not change the\nbilling contact email. Session tokens cannot update answers.\nSupplying an organization work email requires a human user and sends\na Slack Connect invitation. Slack failures do not undo saved answers.",
        "operationId": "update_account_onboarding",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchAccountOnboardingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOnboardingResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Account Onboarding",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "deny"
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.onboarding.update"
      }
    },
    "/v1/account/settings": {
      "get": {
        "description": "Get the organization settings.\n\nSession budget ceiling, mention behavior, analytics,\nretention, and notification contacts. PATCH replaces\nsupplied sections; PUT sets the budget ceiling only.",
        "operationId": "get_account_settings",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSettings"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Account Settings",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:defaults.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "defaults"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.settings.get"
      },
      "patch": {
        "description": "Replace supplied settings sections without changing omitted sections.\n\nChanges to the budget ceiling require a GitHub administrator.",
        "operationId": "patch_account_settings",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchAccountSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSettings"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Patch Account Settings",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [
                "budget_ceiling"
              ],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:defaults.\nAPI key: Cannot set budget_ceiling to a non-null value; those changes require a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator when setting budget_ceiling to a non-null value.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "defaults"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [
                "Cannot set budget_ceiling to a non-null value; those changes require a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator when setting budget_ceiling to a non-null value."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.settings.update"
      },
      "put": {
        "description": "Set the organization settings.\n\n`budget_ceiling.session` is in US dollars, at most the platform\nceiling, and null clears it.\nRefused for session tokens (potentially prompt-injected code must\nnot raise the organization's ceiling).",
        "operationId": "put_account_settings",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSettings"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The budget ceiling is not positive or exceeds the platform's."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set Organization Settings",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "account_admin",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:defaults.\nAPI key: Requires a CLI user token belonging to an account administrator.\nCLI user token: Requires an account administrator.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "defaults"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token belonging to an account administrator."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [
                "Requires an account administrator."
              ],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.settings.set"
      }
    },
    "/v1/account/usage": {
      "get": {
        "description": "Get usage for a calendar month, including its funding sources.\n\nOmit period_start for the current UTC month; select a period returned\nin billing_periods to view history. Credit debits are distinct from\nrated token usage through a developer's Claude or Codex\nsubscription. Rated usage estimates are not provider invoices.\nPending and unresolved requests identify missing measurements.",
        "operationId": "get_account_usage",
        "parameters": [
          {
            "in": "query",
            "name": "period_start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period Start"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsageOverTimeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Usage",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "account.usage"
      }
    },
    "/v1/agents": {
      "get": {
        "description": "List agents.",
        "operationId": "list_agents",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Agents",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.list"
      },
      "post": {
        "description": "Create an agent, managed through the API: no file, live\nimmediately. To put its definition in a repository instead, create\nit here and then POST /v1/agents/{agent_id}/link.\n\n409 when another live agent already holds the name.",
        "operationId": "create_agent",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The definition is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "An agent with that name already exists."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent's name contains no usable characters, or a file reference names no repository."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.create"
      }
    },
    "/v1/agents/stream-ticket": {
      "get": {
        "operationId": "get_agents_stream_ticket",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTicketResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agents Stream Ticket",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.stream_ticket"
      }
    },
    "/v1/agents/{agent_id}": {
      "delete": {
        "description": "Delete an agent, by id or by name.\n\nIt stops running and its name is freed immediately; its past\nsessions remain readable. Only for agents managed through\nthis API \u2014 delete the file to remove one defined by a repository.",
        "operationId": "delete_agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent is defined by a file in a repository; delete that file instead."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.delete"
      },
      "get": {
        "description": "Return one agent, by id or by name.",
        "operationId": "get_agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.get"
      },
      "put": {
        "description": "Replace an agent's definition, by id or by name.\n\nThe whole definition is replaced, and the change is live at\nonce. Only for agents managed through this API: one defined\nby a repository file is a 409, since the next push to that file\nwould revert the change \u2014 unlink it first to take ownership.",
        "operationId": "update_agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The definition is invalid (for example an unschedulable cron expression)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent is defined by a file in a repository, or another live agent already holds the new name."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent's name is missing or malformed, or a file reference names no repository."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.update"
      }
    },
    "/v1/agents/{agent_id}/link": {
      "post": {
        "description": "Move an agent into a repository, by id or by name.\n\nOpens a pull request adding its definition file. The agent\nkeeps running unchanged meanwhile; merging hands it over to the\nfile, after which the file is what changes it. Nothing happens\nif the pull request is never merged.",
        "operationId": "link_agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkAgentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The path is not a synced location, or the repository has no commits."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent or repository was not found in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent is already defined by a file, a link is already open for it, a file already exists at that path, or another agent syncs from it."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "GitHub rejected the pull request."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Link Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.link"
      }
    },
    "/v1/agents/{agent_id}/metrics": {
      "get": {
        "description": "Return an agent's session distribution and trailing spend,\nby id or by name.\n\n`samples` carries one entry per finished session (duration, cost,\ntokens) for distributions; `spend_windows` carries what the\nagent's sessions cost over the last 1, 7, and 28 days against\nits budget for each window.",
        "operationId": "get_agent_metrics",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent Metrics",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.metrics"
      }
    },
    "/v1/agents/{agent_id}/sessions": {
      "post": {
        "description": "Start an agent session.\n\nStarts a session from the agent's saved `session` settings and\nreturns it. The body takes the fields of POST /v1/sessions, all\noptional: each field you send replaces the agent's value for that\nfield, and each field you leave out keeps it. Lists, maps such as\n`metadata`, and `environment` are replaced whole, never merged;\nnaming the other harness replaces the agent's. An empty body starts\nthe agent as written. If the agent declares input.json_schema, send\n`input`; its rendered message is added after the prompt. A run-once\nsession needs a prompt or `input` from the agent or the request, or\nthe call is a 400.",
        "operationId": "start_agent_session",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartAgentSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The resolved agent combination is not supported (unsupported_session_combination), a run-once session has no prompt or input, or budget exceeds the organization's ceiling."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account, or its environment no longer exists."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A field is malformed, `budget` carries `day`, `week`, or `month`, both `claude_code` and `codex` are set, the merged settings are invalid, `input` is missing when the agent declares a schema or sent when it declares none, or the body carries a key this route does not accept. Input must match the schema and render a non-empty message."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start Agent Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.start"
      }
    },
    "/v1/agents/{agent_id}/unlink": {
      "post": {
        "description": "Take over an agent from its file, by id or by name.\n\nThe file stops governing it immediately and further changes go\nthrough this API. The file is left in place, inert \u2014 delete it\nwhenever you like.",
        "operationId": "unlink_agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such agent in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent is already managed through the API."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The definition has a file reference that names no repository, so it cannot resolve without its source repository."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Unlink Agent",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "agents.unlink"
      }
    },
    "/v1/alerts": {
      "get": {
        "description": "List budget alerts for the organization, newest first.\n\nOptionally filtered by status and source.\n\nAvailable to all credential types, so an agent can check \"is\nthis org near budget?\" mid-task.",
        "operationId": "list_alerts",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AlertStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AlertSource"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Alerts",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:alerts.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "alerts"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "alerts.list",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/alerts/{alert_id}": {
      "get": {
        "description": "Return one alert by id.\n\n404 if it doesn't exist or belongs to another organization.",
        "operationId": "get_alert",
        "parameters": [
          {
            "in": "path",
            "name": "alert_id",
            "required": true,
            "schema": {
              "title": "Alert Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such alert in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Alert",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:alerts.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "alerts"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "alerts.get",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/alerts/{alert_id}/dismiss": {
      "post": {
        "description": "Dismiss an open alert and return it.\n\n409 when the alert is not open; 404 when it doesn't exist.",
        "operationId": "dismiss_alert",
        "parameters": [
          {
            "in": "path",
            "name": "alert_id",
            "required": true,
            "schema": {
              "title": "Alert Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such alert in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The alert is not open."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Dismiss Alert",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:alerts.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "alerts"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "alerts.dismiss",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/analytics/metrics": {
      "get": {
        "description": "Return PR and review analytics metrics.\n\nThe same data as the analytics dashboard.\n\nWindowing: pass explicit start/end, or days (default: the last\n30 days). account_type in all|user|bot scopes the authors (bot =\nthe apps/agents). Available to all credential types: the\nresponses expose the organization's own GitHub PR/review activity,\nno secrets.",
        "operationId": "get_analytics_metrics",
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "description": "Filter to repositories by \"owner/name\".",
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to repositories by \"owner/name\".",
              "title": "Repo"
            }
          },
          {
            "description": "Filter by PR-author login(s).",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by PR-author login(s).",
              "title": "Author"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "required": false,
            "schema": {
              "default": "all",
              "title": "Account Type",
              "type": "string"
            }
          },
          {
            "description": "Filter by parent-PR status (open|draft|merged|closed).",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by parent-PR status (open|draft|merged|closed).",
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnalyticsMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The time window is invalid: days combined with start, a non-positive days, or end not after start."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Analytics Metrics",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "analytics.metrics",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/analytics/pull-requests": {
      "get": {
        "description": "Return pull-request analytics.\n\nWindowing: pass explicit start/end, or days (default: the last\n30 days). account_type in all|user|bot scopes the authors.",
        "operationId": "get_analytics_pull_requests",
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "description": "Filter to repositories by \"owner/name\".",
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to repositories by \"owner/name\".",
              "title": "Repo"
            }
          },
          {
            "description": "Filter by PR-author login(s).",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by PR-author login(s).",
              "title": "Author"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "required": false,
            "schema": {
              "default": "all",
              "title": "Account Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnalyticsPullRequestsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The time window is invalid: days combined with start, a non-positive days, or end not after start."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Analytics Pull Requests",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "analytics.pull_requests",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/analytics/reviews": {
      "get": {
        "description": "Return pull request review analytics.\n\naccount_type scopes reviewers (bot|user|all) \u2014 e.g. \"what apps\nreview the most PRs?\" is the reviewer facets here with\naccount_type=bot. Windowing: pass explicit start/end, or days\n(default: the last 30 days).",
        "operationId": "get_analytics_reviews",
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Repo"
            }
          },
          {
            "description": "Filter by reviewer login(s).",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by reviewer login(s).",
              "title": "Author"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "required": false,
            "schema": {
              "default": "all",
              "title": "Account Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "review_state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Review State"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnalyticsReviewsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The time window is invalid: days combined with start, a non-positive days, or end not after start."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Analytics Reviews",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "analytics.reviews",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/auth/cli/poll": {
      "post": {
        "description": "Poll a device-code auth flow for its token.\n\nUnauthenticated; the device code identifies the flow.",
        "operationId": "cli_auth_poll",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CliAuthPollRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollCliAuthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unknown device code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cli Auth Poll",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "description": "Authentication: No token required.",
          "notes": [],
          "required": [],
          "tokens": []
        },
        "x-ellipsis-sdk-method": "auth.cli.poll",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/auth/cli/start": {
      "post": {
        "description": "Start a device-code auth flow for the CLI.\n\nUnauthenticated: the CLI has no credential yet \u2014 that's what\nit's obtaining. The human authorizes out-of-band in the\ndashboard.",
        "operationId": "cli_auth_start",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCliAuthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          }
        },
        "summary": "Cli Auth Start",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "description": "Authentication: No token required.",
          "notes": [],
          "required": [],
          "tokens": []
        },
        "x-ellipsis-sdk-method": "auth.cli.start",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/environments": {
      "get": {
        "description": "List saved environments.",
        "operationId": "list_environments",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Environments",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "environments.list"
      },
      "post": {
        "description": "Create an environment, managed through the API: no file, live\nimmediately. To define it in a repository instead, commit a\n`kind: environment` YAML under an agents directory.\n\n409 when another live environment already holds the name.",
        "operationId": "create_environment",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEnvironmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "An environment with that name already exists."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment's name is missing or malformed."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Environment",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "environments.create"
      }
    },
    "/v1/environments/{environment_id}": {
      "delete": {
        "description": "Delete an environment, by id or by name.\n\nAlways succeeds, even while agents still reference it \u2014 their next\nsession start fails with a clear error naming the missing\nenvironment. Past sessions remain readable. Only for environments\nmanaged through this API \u2014 delete the file to remove one defined\nby a repository.",
        "operationId": "delete_environment",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such environment in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment is defined by a file in a repository; delete that file instead."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Environment",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "environments.delete"
      },
      "get": {
        "description": "Return one saved environment, by id or by name.",
        "operationId": "get_environment",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such environment in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Environment",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "environments.get"
      },
      "put": {
        "description": "Replace an environment's definition, by id or by name.\n\nThe whole definition is replaced, live at once \u2014 future sessions\nresolve the new body; running sessions keep the one frozen at\ntheir start. Only for environments managed through this API: one\ndefined by a repository file is a 409.",
        "operationId": "update_environment",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEnvironmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such environment in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment is defined by a file in a repository, or another live environment already holds the new name."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The environment's name is missing or malformed."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Environment",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "environments.update"
      }
    },
    "/v1/handlers": {
      "get": {
        "description": "List the account's Slack, GitHub, Linear, and Sentry handlers.\n\nReturns at most one handler per service, from the current .ellipsis\nrepository. Disabled handlers and last valid definitions with sync\nerrors are included. Missing handlers are omitted. This reads saved\nstate without fetching GitHub or triggering synchronization.\n\nRequires configs:read; scoped grants match handlers/{service}.\nSession tokens with that grant may read handlers.",
        "operationId": "list_handlers",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandlersListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Handlers",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "handlers.list"
      }
    },
    "/v1/handlers/{handler_id}/metrics": {
      "get": {
        "description": "Return session counts and accumulated spend for a saved handler.\n\nFilters only by session creation time. Omitted bounds include all\nhistory. Counts use the current turn and conversation state, so an open\nconversation awaiting another message remains active. Spend includes the selected sessions' full\naccumulated cost, including activity after the creation-time window.\nOnly sessions carrying this exact saved handler id are counted;\nlegacy sessions without handler provenance are excluded.\n\nspend_windows reports current trailing 1-, 7-, and 28-day credit\ndebits and effective handler budgets across all attributed sessions.\nThose windows use usage timestamps and are independent of start/end.\n\nRequires configs:read matching handlers/{service} and unrestricted\nsessions:read. Session tokens with both grants may read metrics.",
        "operationId": "get_handler_metrics",
        "parameters": [
          {
            "in": "path",
            "name": "handler_id",
            "required": true,
            "schema": {
              "title": "Handler Id",
              "type": "string"
            }
          },
          {
            "description": "Inclusive session creation-time bound. Naive timestamps use UTC.",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Inclusive session creation-time bound. Naive timestamps use UTC.",
              "title": "Start"
            }
          },
          {
            "description": "Exclusive session creation-time bound. Naive timestamps use UTC.",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exclusive session creation-time bound. Naive timestamps use UTC.",
              "title": "End"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandlerMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such current handler in your account or configs grant."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A time bound is malformed, or start is not earlier than end."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Handler Metrics",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            },
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions, read:configs.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            },
            {
              "level": "read",
              "resource": "configs"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "handlers.metrics"
      }
    },
    "/v1/identity": {
      "get": {
        "description": "Return the identity behind the caller's credential.",
        "operationId": "get_identity",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Current Identity",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "identity"
      }
    },
    "/v1/integrations": {
      "get": {
        "description": "List connected integrations.\n\nA read-only view, so an agent authoring another agent's\nconfig can learn which repositories, channels, teams, and\norganizations it may name before POST /agents.\n\nAvailable to all credential types including session tokens: the\nresponses never include OAuth tokens or any other secret.",
        "operationId": "get_integrations",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntegrationsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Integrations",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.list"
      }
    },
    "/v1/integrations/github/members": {
      "get": {
        "description": "List the GitHub organization roster.\n\n(Or the account itself for a personal workspace) \u2014 the universe of author_id values for\n/sessions.\n\nMembers carry their linked Slack identity when a Slack-GitHub\nlink exists, and /slack/members carries the reverse link.",
        "operationId": "list_github_members",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubMembersListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Github Members",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.github.members"
      }
    },
    "/v1/integrations/github/repos": {
      "get": {
        "description": "List GitHub repositories connected to the installation.",
        "operationId": "list_github_repositories",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubRepositoriesListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Github Repositories",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.github.repos"
      }
    },
    "/v1/integrations/github/uninstall": {
      "post": {
        "operationId": "uninstall_github_app",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UninstallGithubAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Uninstall Github App",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.github.uninstall"
      }
    },
    "/v1/integrations/linear": {
      "delete": {
        "operationId": "delete_linear_integration",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Linear Integration",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.linear.delete"
      }
    },
    "/v1/integrations/linear/settings": {
      "put": {
        "operationId": "update_linear_teams",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLinearSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Linear Teams",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.linear.update_settings"
      }
    },
    "/v1/integrations/linear/teams": {
      "get": {
        "description": "List the teams of the connected Linear workspace.",
        "operationId": "list_linear_teams",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinearTeamsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Linear is not connected for this account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Linear Teams",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.linear.teams"
      }
    },
    "/v1/integrations/sentry/organizations": {
      "get": {
        "description": "List the connected Sentry organizations.",
        "operationId": "list_sentry_organizations",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentryOrganizationsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Sentry Organizations",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.sentry.organizations"
      }
    },
    "/v1/integrations/sentry/{integration_id}": {
      "delete": {
        "operationId": "delete_sentry_integration",
        "parameters": [
          {
            "in": "path",
            "name": "integration_id",
            "required": true,
            "schema": {
              "title": "Integration Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Sentry Integration",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.sentry.delete"
      }
    },
    "/v1/integrations/slack": {
      "delete": {
        "operationId": "delete_slack_integration",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Slack Integration",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.slack.delete"
      }
    },
    "/v1/integrations/slack/channels": {
      "get": {
        "description": "List the channels of the connected Slack workspace, fetched\nlive from the Slack API.",
        "operationId": "list_slack_channels",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackChannelsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Slack is not connected for this account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Slack Channels",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.slack.channels"
      }
    },
    "/v1/integrations/slack/members": {
      "get": {
        "description": "List the members of the connected Slack workspace, fetched\nlive from the Slack API.",
        "operationId": "list_slack_members",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackMembersListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Slack is not connected for this account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Slack Members",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.slack.members"
      }
    },
    "/v1/integrations/slack/operations-channel": {
      "post": {
        "operationId": "create_operations_channel",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackChannel"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Operations Channel",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:integrations.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "integrations"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "integrations.slack.create_operations_channel"
      }
    },
    "/v1/reviews": {
      "get": {
        "description": "List code reviews, newest first.",
        "operationId": "list_reviews",
        "parameters": [
          {
            "description": "Only reviews of these repositories, by name.",
            "in": "query",
            "name": "repository",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews of these repositories, by name.",
              "title": "Repository"
            }
          },
          {
            "description": "Only reviews of these pull request numbers.",
            "in": "query",
            "name": "pull_request_number",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews of these pull request numbers.",
              "title": "Pull Request Number"
            }
          },
          {
            "description": "Only reviews in these states.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/CodeReviewStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews in these states.",
              "title": "Status"
            }
          },
          {
            "description": "Only reviews created at or after this time.",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews created at or after this time.",
              "title": "Start"
            }
          },
          {
            "description": "Only reviews created before this time.",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews created before this time.",
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request is invalid or combines incompatible fields."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Reviews",
        "tags": [
          "v1",
          "Reviews"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:reviews.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "reviews"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "reviews.list"
      }
    },
    "/v1/reviews/{review_id}": {
      "get": {
        "description": "Get a code review: its reviewers and every comment they returned, posted or held back.",
        "operationId": "get_review",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "title": "Review Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such review."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Review",
        "tags": [
          "v1",
          "Reviews"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:reviews.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "reviews"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "reviews.get"
      }
    },
    "/v1/secrets": {
      "get": {
        "description": "List secrets.\n\nValues are write-only: the response carries only names and\ntimestamps, never the stored value.",
        "operationId": "list_secrets",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Secrets",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:secrets.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "secrets"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "secrets.list"
      },
      "put": {
        "description": "Upsert secrets.\n\nReturns only the secrets this call wrote, names and timestamps\nonly \u2014 values are write-only. Refused for session tokens (held by\npotentially-untrusted code running inside a session); mutations\nrequire an API key or user token.",
        "operationId": "put_secrets",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutSecretsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A variable name is invalid, or the batch would exceed the per-account variable limit."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set Secrets",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:secrets.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "secrets"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "secrets.set"
      }
    },
    "/v1/secrets/{name}": {
      "delete": {
        "description": "Delete a secret by name.\n\nRefused for session tokens; mutations require an API key or\nuser token.",
        "operationId": "delete_secret",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Secret",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:secrets.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "secrets"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "secrets.delete"
      }
    },
    "/v1/sessions": {
      "get": {
        "description": "List cloud agent sessions, newest first.\n\nOptionally filtered by agent (id or name), source, service, handler, time\nwindow, attributed author, repository, and whether the session is\nstill going.",
        "operationId": "list_sessions",
        "parameters": [
          {
            "description": "An agent id, or its name: only sessions that agent started.",
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "An agent id, or its name: only sessions that agent started.",
              "title": "Agent"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/SessionSource"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "description": "Service that triggered the session. Includes built-in responders and legacy sessions without a saved handler.",
            "in": "query",
            "name": "service",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/HandlerService"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Service that triggered the session. Includes built-in responders and legacy sessions without a saved handler.",
              "title": "Service"
            }
          },
          {
            "description": "Saved handler id captured when the session started.",
            "in": "query",
            "name": "handler",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Saved handler id captured when the session started.",
              "title": "Handler"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "A GitHub account id (see GET /v1/integrations/github/members); scopes the list to sessions attributed to that developer.",
            "in": "query",
            "name": "author_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A GitHub account id (see GET /v1/integrations/github/members); scopes the list to sessions attributed to that developer.",
              "title": "Author Id"
            }
          },
          {
            "description": "\"owner/name\" (exact) or a bare repo name. Sessions whose repository is named only inside their agent \u2014 dashboard starts, cron \u2014 do not match.",
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "\"owner/name\" (exact) or a bare repo name. Sessions whose repository is named only inside their agent \u2014 dashboard starts, cron \u2014 do not match.",
              "title": "Repo"
            }
          },
          {
            "description": "Keep only sessions whose current turn is pending or running.",
            "in": "query",
            "name": "unfinished",
            "required": false,
            "schema": {
              "default": false,
              "description": "Keep only sessions whose current turn is pending or running.",
              "title": "Unfinished",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Sessions",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.list"
      },
      "post": {
        "description": "Start a cloud agent session.\n\nThe daily driver: a prompt, optionally where to run it\n(`environment`) and the session's own settings, in the AgentConfig\nvocabulary. What you send is what runs: omit `environment` and the\nsession runs in the built-in basic environment. A missing model or\nbudget comes from the organization's settings, so\n`{\"claude_code\": {\"prompt\": \"...\"}}` is a complete request.\nSet exactly one of `claude_code` or `codex`. Its `prompt` is the\nfirst message; omit the prompt and the session starts with no\nturn, waiting for one. 400 when `conversation.interactive` is false\nand there is no prompt, or when `budget.session` exceeds the\norganization's per-session ceiling. To start a session from a saved\nagent, use POST /v1/agents/{agent_id}/sessions.",
        "operationId": "start_session",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request is incompatible with itself (a session with interactive false and no prompt, or incompatible harness options), its resolved harness/model/provider/capabilities are not supported, an image or config is invalid, or budget exceeds the organization's ceiling. Unsupported combinations use code unsupported_session_combination."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The named environment does not exist in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A field is malformed, or the body carries a key this route does not accept."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.start"
      }
    },
    "/v1/sessions/search": {
      "get": {
        "operationId": "search_sessions",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SessionSearchScope",
              "default": "both"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/SessionSource"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "description": "Service whose mention or event started the session.",
            "in": "query",
            "name": "service",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/HandlerService"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Service whose mention or event started the session.",
              "title": "Service"
            }
          },
          {
            "description": "Exact saved handler id recorded when the session started.",
            "in": "query",
            "name": "handler",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exact saved handler id recorded when the session started.",
              "title": "Handler"
            }
          },
          {
            "description": "Attributed GitHub user account ids.",
            "in": "query",
            "name": "author_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Attributed GitHub user account ids.",
              "title": "Author Id"
            }
          },
          {
            "description": "Saved agent ids (ORed with author_id).",
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Saved agent ids (ORed with author_id).",
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "session_ids",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Ids"
            }
          },
          {
            "description": "\"owner/name\" (exact) or a bare repo name; ORed.",
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "\"owner/name\" (exact) or a bare repo name; ORed.",
              "title": "Repo"
            }
          },
          {
            "description": "Current turn statuses to keep.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/TurnStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Current turn statuses to keep.",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionSearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Search Sessions",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.search"
      }
    },
    "/v1/sessions/stream-ticket": {
      "get": {
        "operationId": "get_sessions_stream_ticket",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTicketResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Sessions Stream Ticket",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.stream_ticket"
      }
    },
    "/v1/sessions/{session_id}": {
      "get": {
        "description": "Return one session.\n\nThe public wire shape, the same shape the stream's session frames\ncarry, with attribution, stop, and archive actors resolved at read\ntime. `turn` is the turn in progress or the latest one.\n\nThe heavy near-static blobs (config snapshot, input/output)\nlive on the detail endpoints, not here.",
        "operationId": "get_session",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.get"
      },
      "put": {
        "description": "Archive or unarchive a session and return it.\n\nSet archived to true to record the current server time and the\nauthenticated GitHub user. API-key requests record no user.\nRepeated archive requests preserve the original time and user.\nSet archived to false to clear both fields. Archiving is available\nin any session state and does not stop a running session.\n\nChanges are delivered to session and session-list streams.",
        "operationId": "update_session",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "deny"
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.update"
      }
    },
    "/v1/sessions/{session_id}/analytics": {
      "get": {
        "description": "Measured tokens and spend over time, plus estimated content cost.\n\nToken lanes use the request's saved rates. Content attribution\napportions input/cache spend by text size, counting carried context\non every request. It is an estimate, not a tool call fee.\nOnly the latest 200 retained request bodies are inspected; missing\nor unsupported context remains explicitly unattributed. No raw\nprompts or tool results are returned. Session tokens may read only\ntheir own session's analytics.",
        "operationId": "get_session_analytics",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionAnalytics"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Analytics",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_session"
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own session."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.analytics"
      }
    },
    "/v1/sessions/{session_id}/diff": {
      "get": {
        "description": "Return the session's uncommitted changes as a patch.\n\nOne unified-diff section per changed file, captured from the\nenvironment's working tree when the session ended. The per-file\ncounts ride on the session itself (`git.repos[].files`); this\nis the text behind them. Empty when the tree was clean. A\nsession token may read only its own session's diff.",
        "operationId": "get_session_diff",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDiffResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Diff",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_session"
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own session."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.diff"
      }
    },
    "/v1/sessions/{session_id}/download": {
      "get": {
        "description": "Download the complete session history.\n\nThe complete, ordered history of the session (agent output, tool calls, thinking,\nlifecycle events, environment output, message events) as an ordered\nmanifest of presigned segment URLs.\n\nSegments are gzip members: download in order and concatenate\nfor one file. The JSON API never carries the bytes (same\ntwo-step as files). /records is the paged live view of the\nsame data.",
        "operationId": "download_session",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSessionLogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Download Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.download"
      }
    },
    "/v1/sessions/{session_id}/git": {
      "get": {
        "description": "The session's GitHub-side git view: its commits, and each PR it\nopened joined to the live gh_prs row and reviews. The identity list\n(output_git) rides the session itself over the WebSocket; this is\nthe join a \"run\" notify tells an open pane to refetch.",
        "operationId": "get_session_git",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionGitResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Git",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.git"
      }
    },
    "/v1/sessions/{session_id}/messages": {
      "post": {
        "description": "Send a message to a session.\n\n409 for mention, non-interactive, closed, and out-of-budget\nsessions. Returns the created message and its turn; a retried send\nwith the same idempotency_key returns the original ones.",
        "operationId": "send_session_message",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSessionMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The message is empty, an image is invalid or over the limit, or the session's resolved combination is not supported. Unsupported combinations use code unsupported_session_combination."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The session cannot be messaged: it is closed, non-interactive, or steered from its triggering surface (mention)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send Session Message",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.send_message"
      }
    },
    "/v1/sessions/{session_id}/metrics": {
      "get": {
        "description": "List the CPU, memory, swap, and disk readings of every VM the\nsession ran on, oldest first.\n\nA reading is taken every 5 seconds while the session runs.",
        "operationId": "get_session_metrics",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Metrics",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_session"
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own session."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.metrics",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/sessions/{session_id}/output": {
      "get": {
        "description": "Return the session's typed output.\n\nThe payload the agent submitted through its config-declared\noutput.json_schema, as the raw JSON body with no envelope. 404\nwhile the session is still running (poll GET /v1/sessions/{id}),\nwhen the agent declares no output block, or when no turn\nproduced output.",
        "operationId": "get_session_output",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The session's typed output, exactly as the agent submitted it \u2014 the shape is the agent's own output.json_schema, with no envelope."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account, the agent declares no output schema, the session has not completed, or it produced no output."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Output",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.output"
      }
    },
    "/v1/sessions/{session_id}/records": {
      "get": {
        "description": "Return the session's stored transcript records, oldest first.\n\nPagination is opt-in (cursor/limit); a bare call returns the\nfull retained transcript. Available to session tokens too: an\nagent answering \"did X look into Y?\" needs to read the sessions\nit finds, and any org member sees the same transcript in the\ndashboard.",
        "operationId": "get_session_records",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRecordsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Records",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.records"
      }
    },
    "/v1/sessions/{session_id}/stop": {
      "post": {
        "description": "Stop the turn in progress and return the session.\n\nThe turn ends `stopped`; the conversation stays open. 409 when no\nturn is pending or running. The stopping user is recorded only\nwhen the caller's credential maps to a GitHub account.",
        "operationId": "stop_session",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No turn is pending or running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Stop Session",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.stop"
      }
    },
    "/v1/sessions/{session_id}/stream-ticket": {
      "get": {
        "operationId": "get_session_stream_ticket",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTicketResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Stream Ticket",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.session_stream_ticket"
      }
    },
    "/v1/sessions/{session_id}/transcript": {
      "post": {
        "description": "Append transcript lines to a session's record.\n\n            The transcript tailer running inside the session's environment, for\ninteractive sessions.\n\n            A session token may only push its own session's transcript.\n            Idempotent by transcript line uuid; tolerant of malformed lines.",
        "operationId": "ingest_session_transcript",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestTranscriptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptIngestResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No turn has started yet."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ingest Session Transcript",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_session"
            }
          ],
          "description": "Required permissions: write:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "write",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own session."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.ingest_transcript",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/sessions/{session_id}/turns": {
      "get": {
        "description": "Return the session's turns and messages, oldest first.\n\nOne turn per message: pending until the agent starts on it,\nrunning while it works, then completed, failed, stopped, or\ncancelled.",
        "operationId": "get_session_turns",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTurnsListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Turns",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.turns.list"
      }
    },
    "/v1/sessions/{session_id}/turns/{turn_id}": {
      "get": {
        "description": "Return one turn.\n\nPoll this after sending a message: the message is answered when\nthe turn's status is completed, failed, stopped, or cancelled.",
        "operationId": "get_session_turn",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "turn_id",
            "required": true,
            "schema": {
              "title": "Turn Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTurnResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such session or turn in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Session Turn",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete.",
            "Grant match patterns can further restrict access to individual resources."
          ],
          "required": [
            {
              "level": "read",
              "resource": "sessions"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "sessions.turns.get"
      }
    },
    "/v1/support/slack": {
      "get": {
        "operationId": "get_slack_help",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SlackHelpResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Slack Help"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Slack Help",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:account.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "support.slack.get"
      },
      "post": {
        "operationId": "request_slack_help",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackHelpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackHelpResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Request Slack Help",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "human",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "support.slack.create"
      }
    },
    "/v1/support/slack/invites": {
      "post": {
        "operationId": "invite_to_slack_help",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackHelpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackHelpResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Invite To Slack Help",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "human",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:account.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "account"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "support.slack.invite"
      }
    },
    "/v1/templates": {
      "get": {
        "description": "List the built-in starter agent templates.\n\nBehind auth but not account-scoped \u2014 the data is static\nproduct content shared by the dashboard, landing site, and CLI.",
        "operationId": "list_agent_templates",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTemplatesListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Agent Templates",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:templates.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "templates"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "templates.list",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/templates/{template_id}": {
      "get": {
        "description": "Return one built-in agent template by slug.",
        "operationId": "get_agent_template",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTemplate"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such template."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent Template",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:templates.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "templates"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "templates.get",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/user/subscription_tokens": {
      "get": {
        "description": "List your subscription tokens.\n\nOne entry per supported provider, whether or not you have saved a\ntoken for it. Tokens are write-only: the response carries only\n`token_last4`, never the token.",
        "operationId": "list_subscription_tokens",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionTokensListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential carries no developer, so there is no subscription to act on (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Subscription Tokens",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.list"
      }
    },
    "/v1/user/subscription_tokens/{provider}": {
      "delete": {
        "description": "Delete your subscription token for a provider.\n\nYour sessions stop billing your subscription immediately, and the\nusage reading goes with it \u2014 it described that token's plan.",
        "operationId": "delete_subscription_token",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionProvider"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential carries no developer, so there is no subscription to act on (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Subscription Token",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.delete"
      },
      "get": {
        "description": "Get one provider's subscription token.\n\n`configured` is false when nothing is saved. The token itself is\nnever returned, only `token_last4`.",
        "operationId": "get_subscription_token",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionProvider"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionToken"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential carries no developer, so there is no subscription to act on (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Subscription Token",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.get"
      },
      "post": {
        "description": "Save your subscription token for a provider.\n\nReplaces whatever was stored. The token is saved DISABLED and\nroutes nothing until `POST /v1/user/subscription_tokens/{provider}/verify`\nsucceeds. For Claude, use `claude setup-token`. For Codex, paste\nthe auth.json credentials from a ChatGPT login. Each subscription\npays only for models from its corresponding provider.",
        "operationId": "set_subscription_token",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionProvider"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutSubscriptionTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionToken"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The provider does not route yet, the token is not a subscription OAuth token, or the credential carries no developer (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set Subscription Token",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.set"
      }
    },
    "/v1/user/subscription_tokens/{provider}/usage": {
      "get": {
        "description": "Get your plan's last-observed rate-limit windows.\n\nDisplay-only, and only as fresh as your last call through Ellipsis\n(`observed_at`) \u2014 the same plan used outside Ellipsis moves the\nreal windows without us seeing them. Null unless a token is\nenabled for the provider: a disabled token routes nothing, so any\nreading behind it is stale by construction.",
        "operationId": "get_subscription_usage",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionProvider"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionUsageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential carries no developer, so there is no subscription to act on (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Subscription Usage",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.usage"
      }
    },
    "/v1/user/subscription_tokens/{provider}/verify": {
      "post": {
        "description": "Verify the stored token by using it.\n\nMakes one minimal call on the exact runtime path, so a pass proves\nthe token is what will pay. This is the gate on routing: success\nenables the token, failure disables it, so verifying a revoked\ntoken is how you stop it routing. A 200 with `ok: false` is the\nnormal way a bad token is reported \u2014 it is an answer, not a\ntransport failure.",
        "operationId": "verify_subscription_token",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionProvider"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifySubscriptionTokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential carries no developer, so there is no subscription to act on (an organization API key)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Verify Subscription Token",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "subscription_user",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.subscription_tokens.verify"
      }
    },
    "/v1/user/tokens": {
      "get": {
        "operationId": "list_user_tokens",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListUserTokensResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List User Tokens",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "human",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.tokens.list"
      }
    },
    "/v1/user/tokens/{token_id}": {
      "delete": {
        "operationId": "revoke_user_token",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "title": "Token Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRevokedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revoke User Token",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": "human",
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:user.\nAPI key: Requires a CLI user token.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "user"
            }
          ],
          "tokens": [
            {
              "available": false,
              "conditions": [
                "Requires a CLI user token."
              ],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "user.tokens.revoke"
      }
    },
    "/v1/vm-executions": {
      "get": {
        "operationId": "get_vm_executions",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/VMExecutionResponse"
                  },
                  "title": "Response Get Vm Executions",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Vm Executions",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_sandbox"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own sandbox."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vm_executions.list",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vm-executions/{vm_execution_id}": {
      "get": {
        "operationId": "get_single_vm_execution",
        "parameters": [
          {
            "in": "path",
            "name": "vm_execution_id",
            "required": true,
            "schema": {
              "title": "Vm Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMExecutionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Single Vm Execution",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_sandbox"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own sandbox."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vm_executions.get",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vm-executions/{vm_execution_id}/stream-ticket": {
      "get": {
        "operationId": "get_vm_execution_stream_ticket",
        "parameters": [
          {
            "in": "path",
            "name": "vm_execution_id",
            "required": true,
            "schema": {
              "title": "Vm Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTicketResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Vm Execution Stream Ticket",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_sandbox"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own sandbox."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vm_executions.stream_ticket",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vm-images": {
      "get": {
        "description": "List reusable VM images.\n\nIncludes expiration, repository revisions, and build identity.",
        "operationId": "list_vm_images",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMImageListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Vm Images",
        "tags": [
          "v1",
          "VMs",
          "VM images"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "deny"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vm_images.list",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vm-images/{image_id}": {
      "get": {
        "description": "Get metadata for a reusable VM image.",
        "operationId": "get_vm_image",
        "parameters": [
          {
            "in": "path",
            "name": "image_id",
            "required": true,
            "schema": {
              "title": "Image Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMImageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Vm Image",
        "tags": [
          "v1",
          "VMs",
          "VM images"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "deny"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vm_images.get",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vms": {
      "get": {
        "description": "List VMs and their last recorded state.\n\nEach machine appears once, including paused and deleted VMs, newest execution first.",
        "operationId": "list_vms",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Vms",
        "tags": [
          "v1",
          "VMs"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_vm"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own VM."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vms.list",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vms/{vm_id}": {
      "get": {
        "description": "Get a VM and its most recent execution.",
        "operationId": "get_vm",
        "parameters": [
          {
            "in": "path",
            "name": "vm_id",
            "required": true,
            "schema": {
              "title": "Vm Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Vm",
        "tags": [
          "v1",
          "VMs"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_vm"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own VM."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vms.get",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/vms/{vm_id}/metrics": {
      "get": {
        "description": "List a VM's CPU, memory, swap, and disk readings, oldest first.\n\nA reading is taken every 5 seconds while a session runs on the VM.",
        "operationId": "list_vm_metrics",
        "parameters": [
          {
            "in": "path",
            "name": "vm_id",
            "required": true,
            "schema": {
              "title": "Vm Id",
              "type": "string"
            }
          },
          {
            "description": "Only readings at or after this time.",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only readings at or after this time.",
              "title": "Start"
            }
          },
          {
            "description": "Only readings before this time.",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only readings before this time.",
              "title": "End"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VMMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Vm Metrics",
        "tags": [
          "v1",
          "VMs"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": "own_vm"
            }
          ],
          "description": "Required permissions: read:environments.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "environments"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": true,
              "conditions": [
                "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.",
                "Only the token's own VM."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "vms.metrics",
        "x-ellipsis-undocumented": true
      }
    },
    "/v1/webhooks": {
      "get": {
        "description": "List your webhooks and their delivery summaries.",
        "operationId": "list_webhooks",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhooksListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Webhooks",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.list"
      },
      "post": {
        "description": "Create a webhook and send a verification ping.\n\nSave the signing secret from this response; it is returned once.\nAccounts default to three webhook slots, including unverified and\npending ones; your account may have a custom allowance. A ping returning HTTP 200 moves unverified to pending. Contact\nEllipsis to activate it and receive session.create events.",
        "operationId": "create_webhook",
        "parameters": [
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request conflicts with the resource's current state."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A quota or rate limit was exceeded."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Webhook",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.create"
      }
    },
    "/v1/webhooks/deliveries": {
      "get": {
        "description": "List webhook deliveries, newest first.\n\nIncludes verification pings and deliveries for deleted webhooks.\nHistory is retained for 30 days. Retries belong to the same delivery.",
        "operationId": "list_webhook_deliveries",
        "parameters": [
          {
            "in": "query",
            "name": "webhook_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Webhook Id"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookEventType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookDeliveryStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveriesListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request is invalid or combines incompatible fields."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Webhook Deliveries",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.deliveries.list"
      }
    },
    "/v1/webhooks/deliveries/{delivery_id}": {
      "get": {
        "description": "Inspect a delivery's payload and attempts.\n\nPayloads are immutable across retries. Attempt details include HTTP\nstatus, timing, and errors. Response bodies are not retained.",
        "operationId": "get_webhook_delivery",
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Webhook Delivery",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.deliveries.get"
      }
    },
    "/v1/webhooks/{webhook_id}": {
      "delete": {
        "description": "Delete a webhook and cancel outstanding deliveries.\n\nAn HTTP request already in flight may finish. Delivery history remains\navailable for 30 days. Deletion frees a webhook slot.",
        "operationId": "delete_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Webhook",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: delete:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "delete",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.delete"
      },
      "get": {
        "description": "Get a webhook's configuration and approval state.",
        "operationId": "get_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Webhook",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: read:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "read",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.get"
      },
      "put": {
        "description": "Replace a webhook's configuration.\n\nChanging the URL cancels outstanding deliveries, clears verification\nand approval, and sends another ping. State and signing secret cannot\nbe set here. Updating description or subscriptions preserves approval.",
        "operationId": "update_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A quota or rate limit was exceeded."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update Webhook",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.update"
      }
    },
    "/v1/webhooks/{webhook_id}/ping": {
      "post": {
        "description": "Send a signed verification or test ping.\n\nAvailable in every state. Only HTTP 200 verifies a destination;\nsuccessful pings never activate it. The default limit is five pings per\naccount per minute, including creation and URL changes. Custom\naccount allowances apply.",
        "operationId": "ping_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The bearer token is missing, invalid, or revoked."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The credential may not perform this action, or the account is blocked."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such resource in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A quota or rate limit was exceeded."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ping Webhook",
        "tags": [
          "v1"
        ],
        "x-ellipsis-permissions": {
          "constraints": [
            {
              "account_admin_fields": [],
              "identity": null,
              "sandbox_scope": null
            }
          ],
          "description": "Required permissions: write:webhooks.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Not supported by session tokens, even with permissions.ellipsis enabled.\nHigher permission levels include lower levels: read < write < delete.",
          "notes": [
            "Higher permission levels include lower levels: read < write < delete."
          ],
          "required": [
            {
              "level": "write",
              "resource": "webhooks"
            }
          ],
          "tokens": [
            {
              "available": true,
              "conditions": [],
              "kind": "api_key",
              "label": "API key"
            },
            {
              "available": true,
              "conditions": [],
              "kind": "user_token",
              "label": "CLI user token"
            },
            {
              "available": false,
              "conditions": [
                "Not supported by session tokens, even with permissions.ellipsis enabled."
              ],
              "kind": "sandbox_token",
              "label": "Session token"
            }
          ]
        },
        "x-ellipsis-sdk-method": "webhooks.ping"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ellipsis.dev"
    }
  ]
}
