{
  "components": {
    "schemas": {
      "AgentConfig": {
        "additionalProperties": false,
        "properties": {
          "budget": {
            "$ref": "#/components/schemas/AgentConfigBudget",
            "default": {}
          },
          "claude": {
            "$ref": "#/components/schemas/AgentConfigClaude",
            "default": {
              "model": "claude-opus-5",
              "system": ""
            }
          },
          "codex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigCodex"
              },
              {
                "type": "null"
              }
            ]
          },
          "ellipsis": {
            "$ref": "#/components/schemas/AgentConfigEllipsis",
            "default": {
              "enabled": true,
              "ide": true,
              "interactive": true,
              "metadata": {
                "annotations": {},
                "labels": []
              },
              "version": "v1"
            }
          },
          "environment": {
            "$ref": "#/components/schemas/AgentConfigEnvironment",
            "default": {
              "compute": {},
              "hooks": {},
              "image": {},
              "ports": [
                3000,
                5173,
                8000,
                8080
              ],
              "repositories": [],
              "variables": []
            }
          },
          "llm": {
            "$ref": "#/components/schemas/AgentConfigLlm",
            "default": {}
          },
          "mcp_servers": {
            "default": [],
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/AgentConfigMcpServer"
                }
              ]
            },
            "title": "Mcp Servers",
            "type": "array"
          },
          "permissions": {
            "$ref": "#/components/schemas/AgentConfigPermissions",
            "default": {
              "ellipsis": true,
              "github": {}
            }
          },
          "skills": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentConfigSkill"
            },
            "title": "Skills",
            "type": "array"
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigStructuredOutput"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "cron": "#/components/schemas/AgentConfigCronTrigger",
                    "mention": "#/components/schemas/AgentConfigMentionTrigger",
                    "react": "#/components/schemas/AgentConfigReactTrigger"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AgentConfigCronTrigger"
                  },
                  {
                    "$ref": "#/components/schemas/AgentConfigReactTrigger"
                  },
                  {
                    "$ref": "#/components/schemas/AgentConfigMentionTrigger"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger"
          }
        },
        "title": "AgentConfig",
        "type": "object"
      },
      "AgentConfigBudget": {
        "additionalProperties": false,
        "properties": {
          "day": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day"
          },
          "month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Month"
          },
          "session": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session"
          },
          "week": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Week"
          }
        },
        "title": "AgentConfigBudget",
        "type": "object"
      },
      "AgentConfigClaude": {
        "additionalProperties": false,
        "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": {
            "default": "claude-opus-5",
            "title": "Model",
            "type": "string"
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigSettingsRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/AgentConfigSystemFileRef"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/AgentConfigSystemFileRef"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "default": "",
            "title": "System"
          }
        },
        "title": "AgentConfigClaude",
        "type": "object"
      },
      "AgentConfigCodex": {
        "additionalProperties": false,
        "description": "The `codex:` block \u2014 run this agent on OpenAI's Codex CLI instead of\nClaude Code. Declaring the block at all is what selects the harness\n(`AgentConfig.harness`).\n\nDeliberately a small subset of `AgentConfigClaude`: the fields omitted here\nare ones Codex has no equivalent for (`effort`, `fallback_model`,\n`settings`) or that the platform does not yet wire through for this harness\n(`max_turns`, `skills`, MCP servers). They are omitted rather than\naccepted-and-ignored, because `StrictConfigModel` forbids extra keys \u2014 so a\nconfig that sets one fails loudly at parse time instead of silently not doing\nit. The budget still bounds a run regardless.",
        "properties": {
          "model": {
            "default": "bedrock-gpt-5.6-terra",
            "title": "Model",
            "type": "string"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/AgentConfigSystemFileRef"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/AgentConfigSystemFileRef"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "default": "",
            "title": "System"
          }
        },
        "title": "AgentConfigCodex",
        "type": "object"
      },
      "AgentConfigCompute": {
        "additionalProperties": false,
        "description": "Sandbox compute sizing. Every field is optional; None inherits the\nplatform default (1 vCPU / 4096 MiB / 3600s \u2014 see DEFAULT_MODAL_* in\nmodels/ellipsis/sandboxes/sandbox.py). A resolved value outside the platform\nbounds fails validation loudly (a sync error on the config) rather than\nbeing 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 sandbox driver consumes.\n\n`timeout` is the max wall-clock the agent may run before the sandbox is\nkilled, capped at 1h (MAX_SANDBOX_TIMEOUT_SECONDS \u2014 equal to the default, so\ntoday the knob only shortens a session; the cap matches the 1-hour validity\nof the sandbox's GitHub token). The worker's lease/visibility heartbeat\nceiling is derived from that cap, so a run at the max stays owned by its\nworker for its whole life.\n\nCompute is billed on the requested allocation over the sandbox's\nwall-clock lifetime, so a bigger/longer box costs proportionally more.",
        "properties": {
          "cpu": {
            "anyOf": [
              {
                "maximum": 16.0,
                "minimum": 0.125,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/AgentConfigMemorySize"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "timeout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/AgentConfigDuration"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout"
          }
        },
        "title": "AgentConfigCompute",
        "type": "object"
      },
      "AgentConfigCronTrigger": {
        "additionalProperties": false,
        "properties": {
          "schedule": {
            "title": "Schedule",
            "type": "string"
          },
          "type": {
            "const": "cron",
            "default": "cron",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "schedule"
        ],
        "title": "AgentConfigCronTrigger",
        "type": "object"
      },
      "AgentConfigDuration": {
        "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": "AgentConfigDuration",
        "type": "object"
      },
      "AgentConfigEllipsis": {
        "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`, whether the agent is `enabled`, and the two\nhuman-access flags (`interactive`/`ide`). The presence of a top-level\n`ellipsis:` mapping is what marks a YAML file as an Ellipsis agent config (vs\narbitrary YAML that merely lives under a config directory) \u2014 see\n`yaml_is_ellipsis_config`.\n\n`enabled`/`interactive`/`ide` are agent behavior, not freeform metadata, so\nthey stay inside the config `sha` (only `metadata` is sha-excluded).\n`interactive` and `ide` are sibling human-access flags: `interactive` lets a\nhuman `agent session connect` to a live session (CLI relay); `ide` lets a\nhuman open an editor / a port URL into the sandbox. Neither decides whether a\nsession is ephemeral or durable \u2014 that is the trigger's job.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "ide": {
            "default": true,
            "title": "Ide",
            "type": "boolean"
          },
          "interactive": {
            "default": true,
            "title": "Interactive",
            "type": "boolean"
          },
          "metadata": {
            "$ref": "#/components/schemas/AgentConfigMetadata",
            "default": {
              "annotations": {},
              "labels": []
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "default": "v1",
            "title": "Version",
            "type": "string"
          }
        },
        "title": "AgentConfigEllipsis",
        "type": "object"
      },
      "AgentConfigEnvironment": {
        "additionalProperties": false,
        "description": "Everything about the environment (the sandbox) the agent runs in: which\n`repositories` are cloned into it, which environment `variables` it gets,\nits `compute` sizing, how its `image` is customized, 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 sandbox-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/AgentConfigCompute",
            "default": {}
          },
          "hooks": {
            "$ref": "#/components/schemas/AgentConfigEnvironmentHooks",
            "default": {}
          },
          "image": {
            "$ref": "#/components/schemas/AgentConfigEnvironmentImage",
            "default": {}
          },
          "ports": {
            "default": [
              3000,
              5173,
              8000,
              8080
            ],
            "items": {
              "type": "integer"
            },
            "title": "Ports",
            "type": "array"
          },
          "repositories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentConfigRepository"
            },
            "title": "Repositories",
            "type": "array"
          },
          "variables": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentConfigEnvironmentVariable"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "title": "AgentConfigEnvironment",
        "type": "object"
      },
      "AgentConfigEnvironmentHooks": {
        "additionalProperties": false,
        "description": "Shell scripts run at points in the sandbox lifecycle, each as the sandbox\nuser with the sandbox's environment variables available. A non-zero exit\nfails the run (exit_status = LIFECYCLE_HOOK_FAILED) and is not retried.\n\n`post_start` runs after the container starts, before any repo is cloned \u2014\nrepo-independent setup (authenticate a CLI, e.g. `doppler setup`). On Modal\nthe repo is baked into the image so it is incidentally present, but\n`post_start` must not depend on repo contents (that's `post_clone`).\n\n`post_clone` runs after all repos are cloned/checked out, before the agent \u2014\nrepo-dependent setup (`pip install -r requirements.txt`, codegen).\n\nHooks run on every run and their output is never cached. A dependency\ninstall whose result should be reused across runs belongs in `image.setup`\n(baked into the cached image) instead; keep hooks for per-run work \u2014 e.g.\nanything that touches run-scoped credentials.",
        "properties": {
          "post_clone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Clone"
          },
          "post_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Start"
          }
        },
        "title": "AgentConfigEnvironmentHooks",
        "type": "object"
      },
      "AgentConfigEnvironmentImage": {
        "additionalProperties": false,
        "description": "How to customize the container image the agent runs in. You\ncontribute appended layers (`dockerfile_append`) and a build-time script\n(`setup`) only \u2014 Ellipsis owns FROM / base tooling / entrypoint / user.\nToday only inline bodies are supported; a file reference (resolved at the\nrun's SHA) will come later.\n\nThe split: `dockerfile_append` runs when the image is assembled, before any\nrepo exists \u2014 toolchain installs (a package manager binary, apt packages).\n`setup` runs at image-build time *after* the configured repositories are\nchecked out, and its output is captured by the filesystem snapshot that\nbecomes the cached image \u2014 dependency installs (`poetry install`,\n`npm install`), so later runs start with deps already on disk. Neither runs\nper run; that's `hooks.post_start` / `hooks.post_clone`.",
        "properties": {
          "dockerfile_append": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dockerfile Append"
          },
          "setup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup"
          }
        },
        "title": "AgentConfigEnvironmentImage",
        "type": "object"
      },
      "AgentConfigEnvironmentVariable": {
        "additionalProperties": false,
        "description": "One environment variable injected into the agent's sandbox.\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 sandbox-secrets store (dashboard\n/ `PUT /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": "AgentConfigEnvironmentVariable",
        "type": "object"
      },
      "AgentConfigGithubPermissions": {
        "additionalProperties": false,
        "description": "The agent's GitHub access: the scope of the installation token minted for\nits sandbox \u2014 the credential `git`, `gh`, and the GitHub MCP server\nauthenticate with.\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 sandbox 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": "AgentConfigGithubPermissions",
        "type": "object"
      },
      "AgentConfigLlm": {
        "additionalProperties": false,
        "description": "Where this agent's completions go.\n\nDefaults to Ellipsis's own LLM proxy (our Anthropic/Bedrock account, or the\naccount-wide BYO provider if one is enabled). Setting `proxy` to the id of a\nproxy registered on the models settings page routes THIS agent's\ncompletions through that gateway instead.\n\nOpt-in per agent by design: registering a proxy does not silently move any\nexisting agent's traffic. The id is account-scoped, so naming another\naccount's id is a terminal config error, not a route.",
        "properties": {
          "proxy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proxy"
          }
        },
        "title": "AgentConfigLlm",
        "type": "object"
      },
      "AgentConfigMcpServer": {
        "additionalProperties": false,
        "description": "One built-in MCP server this agent opts into by name (`linear`/`slack`).\nThis is a name reference over the connected built-in set, NOT a custom-server\ndefinition \u2014 there is no command/url/headers shape (that was the old,\nremoved field, and Ellipsis does not support bring-your-own MCP servers).\nIt only matters when the named integration is set to `opt_in` inclusion; an\nintegration in the default `all_sessions` mode is added regardless.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "AgentConfigMcpServer",
        "type": "object"
      },
      "AgentConfigMemorySize": {
        "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": "AgentConfigMemorySize",
        "type": "object"
      },
      "AgentConfigMentionPlatform": {
        "description": "The surface an @ellipsis mention can come from.",
        "enum": [
          "github",
          "slack",
          "linear"
        ],
        "title": "AgentConfigMentionPlatform",
        "type": "string"
      },
      "AgentConfigMentionTrigger": {
        "additionalProperties": false,
        "properties": {
          "platforms": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentConfigMentionPlatform"
            },
            "title": "Platforms",
            "type": "array"
          },
          "type": {
            "const": "mention",
            "default": "mention",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "AgentConfigMentionTrigger",
        "type": "object"
      },
      "AgentConfigMetadata": {
        "additionalProperties": false,
        "properties": {
          "annotations": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "title": "Annotations",
            "type": "object"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          }
        },
        "title": "AgentConfigMetadata",
        "type": "object"
      },
      "AgentConfigPermissions": {
        "additionalProperties": false,
        "description": "What the agent is allowed to touch, per credential the platform mints\ninto its sandbox. Distinct from `environment:`, which is where the agent\nruns; this is what it may do from there.\n\n`ellipsis` scopes the sandbox's Ellipsis API token\n(`ELLIPSIS_API_TOKEN`, what the in-sandbox `agent` CLI authenticates\nwith). Only full access exists today \u2014 `true` or the string `all`, both\nmeaning the token may call any Ellipsis API a sandbox token can. The key\nis declarative for now; it reserves the spot for narrowing later, and\nanything other than true/`all` (including `false`) fails validation.\n\n`github` scopes the sandbox's GitHub installation token (`GH_TOKEN`) \u2014\nsee `AgentConfigGithubPermissions`. GitHub enforces it at mint time.",
        "properties": {
          "ellipsis": {
            "default": true,
            "enum": [
              true,
              "all"
            ],
            "title": "Ellipsis"
          },
          "github": {
            "$ref": "#/components/schemas/AgentConfigGithubPermissions",
            "default": {}
          }
        },
        "title": "AgentConfigPermissions",
        "type": "object"
      },
      "AgentConfigReactTrigger": {
        "additionalProperties": false,
        "properties": {
          "issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactIssue"
              },
              {
                "type": "null"
              }
            ]
          },
          "linear_issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactLinearIssue"
              },
              {
                "type": "null"
              }
            ]
          },
          "pull_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPullRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "push": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactPush"
              },
              {
                "type": "null"
              }
            ]
          },
          "sentry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSentry"
              },
              {
                "type": "null"
              }
            ]
          },
          "slack_channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactSlackChannel"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "const": "react",
            "default": "react",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "AgentConfigReactTrigger",
        "type": "object"
      },
      "AgentConfigRepository": {
        "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": "AgentConfigRepository",
        "type": "object"
      },
      "AgentConfigSettingsRef": {
        "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/AgentConfigRepository"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path"
        ],
        "title": "AgentConfigSettingsRef",
        "type": "object"
      },
      "AgentConfigSkill": {
        "additionalProperties": false,
        "description": "One config-declared Claude Code skill: a repository directory containing\na SKILL.md, resolved at run start and installed at the sandbox's personal\nskill level (`~/.claude/skills/<basename(path)>/`). This is how a config\nbrings in skills its cloned repositories don't provide \u2014 cross-repo refs\n(an org-wide skills repo), public third-party repos, and repo-less runs.\nSkills under a cloned repo's own `.claude/skills/` load by themselves and\ndon't need an entry here.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigRepository"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path"
        ],
        "title": "AgentConfigSkill",
        "type": "object"
      },
      "AgentConfigSourceGithub": {
        "description": "Identifies the file a GitHub-sourced agent config is synced from.\n\nKeyed on 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": "AgentConfigSourceGithub",
        "type": "object"
      },
      "AgentConfigStructuredOutput": {
        "additionalProperties": false,
        "properties": {
          "json_schema": {
            "additionalProperties": true,
            "title": "Json Schema",
            "type": "object"
          },
          "type": {
            "const": "json_schema",
            "default": "json_schema",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "json_schema"
        ],
        "title": "AgentConfigStructuredOutput",
        "type": "object"
      },
      "AgentConfigSystemFileRef": {
        "additionalProperties": false,
        "properties": {
          "file": {
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "AgentConfigSystemFileRef",
        "type": "object"
      },
      "AgentDefaultV1": {
        "description": "A default-agent setting: which agent config serves sessions started\nwithout an explicit config, for the whole account or for one repository.",
        "properties": {
          "broken": {
            "anyOf": [
              {
                "enum": [
                  "config_deleted",
                  "config_disabled",
                  "config_pending_pr",
                  "repo_inaccessible"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why this default cannot serve sessions, or null when it is healthy.",
            "title": "Broken"
          },
          "config_id": {
            "description": "The agent config this default points at.",
            "title": "Config Id",
            "type": "string"
          },
          "config_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pointed-at config's name; null when the config no longer exists.",
            "title": "Config Name"
          },
          "id": {
            "description": "The default's unique identifier.",
            "title": "Id",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository this default applies to, as \"owner/name\", or null for the account-wide default.",
            "title": "Repository"
          },
          "updated_at": {
            "description": "When the default was last changed.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config_id",
          "updated_at"
        ],
        "title": "AgentDefaultV1",
        "type": "object"
      },
      "AgentSessionExitStatus": {
        "description": "Why a terminal agent session ended \u2014 a finer-grained reason than `status`.\n\n`status` (AgentSessionStatus) is the lifecycle state: COMPLETED / ERROR /\nCANCELLED. `exit_status` explains *why* a run reached that terminal state, so\nthe UI and metrics can tell a budget cutoff apart from a crashed tool call or\na deliberate cancellation. It is None until the run reaches a terminal state.",
        "enum": [
          "completed",
          "budget_hit",
          "payment_required",
          "tool_call_failed",
          "lifecycle_hook_failed",
          "missing_repo_access",
          "missing_token_permissions",
          "missing_sandbox_variables",
          "cancelled",
          "interrupted",
          "error",
          "stopped"
        ],
        "title": "AgentSessionExitStatus",
        "type": "string"
      },
      "AgentSessionPr": {
        "description": "A pull request this session created, denormalized at capture time so\nsession surfaces render a labeled link without joining gh_prs. Live PR\nstate (open/merged/closed) is not stored here \u2014 read it from gh_prs where\na view needs it.",
        "properties": {
          "gh_pr_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gh Pr Id"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "repo_full_name": {
            "title": "Repo Full Name",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "repo_full_name",
          "number",
          "url"
        ],
        "title": "AgentSessionPr",
        "type": "object"
      },
      "AgentSessionSource": {
        "enum": [
          "react",
          "manual",
          "api",
          "cli",
          "mention",
          "cron",
          "laptop"
        ],
        "title": "AgentSessionSource",
        "type": "string"
      },
      "AgentSessionStatus": {
        "enum": [
          "scheduled",
          "creating_sandbox",
          "running",
          "retrying",
          "completed",
          "error",
          "cancelled",
          "stopped"
        ],
        "title": "AgentSessionStatus",
        "type": "string"
      },
      "AgentSessionWire": {
        "description": "An agent session: one conversation with an agent, from trigger to\nterminal state. Returned by `GET /sessions/{id}` and carried by the\nsession stream's `session`/`snapshot` frames \u2014 REST and stream never\ndisagree about what a session looks like.",
        "properties": {
          "agent_config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the saved agent config the session ran on, if any.",
            "title": "Agent Config Id"
          },
          "attributed_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user the session is attributed to, when the attribution is a GitHub user."
          },
          "attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the principal the session is attributed to.",
            "title": "Attribution Id"
          },
          "attribution_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)."
          },
          "client_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version of the client that started the session, if reported.",
            "title": "Client Version"
          },
          "config_override": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The partial-config diff applied for this run; null when the config was unmodified.",
            "title": "Config Override"
          },
          "context_repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The \"owner/name\" repository context the session was started in, if any.",
            "title": "Context Repository"
          },
          "cost_fee": {
            "default": 0,
            "description": "Platform fee in millicents.",
            "title": "Cost Fee",
            "type": "integer"
          },
          "cost_sandbox_cpu": {
            "default": 0,
            "description": "Sandbox CPU spend in millicents.",
            "title": "Cost Sandbox Cpu",
            "type": "integer"
          },
          "cost_sandbox_memory": {
            "default": 0,
            "description": "Sandbox memory spend in millicents.",
            "title": "Cost Sandbox Memory",
            "type": "integer"
          },
          "cost_tokens": {
            "description": "Token spend in millicents. The session's grand total cost is the sum of cost_tokens, cost_sandbox_cpu, cost_sandbox_memory, and cost_fee.",
            "title": "Cost Tokens",
            "type": "integer"
          },
          "created_at": {
            "description": "When the session was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "description": "Identifier of the account that owns the session.",
            "title": "Customer Id",
            "type": "string"
          },
          "default_resolution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultResolution"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the session's config was resolved from the account's defaults, when no explicit config was given."
          },
          "exit_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentSessionExitStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the session ended; null until it is terminal."
          },
          "harness": {
            "$ref": "#/components/schemas/Harness",
            "description": "The coding-agent harness the session runs on."
          },
          "id": {
            "description": "Unique identifier of the session.",
            "title": "Id",
            "type": "string"
          },
          "last_activity_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the session last showed activity.",
            "title": "Last Activity At"
          },
          "last_message_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the session last received a message.",
            "title": "Last Message At"
          },
          "live_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A live summary of the session's progress while it runs.",
            "title": "Live Summary"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Caller-supplied metadata key-value pairs.",
            "title": "Metadata",
            "type": "object"
          },
          "output_prs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentSessionPr"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pull requests the session created or updated.",
            "title": "Output Prs"
          },
          "parent_agent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the parent session that spawned this one, if any.",
            "title": "Parent Agent Session Id"
          },
          "parent_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParentKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "How this session relates to its parent session, if any."
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The per-session prompt the session was started with.",
            "title": "Prompt"
          },
          "prompting": {
            "$ref": "#/components/schemas/SessionPrompting",
            "description": "Whether a client may send this session a message and, when it may not, the reason to show instead of a composer."
          },
          "replayed_from_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the original session this one was replayed from, if it was started via replay.",
            "title": "Replayed From Session Id"
          },
          "resolved_budget_cents": {
            "description": "The spend budget resolved for this session, in cents.",
            "title": "Resolved Budget Cents",
            "type": "integer"
          },
          "resolved_budget_source": {
            "$ref": "#/components/schemas/BudgetSource",
            "description": "Where the resolved budget came from."
          },
          "sandbox_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the sandbox the session runs in, if any.",
            "title": "Sandbox Id"
          },
          "session_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key identifying the durable conversation this session belongs to, or null for single-shot sessions.",
            "title": "Session Key"
          },
          "session_state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionState"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lifecycle state of the durable conversation, or null for sessions without one."
          },
          "source": {
            "$ref": "#/components/schemas/AgentSessionSource",
            "description": "Where the session came from (e.g. react, manual, api, cli, mention, cron, laptop)."
          },
          "status": {
            "$ref": "#/components/schemas/AgentSessionStatus",
            "description": "Execution status of the session."
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable reason for the current status, when there is one.",
            "title": "Status Reason"
          },
          "stopped_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a stop was requested, if one was.",
            "title": "Stopped At"
          },
          "stopped_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "GitHub account id of the user who stopped the session, if known.",
            "title": "Stopped By"
          },
          "stopped_by_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user who stopped the session, if it was stopped."
          },
          "surface": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionSurface"
              },
              {
                "type": "null"
              }
            ],
            "description": "The public status projection; null for laptop-synced sessions."
          },
          "tokens_cache_creation": {
            "default": 0,
            "description": "Tokens written to the prompt cache.",
            "title": "Tokens Cache Creation",
            "type": "integer"
          },
          "tokens_cache_read": {
            "default": 0,
            "description": "Tokens read from the prompt cache.",
            "title": "Tokens Cache Read",
            "type": "integer"
          },
          "tokens_input": {
            "default": 0,
            "description": "Input tokens used.",
            "title": "Tokens Input",
            "type": "integer"
          },
          "tokens_model": {
            "description": "The model the token counts are attributed to.",
            "title": "Tokens Model",
            "type": "string"
          },
          "tokens_output": {
            "default": 0,
            "description": "Output tokens used.",
            "title": "Tokens Output",
            "type": "integer"
          },
          "tokens_total": {
            "default": 0,
            "description": "Total tokens used by the session.",
            "title": "Tokens Total",
            "type": "integer"
          },
          "updated_at": {
            "description": "When the session was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "webhook_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the webhook event that triggered the session, if any.",
            "title": "Webhook Id"
          },
          "webhook_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of the webhook event that triggered the session, if any."
          }
        },
        "required": [
          "id",
          "customer_id",
          "created_at",
          "updated_at",
          "harness",
          "source",
          "cost_tokens",
          "tokens_model",
          "resolved_budget_cents",
          "resolved_budget_source",
          "status",
          "prompting"
        ],
        "title": "AgentSessionWire",
        "type": "object"
      },
      "AgentTemplate": {
        "description": "A built-in agent template: a ready-to-use agent config 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 config YAML, ready to write to disk.",
            "title": "Yaml",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "tags",
          "summary",
          "use_case",
          "yaml"
        ],
        "title": "AgentTemplate",
        "type": "object"
      },
      "AgentTurn": {
        "description": "One exchange within a session: a single Claude Code execution driven by the\nsession's inbox. Over subsequent slices this absorbs the per-execution fields\n(status, cost, tokens, exit_status) that currently live on agent_sessions.",
        "properties": {
          "agent_session_id": {
            "title": "Agent Session Id",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cost_fee": {
            "default": 0,
            "title": "Cost Fee",
            "type": "integer"
          },
          "cost_sandbox_cpu": {
            "default": 0,
            "title": "Cost Sandbox Cpu",
            "type": "integer"
          },
          "cost_sandbox_memory": {
            "default": 0,
            "title": "Cost Sandbox Memory",
            "type": "integer"
          },
          "cost_tokens": {
            "default": 0,
            "title": "Cost Tokens",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "exit_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentSessionExitStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "react_action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "React Action"
          },
          "sandbox_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sandbox Id"
          },
          "session_execution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Execution Id"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/AgentTurnStatus"
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Reason"
          },
          "tokens_cache_creation": {
            "default": 0,
            "title": "Tokens Cache Creation",
            "type": "integer"
          },
          "tokens_cache_read": {
            "default": 0,
            "title": "Tokens Cache Read",
            "type": "integer"
          },
          "tokens_input": {
            "default": 0,
            "title": "Tokens Input",
            "type": "integer"
          },
          "tokens_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens Model"
          },
          "tokens_output": {
            "default": 0,
            "title": "Tokens Output",
            "type": "integer"
          },
          "tokens_total": {
            "default": 0,
            "title": "Tokens Total",
            "type": "integer"
          },
          "turn_index": {
            "title": "Turn Index",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "webhook_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Id"
          },
          "webhook_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "agent_session_id",
          "turn_index",
          "created_at",
          "updated_at",
          "status"
        ],
        "title": "AgentTurn",
        "type": "object"
      },
      "AgentTurnStatus": {
        "enum": [
          "scheduled",
          "running",
          "completed",
          "error",
          "cancelled"
        ],
        "title": "AgentTurnStatus",
        "type": "string"
      },
      "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"
          },
          "customer_id": {
            "description": "The account the alert belongs to.",
            "title": "Customer Id",
            "type": "string"
          },
          "dedupe_key": {
            "description": "Deduplication key: at most one open alert exists per account and key, so re-raising a known condition is a no-op.",
            "title": "Dedupe Key",
            "type": "string"
          },
          "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",
          "customer_id",
          "created_at",
          "updated_at",
          "source",
          "severity",
          "title",
          "body",
          "dedupe_key",
          "status"
        ],
        "title": "Alert",
        "type": "object"
      },
      "AlertSeverity": {
        "description": "Cosmetic only (badge tone, Slack emoji, email subject prefix). Routing\nis the category's job, never severity's.",
        "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"
      },
      "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"
      },
      "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"
      },
      "BudgetSource": {
        "description": "Which layer actually determined the enforced budget.\n\nNot derivable from the run row alone (the run does not store the config\ncents or the account default), so we persist it for the UI / audit.",
        "enum": [
          "system",
          "account",
          "config",
          "run"
        ],
        "title": "BudgetSource",
        "type": "string"
      },
      "BudgetSummary": {
        "description": "The account's budget and spend for the current period, in one call \u2014\nno client-side arithmetic needed.",
        "properties": {
          "budget_usd": {
            "description": "The budget for the period, in US dollars.",
            "title": "Budget Usd",
            "type": "number"
          },
          "fraction_used": {
            "description": "The fraction of the budget spent, from 0 to 1 (and above 1 when over budget).",
            "title": "Fraction Used",
            "type": "number"
          },
          "pause_at_limit": {
            "description": "Whether new work is paused once the budget is exhausted.",
            "title": "Pause At Limit",
            "type": "boolean"
          },
          "period": {
            "description": "The budget period (e.g. \"monthly\").",
            "title": "Period",
            "type": "string"
          },
          "remaining_usd": {
            "description": "The budget remaining in the period, in US dollars.",
            "title": "Remaining Usd",
            "type": "number"
          },
          "spent_usd": {
            "description": "What has been spent in the period, in US dollars.",
            "title": "Spent Usd",
            "type": "number"
          },
          "window": {
            "$ref": "#/components/schemas/BudgetWindow",
            "description": "The time window the summary covers."
          }
        },
        "required": [
          "period",
          "window",
          "budget_usd",
          "spent_usd",
          "remaining_usd",
          "fraction_used",
          "pause_at_limit"
        ],
        "title": "BudgetSummary",
        "type": "object"
      },
      "BudgetWindow": {
        "description": "The time window a budget summary covers.",
        "properties": {
          "end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the budget period ends, as an ISO timestamp.",
            "title": "End"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the budget period started, as an ISO timestamp.",
            "title": "Start"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "BudgetWindow",
        "type": "object"
      },
      "CliAuthPollRequest": {
        "description": "A device-flow poll from the CLI.",
        "properties": {
          "device_code": {
            "description": "The device code returned by POST /auth/cli/start.",
            "title": "Device Code",
            "type": "string"
          }
        },
        "required": [
          "device_code"
        ],
        "title": "CliAuthPollRequest",
        "type": "object"
      },
      "CodeReviewRunStatus": {
        "enum": [
          "scheduled",
          "running",
          "posting",
          "completed",
          "skipped",
          "error",
          "cancelled"
        ],
        "title": "CodeReviewRunStatus",
        "type": "string"
      },
      "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"
      },
      "CreateAgentConfigRequest": {
        "description": "Parameters for creating an agent config via a pull request. Exactly\none of config or template_id must be set.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "An inline agent config."
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "File path within the repo. Omit for the default agents/<slug>.yaml; if set it must be a location the config sync scans (a .yaml/.yml file under agents/, .agents/, ellipsis/, or .ellipsis/ at any depth).",
            "title": "Path"
          },
          "repository": {
            "description": "Target 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"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A gallery template slug (see GET /agents/templates).",
            "title": "Template Id"
          }
        },
        "required": [
          "repository"
        ],
        "title": "CreateAgentConfigRequest",
        "type": "object"
      },
      "CreateFileRequest": {
        "description": "Upload a file owned by the calling account.",
        "properties": {
          "content_type": {
            "description": "The MIME type of the file. Only image/png is currently supported, and the uploaded bytes must actually be a PNG.",
            "title": "Content Type",
            "type": "string"
          },
          "data_b64": {
            "description": "The raw file bytes, base64-encoded.",
            "title": "Data B64",
            "type": "string"
          },
          "filename": {
            "description": "The original file basename. Used for display only.",
            "title": "Filename",
            "type": "string"
          }
        },
        "required": [
          "filename",
          "content_type",
          "data_b64"
        ],
        "title": "CreateFileRequest",
        "type": "object"
      },
      "CreateFileResponse": {
        "description": "The stored file and the shareable link to it.",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/FileView",
            "description": "The stored file's metadata."
          },
          "url": {
            "description": "The file's dashboard URL (app.ellipsis.dev/files/{id}). Access is gated to members of the owning organization, so this link is safe to share, e.g. in a pull request comment.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "file",
          "url"
        ],
        "title": "CreateFileResponse",
        "type": "object"
      },
      "CreateReviewRequest": {
        "description": "Request an explicit review of one existing pull request.\n\nWhich review pipeline runs is not a parameter: it is resolved from the\nrepository's committed code-review configuration, the same way an\nautomatic review resolves it. To change what runs, commit a\n`.ellipsis/code_review.yaml`.",
        "properties": {
          "owner": {
            "description": "The repository owner's login.",
            "title": "Owner",
            "type": "string"
          },
          "post": {
            "default": true,
            "description": "Whether the review is posted to GitHub. Setting this false keeps the review API-only; it cannot force posting where posting is otherwise disabled.",
            "title": "Post",
            "type": "boolean"
          },
          "pull_request_number": {
            "description": "The pull request to review.",
            "title": "Pull Request Number",
            "type": "integer"
          },
          "repo": {
            "description": "The repository name, without the owner.",
            "title": "Repo",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/ReviewScope",
            "default": {
              "kind": "incremental"
            },
            "description": "What range to review. Defaults to an incremental review of everything since the last review."
          }
        },
        "required": [
          "owner",
          "repo",
          "pull_request_number"
        ],
        "title": "CreateReviewRequest",
        "type": "object"
      },
      "CreatedAgentConfig": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SavedAgentConfig"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "pull_request_url": {
            "title": "Pull Request Url",
            "type": "string"
          }
        },
        "required": [
          "config",
          "path",
          "pull_request_url"
        ],
        "title": "CreatedAgentConfig",
        "type": "object"
      },
      "DefaultResolution": {
        "description": "How a session that arrived with no explicit config source resolved its\nconfig (documents/eng/DEFAULT_CONFIGS.md \u00a74). Persisted on the session so\naudit and clients can say \"ran under X (repo default)\". A session started\nwith an explicit config/config_id/template_id never enters resolution and\nstores None.",
        "enum": [
          "repo_default",
          "account_default",
          "none"
        ],
        "title": "DefaultResolution",
        "type": "string"
      },
      "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"
      },
      "EnvironmentVariableInput": {
        "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 sandboxes but never returned by the API.",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "title": "EnvironmentVariableInput",
        "type": "object"
      },
      "ErrorInfo": {
        "properties": {
          "code": {
            "description": "Stable machine-readable error code. Open vocabulary \u2014 handle unknown codes by HTTP status. Known values: account_blocked, conflict, default_config_broken, failed_dependency, file_quota_exceeded, forbidden, internal_error, invalid_request, not_found, rate_limited, review_in_flight, session_closed, session_ephemeral_trigger, session_finished, session_harness_single_turn, session_laptop, session_mention_surface, session_non_interactive, unauthorized, 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"
      },
      "ExecutionStatus": {
        "description": "Per-execution status ladder (was AgentProcessStatus). Distinct from the\nsession's durable `session_state` and from `agent_sessions.status`, which\nremains the atomic claim/dispatch guard.",
        "enum": [
          "running",
          "failed",
          "done"
        ],
        "title": "ExecutionStatus",
        "type": "string"
      },
      "FileView": {
        "description": "A file's metadata \u2014 the file itself is fetched via a separate\ndownload URL.",
        "properties": {
          "agent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent session that produced this file, when it was uploaded from a sandbox. Null for uploads made outside an agent session.",
            "title": "Agent Session Id"
          },
          "content_type": {
            "description": "The file's MIME type.",
            "title": "Content Type",
            "type": "string"
          },
          "created_at": {
            "description": "When the file was uploaded.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "filename": {
            "description": "The original file basename, for display.",
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "description": "The file's unique identifier.",
            "title": "Id",
            "type": "string"
          },
          "size_bytes": {
            "description": "The size of the stored file in bytes.",
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "filename",
          "content_type",
          "size_bytes",
          "created_at"
        ],
        "title": "FileView",
        "type": "object"
      },
      "FindingAnchor": {
        "description": "Where a finding's line anchor landed relative to the PR diff.",
        "enum": [
          "valid",
          "snapped",
          "not_commentable"
        ],
        "title": "FindingAnchor",
        "type": "string"
      },
      "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/RecentPullRequestDTO"
            },
            "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"
      },
      "GetFileResponse": {
        "description": "One file's metadata plus its shareable link and a short-lived\ndownload URL.",
        "properties": {
          "download_url": {
            "description": "A short-lived presigned URL for downloading the file bytes. Fetch it immediately \u2014 it expires within about a minute.",
            "title": "Download Url",
            "type": "string"
          },
          "file": {
            "$ref": "#/components/schemas/FileView",
            "description": "The file's metadata."
          },
          "url": {
            "description": "The file's dashboard URL \u2014 the same shareable link returned when the file was created.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "file",
          "url",
          "download_url"
        ],
        "title": "GetFileResponse",
        "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"
      },
      "GetSandboxVariablesResponse": {
        "description": "The account's sandbox environment variables, names and timestamps only \u2014\nvalues are never returned.",
        "properties": {
          "variables": {
            "description": "The stored variables.",
            "items": {
              "$ref": "#/components/schemas/SandboxEnvironmentVariableSummary"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "variables"
        ],
        "title": "GetSandboxVariablesResponse",
        "type": "object"
      },
      "GetSessionIdeResponse": {
        "description": "The IDE link for a session's live sandbox.",
        "properties": {
          "url": {
            "description": "The membership-gated dashboard page for the session's sandbox. The page performs the proxy handoff itself, so the URL carries no credential \u2014 safe to share with any org member, in a transcript, or in a Slack message.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "GetSessionIdeResponse",
        "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, sandbox output, message events), archived into\nseq-ranged segments. For a running session `latest_feed_seq` may exceed\n`archived_through_feed_seq`; `caught_up` 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"
          },
          "caught_up": {
            "description": "Whether the archived segments cover the session's whole history so far.",
            "title": "Caught Up",
            "type": "boolean"
          },
          "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"
          },
          "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/SessionLogSegmentView"
            },
            "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",
          "caught_up",
          "segments"
        ],
        "title": "GetSessionLogResponse",
        "type": "object"
      },
      "GetSessionPortResponse": {
        "description": "A preview link for a port in a session's live sandbox.",
        "properties": {
          "port": {
            "description": "The sandbox port the link previews.",
            "title": "Port",
            "type": "integer"
          },
          "url": {
            "description": "The same membership-gated dashboard page as the IDE URL, deep-linked to a preview port (a dev server the agent or the IDE user started).",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "port"
        ],
        "title": "GetSessionPortResponse",
        "type": "object"
      },
      "GetSupportedModelsResponse": {
        "properties": {
          "models": {
            "items": {
              "$ref": "#/components/schemas/SupportedModelApi"
            },
            "title": "Models",
            "type": "array"
          }
        },
        "required": [
          "models"
        ],
        "title": "GetSupportedModelsResponse",
        "type": "object"
      },
      "GetUsageDashboardResponse": {
        "description": "The account's usage over a period: token and cost totals, a per-day\nseries, and a per-model breakdown. Costs are in millicents (1000 = $0.01);\ntoken counts include cache reads and writes \u2014 everything the runs were\ncharged for.",
        "properties": {
          "by_model": {
            "description": "Per-model breakdown for the whole period, highest cost first.",
            "items": {
              "$ref": "#/components/schemas/ModelUsageBreakdown"
            },
            "title": "By Model",
            "type": "array"
          },
          "daily": {
            "description": "One point per day of the period, oldest first, zero-filled for days with no usage.",
            "items": {
              "$ref": "#/components/schemas/UsageDailyPoint"
            },
            "title": "Daily",
            "type": "array"
          },
          "period_end": {
            "description": "The last day of the period, formatted yyyy-MM-dd (UTC).",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "description": "The first day of the period, formatted yyyy-MM-dd (UTC).",
            "title": "Period Start",
            "type": "string"
          },
          "prior_total_cost_millicents": {
            "description": "Cost total for the prior equal-length period, in millicents.",
            "title": "Prior Total Cost Millicents",
            "type": "integer"
          },
          "prior_total_tokens": {
            "description": "Token total for the prior equal-length period, for period-over-period comparison.",
            "title": "Prior Total Tokens",
            "type": "integer"
          },
          "total_cost_millicents": {
            "description": "Total cost for the period across all four billed categories \u2014 LLM tokens, sandbox CPU, sandbox memory, and the platform fee \u2014 in millicents (1000 = $0.01).",
            "title": "Total Cost Millicents",
            "type": "integer"
          },
          "total_tokens": {
            "description": "All tokens used in the period.",
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "total_tokens",
          "total_cost_millicents",
          "prior_total_tokens",
          "prior_total_cost_millicents",
          "daily",
          "by_model"
        ],
        "title": "GetUsageDashboardResponse",
        "type": "object"
      },
      "GithubAccountFilter": {
        "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"
          }
        ]
      },
      "GithubAccountSelector": {
        "additionalProperties": false,
        "description": "A selector of GitHub accounts \u2014 the `for:` audience gate on react\nsurfaces and code review pipelines, classified on the stable entity author\n(the pusher for `push`, the PR author for a review). `users` selects human\naccounts, `bots` selects bot accounts; each is a `GithubAccountFilter`\n(include minus exclude, with bare bool/list shorthand).",
        "properties": {
          "bots": {
            "$ref": "#/components/schemas/GithubAccountFilter"
          },
          "users": {
            "$ref": "#/components/schemas/GithubAccountFilter"
          }
        },
        "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"
          },
          "type": {
            "$ref": "#/components/schemas/GithubAccountType"
          }
        },
        "required": [
          "id",
          "login",
          "type",
          "avatar_url"
        ],
        "title": "GithubAccountSnippet",
        "type": "object"
      },
      "GithubAccountType": {
        "enum": [
          "User",
          "Organization",
          "Bot",
          "Mannequin"
        ],
        "title": "GithubAccountType",
        "type": "string"
      },
      "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."
          },
          "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"
          }
        },
        "required": [
          "account_login",
          "account_type",
          "repository_selection",
          "suspended",
          "repository_count"
        ],
        "title": "GithubIntegrationSummary",
        "type": "object"
      },
      "GithubMemberSummary": {
        "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."
          }
        },
        "required": [
          "id"
        ],
        "title": "GithubMemberSummary",
        "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"
      },
      "HandoffAgentSessionParams": {
        "description": "Laptop-to-cloud handoff parameters (`agent session handoff`): start a\nfresh session on the built-in handoff config, chained to the handed-off\nsession. Mutually exclusive with config_id / config / template_id \u2014 the\nhandoff config is platform-owned.",
        "properties": {
          "parent_session_id": {
            "description": "The session being handed off (usually a laptop-synced session).",
            "title": "Parent Session Id",
            "type": "string"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the WIP commit was pushed (refs/ellipsis/handoff/<short>); recorded as a metadata breadcrumb.",
            "title": "Ref"
          },
          "repo": {
            "description": "\"owner/name\" (or a bare name under the caller's account).",
            "title": "Repo",
            "type": "string"
          },
          "sha": {
            "description": "The work-in-progress commit the CLI pushed (a commit of the dirty working tree) \u2014 becomes the sandbox checkout target.",
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "parent_session_id",
          "repo",
          "sha"
        ],
        "title": "HandoffAgentSessionParams",
        "type": "object"
      },
      "Harness": {
        "enum": [
          "claude_code",
          "codex"
        ],
        "title": "Harness",
        "type": "string"
      },
      "IngestTranscriptRequest": {
        "description": "A batch of raw transcript lines pushed from inside a session's\nsandbox.",
        "properties": {
          "lines": {
            "description": "Raw on-disk transcript lines starting at `offset`.",
            "items": {
              "type": "string"
            },
            "title": "Lines",
            "type": "array"
          },
          "offset": {
            "default": 0,
            "description": "The line offset the batch starts at.",
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "lines"
        ],
        "title": "IngestTranscriptRequest",
        "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"
          }
        },
        "required": [
          "cloud_id"
        ],
        "title": "JiraIntegrationSummary",
        "type": "object"
      },
      "LinearIntegrationSummary": {
        "description": "The account's connected Linear organization and its teams.",
        "properties": {
          "organization_id": {
            "description": "The Linear organization id.",
            "title": "Organization Id",
            "type": "string"
          },
          "teams": {
            "description": "The organization's teams.",
            "items": {
              "$ref": "#/components/schemas/LinearTeamSummary"
            },
            "title": "Teams",
            "type": "array"
          }
        },
        "required": [
          "organization_id",
          "teams"
        ],
        "title": "LinearIntegrationSummary",
        "type": "object"
      },
      "LinearIssueAction": {
        "enum": [
          "opened"
        ],
        "title": "LinearIssueAction",
        "type": "string"
      },
      "LinearTeamSummary": {
        "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": "LinearTeamSummary",
        "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"
      },
      "ListAgentConfigsResponse": {
        "description": "The caller's saved agent configs.",
        "properties": {
          "configs": {
            "description": "Saved agent configs.",
            "items": {
              "$ref": "#/components/schemas/SavedAgentConfig"
            },
            "title": "Configs",
            "type": "array"
          }
        },
        "required": [
          "configs"
        ],
        "title": "ListAgentConfigsResponse",
        "type": "object"
      },
      "ListAgentDefaultsV1Response": {
        "description": "The account's default-agent settings.",
        "properties": {
          "defaults": {
            "description": "The configured defaults.",
            "items": {
              "$ref": "#/components/schemas/AgentDefaultV1"
            },
            "title": "Defaults",
            "type": "array"
          }
        },
        "required": [
          "defaults"
        ],
        "title": "ListAgentDefaultsV1Response",
        "type": "object"
      },
      "ListAgentSessionsResponse": {
        "description": "A list of sessions in the lean wire shape.",
        "properties": {
          "sessions": {
            "description": "Lean wire rows \u2014 the same shape GET /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/AgentSessionWire"
            },
            "title": "Sessions",
            "type": "array"
          }
        },
        "required": [
          "sessions"
        ],
        "title": "ListAgentSessionsResponse",
        "type": "object"
      },
      "ListAgentTemplatesResponse": {
        "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 config, for display in setup walkthroughs. Not a template to run as-is.",
            "title": "Walkthrough Yaml",
            "type": "string"
          }
        },
        "required": [
          "templates",
          "walkthrough_yaml"
        ],
        "title": "ListAgentTemplatesResponse",
        "type": "object"
      },
      "ListAlertsResponse": {
        "description": "A list of alerts for the caller's organization.",
        "properties": {
          "alerts": {
            "description": "The matching alerts.",
            "items": {
              "$ref": "#/components/schemas/Alert"
            },
            "title": "Alerts",
            "type": "array"
          }
        },
        "required": [
          "alerts"
        ],
        "title": "ListAlertsResponse",
        "type": "object"
      },
      "ListFilesResponse": {
        "description": "The calling account's files, newest first. Metadata only \u2014 fetch an\nindividual file to get a download URL.",
        "properties": {
          "files": {
            "description": "The account's files, newest first.",
            "items": {
              "$ref": "#/components/schemas/FileView"
            },
            "title": "Files",
            "type": "array"
          }
        },
        "required": [
          "files"
        ],
        "title": "ListFilesResponse",
        "type": "object"
      },
      "ListGithubMembersResponse": {
        "description": "The members of the account's GitHub organization.",
        "properties": {
          "members": {
            "description": "The organization's members, sorted by login.",
            "items": {
              "$ref": "#/components/schemas/GithubMemberSummary"
            },
            "title": "Members",
            "type": "array"
          }
        },
        "required": [
          "members"
        ],
        "title": "ListGithubMembersResponse",
        "type": "object"
      },
      "ListGithubRepositoriesResponse": {
        "description": "The repositories connected to the account's GitHub installation.",
        "properties": {
          "repositories": {
            "description": "The connected repositories.",
            "items": {
              "$ref": "#/components/schemas/RepositorySummary"
            },
            "title": "Repositories",
            "type": "array"
          }
        },
        "required": [
          "repositories"
        ],
        "title": "ListGithubRepositoriesResponse",
        "type": "object"
      },
      "ListLinearTeamsResponse": {
        "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/LinearTeamSummary"
            },
            "title": "Teams",
            "type": "array"
          }
        },
        "required": [
          "organization_id",
          "teams"
        ],
        "title": "ListLinearTeamsResponse",
        "type": "object"
      },
      "ListReviewsResponse": {
        "description": "Reviews matching the query, newest first. `findings` are omitted\n(counters only); automatically-triggered reviews are included, so this\nanswers \"show me every review on this pull request\".",
        "properties": {
          "reviews": {
            "description": "The matching reviews.",
            "items": {
              "$ref": "#/components/schemas/Review"
            },
            "title": "Reviews",
            "type": "array"
          }
        },
        "required": [
          "reviews"
        ],
        "title": "ListReviewsResponse",
        "type": "object"
      },
      "ListSentryOrganizationsResponse": {
        "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": "ListSentryOrganizationsResponse",
        "type": "object"
      },
      "ListSessionExecutionsResponse": {
        "description": "A session's executions with the launch context each was given.",
        "properties": {
          "executions": {
            "description": "The session's executions (initial start, cold wakes, infra retries), ordered by execution_index. Each carries the launch context the harness was given: system_prompt_append (the text appended to Claude Code's default system prompt), the initial query, and the model.",
            "items": {
              "$ref": "#/components/schemas/SessionExecutionWire"
            },
            "title": "Executions",
            "type": "array"
          }
        },
        "required": [
          "executions"
        ],
        "title": "ListSessionExecutionsResponse",
        "type": "object"
      },
      "ListSessionRecordsResponse": {
        "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 records past this page remain (only meaningful with `limit`).",
            "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 records plus the /turns endpoint.",
            "items": {
              "$ref": "#/components/schemas/SessionMessageWire"
            },
            "title": "Messages",
            "type": "array"
          },
          "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 (`after_seq` + `limit`); a bare call returns the full retained transcript.",
            "items": {
              "$ref": "#/components/schemas/SessionRecordWire"
            },
            "title": "Records",
            "type": "array"
          }
        },
        "required": [
          "records"
        ],
        "title": "ListSessionRecordsResponse",
        "type": "object"
      },
      "ListSessionTurnsResponse": {
        "description": "A session's conversation structure: its turns and inbox messages.\nBoth lists are empty for single-shot sessions.",
        "properties": {
          "messages": {
            "description": "The whole inbox oldest-first (turn 0's query included), joined to the consuming turn via delivered_turn_id (null = still pending).",
            "items": {
              "$ref": "#/components/schemas/SessionMessage"
            },
            "title": "Messages",
            "type": "array"
          },
          "turns": {
            "description": "The session's turns, ordered by turn_index.",
            "items": {
              "$ref": "#/components/schemas/AgentTurn"
            },
            "title": "Turns",
            "type": "array"
          }
        },
        "required": [
          "turns",
          "messages"
        ],
        "title": "ListSessionTurnsResponse",
        "type": "object"
      },
      "ListSlackChannelsResponse": {
        "description": "The channels the Ellipsis app can see in the connected Slack\nworkspace.",
        "properties": {
          "channels": {
            "description": "The workspace's channels.",
            "items": {
              "$ref": "#/components/schemas/SlackChannelSummary"
            },
            "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": "ListSlackChannelsResponse",
        "type": "object"
      },
      "ListSlackMembersResponse": {
        "description": "The human members of the connected Slack workspace (bots excluded).",
        "properties": {
          "members": {
            "description": "The workspace's human members.",
            "items": {
              "$ref": "#/components/schemas/SlackMemberSummary"
            },
            "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": "ListSlackMembersResponse",
        "type": "object"
      },
      "LogSearchHit": {
        "description": "One session record matching a Logs search query, denormalized with just\nenough session context to render a result row and deep-link to the session.\nThe full record/transcript hydrates from the session detail page.",
        "properties": {
          "agent_config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Config Id"
          },
          "agent_session_id": {
            "title": "Agent Session Id",
            "type": "string"
          },
          "attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attribution Id"
          },
          "attribution_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "output_prs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentSessionPr"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Prs"
          },
          "record_type": {
            "title": "Record Type",
            "type": "string"
          },
          "session_execution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Execution Id"
          },
          "session_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentSessionSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentSessionStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "snippet": {
            "title": "Snippet",
            "type": "string"
          },
          "stream_seq": {
            "title": "Stream Seq",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "session_execution_id",
          "agent_session_id",
          "stream_seq",
          "record_type",
          "created_at",
          "snippet"
        ],
        "title": "LogSearchHit",
        "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 whether we reach them through the first-party Anthropic API\nor through Bedrock -- a choice made per request by the llm_providers chain, so\nit is not even a fixed property of the model. Likewise the `bedrock-gpt-5.6-*`\nrows are OPENAI (OpenAI's models, served by AWS), and GLM is ZAI (Z.ai's model,\nserved by Wafer or Concentrate over an OpenAI-compatible API).\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 an AWS logo on a GPT model and\nan OpenAI logo on GLM.",
        "enum": [
          "anthropic",
          "openai",
          "zai",
          "minimax",
          "moonshot"
        ],
        "title": "ModelManufacturer",
        "type": "string"
      },
      "ModelRateCardApi": {
        "properties": {
          "cache_read_cents_per_1m_tokens": {
            "title": "Cache Read Cents Per 1M Tokens",
            "type": "integer"
          },
          "cache_write_1h_cents_per_1m_tokens": {
            "title": "Cache Write 1H Cents Per 1M Tokens",
            "type": "integer"
          },
          "cache_write_5m_cents_per_1m_tokens": {
            "title": "Cache Write 5M Cents Per 1M Tokens",
            "type": "integer"
          },
          "input_cents_per_1m_tokens": {
            "title": "Input Cents Per 1M Tokens",
            "type": "integer"
          },
          "output_cents_per_1m_tokens": {
            "title": "Output Cents Per 1M Tokens",
            "type": "integer"
          }
        },
        "required": [
          "input_cents_per_1m_tokens",
          "cache_write_5m_cents_per_1m_tokens",
          "cache_write_1h_cents_per_1m_tokens",
          "cache_read_cents_per_1m_tokens",
          "output_cents_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_fee_millicents": {
            "description": "Platform fee, in millicents.",
            "title": "Cost Fee Millicents",
            "type": "integer"
          },
          "cost_sandbox_cpu_millicents": {
            "description": "Sandbox CPU cost, in millicents.",
            "title": "Cost Sandbox Cpu Millicents",
            "type": "integer"
          },
          "cost_sandbox_memory_millicents": {
            "description": "Sandbox memory cost, in millicents.",
            "title": "Cost Sandbox 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_sandbox_cpu_millicents",
          "cost_sandbox_memory_millicents",
          "cost_fee_millicents"
        ],
        "title": "ModelUsageBreakdown",
        "type": "object"
      },
      "OrganizationRole": {
        "enum": [
          "admin",
          "member"
        ],
        "title": "OrganizationRole",
        "type": "string"
      },
      "ParentKind": {
        "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nHANDOFF \u2014 a session started to take over work from another surface (e.g.\nlaptop \u2192 cloud handoff; later phase).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
        "enum": [
          "continuation",
          "handoff",
          "resume"
        ],
        "title": "ParentKind",
        "type": "string"
      },
      "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",
          "ephemeral_trigger",
          "non_interactive",
          "harness_single_turn",
          "closed",
          "laptop"
        ],
        "title": "PromptBlockedReason",
        "type": "string"
      },
      "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 created-keyed count 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"
      },
      "PutAgentDefaultRequest": {
        "description": "Parameters for setting a default agent config, at either the account\nor the repository level.",
        "properties": {
          "config_id": {
            "description": "The saved config to make the default.",
            "title": "Config Id",
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rung to set: \"owner/name\" for a repo default; omit to set the account default. Unlike session start's silent ignore, an unknown or foreign repo here is a 404.",
            "title": "Repository"
          }
        },
        "required": [
          "config_id"
        ],
        "title": "PutAgentDefaultRequest",
        "type": "object"
      },
      "PutSandboxVariablesRequest": {
        "description": "Store environment variables for the account's sandboxes. Each variable\nis upserted by name: existing names are overwritten.",
        "properties": {
          "variables": {
            "description": "The variables to store.",
            "items": {
              "$ref": "#/components/schemas/EnvironmentVariableInput"
            },
            "title": "Variables",
            "type": "array"
          }
        },
        "required": [
          "variables"
        ],
        "title": "PutSandboxVariablesRequest",
        "type": "object"
      },
      "ReactIssue": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "on": {
            "items": {
              "$ref": "#/components/schemas/IssueAction"
            },
            "title": "On",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactIssue",
        "type": "object"
      },
      "ReactLinearIssue": {
        "additionalProperties": false,
        "properties": {
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector"
          },
          "on": {
            "default": [
              "opened"
            ],
            "items": {
              "$ref": "#/components/schemas/LinearIssueAction"
            },
            "title": "On",
            "type": "array"
          }
        },
        "title": "ReactLinearIssue",
        "type": "object"
      },
      "ReactPullRequest": {
        "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"
          },
          "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"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactPullRequest",
        "type": "object"
      },
      "ReactPush": {
        "additionalProperties": false,
        "properties": {
          "branch": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Branch",
            "type": "array"
          },
          "for": {
            "$ref": "#/components/schemas/GithubAccountSelector"
          },
          "paths": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Paths",
            "type": "array"
          },
          "repositories": {
            "$ref": "#/components/schemas/RepositoryFilter"
          }
        },
        "title": "ReactPush",
        "type": "object"
      },
      "ReactSentry": {
        "additionalProperties": false,
        "properties": {
          "on": {
            "items": {
              "$ref": "#/components/schemas/SentryAction"
            },
            "title": "On",
            "type": "array"
          },
          "projects": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Projects",
            "type": "array"
          }
        },
        "required": [
          "on"
        ],
        "title": "ReactSentry",
        "type": "object"
      },
      "ReactSlackChannel": {
        "additionalProperties": false,
        "properties": {},
        "title": "ReactSlackChannel",
        "type": "object"
      },
      "RecentPullRequestDTO": {
        "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": "RecentPullRequestDTO",
        "type": "object"
      },
      "RecordSource": {
        "description": "`session_records.source` \u2014 the client render switch. `lifecycle` rows are\ncontroller-emitted platform notifications; a harness value means a native\ntranscript record from that harness.",
        "enum": [
          "lifecycle",
          "claude_code",
          "codex"
        ],
        "title": "RecordSource",
        "type": "string"
      },
      "ReplayAgentSessionRequest": {
        "description": "Parameters for re-running an existing run's original trigger input as\na new run.",
        "properties": {
          "config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A saved config to replay against. By default the original run's frozen config snapshot is reused.",
            "title": "Config Id"
          },
          "config_override": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional partial-config override merged onto the chosen config and re-validated \u2014 e.g. {\"claude\": {\"model\": \"claude-opus-4-8\"}} to replay the run on a different model, or {\"limits\": {\"run\": 5.0}} to raise its budget. Mutually exclusive with config_override_yaml.",
            "title": "Config Override"
          },
          "config_override_yaml": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The same partial-config override as a YAML/JSON string (e.g. read from a file). Mutually exclusive with config_override.",
            "title": "Config Override Yaml"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-run instructions. Omit to inherit the original run's prompt (a bare replay re-runs the same instructions); pass \"\" to clear it.",
            "title": "Prompt"
          }
        },
        "title": "ReplayAgentSessionRequest",
        "type": "object"
      },
      "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"
      },
      "RepositoryFilter": {
        "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"
          }
        ]
      },
      "RepositorySelection": {
        "enum": [
          "all",
          "selected"
        ],
        "title": "RepositorySelection",
        "type": "string"
      },
      "RepositorySummary": {
        "description": "A repository connected to the account's GitHub installation \u2014 a valid\ntarget for `repository` when creating an agent config and for the\nrepository lists inside an agent config.",
        "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"
          },
          "id": {
            "description": "The repository's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "The repository name, without the owner.",
            "title": "Name",
            "type": "string"
          },
          "private": {
            "description": "Whether the repository is private.",
            "title": "Private",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "full_name",
          "private"
        ],
        "title": "RepositorySummary",
        "type": "object"
      },
      "ResolvedReviewScope": {
        "description": "The range a minted review actually covers, read back off the (possibly\ndoctored) PR so it can never disagree with what the session was handed.",
        "properties": {
          "empty": {
            "title": "Empty",
            "type": "boolean"
          },
          "head": {
            "title": "Head",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ReviewScopeKind"
          },
          "watermark": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Watermark"
          }
        },
        "required": [
          "kind",
          "watermark",
          "head",
          "empty"
        ],
        "title": "ResolvedReviewScope",
        "type": "object"
      },
      "Review": {
        "description": "One code review: one pipeline iteration over one commit range of a pull\nrequest.\n\n`review_body`, `findings`, and `counters` are produced as each stage\nsession finishes \u2014 while a review is running they are null/empty. Stream a\nstage's session to follow it live, then re-fetch the review.",
        "properties": {
          "budget_millicents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The configured per-review budget in millicents \u2014 what one review may spend across every stage. Null when the pipeline sets no per-review budget, in which case spend is capped per stage session instead.",
            "title": "Budget Millicents"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the review finished; null while it is running.",
            "title": "Completed At"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewConfiguration"
              },
              {
                "type": "null"
              }
            ],
            "description": "The configuration that ran, frozen at creation. Omitted on list responses."
          },
          "cost_millicents": {
            "default": 0,
            "description": "Total spend across all stages, in millicents (1000 = $0.01).",
            "title": "Cost Millicents",
            "type": "integer"
          },
          "counters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewCounters"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parser and anchor reliability counters, summed across stages."
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the review was created.",
            "title": "Created At"
          },
          "description_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The description stage's error, when it failed.",
            "title": "Description Error"
          },
          "description_outcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the description stage did to the pull request body: updated, removed, skipped, unchanged, or error. Null when the pipeline runs no description agent.",
            "title": "Description Outcome"
          },
          "findings": {
            "default": [],
            "description": "The review's findings, each carrying the pipeline's verdict. Omitted on list responses.",
            "items": {
              "$ref": "#/components/schemas/ReviewFinding"
            },
            "title": "Findings",
            "type": "array"
          },
          "id": {
            "description": "The review's unique identifier.",
            "title": "Id",
            "type": "string"
          },
          "post": {
            "default": true,
            "description": "Whether the caller asked for this review to be posted to GitHub.",
            "title": "Post",
            "type": "boolean"
          },
          "post_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why posting to GitHub failed, when it did.",
            "title": "Post Error"
          },
          "posted_review_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub review id this review was posted as, if any.",
            "title": "Posted Review Id"
          },
          "pull_request": {
            "$ref": "#/components/schemas/ReviewPullRequest",
            "description": "The pull request the review ran on."
          },
          "repository": {
            "$ref": "#/components/schemas/ReviewRepository",
            "description": "The repository the review ran on."
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewRequester"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who requested the review; null for automatic reviews triggered by a push."
          },
          "review_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The review's summary body; null while the review is running.",
            "title": "Review Body"
          },
          "reviewed_commits": {
            "default": [],
            "description": "The commits the range covered, oldest first, snapshotted when the review was created. Empty for older reviews, or when the pull request's history was rewritten first.",
            "items": {
              "$ref": "#/components/schemas/ReviewedCommit"
            },
            "title": "Reviewed Commits",
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/ResolvedReviewScope",
            "description": "The commit range the review covered."
          },
          "skip_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the review was skipped, when it was.",
            "title": "Skip Reason"
          },
          "stages": {
            "default": [],
            "description": "The pipeline stages that make up the review.",
            "items": {
              "$ref": "#/components/schemas/ReviewStage"
            },
            "title": "Stages",
            "type": "array"
          },
          "status": {
            "description": "The review's status, or the synthetic \"skipped\" for an incremental review with nothing new to look at.",
            "title": "Status",
            "type": "string"
          },
          "trigger": {
            "description": "What triggered the review.",
            "title": "Trigger",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "trigger",
          "repository",
          "pull_request",
          "scope"
        ],
        "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"
      },
      "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_name": {
            "description": "The repository name, without the owner.",
            "title": "Repo 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_name",
          "base_ref"
        ],
        "title": "ReviewCommentListItem",
        "type": "object"
      },
      "ReviewConfiguration": {
        "description": "The review configuration that executed, frozen when the review was\ncreated.\n\n`raw_yaml` is the repository's committed code-review file verbatim \u2014 null\nwhen there is no file and the review ran on pure platform defaults.\n`effective_yaml` is the merged result that actually ran; comparing the two\nshows which platform defaults a sparse file inherited.",
        "properties": {
          "config_id": {
            "description": "The identifier of the configuration that ran.",
            "title": "Config Id",
            "type": "string"
          },
          "effective_yaml": {
            "description": "The merged configuration that actually ran, as YAML.",
            "title": "Effective Yaml",
            "type": "string"
          },
          "raw_yaml": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The repository's committed code-review YAML, verbatim; null when the review ran on platform defaults alone.",
            "title": "Raw Yaml"
          }
        },
        "required": [
          "config_id",
          "effective_yaml"
        ],
        "title": "ReviewConfiguration",
        "type": "object"
      },
      "ReviewCounters": {
        "description": "Parser and anchor reliability counters, summed across the review's\nstage sessions.",
        "properties": {
          "n_anchor_valid": {
            "default": 0,
            "description": "Findings whose file/line anchor was valid.",
            "title": "N Anchor Valid",
            "type": "integer"
          },
          "n_coerced": {
            "default": 0,
            "description": "Lines that parsed only after coercion.",
            "title": "N Coerced",
            "type": "integer"
          },
          "n_dropped": {
            "default": 0,
            "description": "Lines dropped as unparseable.",
            "title": "N Dropped",
            "type": "integer"
          },
          "n_not_commentable": {
            "default": 0,
            "description": "Findings anchored to lines that cannot carry a comment.",
            "title": "N Not Commentable",
            "type": "integer"
          },
          "n_parsed": {
            "default": 0,
            "description": "Lines that parsed into findings.",
            "title": "N Parsed",
            "type": "integer"
          },
          "n_raw_lines": {
            "default": 0,
            "description": "Raw finding lines the stages emitted.",
            "title": "N Raw Lines",
            "type": "integer"
          },
          "n_snapped": {
            "default": 0,
            "description": "Findings whose anchor was snapped to a nearby valid line.",
            "title": "N Snapped",
            "type": "integer"
          },
          "parser_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which parser version produced the findings.",
            "title": "Parser Version"
          }
        },
        "title": "ReviewCounters",
        "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"
      },
      "ReviewFinding": {
        "description": "A finding plus the pipeline's verdict on it.\n\nThe verdict fields \u2014 which agent proposed the finding and what the filter\nstage decided \u2014 are null when no verdict has been recorded for the finding\n(a review from before verdicts were tracked, or one whose filter stage has\nnot ruled yet).",
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that proposed the finding.",
            "title": "Agent Name"
          },
          "anchor": {
            "$ref": "#/components/schemas/FindingAnchor",
            "default": "not_commentable"
          },
          "category": {
            "default": "other",
            "title": "Category",
            "type": "string"
          },
          "claim": {
            "title": "Claim",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pipeline's verdict: proposed, dedup_dropped, approved, rejected, merged_into, or posted_failed.",
            "title": "Disposition"
          },
          "end_line": {
            "title": "End Line",
            "type": "integer"
          },
          "evidence": {
            "default": "",
            "title": "Evidence",
            "type": "string"
          },
          "extra": {
            "additionalProperties": true,
            "default": {},
            "title": "Extra",
            "type": "object"
          },
          "filter_verdict_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The filter stage's reasoning on a rejection or a merge \u2014 the line shown beside a suppressed finding.",
            "title": "Filter Verdict Reason"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The finding's unique identifier; null when no verdict has been recorded.",
            "title": "Id"
          },
          "in_scope": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Scope"
          },
          "merged_into_finding_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The surviving finding this one was merged into, when disposition is merged_into.",
            "title": "Merged Into Finding Id"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "posted_comment_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub comment id this finding was posted as, if any.",
            "title": "Posted Comment Id"
          },
          "severity": {
            "default": 3,
            "title": "Severity",
            "type": "integer"
          },
          "side": {
            "default": "RIGHT",
            "title": "Side",
            "type": "string"
          },
          "snapped_from": {
            "anyOf": [
              {
                "maxItems": 2,
                "minItems": 2,
                "prefixItems": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapped From"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pipeline stage that proposed the finding.",
            "title": "Stage"
          },
          "start_line": {
            "title": "Start Line",
            "type": "integer"
          },
          "suggested_fix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Fix"
          }
        },
        "required": [
          "path",
          "start_line",
          "end_line",
          "claim"
        ],
        "title": "ReviewFinding",
        "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_name": {
            "description": "The repository name, without the owner.",
            "title": "Repo 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_name",
          "base_ref"
        ],
        "title": "ReviewListItem",
        "type": "object"
      },
      "ReviewPullRequest": {
        "description": "The pull request a review ran on.",
        "properties": {
          "number": {
            "description": "The pull request number.",
            "title": "Number",
            "type": "integer"
          },
          "url": {
            "description": "The pull request's URL on GitHub.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "number",
          "url"
        ],
        "title": "ReviewPullRequest",
        "type": "object"
      },
      "ReviewRepoFacet": {
        "description": "A repository filter option for the reviews view.",
        "properties": {
          "repository_name": {
            "description": "The repository name, without the owner.",
            "title": "Repository Name",
            "type": "string"
          },
          "reviews": {
            "description": "Reviews in this repository.",
            "title": "Reviews",
            "type": "integer"
          }
        },
        "required": [
          "repository_name",
          "reviews"
        ],
        "title": "ReviewRepoFacet",
        "type": "object"
      },
      "ReviewRepository": {
        "description": "The repository a review ran on.",
        "properties": {
          "id": {
            "description": "The repository's GitHub id.",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "The repository name, without the owner.",
            "title": "Name",
            "type": "string"
          },
          "owner": {
            "description": "The repository owner's login.",
            "title": "Owner",
            "type": "string"
          }
        },
        "required": [
          "id",
          "owner",
          "name"
        ],
        "title": "ReviewRepository",
        "type": "object"
      },
      "ReviewRequester": {
        "description": "Who asked for this review. Absent on an automatic review, whose trigger\nis the push itself rather than a person.",
        "properties": {
          "attribution_id": {
            "description": "The requesting principal's identifier.",
            "title": "Attribution Id",
            "type": "string"
          },
          "attribution_type": {
            "description": "What kind of principal requested the review.",
            "title": "Attribution Type",
            "type": "string"
          }
        },
        "required": [
          "attribution_type",
          "attribution_id"
        ],
        "title": "ReviewRequester",
        "type": "object"
      },
      "ReviewScope": {
        "description": "Which range to review. `watermark`/`head` pin it explicitly (the\nharness's `--watermark`/`--head` promoted to the API \u2014 the doctored-PR path\nthat lets you evaluate a reviewer over a historical range). Values are SHAs\nonly; resolving a 1-based commit index stays a CLI/pyscript nicety.",
        "properties": {
          "head": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Head"
          },
          "kind": {
            "$ref": "#/components/schemas/ReviewScopeKind",
            "default": "incremental"
          },
          "watermark": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Watermark"
          }
        },
        "title": "ReviewScope",
        "type": "object"
      },
      "ReviewScopeKind": {
        "enum": [
          "incremental",
          "full"
        ],
        "title": "ReviewScopeKind",
        "type": "string"
      },
      "ReviewStage": {
        "description": "One stage agent's contribution to a review. `session_id` is the agent\nsession that ran it \u2014 stream that session to follow the stage live, since\na review is a pipeline of sessions rather than one process.",
        "properties": {
          "agent_name": {
            "description": "The stage agent's name.",
            "title": "Agent Name",
            "type": "string"
          },
          "cost_millicents": {
            "default": 0,
            "description": "What the stage spent, in millicents (1000 = $0.01).",
            "title": "Cost Millicents",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the stage session was created.",
            "title": "Created At"
          },
          "finalized_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the stage session finished; null while it is still running.",
            "title": "Finalized At"
          },
          "n_findings": {
            "default": 0,
            "description": "Findings this stage produced.",
            "title": "N Findings",
            "type": "integer"
          },
          "session_id": {
            "description": "The agent session that ran this stage.",
            "title": "Session Id",
            "type": "string"
          },
          "stage": {
            "description": "The pipeline stage this run belongs to.",
            "title": "Stage",
            "type": "string"
          },
          "status": {
            "description": "The stage session's status.",
            "title": "Status",
            "type": "string"
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why this stage's session ended the way it did, when it did not complete normally.",
            "title": "Status Reason"
          }
        },
        "required": [
          "stage",
          "agent_name",
          "session_id",
          "status"
        ],
        "title": "ReviewStage",
        "type": "object"
      },
      "ReviewedCommit": {
        "description": "One commit inside a run's reviewed range, snapshotted at mint time.\n\nStored rather than re-derived: `watermark...head` is only resolvable against\nthe PR's history as it was when the run was minted, and a force-push (or a\nmerge) makes those SHAs unreachable \u2014 the range would then render as two\norphan SHAs forever. The mint path already holds the PR's ordered commit\nlist, so this costs no extra GitHub call.",
        "properties": {
          "author_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Avatar Url"
          },
          "author_login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Login"
          },
          "authored_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authored At"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "sha": {
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "sha",
          "message"
        ],
        "title": "ReviewedCommit",
        "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"
      },
      "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"
      },
      "RunStatus": {
        "description": "What the current (or most recent) execution is doing (backs `run`).",
        "enum": [
          "scheduled",
          "starting",
          "working",
          "waiting",
          "done",
          "failed",
          "stopped",
          "cancelled",
          "retrying"
        ],
        "title": "RunStatus",
        "type": "string"
      },
      "SandboxEnvironmentVariableSummary": {
        "description": "A stored variable WITHOUT its value. Values are write-only: once\nuploaded they are injected into sandboxes but never returned to a 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": "SandboxEnvironmentVariableSummary",
        "type": "object"
      },
      "SavedAgentConfig": {
        "properties": {
          "agent_config": {
            "$ref": "#/components/schemas/AgentConfig"
          },
          "agent_config_source_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigSourceGithub"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "title": "Customer Id",
            "type": "string"
          },
          "deleted": {
            "default": false,
            "title": "Deleted",
            "type": "boolean"
          },
          "edited_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_pull_request_head_preview": {
            "default": false,
            "title": "Is Pull Request Head Preview",
            "type": "boolean"
          },
          "last_agent_session_created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Agent Session Created At"
          },
          "last_agent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Agent Session Id"
          },
          "last_sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync Error"
          },
          "last_synced_commit_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced Commit Sha"
          },
          "pending_pull_request_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pending Pull Request Url"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "customer_id",
          "created_at",
          "updated_at",
          "agent_config"
        ],
        "title": "SavedAgentConfig",
        "type": "object"
      },
      "SearchSessionsWireResponse": {
        "description": "A page of session search results.",
        "properties": {
          "attributed_users": {
            "additionalProperties": {
              "$ref": "#/components/schemas/GithubAccountSnippet"
            },
            "description": "GitHub account snippets for the user attributions among the results, keyed by attribution_id, so callers can render author logins and avatars.",
            "title": "Attributed Users",
            "type": "object"
          },
          "results": {
            "description": "The matching sessions, newest first.",
            "items": {
              "$ref": "#/components/schemas/SessionSearchResultWire"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "results",
          "attributed_users"
        ],
        "title": "SearchSessionsWireResponse",
        "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 wakes the\nsession when idle.",
        "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"
          },
          "message": {
            "description": "The message text.",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "SendSessionMessageRequest",
        "type": "object"
      },
      "SentryAction": {
        "enum": [
          "issue_alert",
          "metric_alert"
        ],
        "title": "SentryAction",
        "type": "string"
      },
      "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"
      },
      "SessionExecutionWire": {
        "description": "One runtime attempt of a session \u2014 the initial start, a cold wake of a\ndurable conversation, or an infrastructure retry \u2014 including the launch\ncontext the model was actually given.",
        "properties": {
          "agent_session_id": {
            "description": "Identifier of the session this execution belongs to.",
            "title": "Agent Session Id",
            "type": "string"
          },
          "attempt_index": {
            "description": "Infrastructure-retry counter within one wake.",
            "title": "Attempt Index",
            "type": "integer"
          },
          "created_at": {
            "description": "When the execution was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "execution_index": {
            "description": "Monotonic position of this execution within the session, across all starts, wakes, and retries.",
            "title": "Execution Index",
            "type": "integer"
          },
          "exit_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Finer terminal reason, mirroring the session's exit_status vocabulary; null until the execution is terminal.",
            "title": "Exit Status"
          },
          "id": {
            "description": "Unique identifier of the execution.",
            "title": "Id",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model the harness was launched with, when a launch config exists.",
            "title": "Model"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The initial query delivered to the harness, when the trigger carried one.",
            "title": "Query"
          },
          "resumed": {
            "description": "Whether this execution resumed a prior conversation (a cold wake with the previous state restored).",
            "title": "Resumed",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ExecutionStatus",
            "description": "Execution status."
          },
          "system_prompt_append": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The system-prompt text Ellipsis appends to the harness's default system prompt (the platform section, run-type instructions, and the config's own instructions) \u2014 the platform-added portion, not the complete prompt the model saw. Null when no launch config was persisted (the execution failed before provisioning finished).",
            "title": "System Prompt Append"
          },
          "wake_index": {
            "description": "0 on the session's fresh start; increments once per cold wake of a durable conversation.",
            "title": "Wake Index",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "agent_session_id",
          "created_at",
          "execution_index",
          "wake_index",
          "attempt_index",
          "resumed",
          "status"
        ],
        "title": "SessionExecutionWire",
        "type": "object"
      },
      "SessionLiveness": {
        "description": "The durable conversation axis (backs the surfaced `session` field).",
        "enum": [
          "alive",
          "sleeping",
          "closed"
        ],
        "title": "SessionLiveness",
        "type": "string"
      },
      "SessionLogSegmentView": {
        "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": "SessionLogSegmentView",
        "type": "object"
      },
      "SessionMessage": {
        "description": "One entry in a session's inbox: an event, rendered into a user message,\nwaiting to be consumed by a turn. body is the RENDERED text (pointers to\ncode/events, never embedded diffs), so a turn's initial query is built from\nthe pending messages without re-fetching the trigger.",
        "properties": {
          "agent_session_id": {
            "title": "Agent Session Id",
            "type": "string"
          },
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "closes_session": {
            "default": false,
            "title": "Closes Session",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "delivered_turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered Turn Id"
          },
          "feed_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feed Seq"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "idempotency_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotency Key"
          },
          "platform_ts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform Ts"
          },
          "sender_attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Attribution Id"
          },
          "sender_attribution_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttributionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SessionMessageStatus"
          },
          "webhook_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Id"
          },
          "webhook_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "agent_session_id",
          "body",
          "status",
          "created_at"
        ],
        "title": "SessionMessage",
        "type": "object"
      },
      "SessionMessageStatus": {
        "enum": [
          "pending",
          "delivered"
        ],
        "title": "SessionMessageStatus",
        "type": "string"
      },
      "SessionMessageWire": {
        "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": {
          "agent_session_id": {
            "description": "Identifier of the session the message belongs to.",
            "title": "Agent Session Id",
            "type": "string"
          },
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display attribution of the message's sender.",
            "title": "Author"
          },
          "body": {
            "description": "The message text.",
            "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"
          },
          "delivered_turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the turn the message was delivered into, if any.",
            "title": "Delivered Turn Id"
          },
          "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"
          },
          "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."
          },
          "status": {
            "$ref": "#/components/schemas/SessionMessageStatus",
            "description": "Delivery status of the message."
          }
        },
        "required": [
          "id",
          "agent_session_id",
          "status",
          "body",
          "created_at"
        ],
        "title": "SessionMessageWire",
        "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": [
          "enabled"
        ],
        "title": "SessionPrompting",
        "type": "object"
      },
      "SessionRecordWire": {
        "description": "One entry of a session's log: a stable envelope around the harness's\nnative payload. Internal-only columns are deliberately absent so internal\nmodel evolution stays free.",
        "properties": {
          "agent_session_id": {
            "description": "Identifier of the session the record belongs to.",
            "title": "Agent Session Id",
            "type": "string"
          },
          "agent_turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the turn the record belongs to, if any.",
            "title": "Agent Turn Id"
          },
          "cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cost attributed to this record, if any.",
            "title": "Cost"
          },
          "created_at": {
            "description": "When the record was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Duration attributed to this record, if any.",
            "title": "Duration"
          },
          "feed_seq": {
            "description": "The record's position in the session's ordered feed \u2014 the resume cursor for the stream and the records endpoints.",
            "title": "Feed Seq",
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier of the record.",
            "title": "Id",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model that produced this record, if any.",
            "title": "Model"
          },
          "payload": {
            "additionalProperties": true,
            "description": "The harness's native line, verbatim. Consumers parse it at their own risk, versioned via record_format.",
            "title": "Payload",
            "type": "object"
          },
          "record_format": {
            "description": "Versions the payload shape, e.g. claude_stream_json@2.0 or ellipsis_lifecycle@1.",
            "title": "Record Format",
            "type": "string"
          },
          "record_type": {
            "description": "The record's type within its format.",
            "title": "Record Type",
            "type": "string"
          },
          "session_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Correlates a user-echo record back to the session message it echoes, so clients can retire queued messages by id.",
            "title": "Session Message Id"
          },
          "source": {
            "$ref": "#/components/schemas/RecordSource",
            "description": "Which subsystem produced the record."
          },
          "stream_seq": {
            "description": "The record's position within its execution's stream.",
            "title": "Stream Seq",
            "type": "integer"
          },
          "tokens_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokensInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Token usage reported for this record, if any."
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Names of the tools used in this record, if any.",
            "title": "Tools"
          }
        },
        "required": [
          "id",
          "agent_session_id",
          "feed_seq",
          "stream_seq",
          "source",
          "record_type",
          "record_format",
          "payload",
          "created_at"
        ],
        "title": "SessionRecordWire",
        "type": "object"
      },
      "SessionSearchResultWire": {
        "description": "One search hit: a session plus how and where the query matched it.",
        "properties": {
          "matched": {
            "description": "Which search arms matched this session: \"records\", \"recap\", \"pr\", and/or \"similar\".",
            "items": {
              "type": "string"
            },
            "title": "Matched",
            "type": "array"
          },
          "recap_snippet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A short window of the session's recap text around the first term match; null unless the recap arm matched.",
            "title": "Recap Snippet"
          },
          "record_hit_count": {
            "default": 0,
            "description": "Total record hits found for this session within the search window; may exceed the number of record_hits returned.",
            "title": "Record Hit Count",
            "type": "integer"
          },
          "record_hits": {
            "default": [],
            "description": "Matching session-log entries, capped per session.",
            "items": {
              "$ref": "#/components/schemas/LogSearchHit"
            },
            "title": "Record Hits",
            "type": "array"
          },
          "session": {
            "$ref": "#/components/schemas/AgentSessionWire",
            "description": "The matching session."
          }
        },
        "required": [
          "session",
          "matched"
        ],
        "title": "SessionSearchResultWire",
        "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"
      },
      "SessionState": {
        "description": "Lifecycle of a keyed (multi-turn) session \u2014 the durable conversation.\nDistinct from AgentSessionStatus, which is per-execution (one turn's run) and\nmoves to agent_turns in a later slice. IDLE: alive, waiting for the next\nmessage. RUNNING: a turn is executing. CLOSED: the conversation is done and\nits sandbox/snapshots are torn down.",
        "enum": [
          "idle",
          "running",
          "closed"
        ],
        "title": "SessionState",
        "type": "string"
      },
      "SessionSurface": {
        "description": "The three fields we expose. All `None` for an un-keyed (laptop) session.\n\n`use_enum_values=True` (from CustomBaseModel) stores the members as their\nstring values, so this serializes to `{\"session\": \"alive\", \"run\": \"waiting\",\n\"status\": \"waiting\"}` \u2014 a plain object, not enum names.",
        "properties": {
          "run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "session": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionLiveness"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "required": [
          "session",
          "run",
          "status"
        ],
        "title": "SessionSurface",
        "type": "object"
      },
      "SlackChannelSummary": {
        "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": "SlackChannelSummary",
        "type": "object"
      },
      "SlackIntegrationSummary": {
        "description": "The account's connected Slack workspace.",
        "properties": {
          "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"
          }
        },
        "required": [
          "team_id",
          "team_name"
        ],
        "title": "SlackIntegrationSummary",
        "type": "object"
      },
      "SlackMemberSummary": {
        "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": "SlackMemberSummary",
        "type": "object"
      },
      "StartAgentSessionRequest": {
        "description": "Parameters for starting a new agent session.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "An inline agent config to run under."
          },
          "config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A saved agent config id to run under.",
            "title": "Config Id"
          },
          "config_override": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional partial-config override merged onto the chosen config and re-validated (e.g. {\"limits\": {\"run\": 5.0}} to raise just this run's budget). Merged onto config_id/template_id or the platform default; with an inline config, set fields directly instead. Mutually exclusive with config_override_yaml.",
            "title": "Config Override"
          },
          "config_override_yaml": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The same partial-config override as a YAML/JSON string (e.g. read from a file). Mutually exclusive with config_override.",
            "title": "Config Override Yaml"
          },
          "force_rebuild": {
            "default": false,
            "description": "Skip the image cache for this session's initial provision: a fresh full build whose snapshot then refreshes the cache for later runs. A wake of a durable session provisions through the cache as usual. The CLI's `--rebuild`.",
            "title": "Force Rebuild",
            "type": "boolean"
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HandoffAgentSessionParams"
              },
              {
                "type": "null"
              }
            ],
            "description": "Laptop-to-cloud handoff parameters. When set, the built-in handoff config is used and config_id/config/template_id must be omitted."
          },
          "idle_start": {
            "default": false,
            "description": "Start the session with no initial message: the sandbox spins up, the agent starts idle at the prompt, and the first message sent to the session opens turn 0. Mutually exclusive with prompt and handoff. Ignored when the resolved config is not interactive (an ephemeral run keeps its kickoff \u2014 it can never receive a message).",
            "title": "Idle Start",
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Arbitrary string key/value metadata stored on the session.",
            "title": "Metadata",
            "type": "object"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-run instructions appended to the initial query after the config's shared system prompt. Applies regardless of which config source is used. For a handoff, this is the developer's handoff note.",
            "title": "Prompt"
          },
          "repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The \"owner/name\" repository the client is standing in (the CLI's detected git remote). Selects the repo rung of the defaults ladder, and is merged into the sandbox repository set (cloned at its default branch) regardless of which config source is used. An unknown or foreign repo is ignored.",
            "title": "Repository"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A maintained run-on-demand template slug (e.g. \"ellipsis-helper\"), resolved server-side to its config. At most one of config_id, config, or template_id may be set; if none is, the run resolves the account's default-config ladder (repo default, then account default, then the platform default config).",
            "title": "Template Id"
          }
        },
        "title": "StartAgentSessionRequest",
        "type": "object"
      },
      "StartAgentSessionResponse": {
        "description": "The started session, plus explicit fields describing how its config\nwas resolved.",
        "properties": {
          "agent_config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the saved agent config the session ran on, if any.",
            "title": "Agent Config Id"
          },
          "attributed_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user the session is attributed to, when the attribution is a GitHub user."
          },
          "attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the principal the session is attributed to.",
            "title": "Attribution Id"
          },
          "attribution_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)."
          },
          "client_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version of the client that started the session, if reported.",
            "title": "Client Version"
          },
          "config_override": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The partial-config diff applied for this run; null when the config was unmodified.",
            "title": "Config Override"
          },
          "context_repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The \"owner/name\" repository context the session was started in, if any.",
            "title": "Context Repository"
          },
          "cost_fee": {
            "default": 0,
            "description": "Platform fee in millicents.",
            "title": "Cost Fee",
            "type": "integer"
          },
          "cost_sandbox_cpu": {
            "default": 0,
            "description": "Sandbox CPU spend in millicents.",
            "title": "Cost Sandbox Cpu",
            "type": "integer"
          },
          "cost_sandbox_memory": {
            "default": 0,
            "description": "Sandbox memory spend in millicents.",
            "title": "Cost Sandbox Memory",
            "type": "integer"
          },
          "cost_tokens": {
            "description": "Token spend in millicents. The session's grand total cost is the sum of cost_tokens, cost_sandbox_cpu, cost_sandbox_memory, and cost_fee.",
            "title": "Cost Tokens",
            "type": "integer"
          },
          "created_at": {
            "description": "When the session was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "description": "Identifier of the account that owns the session.",
            "title": "Customer Id",
            "type": "string"
          },
          "default_resolution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultResolution"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the session's config was resolved from the account's defaults, when no explicit config was given."
          },
          "exit_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentSessionExitStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the session ended; null until it is terminal."
          },
          "harness": {
            "$ref": "#/components/schemas/Harness",
            "description": "The coding-agent harness the session runs on."
          },
          "id": {
            "description": "Unique identifier of the session.",
            "title": "Id",
            "type": "string"
          },
          "last_activity_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the session last showed activity.",
            "title": "Last Activity At"
          },
          "last_message_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the session last received a message.",
            "title": "Last Message At"
          },
          "live_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A live summary of the session's progress while it runs.",
            "title": "Live Summary"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Caller-supplied metadata key-value pairs.",
            "title": "Metadata",
            "type": "object"
          },
          "output_prs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentSessionPr"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pull requests the session created or updated.",
            "title": "Output Prs"
          },
          "parent_agent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the parent session that spawned this one, if any.",
            "title": "Parent Agent Session Id"
          },
          "parent_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParentKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "How this session relates to its parent session, if any."
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The per-session prompt the session was started with.",
            "title": "Prompt"
          },
          "prompting": {
            "$ref": "#/components/schemas/SessionPrompting",
            "description": "Whether a client may send this session a message and, when it may not, the reason to show instead of a composer."
          },
          "replayed_from_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the original session this one was replayed from, if it was started via replay.",
            "title": "Replayed From Session Id"
          },
          "resolution_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefaultResolution"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which rung of the defaults ladder chose the config (repo_default | account_default | none). Null when an explicit config/config_id/template_id (or a handoff) bypassed resolution."
          },
          "resolved_budget_cents": {
            "description": "The spend budget resolved for this session, in cents.",
            "title": "Resolved Budget Cents",
            "type": "integer"
          },
          "resolved_budget_source": {
            "$ref": "#/components/schemas/BudgetSource",
            "description": "Where the resolved budget came from."
          },
          "resolved_config_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name of the config the session runs under.",
            "title": "Resolved Config Name"
          },
          "sandbox_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the sandbox the session runs in, if any.",
            "title": "Sandbox Id"
          },
          "session_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key identifying the durable conversation this session belongs to, or null for single-shot sessions.",
            "title": "Session Key"
          },
          "session_state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionState"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lifecycle state of the durable conversation, or null for sessions without one."
          },
          "source": {
            "$ref": "#/components/schemas/AgentSessionSource",
            "description": "Where the session came from (e.g. react, manual, api, cli, mention, cron, laptop)."
          },
          "status": {
            "$ref": "#/components/schemas/AgentSessionStatus",
            "description": "Execution status of the session."
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable reason for the current status, when there is one.",
            "title": "Status Reason"
          },
          "stopped_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a stop was requested, if one was.",
            "title": "Stopped At"
          },
          "stopped_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "GitHub account id of the user who stopped the session, if known.",
            "title": "Stopped By"
          },
          "stopped_by_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GithubAccountSnippet"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GitHub user who stopped the session, if it was stopped."
          },
          "surface": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionSurface"
              },
              {
                "type": "null"
              }
            ],
            "description": "The public status projection; null for laptop-synced sessions."
          },
          "tokens_cache_creation": {
            "default": 0,
            "description": "Tokens written to the prompt cache.",
            "title": "Tokens Cache Creation",
            "type": "integer"
          },
          "tokens_cache_read": {
            "default": 0,
            "description": "Tokens read from the prompt cache.",
            "title": "Tokens Cache Read",
            "type": "integer"
          },
          "tokens_input": {
            "default": 0,
            "description": "Input tokens used.",
            "title": "Tokens Input",
            "type": "integer"
          },
          "tokens_model": {
            "description": "The model the token counts are attributed to.",
            "title": "Tokens Model",
            "type": "string"
          },
          "tokens_output": {
            "default": 0,
            "description": "Output tokens used.",
            "title": "Tokens Output",
            "type": "integer"
          },
          "tokens_total": {
            "default": 0,
            "description": "Total tokens used by the session.",
            "title": "Tokens Total",
            "type": "integer"
          },
          "updated_at": {
            "description": "When the session was last updated.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "webhook_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the webhook event that triggered the session, if any.",
            "title": "Webhook Id"
          },
          "webhook_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of the webhook event that triggered the session, if any."
          }
        },
        "required": [
          "id",
          "customer_id",
          "created_at",
          "updated_at",
          "harness",
          "source",
          "cost_tokens",
          "tokens_model",
          "resolved_budget_cents",
          "resolved_budget_source",
          "status",
          "prompting"
        ],
        "title": "StartAgentSessionResponse",
        "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"
      },
      "SupportedModelApi": {
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_default_agent_model": {
            "title": "Is Default Agent Model",
            "type": "boolean"
          },
          "manufacturer": {
            "$ref": "#/components/schemas/ModelManufacturer"
          },
          "rate_card": {
            "$ref": "#/components/schemas/ModelRateCardApi"
          }
        },
        "required": [
          "id",
          "display_name",
          "manufacturer",
          "is_default_agent_model",
          "rate_card"
        ],
        "title": "SupportedModelApi",
        "type": "object"
      },
      "SyncAgentSessionRequest": {
        "description": "One hook-driven transcript sync from a developer laptop. The CLI reads\nthe live on-disk Claude Code transcript, redacts it client-side, gzips\nit, and POSTs it here \u2014 once per turn and at termination.",
        "properties": {
          "cc_session_id": {
            "description": "The Claude Code session uuid (from the hook payload's session_id).",
            "title": "Cc Session Id",
            "type": "string"
          },
          "cwd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The laptop working directory.",
            "title": "Cwd"
          },
          "git_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The checked-out git branch.",
            "title": "Git Branch"
          },
          "reason": {
            "default": "stop",
            "description": "Which hook fired the sync: \"stop\" (mid-session, once per turn) or \"session_end\" (the Claude Code process terminated).",
            "enum": [
              "stop",
              "session_end"
            ],
            "title": "Reason",
            "type": "string"
          },
          "repo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The enrolled repository (\"owner/name\", from the working directory's git remote).",
            "title": "Repo"
          },
          "transcript_gzip_b64": {
            "description": "The redacted transcript JSONL, gzipped then base64-encoded.",
            "title": "Transcript Gzip B64",
            "type": "string"
          }
        },
        "required": [
          "cc_session_id",
          "transcript_gzip_b64"
        ],
        "title": "SyncAgentSessionRequest",
        "type": "object"
      },
      "SyncAgentSessionResponse": {
        "description": "The outcome of a laptop transcript sync.",
        "properties": {
          "accepted": {
            "description": "False when the stored snapshot was already at least as long (longest snapshot wins) \u2014 acknowledged, nothing written.",
            "title": "Accepted",
            "type": "boolean"
          },
          "event_count": {
            "description": "The number of transcript events in the stored snapshot.",
            "title": "Event Count",
            "type": "integer"
          },
          "process_id": {
            "description": "The synced Claude Code process id.",
            "title": "Process Id",
            "type": "string"
          },
          "session_id": {
            "description": "The platform session the sync mapped to.",
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "process_id",
          "event_count",
          "accepted"
        ],
        "title": "SyncAgentSessionResponse",
        "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 execution/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 lives on\n`execution.model_usage` (CC's modelUsage, verbatim).",
        "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"
      },
      "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_fee_millicents": {
            "description": "Platform fee this day, in millicents.",
            "title": "Cost Fee Millicents",
            "type": "integer"
          },
          "cost_sandbox_cpu_millicents": {
            "description": "Sandbox CPU cost this day, in millicents.",
            "title": "Cost Sandbox Cpu Millicents",
            "type": "integer"
          },
          "cost_sandbox_memory_millicents": {
            "description": "Sandbox memory cost this day, in millicents.",
            "title": "Cost Sandbox 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_sandbox_cpu_millicents",
          "cost_sandbox_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"
      },
      "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"
      },
      "WebhookType": {
        "enum": [
          "github.issue",
          "github.issue_comment",
          "github.push",
          "github.pull_request",
          "github.pull_request_comment",
          "github.pull_request_review",
          "github.pull_request_review_comment",
          "slack.app_mention",
          "slack.message",
          "slack.channel_created",
          "linear.issue",
          "linear.issue_comment",
          "sentry.event_alert",
          "sentry.metric_alert",
          "user.message"
        ],
        "title": "WebhookType",
        "type": "string"
      },
      "WhoAmIResponse": {
        "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."
          },
          "sandbox_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The sandbox id, when the credential is a sandbox token.",
            "title": "Sandbox 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",
          "sandbox_id"
        ],
        "title": "WhoAmIResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The Ellipsis REST API: start and drive agent sessions, run code reviews, 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 in-sandbox 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": {
    "/agents/configs": {
      "get": {
        "description": "List saved agent configs.",
        "operationId": "list_agent_configs",
        "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/ListAgentConfigsResponse"
                }
              }
            },
            "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 Configs",
        "tags": [
          "v1"
        ]
      },
      "post": {
        "description": "Create an agent config via pull request.\n\nThe PR adds the config file to agents/ on the target\nrepository.\n\nAccepts an inline config or a gallery template slug.",
        "operationId": "create_agent_config",
        "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/CreateAgentConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAgentConfig"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Provide exactly one of config or template_id; or the config, path, or target branch 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": "The template or repository was not found in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Another agent is already synced from that path, or a file already exists there."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Agent Config",
        "tags": [
          "v1"
        ]
      }
    },
    "/agents/configs/{config_id}": {
      "get": {
        "description": "Return one saved agent config by id.",
        "operationId": "get_agent_config",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "title": "Config 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/SavedAgentConfig"
                }
              }
            },
            "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 config in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent Config",
        "tags": [
          "v1"
        ]
      }
    },
    "/agents/defaults": {
      "delete": {
        "description": "Clear a default agent config.\n\nAddressed by rung: the account rung (repository omitted) or a\nrepository rung.\n\nRefused for sandbox tokens.",
        "operationId": "delete_agent_default",
        "parameters": [
          {
            "description": "Repo rung to clear (\"owner/name\"); omit to clear the account default.",
            "in": "query",
            "name": "repository",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repo rung to clear (\"owner/name\"); omit to clear the account default.",
              "title": "Repository"
            }
          },
          {
            "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 default is set at that rung, or the repository was not found in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete Agent Default",
        "tags": [
          "v1"
        ]
      },
      "get": {
        "description": "List default agent configs.\n\nThe account default and any per-repository defaults.\n\nDefaults are addressed by rung: the account rung is repository\nomitted, a repo rung is \"owner/name\" \u2014 never by row id.",
        "operationId": "list_agent_defaults",
        "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/ListAgentDefaultsV1Response"
                }
              }
            },
            "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 Defaults",
        "tags": [
          "v1"
        ]
      },
      "put": {
        "description": "Set a default agent config.\n\nAddressed by rung: the account rung (repository omitted) or a\nrepository rung (\"owner/name\").\n\nRefused for sandbox tokens (potentially prompt-injected code\nmust not repoint the account's ambient default); an unknown or\nforeign repository is a 404.",
        "operationId": "put_agent_default",
        "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/PutAgentDefaultRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefaultV1"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The config is not eligible as a default: its pull request has not merged, or it is disabled."
          },
          "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 config or repository was not found in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Put Agent Default",
        "tags": [
          "v1"
        ]
      }
    },
    "/agents/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/ListAgentTemplatesResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/agents/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"
        ]
      }
    },
    "/alerts": {
      "get": {
        "description": "List budget alerts for the organization.\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": "header",
            "name": "user-agent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User-Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAlertsResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/Alert"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/Alert"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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"
        ]
      }
    },
    "/analytics/pull-requests": {
      "get": {
        "description": "Return pull-request analytics.\n\nWindowing: pass explicit start/end, or days (default: the last\n30 days).",
        "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"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Type"
            }
          },
          {
            "in": "query",
            "name": "repository_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Repository Id"
            }
          },
          {
            "in": "query",
            "name": "author_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Author Id"
            }
          },
          {
            "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"
        ]
      }
    },
    "/analytics/reviews": {
      "get": {
        "description": "Return code-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"
        ]
      }
    },
    "/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"
        ]
      }
    },
    "/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"
        ]
      }
    },
    "/budget": {
      "get": {
        "description": "Return the caller's current budget summary.",
        "operationId": "get_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 Budget",
        "tags": [
          "v1"
        ]
      }
    },
    "/files": {
      "get": {
        "description": "List uploaded files, newest first.\n\nMetadata only \u2014 download URLs are minted per explicit GET, not\nper row. agent_session_id scopes the list to one run's uploads.",
        "operationId": "list_files",
        "parameters": [
          {
            "in": "query",
            "name": "agent_session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Session Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "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/ListFilesResponse"
                }
              }
            },
            "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 Files",
        "tags": [
          "v1"
        ]
      },
      "post": {
        "description": "Upload a file that outlives the sandbox.\n\nv1: PNG images only, base64 in the JSON body, 10 MiB cap. The\nprimary caller is the in-sandbox `agent file upload` CLI (an\nagent persisting a screenshot to link on a PR), but all\ncredential types work. Returns the org-membership-gated\ndashboard URL so callers never hard-code URL shapes.",
        "operationId": "create_file",
        "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/CreateFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateFileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The upload is not a valid PNG, is empty, exceeds the size limit, or is not valid base64."
          },
          "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"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A file quota was exceeded (per-session, per-day, or account-wide)."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create File",
        "tags": [
          "v1"
        ]
      }
    },
    "/files/{file_id}": {
      "delete": {
        "description": "Delete a file.\n\nA foreign, missing, or already-deleted id is an\nindistinguishable 404, so ids can't be enumerated. Sandbox\ntokens get a 403 (a sandbox token sits next to\npotentially-untrusted code and must not be able to destroy the\naccount's files \u2014 uploading is fine, destruction is not); API\nkeys and user tokens may delete.",
        "operationId": "delete_file",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File 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 file in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete File",
        "tags": [
          "v1"
        ]
      },
      "get": {
        "description": "Return one file's metadata and download link.\n\nIncludes the gated dashboard URL and a short-lived presigned\n`download_url`.\n\nTo fetch the bytes locally, call this and then GET download_url\nimmediately \u2014 the JSON API never carries the file. The CLI's\n`agent file get` wraps exactly that two-step.",
        "operationId": "get_file",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File 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/GetFileResponse"
                }
              }
            },
            "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 file in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get File",
        "tags": [
          "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/configs.\n\nAvailable to all credential types including sandbox 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": "Get Integrations",
        "tags": [
          "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 and /sessions/search.\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/ListGithubMembersResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/ListGithubRepositoriesResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/ListLinearTeamsResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/ListSentryOrganizationsResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/ListSlackChannelsResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/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/ListSlackMembersResponse"
                }
              }
            },
            "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"
        ]
      }
    },
    "/me": {
      "get": {
        "description": "Return the identity behind the caller's credential.",
        "operationId": "whoami",
        "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/WhoAmIResponse"
                }
              }
            },
            "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": "Whoami",
        "tags": [
          "v1"
        ]
      }
    },
    "/models": {
      "get": {
        "description": "List selectable agent models.\n\nMost expensive first, with the platform default flagged.\n\nReads the same registry as the dashboard's rate table, so a\nclient's model picker can never drift from what's offered.\nBehind auth but not account-scoped \u2014 the selectable set is\nglobal.",
        "operationId": "list_supported_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/GetSupportedModelsResponse"
                }
              }
            },
            "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 Supported Models",
        "tags": [
          "v1"
        ]
      }
    },
    "/reviews": {
      "get": {
        "description": "List code reviews, newest first.\n\n`findings` is omitted (counters only).\n\nWebhook-created reviews appear here too, so this answers \"show\nme every review on this PR\".",
        "operationId": "list_reviews",
        "parameters": [
          {
            "in": "query",
            "name": "owner",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner"
            }
          },
          {
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Repo"
            }
          },
          {
            "in": "query",
            "name": "pull_request_number",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pull Request Number"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CodeReviewRunStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "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/ListReviewsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Filtering by repository requires both owner and repo (and pull_request_number requires them too)."
          },
          "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 repository was not found in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Reviews",
        "tags": [
          "v1"
        ]
      },
      "post": {
        "description": "Run a code review on demand.\n\nReviews an existing PR or a pushed branch (for a branch, the\nplatform finds or creates a draft PR for it, since a code\nreview is structurally about a PR).\n\nA review is one pipeline run over one commit range, with one\nagent session per stage: `review.id` is the run id, and\n`stages[].session_id` is where a client streams\n(/sessions/{id}/stream on a stage session), since the review\nitself is a pipeline rather than one process.",
        "operationId": "create_review",
        "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/CreateReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "scope.kind \"full\" cannot be combined with an explicit scope.watermark."
          },
          "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 repository was not found in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A review of this pull request is already running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Review",
        "tags": [
          "v1"
        ]
      }
    },
    "/reviews/{review_id}": {
      "get": {
        "description": "Return one review with findings and outcome.\n\nIncludes its scope, the per-stage sessions, the parsed findings,\nthe finding counters, and the posting outcome.\n\nFindings only exist after a stage session finalizes \u2014 a running\nreview honestly reports [] / null, which is why a client\nstreams a stage session and then re-fetches the review.",
        "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 in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Review",
        "tags": [
          "v1"
        ]
      }
    },
    "/secrets": {
      "get": {
        "description": "List sandbox variables.\n\nValues are write-only: the response carries only names and\ntimestamps, never the stored value.",
        "operationId": "list_sandbox_variables",
        "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/GetSandboxVariablesResponse"
                }
              }
            },
            "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 Sandbox Variables",
        "tags": [
          "v1"
        ]
      },
      "put": {
        "description": "Upsert sandbox variables.\n\nValues are write-only: the response carries only names and\ntimestamps. Refused for sandbox tokens (held by\npotentially-untrusted in-sandbox code); mutations require an\nAPI key or user token.",
        "operationId": "put_sandbox_variables",
        "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/PutSandboxVariablesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSandboxVariablesResponse"
                }
              }
            },
            "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": "Put Sandbox Variables",
        "tags": [
          "v1"
        ]
      }
    },
    "/secrets/{name}": {
      "delete": {
        "description": "Delete a sandbox variable by name.\n\nRefused for sandbox tokens; mutations require an API key or\nuser token.",
        "operationId": "delete_sandbox_variable",
        "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": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSandboxVariablesResponse"
                }
              }
            },
            "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 Sandbox Variable",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions": {
      "get": {
        "description": "List cloud agent sessions.\n\nOptionally filtered by config, source, time window, attributed\nauthor, repository, and whether the session is still going.",
        "operationId": "list_agent_sessions",
        "parameters": [
          {
            "in": "query",
            "name": "config_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Config Id"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/AgentSessionSource"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "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,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "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, matched the same way as on GET /v1/sessions/search. Sessions whose repository is named only inside their agent config \u2014 dashboard starts, cron, handoffs \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, matched the same way as on GET /v1/sessions/search. Sessions whose repository is named only inside their agent config \u2014 dashboard starts, cron, handoffs \u2014 do not match.",
              "title": "Repo"
            }
          },
          {
            "description": "Keep only sessions whose conversation is still going \u2014 live or sleeping \u2014 dropping the ones that completed, errored, or were stopped or cancelled. A session parked between turns counts as unfinished.",
            "in": "query",
            "name": "unfinished",
            "required": false,
            "schema": {
              "default": false,
              "description": "Keep only sessions whose conversation is still going \u2014 live or sleeping \u2014 dropping the ones that completed, errored, or were stopped or cancelled. A session parked between turns counts as unfinished.",
              "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/ListAgentSessionsResponse"
                }
              }
            },
            "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 Sessions",
        "tags": [
          "v1"
        ]
      },
      "post": {
        "description": "Start a cloud agent session.\n\nProvide at most one of config_id, config, or template_id; with\nnone, the account's default-config ladder resolves the config.\n400 when idle_start is combined with prompt or handoff, or when\na handoff is combined with any config source or override.",
        "operationId": "start_agent_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/StartAgentSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartAgentSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request combines incompatible fields (multiple config sources, idle_start with prompt/handoff, a handoff with a config source, or both override forms), or the config override / handoff repo/sha 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": "The named config, template, or handoff parent session does not exist in your account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The resolved default config is broken (deleted, disabled, unmerged, or on an inaccessible repository)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start Agent Session",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/search": {
      "get": {
        "description": "Search sessions over steps, recaps, and pull requests.\n\nGrouped by session, over everything a session left behind: step text, recap text, created\nPRs, and recap-embedding similarity.\n\nThis is how an agent answers \"did Tony look into X?\": resolve\nthe author via /github/members, search, then read the winning\nsession via /sessions/{id} (recap) and /sessions/{id}/records\n(transcript).",
        "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/AgentSessionSource"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "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 config ids (ORed with author_id).",
            "in": "query",
            "name": "agent_config_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Saved agent config ids (ORed with author_id).",
              "title": "Agent Config 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.",
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "\"owner/name\" (exact) or a bare repo name.",
              "title": "Repo"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/AgentSessionStatus"
                  },
                  "type": "array"
                },
                {
                  "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": 20,
              "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/SearchSessionsWireResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The search query is too short, or limit is out of range."
          },
          "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"
        ]
      }
    },
    "/sessions/sync": {
      "post": {
        "description": "Sync a local Claude Code session to Ellipsis.\n\nRequires a user token (device-flow `agent login`): the user is\npart of the sync's idempotency key, so API keys and sandbox\ntokens are rejected with a 403 rather than silently attributed.",
        "operationId": "sync_agent_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/SyncAgentSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncAgentSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The transcript payload is empty, or is not valid base64/gzip."
          },
          "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."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The transcript exceeds the size limit (compressed or decompressed)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Sync Agent Session",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}": {
      "get": {
        "description": "Return one session.\n\nThe public wire shape \u2014 the same shape the stream's session\nframes carry, with attributed_user and stopped_by_user resolved\nat read time.\n\nThe heavy near-static blobs (config snapshot, input/output)\nlive on the detail endpoints, not here.",
        "operationId": "get_agent_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/AgentSessionWire"
                }
              }
            },
            "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 Agent Session",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/executions": {
      "get": {
        "description": "Return the session's executions and launch context.\n\nMost notably system_prompt_append, the text Ellipsis appends to\nClaude Code's default system prompt (platform section + response\ninstructions + the config's own instructions).\n\nPer execution because each cold wake persists its own launch\nconfig (a config edit or replay override between wakes changes\nit).",
        "operationId": "get_agent_session_executions",
        "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/ListSessionExecutionsResponse"
                }
              }
            },
            "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 Agent Session Executions",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/ide": {
      "get": {
        "description": "Return the IDE link for the session's sandbox.\n\nThe membership-gated dashboard page, which performs the sandbox\nproxy handoff itself.\n\nNo credential is minted here \u2014 the URL grants nothing by\npossession. 409 when the sandbox isn't running (send the\nsession a message to wake it first). Backs the `agent session\nide` CLI verb.",
        "operationId": "get_agent_session_ide",
        "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/GetSessionIdeResponse"
                }
              }
            },
            "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": "The session's sandbox is not running; send it a message to wake it first."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent Session Ide",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/log": {
      "get": {
        "description": "Download the complete session log.\n\nThe complete, ordered history of the session (agent output, tool calls, thinking,\nlifecycle events, sandbox 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": "get_agent_session_log",
        "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": "Get Agent Session Log",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/messages": {
      "post": {
        "description": "Send a message to a session.\n\n409 for react/cron, non-interactive, and closed sessions.\nReturns the created message so the caller can track it by id; a\nretried send with the same idempotency_key returns the original\nmessage.",
        "operationId": "send_agent_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/SessionMessageWire"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The message is empty."
          },
          "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, laptop-synced, or steered from its triggering surface (mention/react/cron)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send Agent Session Message",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/ports/{port}": {
      "get": {
        "description": "Return a preview link for a sandbox port.\n\nFor a dev server running in the session's live sandbox: the\nsame dashboard page as the IDE, deep-linked to the port.\n\nBacks `agent session port`.",
        "operationId": "get_agent_session_port",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "port",
            "required": true,
            "schema": {
              "title": "Port",
              "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/GetSessionPortResponse"
                }
              }
            },
            "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, or the port is not a valid TCP port."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The session's sandbox is not running; send it a message to wake it first."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Agent Session Port",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/records": {
      "get": {
        "description": "Return the session's stored transcript records.\n\nPagination is opt-in (after_seq/limit \u2014 the same feed_seq\ncursor as the stream); a bare call returns the full retained\ntranscript. Available to sandbox tokens too: an agent answering\n\"did X look into Y?\" needs to read the session it found via\n/sessions/search, and any org member sees the same transcript\nin the dashboard (laptop transcripts are redacted client-side\nbefore they are ever uploaded).",
        "operationId": "get_agent_session_records",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "default": 0,
              "title": "After Seq",
              "type": "integer"
            }
          },
          {
            "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/ListSessionRecordsResponse"
                }
              }
            },
            "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 Agent Session Records",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/replay": {
      "post": {
        "description": "Replay a session as a new session.\n\nReuses the original config snapshot unless config_id is given,\nand accepts the same config_override as session start \u2014 e.g.\n{\"claude\": {\"model\": ...}} to replay the same input on a\ndifferent model.",
        "operationId": "replay_agent_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/ReplayAgentSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionWire"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The session is a laptop session (not replayable), the named config does not exist, or the config override 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 session in your account."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replay Agent Session",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/stop": {
      "post": {
        "description": "Stop an in-flight session and return it.\n\nstopped_by is recorded only when the caller's credential maps\nto a GitHub account.",
        "operationId": "stop_agent_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/AgentSessionWire"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The session runs on a developer laptop and cannot be stopped from the cloud."
          },
          "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 has already finished."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Stop Agent Session",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/transcript": {
      "post": {
        "description": "Append transcript lines to a session's record.\n\nThe in-sandbox tailer for interactive sessions.\n\nA sandbox token may only push its own session's transcript.\nIdempotent by transcript line uuid; tolerant of malformed lines.",
        "operationId": "ingest_agent_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": "The session has no execution yet to attach transcript records to."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ingest Agent Session Transcript",
        "tags": [
          "v1"
        ]
      }
    },
    "/sessions/{session_id}/turns": {
      "get": {
        "description": "Return the session's turns and inbox messages.\n\nThe conversation structure, for durable (keyed) sessions; empty lists for\nsingle-shot sessions.\n\nThe session's per-conversation state (idle | running | closed)\nrides on the session object itself (session_state).",
        "operationId": "get_agent_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/ListSessionTurnsResponse"
                }
              }
            },
            "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 Agent Session Turns",
        "tags": [
          "v1"
        ]
      }
    },
    "/usage": {
      "get": {
        "description": "Return the caller's usage dashboard data.",
        "operationId": "get_usage_endpoint",
        "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/GetUsageDashboardResponse"
                }
              }
            },
            "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 Endpoint",
        "tags": [
          "v1"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ellipsis.dev"
    }
  ]
}
