{
  "openapi": "3.1.0",
  "info": {
    "title": "Sandbox Router API",
    "version": "sandboxrouter.io/v1",
    "description": "Sandbox Router's API: sandboxes across providers, and the MCP servers, workflows, connectors, logins and billing of a workspace.\n\nEvery request authenticates with an API key of the workspace, `Authorization: Bearer <key>`, and acts in that workspace. A key's scopes and its creator's role in the workspace decide which routes it may call.\n\nRequest bodies are JSON, but a file's bytes and a sandbox's change, a JSON merge patch. Sandboxes, snapshots, images, pools, providers and provider accounts are `sandboxrouter.io/v1` objects (`apiVersion`, `kind`, `metadata`, `spec`, `status`), their times RFC 3339 and their errors a `Status`. Every other resource is flat, its times milliseconds since the Unix epoch and its errors `{ \"error\": { \"code\", \"message\" } }`. Money is in micro-USD: 1,000,000 is $1."
  },
  "servers": [
    {
      "url": "https://api.sandboxrouter.io"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Sandboxes",
      "description": "A namespace's sandboxes: run, read, change, start, stop and delete them, and their execs, files, ports, metrics and logs."
    },
    {
      "name": "Snapshots",
      "description": "Snapshots a sandbox's provider takes of it, kept until they are deleted, even once their sandbox is gone, which a sandbox's create restores (`spec.from.snapshotRef`)."
    },
    {
      "name": "Images",
      "description": "A namespace's SandboxImages: what its sandboxes boot, by name (`spec.from.imageRef.name`), and where each is bootable."
    },
    {
      "name": "Provider accounts",
      "description": "The workspace's own accounts at providers, each by its key: sandboxes placed on one run and are billed there, and the namespace has its pool."
    },
    {
      "name": "Pools",
      "description": "Capacity sandboxes are placed on: a namespace's own accounts' pools, and Sandbox Router's own."
    },
    {
      "name": "Providers",
      "description": "The sandbox providers, and how each stands for the workspace."
    },
    {
      "name": "Registry",
      "description": "The workspace's repositories at its registry, registry.caas.sh."
    },
    {
      "name": "MCP servers",
      "description": "MCP servers that run in the workspace's sandboxes, each at its endpoint https://mcp.sandboxrouter.io/<id> behind its client tokens."
    },
    {
      "name": "Workflows",
      "description": "Saved workflows, each with its versions."
    },
    {
      "name": "Workflow runs",
      "description": "Runs of workflows: start, read, follow, pause, resume, cancel, rerun and replay them."
    },
    {
      "name": "Triggers",
      "description": "Triggers start runs of saved workflows from a connector's events."
    },
    {
      "name": "Endpoints",
      "description": "Where a connector receives its events, and the deliveries it received."
    },
    {
      "name": "Schedules",
      "description": "Schedules fire at the times their cron names, in their time zone, starting the runs of their triggers."
    },
    {
      "name": "Connectors",
      "description": "Connectors: the tools whose accounts the workspace's sandboxes reach, with the workspace's account of each and its users' connections."
    },
    {
      "name": "Users",
      "description": "The workspace's own users: their connections to its connectors, their logins and their usage."
    },
    {
      "name": "Logins",
      "description": "Logins: how the workspace's sandboxes' browsers sign in to sites, a user's or the workspace's own."
    },
    {
      "name": "Workspace",
      "description": "The workspace's settings and audit log."
    },
    {
      "name": "Billing",
      "description": "The prepaid balance, usage, auto-recharge and what a halt stopped. They work while the workspace is suspended."
    }
  ],
  "paths": {
    "/v1/namespaces/{namespace}/sandboxes": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "get": {
        "operationId": "listSandboxes",
        "summary": "List sandboxes",
        "description": "The namespace's sandboxes, newest first, each with what was metered of it.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          },
          {
            "$ref": "#/components/parameters/query.pageLimit"
          },
          {
            "$ref": "#/components/parameters/query.continue"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of sandboxes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSandbox",
        "summary": "Create a sandbox",
        "description": "Creates a sandbox and answers at once, while it starts (`Pending`): read it with `waitMs` to see it run. Every field of the body is optional.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A repeat of an Idempotency-Key: what its first request made, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "201": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes:run": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "post": {
        "operationId": "runSandbox",
        "summary": "Run a sandbox",
        "description": "Creates a sandbox and holds the request until it runs or fails: a sandbox that failed answers 201 too, its `status.phase` `Failed` and why on its `Ready` condition. Every field of the body is optional.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A repeat of an Idempotency-Key: what its first request made, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "201": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        }
      ],
      "get": {
        "operationId": "readSandbox",
        "summary": "Read a sandbox",
        "description": "The sandbox, with what was metered of it; `waitMs` holds the read while it starts or stops.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.waitMs"
          }
        ],
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeSandbox",
        "summary": "Change a sandbox",
        "description": "A JSON merge patch of its `metadata.labels`, `spec.state` (`Running` starts it, `Stopped` stops it), `spec.lifecycle.idleTimeout` and `spec.network.egress`. A start or stop answers at once: read the sandbox with `waitMs` to see it settle.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSandbox",
        "summary": "Delete a sandbox",
        "description": "Deletes the sandbox at its provider; its snapshots stay.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "The sandbox, its deletion under way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSandbox"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/exec": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        }
      ],
      "get": {
        "operationId": "listExecs",
        "summary": "List running execs, or open a terminal",
        "description": "The sandbox's execs that run, oldest first. Sent as a WebSocket handshake (`Upgrade: websocket`) that offers the `v5.channel.k8s.io` subprotocol, the same request opens a terminal in the running sandbox instead, as Kubernetes' exec does: a pseudo-terminal with `tty` and `stdin` true, running `command` or, without one, the sandbox's login shell. It needs `sandbox:execute` (the 101's `x-scopes`), and is refused where the sandbox's provider offers no pseudo-terminal (`Unsupported`, naming `exec.pty`) or the sandbox is not running.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.execCommand"
          },
          {
            "$ref": "#/components/parameters/query.execStdin"
          },
          {
            "$ref": "#/components/parameters/query.execStdout"
          },
          {
            "$ref": "#/components/parameters/query.execStderr"
          },
          {
            "$ref": "#/components/parameters/query.execTty"
          }
        ],
        "responses": {
          "101": {
            "description": "The terminal's WebSocket, in `v5.channel.k8s.io`: each binary message a channel byte (0 stdin, 1 output, 3 the session's last message, a Status with the program's exit, 4 a resize, `{\"Width\",\"Height\"}`, 255 a close of one channel) and its payload. The server closes with 1000 after its Status.",
            "x-scopes": [
              "sandbox:execute"
            ]
          },
          "200": {
            "description": "The execs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "runExec",
        "summary": "Run a command",
        "description": "Runs a command in the running sandbox and holds the request until it ends, unless `detach` or `waitMs` says otherwise. Without `timeoutSeconds`, it has no time limit.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.waitMs"
          },
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxExecBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The exec, ended, with its output.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "202": {
            "description": "The exec, still running: detached, or `waitMs` passed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/exec/{exec}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        },
        {
          "$ref": "#/components/parameters/path.exec"
        }
      ],
      "get": {
        "operationId": "readExec",
        "summary": "Read an exec",
        "description": "The exec; `waitMs` holds the read while it runs.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.waitMs"
          }
        ],
        "responses": {
          "200": {
            "description": "The exec, ended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "202": {
            "description": "The exec, still running.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "cancelExec",
        "summary": "Cancel an exec",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The exec as its cancel left it, ended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "202": {
            "description": "The exec as its cancel left it, still running.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Execution"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/files": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        }
      ],
      "get": {
        "operationId": "readRootPath",
        "summary": "Read the path /",
        "description": "`…/files` names the path `/`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Its bytes.",
            "content": {
              "application/octet-stream": {}
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "writeRootPath",
        "summary": "Write the path / (refused)",
        "description": "`/` cannot be written.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteRootPath",
        "summary": "Delete the path / (refused)",
        "description": "`/` cannot be deleted.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/files/{path}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        },
        {
          "$ref": "#/components/parameters/path.path"
        }
      ],
      "get": {
        "operationId": "readFile",
        "summary": "Read a file",
        "description": "The file's bytes, as the sandbox's provider reads them from the running sandbox.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The file's bytes.",
            "content": {
              "application/octet-stream": {}
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "writeFile",
        "summary": "Write a file",
        "description": "Writes the body as the file, whole.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "description": "The file's bytes.",
          "content": {
            "application/octet-stream": {}
          }
        },
        "responses": {
          "200": {
            "description": "The file written.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxFileWritten"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteFile",
        "summary": "Delete a file",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The file deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxFileDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/ports/{port}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        },
        {
          "$ref": "#/components/parameters/path.port"
        }
      ],
      "get": {
        "operationId": "readPort",
        "summary": "Reach a port",
        "description": "Where a port of the running sandbox is reached: its provider's URL, the headers a request to it carries (the provider's authorization for it, a secret), and when they lapse, after which read it again.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The port's URL and headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPort"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/metrics": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        }
      ],
      "get": {
        "operationId": "readMetrics",
        "summary": "Read metrics",
        "description": "The sandbox's CPU, memory and disk over time, as its provider measured them, oldest first.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.metricsFrom"
          },
          {
            "$ref": "#/components/parameters/query.metricsTo"
          }
        ],
        "responses": {
          "200": {
            "description": "The samples.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxMetrics"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxes/{sandbox}/logs": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.sandbox"
        }
      ],
      "get": {
        "operationId": "readLogs",
        "summary": "Read the log",
        "description": "What Sandbox Router recorded of the sandbox's lifecycle, oldest first, kept for its lifetime.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.logSince"
          },
          {
            "$ref": "#/components/parameters/query.follow"
          }
        ],
        "responses": {
          "200": {
            "description": "The log's entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxLog"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxLogEntry"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxsnapshots": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "get": {
        "operationId": "listSnapshots",
        "summary": "List snapshots",
        "description": "The namespace's snapshots, newest first, deleted sandboxes' among them. `labelSelector` matches their labels and `sandboxrouter.io/sandbox-uid`, so `sandboxrouter.io/sandbox-uid=<uid>` lists one sandbox's.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          },
          {
            "$ref": "#/components/parameters/query.pageLimit"
          },
          {
            "$ref": "#/components/parameters/query.continue"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of snapshots.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxSnapshotList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "takeSnapshot",
        "summary": "Take a snapshot",
        "description": "Has the provider of a running sandbox take a snapshot of it: its memory and processes too with `includeMemory: true`, its disk alone with `false`, and what the provider's snapshots keep without it. A provider whose snapshot pauses or stops the sandbox leaves it stopped. It answers at once with the snapshot: `Pending` while its provider still makes it, else `Ready`, or `Failed` with why in `status.message`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxSnapshotCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A repeat of an Idempotency-Key: what its first request made, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSnapshot"
                }
              }
            }
          },
          "201": {
            "description": "The snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSnapshot"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxsnapshots/{snapshot}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.snapshot"
        }
      ],
      "get": {
        "operationId": "readSnapshot",
        "summary": "Read a snapshot",
        "description": "The snapshot, whether its sandbox is deleted or not.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSnapshot"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSnapshot",
        "summary": "Delete a snapshot",
        "description": "Deletes the snapshot at its provider.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The snapshot, gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSnapshot"
                }
              }
            }
          },
          "202": {
            "description": "The snapshot, its provider still removing it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredSnapshot"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboximages": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "get": {
        "operationId": "listImages",
        "summary": "List images",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          }
        ],
        "responses": {
          "200": {
            "description": "Every image, by name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxImageList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createImage",
        "summary": "Create an image",
        "description": "An image of the workspace's registry (its tag resolved to a digest), a provider's own artifact, or a Dockerfile Sandbox Router builds; its status says where it is bootable.",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxImageCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredImage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboximages/{image}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.image"
        }
      ],
      "get": {
        "operationId": "readImage",
        "summary": "Read an image",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredImage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteImage",
        "summary": "Delete an image",
        "description": "Deletes the image; nothing at the registry or a provider is removed, and sandboxes that boot it keep running.",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The image deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredImage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxproviderconfigs": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "get": {
        "operationId": "listProviderConfigs",
        "summary": "List provider accounts",
        "tags": [
          "Provider accounts"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          }
        ],
        "responses": {
          "200": {
            "description": "Every account, by name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxProviderConfigList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxproviderconfigs/{config}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.config"
        }
      ],
      "get": {
        "operationId": "readProviderConfig",
        "summary": "Read a provider account",
        "tags": [
          "Provider accounts"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The account; its key is never answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredProviderConfig"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putProviderConfig",
        "summary": "Connect a provider account",
        "description": "Connects an account's key, or replaces it; the provider checks it. Only an owner's key may do it.",
        "tags": [
          "Provider accounts"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxProviderConfigBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The provider answered: `Ready`, or `Refused` with why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredProviderConfig"
                }
              }
            }
          },
          "202": {
            "description": "The provider is checking the key: `Verifying`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredProviderConfig"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteProviderConfig",
        "summary": "Remove a provider account",
        "description": "Removes the account, deleting the workspace's sandboxes on it. Only an owner's key may do it.",
        "tags": [
          "Provider accounts"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "202": {
            "description": "The removal is under way: `Removing`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnsweredProviderConfig"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxpools": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        }
      ],
      "get": {
        "operationId": "listNamespacePools",
        "summary": "List the namespace's pools",
        "tags": [
          "Pools"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          }
        ],
        "responses": {
          "200": {
            "description": "A pool for each account of the workspace's own that takes sandboxes now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPoolList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/namespaces/{namespace}/sandboxpools/{pool}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.namespace"
        },
        {
          "$ref": "#/components/parameters/path.pool"
        }
      ],
      "get": {
        "operationId": "readNamespacePool",
        "summary": "Read a namespace's pool",
        "tags": [
          "Pools"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The pool.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPool"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sandboxpools": {
      "parameters": [],
      "get": {
        "operationId": "listPools",
        "summary": "List Sandbox Router's pools",
        "tags": [
          "Pools"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          }
        ],
        "responses": {
          "200": {
            "description": "A pool for each provider Sandbox Router's own account runs sandboxes on.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPoolList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sandboxpools/{pool}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.pool"
        }
      ],
      "get": {
        "operationId": "readPool",
        "summary": "Read one of Sandbox Router's pools",
        "tags": [
          "Pools"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The pool.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPool"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sandboxproviders": {
      "parameters": [],
      "get": {
        "operationId": "listSandboxProviders",
        "summary": "List providers",
        "tags": [
          "Providers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.labelSelector"
          }
        ],
        "responses": {
          "200": {
            "description": "Every provider, by name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxProviderList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sandboxproviders/{provider}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.provider"
        }
      ],
      "get": {
        "operationId": "readSandboxProvider",
        "summary": "Read a provider",
        "tags": [
          "Providers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxProvider"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `Status`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/providers": {
      "parameters": [],
      "get": {
        "operationId": "listProviders",
        "summary": "List providers for the workspace",
        "description": "Each provider as the workspace may use it: its status, whose account it runs on, the sizes it takes with what an hour of each costs, its limits, features and rates, and its place in the Auto order.",
        "tags": [
          "Providers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The providers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/providers/auto": {
      "parameters": [],
      "get": {
        "operationId": "readAutoOrder",
        "summary": "Read the Auto order",
        "description": "The providers a sandbox that names none may go to, in the order they are tried.",
        "tags": [
          "Providers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The Auto order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoOrder"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setAutoOrder",
        "summary": "Set the Auto order",
        "description": "Sets the providers a sandbox that names none may go to, in order; one it leaves out is never used. Only an owner's key may do it.",
        "tags": [
          "Providers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoOrder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The Auto order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoOrder"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images": {
      "parameters": [],
      "get": {
        "operationId": "listRepositories",
        "summary": "List repositories",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "apiKey": [
              "registry:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The repositories, by name, and every byte they store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryRepositoryList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/{repository}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.repository"
        }
      ],
      "get": {
        "operationId": "readRepository",
        "summary": "Read a repository",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "apiKey": [
              "registry:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The repository and its images, newest push first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryRepositoryView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/{repository}:{tag}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.repository"
        },
        {
          "$ref": "#/components/parameters/path.tag"
        }
      ],
      "delete": {
        "operationId": "deleteTag",
        "summary": "Delete a tag",
        "description": "Removes the tag alone: its image stays under its digest and other tags.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "apiKey": [
              "registry:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The tag removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryTagDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/{repository}@{digest}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.repository"
        },
        {
          "$ref": "#/components/parameters/path.digest"
        }
      ],
      "delete": {
        "operationId": "deleteRegistryImage",
        "summary": "Delete an image",
        "description": "Removes the image, every tag of it, and the layers nothing else uses; refused while a push to the repository is under way.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "apiKey": [
              "registry:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The image removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryImageDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers": {
      "parameters": [],
      "get": {
        "operationId": "listMcpServers",
        "summary": "List MCP servers",
        "description": "Newest first.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of servers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createMcpServer",
        "summary": "Create an MCP server",
        "description": "Creates a server in a new sandbox or one you have, and mints its client tokens: their secrets are in this answer alone.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:write",
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A repeat of an Idempotency-Key: what its first request made, as it stands. Its tokens' secrets are not shown again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerView"
                }
              }
            }
          },
          "201": {
            "description": "The server, with its tokens.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerCreated"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.server"
        }
      ],
      "get": {
        "operationId": "readMcpServer",
        "summary": "Read an MCP server",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeMcpServer",
        "summary": "Change an MCP server",
        "description": "Renames it, or changes its port and path.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:write",
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMcpServer",
        "summary": "Delete an MCP server",
        "description": "Deletes the server, and the sandbox its create made unless `keepSandbox`; deleting that sandbox needs `sandbox:write` too.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.keepSandbox"
          }
        ],
        "responses": {
          "200": {
            "description": "The deletion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server}/tokens": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.server"
        }
      ],
      "get": {
        "operationId": "listMcpTokens",
        "summary": "List client tokens",
        "description": "Newest first; never a secret.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The tokens.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientTokenList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mintMcpToken",
        "summary": "Mint a client token",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpClientTokenBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The token, with its secret, shown this once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientTokenMinted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server}/tokens/{token}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.server"
        },
        {
          "$ref": "#/components/parameters/path.token"
        }
      ],
      "delete": {
        "operationId": "revokeMcpToken",
        "summary": "Revoke a client token",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The token, revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientTokenView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server}/traces": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.server"
        }
      ],
      "get": {
        "operationId": "listMcpTraces",
        "summary": "List traces",
        "description": "The server's newest traced requests, never their arguments or a token.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The traces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpTraceList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server}/stats": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.server"
        }
      ],
      "get": {
        "operationId": "readMcpStats",
        "summary": "Read the gateway's stats",
        "description": "The server's gateway over the last 24 hours.",
        "tags": [
          "MCP servers"
        ],
        "security": [
          {
            "apiKey": [
              "mcp:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The stats.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpGatewayStats"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflows": {
      "parameters": [],
      "get": {
        "operationId": "listWorkflows",
        "summary": "List workflows",
        "description": "Newest activity first.",
        "tags": [
          "Workflows"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of workflows.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "saveWorkflow",
        "summary": "Save a workflow",
        "description": "Saves a workflow document as its workflow's next version.",
        "tags": [
          "Workflows"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowSaveBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workflow, with its new version, or as it was when its latest version is this document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailView"
                }
              }
            }
          },
          "201": {
            "description": "A new workflow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflows/{workflow}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.workflow"
        }
      ],
      "get": {
        "operationId": "readWorkflow",
        "summary": "Read a workflow",
        "tags": [
          "Workflows"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWorkflow",
        "summary": "Delete a workflow",
        "description": "Deletes the workflow with its versions.",
        "tags": [
          "Workflows"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The deletion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflows/{workflow}/versions/{version}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.workflow"
        },
        {
          "$ref": "#/components/parameters/path.version"
        }
      ],
      "get": {
        "operationId": "readWorkflowVersion",
        "summary": "Read a workflow's version",
        "tags": [
          "Workflows"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The version, with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs": {
      "parameters": [],
      "get": {
        "operationId": "listRuns",
        "summary": "List runs",
        "description": "Newest first.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.runStatus"
          },
          {
            "$ref": "#/components/parameters/query.runWorkflow"
          },
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of runs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "startRun",
        "summary": "Start a run",
        "description": "Starts a run of a workflow document, or of a saved workflow's version; `dryRun` checks it and starts nothing.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.dryRun"
          },
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunStartBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A dry run's answer; or a repeat of an Idempotency-Key: the run its first request started, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WorkflowRunDetailView"
                    },
                    {
                      "$ref": "#/components/schemas/WorkflowDryRun"
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The run, queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "get": {
        "operationId": "readRun",
        "summary": "Read a run",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/definition": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "get": {
        "operationId": "readRunDefinition",
        "summary": "Read a run's document",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The document the run runs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDefinition"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "get": {
        "operationId": "listRunEvents",
        "summary": "List a run's events",
        "description": "Oldest first; with `follow`, each new one as it comes, for up to 10 minutes.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.eventCursor"
          },
          {
            "$ref": "#/components/parameters/query.eventLimit"
          },
          {
            "$ref": "#/components/parameters/query.follow"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowEventPage"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowEventView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/trigger-event": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "get": {
        "operationId": "readRunTriggerEvent",
        "summary": "Read the event that started a run",
        "description": "The payload of the event its trigger started it with, as it arrived.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The payload, of its own content type.",
            "content": {
              "*/*": {}
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/pause": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "post": {
        "operationId": "pauseRun",
        "summary": "Pause a run",
        "description": "Allowed while the workspace is suspended.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read",
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The run, paused already.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "202": {
            "description": "The run, pausing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/resume": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "post": {
        "operationId": "resumeRun",
        "summary": "Resume a run",
        "description": "Allowed while the workspace is suspended.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read",
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The run, running already.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "202": {
            "description": "The run, resuming.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "post": {
        "operationId": "cancelRun",
        "summary": "Cancel a run",
        "description": "Allowed while the workspace is suspended.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read",
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCancelBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The run, canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "202": {
            "description": "The run, canceling.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/rerun": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "post": {
        "operationId": "rerunRun",
        "summary": "Rerun steps of a run",
        "description": "Runs steps of the run again, as a new attempt of it.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRerunBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The run, queued again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/replay": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        }
      ],
      "post": {
        "operationId": "replayRun",
        "summary": "Replay a run",
        "description": "Starts the run again, as a new run.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A repeat of an Idempotency-Key: what its first request made, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "201": {
            "description": "The new run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/steps/{step}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        },
        {
          "$ref": "#/components/parameters/path.step"
        }
      ],
      "get": {
        "operationId": "readRunStep",
        "summary": "Read a step",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The step's instance, with its executions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowInstanceDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/steps/{step}/executions/{execution}/logs": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        },
        {
          "$ref": "#/components/parameters/path.step"
        },
        {
          "$ref": "#/components/parameters/path.execution"
        }
      ],
      "get": {
        "operationId": "readExecutionLog",
        "summary": "Read an execution's log",
        "description": "Oldest first; with `follow`, each new entry as it comes, for up to 10 minutes.",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.cursor"
          },
          {
            "$ref": "#/components/parameters/query.follow"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the log.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowLogPage"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowLogEntry"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{run}/steps/{step}/artifacts/{artifact}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.run"
        },
        {
          "$ref": "#/components/parameters/path.step"
        },
        {
          "$ref": "#/components/parameters/path.artifact"
        }
      ],
      "get": {
        "operationId": "downloadArtifact",
        "summary": "Download an artifact",
        "tags": [
          "Workflow runs"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The artifact, as a gzipped tar archive.",
            "content": {
              "application/gzip": {}
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/triggers": {
      "parameters": [],
      "get": {
        "operationId": "listTriggers",
        "summary": "List triggers",
        "description": "By connector, then name.",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.triggerConnector"
          },
          {
            "$ref": "#/components/parameters/query.triggerWorkflow"
          },
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of triggers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createTrigger",
        "summary": "Create a trigger",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/triggers/{trigger}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.trigger"
        }
      ],
      "get": {
        "operationId": "readTrigger",
        "summary": "Read a trigger",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeTrigger",
        "summary": "Change a trigger",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTrigger",
        "summary": "Delete a trigger",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The deletion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/triggers/{trigger}/test": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.trigger"
        }
      ],
      "post": {
        "operationId": "testTrigger",
        "summary": "Test a trigger",
        "description": "Shows the run a kept delivery, or a payload of your own, would start; with `start`, starts it.",
        "tags": [
          "Triggers"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerTestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What the test found; with `start`, a repeat of an Idempotency-Key: the run its first request started, as it stands.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TriggerTestResult"
                    },
                    {
                      "$ref": "#/components/schemas/WorkflowRunDetailView"
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The run it started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetailView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/endpoint": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "readEndpoint",
        "summary": "Read a connector's endpoint",
        "description": "Its URL is shown before it is set up.",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setUpEndpoint",
        "summary": "Set up a connector's endpoint",
        "description": "Sets up the endpoint with its sender's signing secret, generated where left out and the sender lets it be: then shown in this answer alone. Only an owner's key may do it.",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointSetBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointView"
                }
              }
            }
          },
          "201": {
            "description": "The endpoint, set up for the first time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeEndpoint",
        "summary": "Remove a connector's endpoint",
        "description": "Only an owner's key may do it.",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/endpoint/rotate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "post": {
        "operationId": "rotateEndpointSecret",
        "summary": "Replace an endpoint's signing secret",
        "description": "Generated where left out and the sender lets it be: then shown in this answer alone. Only an owner's key may do it.",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointRotateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/deliveries": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "listDeliveries",
        "summary": "List deliveries",
        "description": "Newest first.",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.after"
          },
          {
            "$ref": "#/components/parameters/query.limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of deliveries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/deliveries/{delivery}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.delivery"
        }
      ],
      "get": {
        "operationId": "readDelivery",
        "summary": "Read a delivery",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/deliveries/{delivery}/payload": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.delivery"
        }
      ],
      "get": {
        "operationId": "readDeliveryPayload",
        "summary": "Read a delivery's payload",
        "tags": [
          "Endpoints"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The payload as it arrived, of its own content type.",
            "content": {
              "*/*": {}
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedules": {
      "parameters": [],
      "get": {
        "operationId": "listSchedules",
        "summary": "List schedules",
        "description": "By name.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The schedules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSchedule",
        "summary": "Create a schedule",
        "description": "Creates a schedule, and a trigger of it to run a saved workflow where `trigger` names one.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The schedule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedules/{schedule}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.schedule"
        }
      ],
      "get": {
        "operationId": "readSchedule",
        "summary": "Read a schedule",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The schedule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeSchedule",
        "summary": "Change a schedule",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The schedule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSchedule",
        "summary": "Delete a schedule",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The deletion, with its firings, and the triggers left that take it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedules/{schedule}/firings": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.schedule"
        }
      ],
      "get": {
        "operationId": "listFirings",
        "summary": "List a schedule's firings",
        "description": "Newest first.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of firings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleFiringPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedules/{schedule}/run": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.schedule"
        }
      ],
      "post": {
        "operationId": "runSchedule",
        "summary": "Run a schedule now",
        "description": "Fires the schedule now, starting a run of each of its triggers. It takes no body.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write",
              "sandbox:execute"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The starts, none of them new: no trigger took it, each was refused, or a repeat of an Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRun"
                }
              }
            }
          },
          "201": {
            "description": "The starts, one or more of them new.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRun"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connector-catalog": {
      "parameters": [],
      "get": {
        "operationId": "listCatalog",
        "summary": "List the catalog",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog's tools.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors": {
      "parameters": [],
      "get": {
        "operationId": "listConnectors",
        "summary": "List connectors",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The connectors, by ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addConnector",
        "summary": "Add a connector",
        "description": "A catalog tool, an MCP server by its address, an API by its hosts, or a webhook. Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The connector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/discover": {
      "parameters": [],
      "post": {
        "operationId": "discoverConnector",
        "summary": "Discover an MCP server",
        "description": "How an MCP server's users would connect; nothing is kept. Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorDiscoverBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What the server's address answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveredConnector"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "readConnector",
        "summary": "Read a connector",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The connector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeConnector",
        "summary": "Change a connector",
        "description": "Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeConnector",
        "summary": "Remove a connector",
        "description": "Removes it with its workspace account and its users' connections. Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/connections": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "listConnections",
        "summary": "List a connector's connections",
        "description": "Its users' connections, by user.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.after"
          },
          {
            "$ref": "#/components/parameters/query.limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of connections.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "post": {
        "operationId": "connectAccount",
        "summary": "Connect the workspace account",
        "description": "With a key, or by a sign-in or an install whose next step is in `action`, or a code shown in `signIn`. Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountConnectBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The account, connected again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAccountView"
                }
              }
            }
          },
          "201": {
            "description": "The account, connected for the first time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAccountView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnectAccount",
        "summary": "Disconnect the workspace account",
        "description": "Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The disconnection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAccountDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/callback": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "post": {
        "operationId": "finishAccountSignIn",
        "summary": "Finish the workspace account's sign-in",
        "description": "Finishes a sign-in that returned to the console. Only an owner's key may do it.",
        "tags": [
          "Connectors"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialCallback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAccountView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "parameters": [],
      "get": {
        "operationId": "listUsers",
        "summary": "List users",
        "description": "By ID.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.after"
          },
          {
            "$ref": "#/components/parameters/query.limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndUserPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        }
      ],
      "get": {
        "operationId": "readUser",
        "summary": "Read a user",
        "description": "The user with their connections; a code only to a caller with `sandbox:write`.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndUserDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeUser",
        "summary": "Remove a user",
        "description": "Removes the user with their connections, logins and usage.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndUserDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/usage": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        }
      ],
      "get": {
        "operationId": "readUserUsage",
        "summary": "Read a user's usage",
        "description": "Their sandbox time and browser time per UTC day.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.usageFrom"
          },
          {
            "$ref": "#/components/parameters/query.usageTo"
          }
        ],
        "responses": {
          "200": {
            "description": "The usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndUserUsage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/connections": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        }
      ],
      "post": {
        "operationId": "linkUser",
        "summary": "Connect a user",
        "description": "A connect link to send the user, or their key.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The connection, and its link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionLinked"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/connections/{connector}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "readConnection",
        "summary": "Read a user's connection",
        "description": "A code only to a caller with `sandbox:write`.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnectUser",
        "summary": "Disconnect a user",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The disconnection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/connections/{connector}/sign-in": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "post": {
        "operationId": "signInUser",
        "summary": "Get a user's code",
        "description": "The user's code to sign in with, the one under way while it works, else a new one.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The connection, and its code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionSignIn"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        }
      ],
      "get": {
        "operationId": "listUserLogins",
        "summary": "List logins",
        "description": "Logins by site, then account name.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          },
          {
            "$ref": "#/components/parameters/query.loginSite"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of logins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addUserLogin",
        "summary": "Add a login",
        "description": "Adds a login of a site: how its sandboxes' browsers sign in to it. Its password and authenticator code are kept for signing in and never answered back.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "get": {
        "operationId": "readUserLogin",
        "summary": "Read a login",
        "description": "The login; its live view's URL only to a caller who could open one.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeUserLogin",
        "summary": "Change a login",
        "description": "Changes any of its fields but its site; null removes its password or code, or clears a field.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeUserLogin",
        "summary": "Remove a login",
        "description": "Removes the login with its passkeys and saved sign-in.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "What went with it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/passkeys/{passkey}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        },
        {
          "$ref": "#/components/parameters/path.passkey"
        }
      ],
      "patch": {
        "operationId": "renameUserPasskey",
        "summary": "Rename a passkey",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The passkey.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeUserPasskey",
        "summary": "Remove a passkey",
        "description": "Removes the passkey; its site may still list it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal, and what is left to do at the site.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/session": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "get": {
        "operationId": "readUserSavedSignIn",
        "summary": "Read a saved sign-in",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login's saved sign-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "uploadUserSavedSignIn",
        "summary": "Upload a saved sign-in",
        "description": "Saves a browser's storage state as the login's sign-in, the cookies of other sites dropped.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedSessionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved sign-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionUploaded"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeUserSavedSignIn",
        "summary": "Remove a saved sign-in",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/live": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "openUserLiveView",
        "summary": "Open a live view",
        "description": "Opens a browser on the login's site for a person to sign in; its URL drives the browser.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "201": {
            "description": "The live view, with its URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveOpened"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "endUserLiveView",
        "summary": "End a live view",
        "description": "Ends the open live view, unfinished.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The live view ended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveEnded"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/live/done": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "finishUserLiveView",
        "summary": "Finish a live view",
        "description": "Finishes the open live view: whether the site is signed in, and its sign-in saved.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/check": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "checkUserLogin",
        "summary": "Check a login",
        "description": "Checks whether the login's site is still signed in.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "What the check found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginChecked"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/link": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        }
      ],
      "post": {
        "operationId": "linkUserSite",
        "summary": "Make a sign-in link for a site",
        "description": "A link for the user to sign in to a site: to the user's login of it, made where there is none.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginLinkBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The login, and the link to send its user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginLinked"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{user}/logins/{login}/link": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.user"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "linkUserLogin",
        "summary": "Make a sign-in link for a login",
        "description": "A link for the user to sign in to the login's site.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRelinkBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The login, and the link to send its user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginLinked"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        }
      ],
      "get": {
        "operationId": "listWorkspaceLogins",
        "summary": "List logins",
        "description": "Logins by site, then account name.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.limit"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          },
          {
            "$ref": "#/components/parameters/query.loginSite"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of logins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addWorkspaceLogin",
        "summary": "Add a login",
        "description": "Adds a login of a site: how its sandboxes' browsers sign in to it. Its password and authenticator code are kept for signing in and never answered back. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/header.idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "get": {
        "operationId": "readWorkspaceLogin",
        "summary": "Read a login",
        "description": "The login; its live view's URL only to a caller who could open one.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeWorkspaceLogin",
        "summary": "Change a login",
        "description": "Changes any of its fields but its site; null removes its password or code, or clears a field. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeWorkspaceLogin",
        "summary": "Remove a login",
        "description": "Removes the login with its passkeys and saved sign-in. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "What went with it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}/passkeys/{passkey}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        },
        {
          "$ref": "#/components/parameters/path.passkey"
        }
      ],
      "patch": {
        "operationId": "renameWorkspacePasskey",
        "summary": "Rename a passkey",
        "description": "Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyChangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The passkey.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeWorkspacePasskey",
        "summary": "Remove a passkey",
        "description": "Removes the passkey; its site may still list it. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal, and what is left to do at the site.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}/session": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "get": {
        "operationId": "readWorkspaceSavedSignIn",
        "summary": "Read a saved sign-in",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login's saved sign-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "uploadWorkspaceSavedSignIn",
        "summary": "Upload a saved sign-in",
        "description": "Saves a browser's storage state as the login's sign-in, the cookies of other sites dropped. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedSessionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved sign-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionUploaded"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeWorkspaceSavedSignIn",
        "summary": "Remove a saved sign-in",
        "description": "Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedSessionDeleted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}/live": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "openWorkspaceLiveView",
        "summary": "Open a live view",
        "description": "Opens a browser on the login's site for a person to sign in; its URL drives the browser. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "201": {
            "description": "The live view, with its URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveOpened"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "endWorkspaceLiveView",
        "summary": "End a live view",
        "description": "Ends the open live view, unfinished. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The live view ended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveEnded"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}/live/done": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "finishWorkspaceLiveView",
        "summary": "Finish a live view",
        "description": "Finishes the open live view: whether the site is signed in, and its sign-in saved. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors/{connector}/account/logins/{login}/check": {
      "parameters": [
        {
          "$ref": "#/components/parameters/path.connector"
        },
        {
          "$ref": "#/components/parameters/path.login"
        }
      ],
      "post": {
        "operationId": "checkWorkspaceLogin",
        "summary": "Check a login",
        "description": "Checks whether the login's site is still signed in. Only an owner's key may do it.",
        "tags": [
          "Logins"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "What the check found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginChecked"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/settings": {
      "parameters": [],
      "get": {
        "operationId": "readSettings",
        "summary": "Read the settings",
        "tags": [
          "Workspace"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSettings"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "changeSettings",
        "summary": "Change the settings",
        "description": "Sets the time zone schedules take when they name none.",
        "tags": [
          "Workspace"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceSettings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSettings"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audit-log": {
      "parameters": [],
      "get": {
        "operationId": "readAuditLog",
        "summary": "Read the audit log",
        "description": "Newest first; each record of who changed what, never a secret, token or command's text.",
        "tags": [
          "Workspace"
        ],
        "security": [
          {
            "apiKey": [
              "sandbox:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.auditAction"
          },
          {
            "$ref": "#/components/parameters/query.auditActor"
          },
          {
            "$ref": "#/components/parameters/query.auditTarget"
          },
          {
            "$ref": "#/components/parameters/query.auditOutcome"
          },
          {
            "$ref": "#/components/parameters/query.auditSince"
          },
          {
            "$ref": "#/components/parameters/query.auditUntil"
          },
          {
            "$ref": "#/components/parameters/query.cursor"
          },
          {
            "$ref": "#/components/parameters/query.auditLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/balance": {
      "parameters": [],
      "get": {
        "operationId": "readBalance",
        "summary": "Read the balance",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.balanceCursor"
          }
        ],
        "responses": {
          "200": {
            "description": "The balance, auto-recharge, card, recent top-ups and a page of the balance's history.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/usage": {
      "parameters": [],
      "get": {
        "operationId": "readUsage",
        "summary": "Read a month's usage",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query.month"
          },
          {
            "$ref": "#/components/parameters/query.format"
          }
        ],
        "responses": {
          "200": {
            "description": "The month's usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReport"
                }
              },
              "text/csv": {}
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/auto-recharge": {
      "parameters": [],
      "get": {
        "operationId": "readAutoRecharge",
        "summary": "Read auto-recharge",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Auto-recharge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoRechargeView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setAutoRecharge",
        "summary": "Change auto-recharge",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRechargeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Auto-recharge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoRechargeView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/top-ups": {
      "parameters": [],
      "post": {
        "operationId": "addFunds",
        "summary": "Add funds",
        "description": "Charges the card on file, or answers a Checkout page to pay on.",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Makes the request safe to repeat: a repeat with the same key and body answers what the first did, creating nothing twice; the same key with another body is refused.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,128}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The top-up, and the Checkout page that finishes it, where it needs one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopUpResult"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/halt": {
      "parameters": [],
      "get": {
        "operationId": "readHalt",
        "summary": "Read what the halt stopped",
        "description": "What stopping the workspace at $0 or on its suspension stopped: counts at the halt, not what is stopped now. Null while the workspace may run.",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "apiKey": [
              "billing:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The halt, or null.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingHaltView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as a `ApiError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountAction": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "redirect"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "url"
        ]
      },
      "AccountConnectBody": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "key",
              "device",
              "native",
              "sign_in",
              "install"
            ]
          },
          "key": {
            "type": "string"
          }
        },
        "required": [
          "method"
        ]
      },
      "AnsweredImage": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxImage"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "type": "string"
              },
              "creationTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "deletionTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "namespace",
              "uid",
              "creationTimestamp",
              "labels"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxImageSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxImageStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec",
          "status"
        ]
      },
      "AnsweredProviderConfig": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProviderConfig"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "type": "string"
              },
              "creationTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "deletionTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "namespace"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxProviderConfigSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxProviderConfigStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec",
          "status"
        ]
      },
      "AnsweredSandbox": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Sandbox"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "type": "string"
              },
              "creationTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "deletionTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "namespace",
              "uid",
              "creationTimestamp",
              "labels"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec",
          "status"
        ]
      },
      "AnsweredSnapshot": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxSnapshot"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "type": "string"
              },
              "creationTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "deletionTimestamp": {
                "type": "string",
                "format": "date-time"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "namespace",
              "uid",
              "creationTimestamp",
              "labels"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxSnapshotSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxSnapshotStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec",
          "status"
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "capability": {
                "type": "string"
              },
              "billingUrl": {
                "type": "string"
              },
              "requestId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "error"
        ]
      },
      "ApiResources": {
        "type": "object",
        "properties": {
          "cpu": {
            "type": "number"
          },
          "memoryGiB": {
            "type": "number"
          },
          "diskGB": {
            "type": "number"
          }
        },
        "required": [
          "cpu",
          "memoryGiB",
          "diskGB"
        ]
      },
      "ApiSandboxSize": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "xs",
              "s",
              "m",
              "l",
              "xl",
              "2xl"
            ]
          },
          {
            "$ref": "#/components/schemas/ApiResources"
          }
        ]
      },
      "AuditActor": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "user"
              },
              "id": {
                "type": "string"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "id",
              "email"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "api_key"
              },
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "label",
              "userId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "operator"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "system"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "sandbox"
              },
              "id": {
                "type": "string"
              },
              "user": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "id",
              "user"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "end_user"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id"
            ]
          }
        ]
      },
      "AuditDetail": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "AuditPage": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditRecord"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "retentionDays": {
            "type": "number"
          }
        },
        "required": [
          "records",
          "nextCursor",
          "retentionDays"
        ]
      },
      "AuditRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "at": {
            "type": "number"
          },
          "tenantId": {
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/AuditActor"
          },
          "action": {
            "type": "string",
            "enum": [
              "sandbox.create",
              "sandbox.start",
              "sandbox.stop",
              "sandbox.delete",
              "sandbox.snapshot",
              "sandbox.snapshot.delete",
              "sandbox.restore",
              "sandbox.snapshot_schedule.update",
              "sandbox.url.update",
              "sandbox.url.disable",
              "sandbox.url_token.create",
              "command.exec",
              "command.cancel",
              "mcp_token.create",
              "mcp_token.revoke",
              "api_key.create",
              "api_key.revoke",
              "member.role.update",
              "member.remove",
              "invite.create",
              "invite.accept",
              "tenant.create",
              "tenant.settings.update",
              "tenant.suspend",
              "tenant.unsuspend",
              "tenant.plan.update",
              "tenant.constal_key.rotate",
              "billing.standing.change",
              "billing.spend_alert.update",
              "billing.top_up.create",
              "billing.auto_recharge.update",
              "workflow.run.start",
              "workflow.run.pause",
              "workflow.run.cancel",
              "workflow.run.resume",
              "workflow.run.restart",
              "workflow.run.replay",
              "workflow.run.rerun",
              "mcp_server.create",
              "mcp_server.update",
              "mcp_server.delete",
              "sandbox.file.write",
              "sandbox.file.delete",
              "sandbox.update",
              "sandbox.restart",
              "provider.key.set",
              "provider.key.delete",
              "provider.auto.set",
              "connector.create",
              "connector.update",
              "connector.delete",
              "workspace_account.connect",
              "workspace_account.disconnect",
              "connection.link",
              "connection.delete",
              "connection.sign_in",
              "end_user.delete",
              "image.delete",
              "sandbox_image.create",
              "sandbox_image.delete",
              "workflow.create",
              "workflow.update",
              "workflow.delete",
              "trigger.create",
              "trigger.update",
              "trigger.delete",
              "trigger.test",
              "connector_endpoint.set",
              "connector_endpoint.rotate",
              "connector_endpoint.delete",
              "mailbox.create",
              "mailbox.delete",
              "email.send",
              "email.sending.suspend",
              "email.sending.unsuspend",
              "schedule.create",
              "schedule.update",
              "schedule.delete",
              "schedule.run",
              "login.create",
              "login.update",
              "login.delete",
              "login.link",
              "login.sign_in",
              "login.fill",
              "login.read",
              "login.handoff",
              "login.check",
              "login.live.open",
              "login.live.done",
              "login.live.cancel",
              "login.session.save",
              "login.session.delete",
              "login.session.end",
              "passkey.create",
              "passkey.sign",
              "passkey.update",
              "passkey.delete",
              "sandbox.source.upload",
              "sandbox.image.create",
              "sandbox.terminal.open",
              "sandbox.terminal.close",
              "secret.set",
              "secret.delete",
              "egress.rules.update",
              "tenant.agent.upgrade",
              "workflow.link"
            ]
          },
          "target": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "provider",
                  "api_key",
                  "trigger",
                  "sandbox",
                  "workflow",
                  "end_user",
                  "upload",
                  "member",
                  "invite",
                  "tenant",
                  "workflow_run",
                  "mcp_server",
                  "connector",
                  "connection",
                  "mailbox",
                  "schedule",
                  "login",
                  "sandbox_image",
                  "credential",
                  "credential_provider"
                ]
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "id",
              "label"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "success",
              "failure"
            ]
          },
          "status": {
            "type": [
              "number",
              "null"
            ]
          },
          "requestId": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "$ref": "#/components/schemas/AuditDetail"
          }
        },
        "required": [
          "id",
          "at",
          "tenantId",
          "actor",
          "action",
          "target",
          "outcome",
          "status",
          "requestId",
          "detail"
        ]
      },
      "AutoOrder": {
        "type": "object",
        "properties": {
          "order": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "cloudflare",
                "maritime",
                "daytona",
                "freestyle",
                "e2b"
              ]
            },
            "uniqueItems": true
          }
        },
        "required": [
          "order"
        ]
      },
      "AutoRechargeBody": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "minimumMicroUsd": {
            "type": "integer",
            "minimum": 5000000,
            "maximum": 1000000000
          },
          "targetMicroUsd": {
            "type": "integer",
            "maximum": 2000000000
          }
        }
      },
      "AutoRechargeView": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "minimumMicroUsd": {
            "type": "number"
          },
          "targetMicroUsd": {
            "type": "number"
          },
          "active": {
            "type": "boolean"
          },
          "failure": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "at": {
                "type": "number"
              },
              "retrying": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "at",
              "retrying"
            ]
          }
        },
        "required": [
          "enabled",
          "minimumMicroUsd",
          "targetMicroUsd",
          "active",
          "failure"
        ]
      },
      "BalanceEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "usage",
              "top_up"
            ]
          },
          "day": {
            "type": "string"
          },
          "amountMicroUsd": {
            "type": "number"
          },
          "at": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "kind",
          "day",
          "amountMicroUsd",
          "at"
        ]
      },
      "BalanceView": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "standard",
              "enterprise"
            ]
          },
          "balanceMicroUsd": {
            "type": "number"
          },
          "everToppedUp": {
            "type": "boolean"
          },
          "everUsed": {
            "type": "boolean"
          },
          "outOfFundsAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "autoRecharge": {
            "$ref": "#/components/schemas/AutoRechargeView"
          },
          "card": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "brand": {
                "type": "string"
              },
              "last4": {
                "type": "string"
              },
              "expMonth": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "expYear": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "brand",
              "last4",
              "expMonth",
              "expYear"
            ]
          },
          "topUps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TopUp"
            }
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceEntry"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "balanceMicroUsd",
          "autoRecharge",
          "card",
          "topUps",
          "entries",
          "nextCursor"
        ]
      },
      "BillingHalt": {
        "type": "object",
        "properties": {
          "at": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "enum": [
              "out_of_funds",
              "tenant_suspended"
            ]
          },
          "sandboxes": {
            "type": "number"
          },
          "ownKeys": {
            "type": "number"
          },
          "runs": {
            "type": "number"
          },
          "browsers": {
            "type": "number"
          },
          "complete": {
            "type": "boolean"
          }
        },
        "required": [
          "at",
          "reason",
          "sandboxes",
          "ownKeys",
          "runs",
          "browsers",
          "complete"
        ]
      },
      "BillingHaltView": {
        "type": "object",
        "properties": {
          "halt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingHalt"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "halt"
        ]
      },
      "BoundInputs": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        }
      },
      "CatalogEntryView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "mcp",
              "api"
            ]
          },
          "mcpUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "auth": {
            "type": "string",
            "enum": [
              "none",
              "oauth",
              "key",
              "device",
              "native",
              "minted",
              "workspace"
            ]
          },
          "accountMethods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "key",
                "device",
                "native",
                "sign_in",
                "install"
              ]
            }
          },
          "available": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "added": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "kind",
          "mcpUrl",
          "auth",
          "accountMethods",
          "available",
          "reason",
          "added"
        ]
      },
      "CatalogList": {
        "type": "object",
        "properties": {
          "connectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogEntryView"
            }
          }
        },
        "required": [
          "connectors"
        ]
      },
      "Condition": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConditionStatus"
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "lastTransitionTime": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "type",
          "status",
          "reason",
          "lastTransitionTime"
        ]
      },
      "ConditionStatus": {
        "type": "string",
        "enum": [
          "True",
          "False",
          "Unknown"
        ]
      },
      "ConnectionCreateBody": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
            "maxLength": 32
          },
          "returnUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "type": "string"
          }
        },
        "required": [
          "connector"
        ]
      },
      "ConnectionDeleted": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "connector",
          "user",
          "deleted"
        ]
      },
      "ConnectionLinked": {
        "type": "object",
        "properties": {
          "connection": {
            "$ref": "#/components/schemas/ConnectionView"
          },
          "connectUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "connection",
          "connectUrl"
        ]
      },
      "ConnectionPage": {
        "type": "object",
        "properties": {
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectionView"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "connections",
          "next"
        ]
      },
      "ConnectionSignIn": {
        "type": "object",
        "properties": {
          "connection": {
            "$ref": "#/components/schemas/ConnectionView"
          },
          "signIn": {
            "$ref": "#/components/schemas/DeviceSignInView"
          }
        },
        "required": [
          "connection",
          "signIn"
        ]
      },
      "ConnectionView": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "unavailable",
              "expired",
              "pending",
              "ready",
              "renewing",
              "reauthentication_required",
              "invited"
            ]
          },
          "statusAt": {
            "type": "number"
          },
          "connectedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "linkOpen": {
            "type": "boolean"
          },
          "signIn": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeviceSignInView"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "number"
          }
        },
        "required": [
          "connector",
          "user",
          "status",
          "statusAt",
          "connectedAt",
          "expiresAt",
          "linkOpen",
          "signIn",
          "createdAt"
        ]
      },
      "ConnectorAppBody": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": "string"
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "pattern": "^[\\x21-\\x7e]{1,128}$"
            },
            "minItems": 1,
            "maxItems": 64,
            "uniqueItems": true
          },
          "preset": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "google",
              "gitlab",
              "linear",
              null
            ]
          },
          "authorizeUrl": {
            "type": "string"
          },
          "tokenUrl": {
            "type": "string"
          },
          "scopeSeparator": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              " ",
              ",",
              null
            ]
          },
          "tokenEndpointAuth": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "client_secret_post",
              "client_secret_basic",
              null
            ]
          }
        },
        "required": [
          "clientId",
          "clientSecret"
        ]
      },
      "ConnectorChangeBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "selector": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "envVar": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 128
          },
          "app": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorAppBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "githubApp": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorGithubAppBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "webhook": {
            "type": "object",
            "properties": {
              "signature": {
                "$ref": "#/components/schemas/WebhookSignatureBody"
              }
            },
            "required": [
              "signature"
            ]
          }
        }
      },
      "ConnectorCreateBody": {
        "type": "object",
        "properties": {
          "catalog": {
            "type": "string"
          },
          "mcpUrl": {
            "type": "string"
          },
          "api": {
            "type": "object",
            "properties": {
              "hosts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ConnectorHostBody"
                },
                "minItems": 1,
                "maxItems": 16
              }
            },
            "required": [
              "hosts"
            ]
          },
          "webhook": {
            "type": "object",
            "properties": {
              "signature": {
                "$ref": "#/components/schemas/WebhookSignatureBody"
              },
              "secret": {
                "type": "string"
              }
            },
            "required": [
              "signature"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
            "maxLength": 32
          },
          "name": {
            "type": "string"
          },
          "auth": {
            "type": "string",
            "const": "key"
          },
          "app": {
            "$ref": "#/components/schemas/ConnectorAppBody"
          },
          "githubApp": {
            "$ref": "#/components/schemas/ConnectorGithubAppBody"
          },
          "selector": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "envVar": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "ConnectorDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "connections": {
            "type": "number"
          },
          "account": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "deleted",
          "connections",
          "account"
        ]
      },
      "ConnectorDiscoverBody": {
        "type": "object",
        "properties": {
          "mcpUrl": {
            "type": "string"
          }
        },
        "required": [
          "mcpUrl"
        ]
      },
      "ConnectorGithubApp": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "slug"
        ]
      },
      "ConnectorGithubAppBody": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "privateKey": {
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "slug",
          "privateKey"
        ]
      },
      "ConnectorHeader": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "enum": [
              "bearer",
              "basic",
              "raw"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "header",
          "scheme",
          "username"
        ]
      },
      "ConnectorHost": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "enum": [
              "bearer",
              "basic",
              "raw"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "field": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorHeader"
            }
          }
        },
        "required": [
          "header",
          "scheme",
          "username",
          "host"
        ]
      },
      "ConnectorHostBody": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "maxLength": 255
          },
          "header": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "enum": [
              "bearer",
              "basic",
              "raw"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "host"
        ]
      },
      "ConnectorList": {
        "type": "object",
        "properties": {
          "connectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorView"
            }
          }
        },
        "required": [
          "connectors"
        ]
      },
      "ConnectorView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "mcp",
              "api",
              "catalog",
              "webhook"
            ]
          },
          "catalog": {
            "type": [
              "string",
              "null"
            ]
          },
          "mcpUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "hosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorHost"
            }
          },
          "auth": {
            "type": "string",
            "enum": [
              "none",
              "oauth",
              "key",
              "device",
              "native",
              "minted",
              "workspace"
            ]
          },
          "env": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountMethods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "key",
                "device",
                "native",
                "sign_in",
                "install"
              ]
            }
          },
          "app": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "sandboxrouter"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "own"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "kind",
                  "clientId",
                  "scopes"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "own"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "preset": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "google",
                      "gitlab",
                      "linear",
                      null
                    ]
                  },
                  "authorizeUrl": {
                    "type": "string"
                  },
                  "tokenUrl": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scopeSeparator": {
                    "type": "string",
                    "enum": [
                      " ",
                      ","
                    ]
                  },
                  "tokenEndpointAuth": {
                    "$ref": "#/components/schemas/OAuthTokenEndpointAuth"
                  }
                },
                "required": [
                  "kind",
                  "clientId",
                  "preset",
                  "authorizeUrl",
                  "tokenUrl",
                  "scopes",
                  "scopeSeparator",
                  "tokenEndpointAuth"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "githubApp": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorGithubApp"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "selector": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkspaceAccountView"
              },
              {
                "type": "null"
              }
            ]
          },
          "connections": {
            "type": "object",
            "properties": {
              "ready": {
                "type": "number"
              },
              "total": {
                "type": "number"
              }
            },
            "required": [
              "ready",
              "total"
            ]
          },
          "endpoint": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EndpointView"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookSignature"
              },
              {
                "type": "null"
              }
            ]
          },
          "triggers": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "enabled": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "enabled"
            ]
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "source",
          "catalog",
          "mcpUrl",
          "hosts",
          "auth",
          "env",
          "accountMethods",
          "app",
          "githubApp",
          "scopes",
          "selector",
          "account",
          "connections",
          "endpoint",
          "signature",
          "triggers",
          "createdBy",
          "createdAt",
          "updatedAt"
        ]
      },
      "CredentialCallback": {
        "type": "object",
        "properties": {
          "session": {
            "type": "string"
          },
          "confirm": {
            "type": "string"
          }
        },
        "required": [
          "session",
          "confirm"
        ]
      },
      "DeliveryOutcome": {
        "type": "string",
        "enum": [
          "lost",
          "pending",
          "started",
          "refused",
          "not_started",
          "no_match"
        ]
      },
      "DeliveryPage": {
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryView"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastRefusedAt": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "deliveries",
          "next",
          "lastRefusedAt"
        ]
      },
      "DeliverySummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/DeliveryOutcome"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "run": {
                  "type": "string"
                },
                "number": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trigger": {
                  "type": "string"
                }
              },
              "required": [
                "run",
                "number",
                "trigger"
              ]
            }
          },
          "refused": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "trigger": {
                  "type": "string"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "trigger",
                "reason",
                "message"
              ]
            }
          }
        },
        "required": [
          "id",
          "outcome",
          "reason",
          "runs",
          "refused"
        ]
      },
      "DeliveryView": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "endpoint": {
            "type": "string"
          },
          "at": {
            "type": "number"
          },
          "eventId": {
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/DeliveryOutcome"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "payload": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "bytes": {
                "type": "number"
              },
              "kept": {
                "type": "boolean"
              }
            },
            "required": [
              "bytes",
              "kept"
            ]
          },
          "starts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "trigger": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "state": {
                  "$ref": "#/components/schemas/TriggerStartState"
                },
                "run": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "number": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "trigger",
                "name",
                "state",
                "run",
                "number",
                "reason",
                "message"
              ]
            }
          }
        },
        "required": [
          "id",
          "endpoint",
          "at",
          "eventId",
          "type",
          "outcome",
          "reason",
          "payload",
          "starts"
        ]
      },
      "DeviceSignInView": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "failed",
              "starting",
              "expired",
              "pending",
              "connected"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "pollAfterMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "again": {
            "type": "boolean"
          },
          "startedAt": {
            "type": "number"
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "code",
          "url",
          "expiresAt",
          "pollAfterMs",
          "again",
          "startedAt",
          "endedAt",
          "reason"
        ]
      },
      "DiscoveredConnector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "mcpUrl": {
            "type": "string"
          },
          "hosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorHost"
            }
          },
          "auth": {
            "type": "string",
            "enum": [
              "none",
              "oauth",
              "key",
              "device",
              "native",
              "minted",
              "workspace"
            ]
          },
          "registration": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "dynamic",
              "app",
              null
            ]
          },
          "oauth": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "authorizeUrl": {
                "type": "string"
              },
              "tokenUrl": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "authorizeUrl",
              "tokenUrl",
              "scopes"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "callbackUrl": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "mcpUrl",
          "hosts",
          "auth",
          "registration",
          "oauth",
          "note",
          "callbackUrl"
        ]
      },
      "DockerfileSource": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          }
        },
        "required": [
          "content"
        ]
      },
      "EgressDestination": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "domain": {
                "type": "string",
                "maxLength": 255
              },
              "ports": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 65535
                },
                "minItems": 1,
                "uniqueItems": true
              }
            },
            "required": [
              "domain"
            ]
          },
          {
            "type": "object",
            "properties": {
              "cidr": {
                "type": "string"
              },
              "ports": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 65535
                },
                "minItems": 1,
                "uniqueItems": true
              }
            },
            "required": [
              "cidr"
            ]
          }
        ]
      },
      "EndpointDeleted": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "connector",
          "deleted"
        ]
      },
      "EndpointRotateBody": {
        "type": "object",
        "properties": {
          "secret": {
            "type": "string"
          }
        }
      },
      "EndpointSetBody": {
        "type": "object",
        "properties": {
          "via": {
            "type": "string",
            "const": "url"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "EndpointStatus": {
        "type": "string",
        "enum": [
          "failed",
          "ready",
          "not_set_up",
          "provisioning",
          "removing"
        ]
      },
      "EndpointView": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "via": {
            "type": "string",
            "enum": [
              "url",
              "schedules",
              "logins"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EndpointStatus"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "secretSetAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "connector",
          "id",
          "via",
          "url",
          "status",
          "error",
          "secretSetAt",
          "events"
        ]
      },
      "EndUserDeleted": {
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "connections": {
            "type": "number"
          },
          "logins": {
            "type": "number"
          }
        },
        "required": [
          "user",
          "deleted",
          "connections",
          "logins"
        ]
      },
      "EndUserDetail": {
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "createdAt": {
            "type": "number"
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectionView"
            }
          }
        },
        "required": [
          "user",
          "createdAt",
          "connections"
        ]
      },
      "EndUserPage": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndUserSummary"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "users",
          "next"
        ]
      },
      "EndUserSummary": {
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "createdAt": {
            "type": "number"
          },
          "connections": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "unavailable",
                "expired",
                "pending",
                "ready",
                "renewing",
                "reauthentication_required",
                "invited"
              ]
            }
          },
          "signIns": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "failed",
                    "starting",
                    "expired",
                    "pending",
                    "connected"
                  ]
                },
                "expiresAt": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pollAfterMs": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "status",
                "expiresAt",
                "pollAfterMs"
              ]
            }
          },
          "logins": {
            "type": "number"
          },
          "signedOut": {
            "type": "number"
          },
          "month": {
            "type": "object",
            "properties": {
              "runningSeconds": {
                "type": "number"
              },
              "browserSeconds": {
                "type": "number"
              }
            },
            "required": [
              "runningSeconds",
              "browserSeconds"
            ]
          }
        },
        "required": [
          "user",
          "createdAt",
          "connections",
          "signIns",
          "logins",
          "signedOut",
          "month"
        ]
      },
      "EndUserUsage": {
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "runningSeconds": {
                  "type": "number"
                },
                "browserSeconds": {
                  "type": "number"
                }
              },
              "required": [
                "date",
                "runningSeconds",
                "browserSeconds"
              ]
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "runningSeconds": {
                "type": "number"
              },
              "browserSeconds": {
                "type": "number"
              }
            },
            "required": [
              "runningSeconds",
              "browserSeconds"
            ]
          }
        },
        "required": [
          "user",
          "from",
          "to",
          "days",
          "total"
        ]
      },
      "EnvVar": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 128
          },
          "value": {
            "type": "string",
            "maxLength": 4096
          }
        },
        "required": [
          "name"
        ]
      },
      "Execution": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Execution"
          },
          "execId": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "canceled",
              "lost"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "exitCode": {
            "type": [
              "number",
              "null"
            ]
          },
          "signal": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "stdout": {
            "type": [
              "string",
              "null"
            ]
          },
          "stderr": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "execId",
          "state",
          "createdAt",
          "endedAt",
          "exitCode",
          "signal",
          "stdout",
          "stderr"
        ]
      },
      "ExecutionList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "ExecutionList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Execution"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "GrantedCapability": {
        "type": "string",
        "enum": [
          "lifecycle.pause",
          "exec",
          "exec.stream",
          "exec.stdin",
          "exec.pty",
          "exec.detach",
          "exec.env",
          "exec.cwd",
          "exec.timeout",
          "files",
          "snapshot.fs",
          "snapshot.memory",
          "snapshot.live",
          "snapshot.export",
          "snapshot.resize",
          "egress",
          "egress.domains",
          "egress.cidr",
          "egress.cidr6",
          "egress.live",
          "ingress"
        ]
      },
      "ImageMaterialization": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "account": {
            "type": "string",
            "enum": [
              "sandboxrouter",
              "own"
            ]
          },
          "size": {
            "type": "string"
          },
          "resources": {
            "$ref": "#/components/schemas/Resources"
          },
          "state": {
            "$ref": "#/components/schemas/ImageMaterializationState"
          },
          "method": {
            "$ref": "#/components/schemas/MaterializationMethod"
          },
          "ref": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "account",
          "state"
        ]
      },
      "ImageMaterializationState": {
        "type": "string",
        "enum": [
          "Pending",
          "Failed",
          "Unsupported",
          "Ready",
          "Building"
        ]
      },
      "ImageRef": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "ref": {
                "type": "string"
              }
            },
            "required": [
              "ref"
            ]
          }
        ]
      },
      "InputDeclaration": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "string",
              "boolean",
              "list"
            ]
          },
          "default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "maxLength": {
            "type": "number"
          },
          "enum": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "maxLength",
          "enum",
          "description"
        ]
      },
      "Lifecycle": {
        "type": "object",
        "properties": {
          "idleTimeout": {
            "type": "string"
          }
        }
      },
      "ListMeta": {
        "type": "object",
        "properties": {
          "continue": {
            "type": "string"
          }
        }
      },
      "LiveEnded": {
        "type": "object",
        "properties": {
          "ended": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "ended"
        ]
      },
      "LiveOpened": {
        "type": "object",
        "properties": {
          "live": {
            "$ref": "#/components/schemas/LiveView"
          }
        },
        "required": [
          "live"
        ]
      },
      "LiveView": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "done",
              "ended"
            ]
          },
          "from": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "sandbox": {
                    "type": "string"
                  }
                },
                "required": [
                  "sandbox"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "person": {
                    "type": "string"
                  }
                },
                "required": [
                  "person"
                ]
              }
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "embeddable": {
            "type": "boolean"
          },
          "startedAt": {
            "type": "number"
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "signedIn": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "saved": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "from",
          "message",
          "url",
          "expiresAt",
          "embeddable",
          "startedAt",
          "endedAt",
          "signedIn",
          "saved",
          "reason"
        ]
      },
      "LoginChangeBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "browser": {
            "type": "string",
            "enum": [
              "native",
              "browserbase"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "passkey",
                "typed",
                "readable"
              ]
            }
          },
          "signInUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "check": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "text"
            ]
          },
          "passkeys": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "signer": {
                "type": "string",
                "enum": [
                  "sandboxrouter",
                  "browser"
                ]
              },
              "creators": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "user",
                    "platform",
                    "agent"
                  ]
                }
              }
            }
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoginDeliveryBody"
            },
            "maxItems": 16
          },
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LoginChecked": {
        "type": "object",
        "properties": {
          "signedIn": {
            "type": "boolean"
          },
          "checkedAt": {
            "type": "number"
          },
          "session": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SavedSessionView"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "signedIn",
          "checkedAt",
          "session"
        ]
      },
      "LoginCreateBody": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "maxLength": 253
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "passkey",
                "typed",
                "readable"
              ]
            }
          },
          "browser": {
            "type": "string",
            "enum": [
              "native",
              "browserbase"
            ]
          },
          "signInUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "check": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "text"
            ]
          },
          "password": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "passkeys": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "signer": {
                "type": "string",
                "enum": [
                  "sandboxrouter",
                  "browser"
                ]
              },
              "creators": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "user",
                    "platform",
                    "agent"
                  ]
                }
              }
            }
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoginDeliveryBody"
            },
            "maxItems": 16
          }
        },
        "required": [
          "site"
        ]
      },
      "LoginDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "passkeys": {
            "type": "number"
          },
          "session": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "deleted",
          "passkeys",
          "session"
        ]
      },
      "LoginDelivery": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "header": {
            "type": "string"
          },
          "value": {
            "type": "string",
            "enum": [
              "password",
              "username",
              "code"
            ]
          },
          "scheme": {
            "type": "string",
            "enum": [
              "bearer",
              "basic",
              "raw"
            ]
          }
        },
        "required": [
          "host",
          "header",
          "value",
          "scheme"
        ]
      },
      "LoginDeliveryBody": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "enum": [
              "password",
              "username",
              "code"
            ]
          },
          "host": {
            "type": "string",
            "maxLength": 255
          },
          "header": {
            "type": "string"
          },
          "scheme": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "bearer",
              "basic",
              "raw",
              null
            ]
          }
        },
        "required": [
          "value",
          "host",
          "header"
        ]
      },
      "LoginLinkBody": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "maxLength": 253
          },
          "returnUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "site"
        ]
      },
      "LoginLinked": {
        "type": "object",
        "properties": {
          "login": {
            "$ref": "#/components/schemas/LoginView"
          },
          "connectUrl": {
            "type": "string"
          }
        },
        "required": [
          "login",
          "connectUrl"
        ]
      },
      "LoginPage": {
        "type": "object",
        "properties": {
          "logins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoginView"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "logins",
          "nextCursor"
        ]
      },
      "LoginRelinkBody": {
        "type": "object",
        "properties": {
          "returnUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LoginView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "site": {
            "type": "string"
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "passkey",
                "typed",
                "readable"
              ]
            }
          },
          "browser": {
            "type": "string",
            "enum": [
              "native",
              "browserbase"
            ]
          },
          "signInUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "check": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "text"
            ]
          },
          "password": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "savedAt": {
                "type": "number"
              },
              "savedBy": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "savedAt",
              "savedBy"
            ]
          },
          "code": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "addedAt": {
                "type": "number"
              },
              "digits": {
                "type": "number"
              },
              "periodSeconds": {
                "type": "number"
              }
            },
            "required": [
              "addedAt",
              "digits",
              "periodSeconds"
            ]
          },
          "passkeys": {
            "type": "object",
            "properties": {
              "signer": {
                "type": "string",
                "enum": [
                  "sandboxrouter",
                  "browser"
                ]
              },
              "creators": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "user",
                    "platform",
                    "agent"
                  ]
                }
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PasskeyView"
                }
              }
            },
            "required": [
              "signer",
              "creators",
              "items"
            ]
          },
          "session": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SavedSessionView"
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoginDelivery"
            }
          },
          "live": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LiveView"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "number"
          },
          "lastUsedAt": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "site",
          "username",
          "name",
          "methods",
          "browser",
          "signInUrl",
          "check",
          "password",
          "code",
          "passkeys",
          "session",
          "deliveries",
          "live",
          "createdAt",
          "createdBy",
          "updatedAt",
          "lastUsedAt"
        ]
      },
      "MaterializationMethod": {
        "type": "string",
        "enum": [
          "direct",
          "template-build",
          "registry-push",
          "snapshot",
          "providerRef"
        ]
      },
      "McpClientTokenBody": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "allowedTools": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 32,
            "uniqueItems": true
          }
        },
        "required": [
          "label"
        ]
      },
      "McpClientTokenList": {
        "type": "object",
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpClientTokenView"
            }
          }
        },
        "required": [
          "tokens"
        ]
      },
      "McpClientTokenMinted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "type": "number"
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "revokedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "lastUsedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "allowedTools": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "requestCount": {
            "type": "number"
          },
          "errorCount": {
            "type": "number"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "createdAt",
          "expiresAt",
          "revokedAt",
          "lastUsedAt",
          "allowedTools",
          "requestCount",
          "errorCount",
          "secret"
        ]
      },
      "McpClientTokenView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "type": "number"
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "revokedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "lastUsedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "allowedTools": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "requestCount": {
            "type": "number"
          },
          "errorCount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "label",
          "createdAt",
          "expiresAt",
          "revokedAt",
          "lastUsedAt",
          "allowedTools",
          "requestCount",
          "errorCount"
        ]
      },
      "McpGatewayStats": {
        "type": "object",
        "properties": {
          "requests": {
            "type": "number"
          },
          "blocked": {
            "type": "number"
          },
          "errors": {
            "type": "number"
          },
          "timeouts": {
            "type": "number"
          },
          "medianLatencyMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "health": {
            "type": "string",
            "enum": [
              "healthy",
              "slow"
            ]
          },
          "insight": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lastHourMedianMs": {
                "type": "number"
              },
              "yesterdayMedianMs": {
                "type": "number"
              },
              "slowTool": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lastHourMedianMs",
              "yesterdayMedianMs",
              "slowTool"
            ]
          }
        },
        "required": [
          "requests",
          "blocked",
          "errors",
          "timeouts",
          "medianLatencyMs",
          "health",
          "insight"
        ]
      },
      "McpServerChangeBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
            "maxLength": 63
          },
          "transport": {
            "$ref": "#/components/schemas/McpTransportBody"
          }
        }
      },
      "McpServerCreateBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
            "maxLength": 63
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxConfigBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "sandboxId": {
            "type": "string",
            "pattern": "^u-[a-z2-7]{51}[aq]$"
          },
          "transport": {
            "$ref": "#/components/schemas/McpTransportBody"
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpClientTokenBody"
            },
            "minItems": 1,
            "maxItems": 20
          }
        },
        "required": [
          "name",
          "transport"
        ]
      },
      "McpServerCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "sandboxId": {
            "type": "string"
          },
          "transport": {
            "$ref": "#/components/schemas/McpTransport"
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "failed",
              "starting",
              "stopping",
              "stopped"
            ]
          },
          "stateMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          },
          "stats": {
            "$ref": "#/components/schemas/McpGatewayStats"
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpClientTokenMinted"
            }
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "sandboxId",
          "transport",
          "state",
          "stateMessage",
          "createdAt",
          "updatedAt",
          "stats",
          "tokens"
        ]
      },
      "McpServerDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "sandboxDeleted": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "deleted",
          "sandboxDeleted"
        ]
      },
      "McpServerPage": {
        "type": "object",
        "properties": {
          "mcpServers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServerView"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "mcpServers",
          "nextCursor"
        ]
      },
      "McpServerView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "sandboxId": {
            "type": "string"
          },
          "transport": {
            "$ref": "#/components/schemas/McpTransport"
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "failed",
              "starting",
              "stopping",
              "stopped"
            ]
          },
          "stateMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          },
          "stats": {
            "$ref": "#/components/schemas/McpGatewayStats"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "sandboxId",
          "transport",
          "state",
          "stateMessage",
          "createdAt",
          "updatedAt",
          "stats"
        ]
      },
      "McpTraceList": {
        "type": "object",
        "properties": {
          "traces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpTraceView"
            }
          }
        },
        "required": [
          "traces"
        ]
      },
      "McpTraceView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "at": {
            "type": "number"
          },
          "status": {
            "type": "number"
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "tool": {
            "type": [
              "string",
              "null"
            ]
          },
          "clientId": {
            "type": [
              "string",
              "null"
            ]
          },
          "clientLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timeout",
              "blocked",
              "denied",
              null
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "missing",
              "invalid",
              "expired",
              "revoked",
              null
            ]
          }
        },
        "required": [
          "id",
          "at",
          "status",
          "durationMs",
          "method",
          "tool",
          "clientId",
          "clientLabel",
          "outcome",
          "reason"
        ]
      },
      "McpTransport": {
        "type": "object",
        "properties": {
          "http": {
            "type": "object",
            "properties": {
              "port": {
                "type": "number"
              },
              "path": {
                "type": "string"
              }
            },
            "required": [
              "port",
              "path"
            ]
          }
        },
        "required": [
          "http"
        ]
      },
      "McpTransportBody": {
        "type": "object",
        "properties": {
          "http": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": 1024,
                "maximum": 65535
              },
              "path": {
                "type": "string",
                "default": "/mcp"
              }
            },
            "required": [
              "port"
            ]
          }
        },
        "required": [
          "http"
        ]
      },
      "OAuthTokenEndpointAuth": {
        "type": "string",
        "enum": [
          "client_secret_post",
          "client_secret_basic"
        ]
      },
      "ObjectMeta": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "uid": {
            "type": "string"
          },
          "creationTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "deletionTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "OciImageSource": {
        "type": "object",
        "properties": {
          "registry": {
            "type": "string",
            "const": "registry.caas.sh"
          },
          "repository": {
            "type": "string"
          },
          "tag": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$"
          },
          "digest": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$"
          }
        },
        "required": [
          "registry",
          "repository"
        ]
      },
      "PasskeyChangeBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "PasskeyDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "deleted",
          "note"
        ]
      },
      "PasskeyView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "credentialId": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "algorithm": {
            "type": "string",
            "const": "ES256"
          },
          "madeAt": {
            "type": "number"
          },
          "madeBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "agent"
                  },
                  "sandbox": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "sandbox"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "user"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "platform"
                  },
                  "by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "by"
                ]
              }
            ]
          },
          "lastUsedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "uses": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "credentialId",
          "name",
          "algorithm",
          "madeAt",
          "madeBy",
          "lastUsedAt",
          "uses"
        ]
      },
      "Placement": {
        "type": "object",
        "properties": {
          "selector": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "enum": [
                "topology.sandboxrouter.io/provider",
                "topology.sandboxrouter.io/account"
              ]
            }
          }
        }
      },
      "PrincipalActor": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "user"
              },
              "id": {
                "type": "string"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "id",
              "email"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "api_key"
              },
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "label",
              "userId"
            ]
          }
        ]
      },
      "ProviderArtifactRef": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "maritime",
              "daytona",
              "e2b"
            ]
          },
          "ref": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "ref"
        ]
      },
      "ProviderCustomLimits": {
        "type": "object",
        "properties": {
          "minVcpu": {
            "type": "number"
          },
          "maxVcpu": {
            "type": "number"
          },
          "minMemoryGibPerVcpu": {
            "type": "number"
          },
          "maxMemoryGib": {
            "type": "number"
          },
          "minDiskGb": {
            "type": "number"
          },
          "maxDiskGb": {
            "type": "number"
          }
        },
        "required": [
          "minVcpu",
          "maxVcpu",
          "minMemoryGibPerVcpu",
          "maxMemoryGib",
          "minDiskGb",
          "maxDiskGb"
        ]
      },
      "ProviderKeyRefusal": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ProviderList": {
        "type": "object",
        "properties": {
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderView"
            }
          }
        },
        "required": [
          "providers"
        ]
      },
      "ProviderReference": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "id"
        ]
      },
      "ProviderSizeView": {
        "type": "object",
        "properties": {
          "cpu": {
            "type": "number"
          },
          "memoryGiB": {
            "type": "number"
          },
          "diskGB": {
            "type": "number"
          },
          "size": {
            "$ref": "#/components/schemas/SandboxSizeName"
          },
          "microUsdPerHour": {
            "type": "number"
          }
        },
        "required": [
          "cpu",
          "memoryGiB",
          "diskGB",
          "size",
          "microUsdPerHour"
        ]
      },
      "ProviderView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "cloudflare",
              "maritime",
              "daytona",
              "freestyle",
              "e2b"
            ]
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "verifying",
              "key_invalid",
              "unconfigured",
              "unavailable"
            ]
          },
          "account": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sandboxrouter",
              "own",
              null
            ]
          },
          "keyError": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderSizeView"
            }
          },
          "custom": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProviderCustomLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "features": {
            "type": "object",
            "properties": {
              "env": {
                "type": "boolean"
              },
              "connectors": {
                "type": "boolean"
              },
              "ownImage": {
                "type": "boolean"
              },
              "ports": {
                "type": "boolean"
              },
              "egressHosts": {
                "type": "boolean"
              },
              "mcpServers": {
                "type": "boolean"
              },
              "workflows": {
                "type": "boolean"
              }
            },
            "required": [
              "env",
              "connectors",
              "ownImage",
              "ports",
              "egressHosts",
              "mcpServers",
              "workflows"
            ]
          },
          "rates": {
            "type": "object",
            "properties": {
              "vcpuHour": {
                "type": "number"
              },
              "memoryGibHour": {
                "type": "number"
              },
              "diskGbHour": {
                "type": "number"
              },
              "egressGb": {
                "type": "number"
              },
              "snapshotGbMonth": {
                "type": "number"
              },
              "mcpRequestsPer1000": {
                "type": "number"
              },
              "workflowStepsPer100": {
                "type": "number"
              },
              "triggerEventsPer100": {
                "type": "number"
              },
              "carriedFilesGibMonth": {
                "type": "number"
              },
              "registryGbMonth": {
                "type": "number"
              },
              "registryPullsPer1000": {
                "type": "number"
              },
              "registryListsPer1000": {
                "type": "number"
              },
              "browserHour": {
                "type": "number"
              },
              "egressProxyGb": {
                "type": "number"
              }
            },
            "required": [
              "vcpuHour",
              "memoryGibHour",
              "diskGbHour",
              "egressGb",
              "snapshotGbMonth",
              "mcpRequestsPer1000",
              "workflowStepsPer100",
              "triggerEventsPer100",
              "carriedFilesGibMonth",
              "registryGbMonth",
              "registryPullsPer1000",
              "registryListsPer1000",
              "browserHour",
              "egressProxyGb"
            ]
          },
          "byok": {
            "type": "boolean"
          },
          "keyConnectedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "autoPosition": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "account",
          "keyError",
          "sizes",
          "custom",
          "features",
          "rates",
          "byok",
          "keyConnectedAt",
          "autoPosition"
        ]
      },
      "RegistryImageDeleted": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "digest": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "freedBytes": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "digest",
          "deleted",
          "tags",
          "freedBytes"
        ]
      },
      "RegistryImageView": {
        "type": "object",
        "properties": {
          "digest": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mediaType": {
            "type": [
              "string",
              "null"
            ]
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "pushedAt": {
            "type": "number"
          }
        },
        "required": [
          "digest",
          "tags",
          "mediaType",
          "platforms",
          "bytes",
          "pushedAt"
        ]
      },
      "RegistryRepositoryList": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryRepositorySummary"
            }
          },
          "bytes": {
            "type": "number"
          }
        },
        "required": [
          "repositories",
          "bytes"
        ]
      },
      "RegistryRepositorySummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "tagCount": {
            "type": "number"
          },
          "imageCount": {
            "type": "number"
          },
          "bytes": {
            "type": "number"
          },
          "pushedAt": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "tagCount",
          "imageCount",
          "bytes",
          "pushedAt"
        ]
      },
      "RegistryRepositoryView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "bytes": {
            "type": "number"
          },
          "pushedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryImageView"
            }
          }
        },
        "required": [
          "name",
          "bytes",
          "pushedAt",
          "images"
        ]
      },
      "RegistryTagDeleted": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "digest": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "name",
          "tag",
          "digest",
          "deleted"
        ]
      },
      "Reservation": {
        "type": "object",
        "properties": {
          "cpu": {
            "type": "number"
          },
          "memoryGiB": {
            "type": "number"
          }
        },
        "required": [
          "cpu",
          "memoryGiB"
        ]
      },
      "ResourceRequest": {
        "type": "object",
        "properties": {
          "size": {
            "type": "string",
            "enum": [
              "xs",
              "s",
              "m",
              "l",
              "xl",
              "2xl"
            ]
          },
          "sizeMatch": {
            "$ref": "#/components/schemas/SizeMatch"
          }
        }
      },
      "Resources": {
        "type": "object",
        "properties": {
          "cpu": {
            "type": "string"
          },
          "memory": {
            "type": "string"
          },
          "disk": {
            "type": "string"
          }
        },
        "required": [
          "cpu",
          "memory"
        ]
      },
      "Sandbox": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Sandbox"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxConfigBody": {
        "type": "object",
        "properties": {
          "image": {
            "type": "string",
            "maxLength": 300,
            "default": "default"
          },
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "minItems": 1,
            "maxItems": 32
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096
            },
            "maxProperties": 64,
            "propertyNames": {
              "maxLength": 128
            }
          },
          "size": {
            "$ref": "#/components/schemas/SandboxSizeName",
            "default": "m"
          },
          "egress": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 32
          },
          "idleStopMinutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 240,
            "default": 15
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 256
            },
            "maxProperties": 16,
            "description": "The labels Sandbox Router keeps beside these count toward the same bound, so fewer of these fit."
          },
          "provider": {
            "$ref": "#/components/schemas/SandboxProviderChoice",
            "default": "auto"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 256
          },
          "connectors": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
              "maxLength": 32
            },
            "maxItems": 32,
            "uniqueItems": true
          }
        }
      },
      "SandboxCreateBody": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Sandbox"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                "maxLength": 63
              },
              "namespace": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxProperties": 16,
                "description": "The labels Sandbox Router keeps beside these count toward the same bound, so fewer of these fit."
              }
            }
          },
          "spec": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "from": {
                "$ref": "#/components/schemas/SandboxSource"
              },
              "resources": {
                "$ref": "#/components/schemas/ResourceRequest"
              },
              "network": {
                "$ref": "#/components/schemas/SandboxNetwork"
              },
              "placement": {
                "$ref": "#/components/schemas/Placement"
              },
              "lifecycle": {
                "$ref": "#/components/schemas/Lifecycle"
              },
              "command": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "minItems": 1,
                "maxItems": 32
              },
              "user": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "connectors": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
                  "maxLength": 32
                },
                "maxItems": 32,
                "uniqueItems": true
              },
              "env": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 4096
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ]
                },
                "maxItems": 64
              }
            }
          },
          "status": {}
        }
      },
      "SandboxEgress": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "all"
              }
            },
            "required": [
              "mode"
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "none"
              }
            },
            "required": [
              "mode"
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "allow"
              },
              "allow": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EgressDestination"
                },
                "minItems": 1,
                "maxItems": 32
              }
            },
            "required": [
              "mode",
              "allow"
            ]
          }
        ]
      },
      "SandboxEgressPatch": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "all",
                  "none"
                ]
              },
              "allow": {
                "type": "null"
              }
            },
            "required": [
              "mode",
              "allow"
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "allow"
              },
              "allow": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EgressDestination"
                }
              }
            },
            "required": [
              "mode",
              "allow"
            ]
          }
        ]
      },
      "SandboxExecBody": {
        "type": "object",
        "properties": {
          "command": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "minItems": 1,
            "maxItems": 32
          },
          "stdin": {
            "type": "string"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096
            },
            "maxProperties": 64,
            "propertyNames": {
              "maxLength": 128
            }
          },
          "workdir": {
            "type": "string",
            "maxLength": 1024
          },
          "timeoutSeconds": {
            "type": "integer",
            "minimum": 1
          },
          "detach": {
            "type": "boolean"
          }
        },
        "required": [
          "command"
        ],
        "if": {
          "properties": {
            "detach": {
              "const": true
            }
          },
          "required": [
            "detach"
          ]
        },
        "then": {
          "properties": {
            "timeoutSeconds": {
              "maximum": 86400
            }
          }
        },
        "else": {
          "properties": {
            "timeoutSeconds": {
              "maximum": 7200
            }
          }
        }
      },
      "SandboxFileDeleted": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "path",
          "deleted"
        ]
      },
      "SandboxFileWritten": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "bytes": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "path",
          "bytes"
        ]
      },
      "SandboxImage": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxImage"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxImageSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxImageStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxImageCreateBody": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxImage"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                "maxLength": 63
              },
              "namespace": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxProperties": 16
              }
            },
            "required": [
              "name"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxImageSpec"
          },
          "status": {}
        },
        "required": [
          "metadata",
          "spec"
        ]
      },
      "SandboxImageList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxImageList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxImage"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxImageSource": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "image": {
                "$ref": "#/components/schemas/OciImageSource"
              }
            },
            "required": [
              "image"
            ]
          },
          {
            "type": "object",
            "properties": {
              "dockerfile": {
                "$ref": "#/components/schemas/DockerfileSource"
              }
            },
            "required": [
              "dockerfile"
            ]
          },
          {
            "type": "object",
            "properties": {
              "providerRef": {
                "$ref": "#/components/schemas/ProviderArtifactRef"
              }
            },
            "required": [
              "providerRef"
            ]
          }
        ]
      },
      "SandboxImageSpec": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/SandboxImageSource"
          }
        },
        "required": [
          "source"
        ]
      },
      "SandboxImageStatus": {
        "type": "object",
        "properties": {
          "digest": {
            "type": "string"
          },
          "materializations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageMaterialization"
            }
          }
        },
        "required": [
          "materializations"
        ]
      },
      "SandboxList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sandbox"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxLog": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxLogEntry"
            }
          }
        },
        "required": [
          "entries"
        ]
      },
      "SandboxLogEntry": {
        "type": "object",
        "properties": {
          "at": {
            "type": "number"
          },
          "stream": {
            "type": "string",
            "enum": [
              "stdout",
              "stderr",
              "system"
            ]
          },
          "message": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        },
        "required": [
          "at",
          "stream",
          "message",
          "kind"
        ]
      },
      "SandboxMetrics": {
        "type": "object",
        "properties": {
          "samples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxMetricsSample"
            }
          }
        },
        "required": [
          "samples"
        ]
      },
      "SandboxMetricsSample": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "cpuPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "memUsedBytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "memTotalBytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "diskUsedBytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "diskTotalBytes": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "at",
          "cpuPct",
          "memUsedBytes",
          "memTotalBytes",
          "diskUsedBytes",
          "diskTotalBytes"
        ]
      },
      "SandboxNetwork": {
        "type": "object",
        "properties": {
          "egress": {
            "$ref": "#/components/schemas/SandboxEgress"
          }
        }
      },
      "SandboxPatch": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Sandbox"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "labels": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 256
                },
                "maxProperties": 16,
                "description": "The labels Sandbox Router keeps beside these count toward the same bound, so fewer of these fit."
              }
            }
          },
          "spec": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "Running",
                  "Stopped"
                ]
              },
              "lifecycle": {
                "$ref": "#/components/schemas/Lifecycle"
              },
              "network": {
                "type": "object",
                "properties": {
                  "egress": {
                    "$ref": "#/components/schemas/SandboxEgressPatch"
                  }
                }
              }
            }
          }
        }
      },
      "SandboxPhase": {
        "type": "string",
        "enum": [
          "Running",
          "Paused",
          "Stopped",
          "Pending",
          "Failed"
        ]
      },
      "SandboxPool": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxPool"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxPoolSpec"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxPoolList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxPoolList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxPool"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxPoolSpec": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "sizing": {
            "$ref": "#/components/schemas/Sizing"
          }
        },
        "required": [
          "provider",
          "sizing"
        ]
      },
      "SandboxPort": {
        "type": "object",
        "properties": {
          "port": {
            "type": "number"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "port",
          "url",
          "headers",
          "expiresAt"
        ]
      },
      "SandboxProvider": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProvider"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxProviderSpec"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxProviderChoice": {
        "type": "string",
        "enum": [
          "cloudflare",
          "maritime",
          "daytona",
          "freestyle",
          "e2b",
          "auto"
        ]
      },
      "SandboxProviderConfig": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProviderConfig"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxProviderConfigSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxProviderConfigStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxProviderConfigBody": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProviderConfig"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                "maxLength": 63
              },
              "namespace": {
                "type": "string"
              }
            }
          },
          "spec": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "maritime",
                  "daytona",
                  "freestyle",
                  "e2b"
                ]
              },
              "credentials": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "credentials"
            ]
          },
          "status": {}
        },
        "required": [
          "spec"
        ]
      },
      "SandboxProviderConfigList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProviderConfigList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxProviderConfig"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxProviderConfigPhase": {
        "type": "string",
        "enum": [
          "Ready",
          "Verifying",
          "Refused",
          "Removing"
        ]
      },
      "SandboxProviderConfigSpec": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "provider"
        ]
      },
      "SandboxProviderConfigStatus": {
        "type": "object",
        "properties": {
          "phase": {
            "$ref": "#/components/schemas/SandboxProviderConfigPhase"
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "$ref": "#/components/schemas/ProviderKeyRefusal"
          }
        },
        "required": [
          "phase",
          "connectedAt"
        ]
      },
      "SandboxProviderList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxProviderList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxProvider"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxProviderSpec": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          }
        },
        "required": [
          "displayName"
        ]
      },
      "SandboxRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
            "maxLength": 63
          }
        },
        "required": [
          "name"
        ]
      },
      "SandboxSizeName": {
        "type": "string",
        "enum": [
          "xs",
          "s",
          "m",
          "l",
          "xl",
          "2xl"
        ]
      },
      "SandboxSnapshot": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxSnapshot"
          },
          "metadata": {
            "$ref": "#/components/schemas/ObjectMeta"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxSnapshotSpec"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxSnapshotStatus"
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "spec"
        ]
      },
      "SandboxSnapshotCreateBody": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxSnapshot"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                "maxLength": 63
              },
              "namespace": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxProperties": 16,
                "description": "The labels Sandbox Router keeps beside these count toward the same bound, so fewer of these fit."
              }
            }
          },
          "spec": {
            "type": "object",
            "properties": {
              "sandboxRef": {
                "$ref": "#/components/schemas/SandboxRef"
              },
              "includeMemory": {
                "type": "boolean"
              }
            },
            "required": [
              "sandboxRef"
            ]
          },
          "status": {}
        },
        "required": [
          "spec"
        ]
      },
      "SandboxSnapshotList": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "SandboxSnapshotList"
          },
          "metadata": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxSnapshot"
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "metadata",
          "items"
        ]
      },
      "SandboxSnapshotSpec": {
        "type": "object",
        "properties": {
          "sandboxRef": {
            "$ref": "#/components/schemas/SandboxRef"
          },
          "includeMemory": {
            "type": "boolean"
          }
        },
        "required": [
          "sandboxRef",
          "includeMemory"
        ]
      },
      "SandboxSnapshotStatus": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "account": {
            "type": "string",
            "enum": [
              "sandboxrouter",
              "own"
            ]
          },
          "ref": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/SnapshotState"
          },
          "message": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "bytes": {
            "type": "number"
          },
          "resources": {
            "$ref": "#/components/schemas/Resources"
          }
        },
        "required": [
          "provider",
          "ref",
          "state"
        ]
      },
      "SandboxSource": {
        "type": "object",
        "properties": {
          "imageRef": {
            "$ref": "#/components/schemas/ImageRef"
          },
          "snapshotRef": {
            "$ref": "#/components/schemas/SnapshotRef"
          }
        }
      },
      "SandboxSpec": {
        "type": "object",
        "properties": {
          "from": {
            "$ref": "#/components/schemas/SandboxSource"
          },
          "resources": {
            "$ref": "#/components/schemas/ResourceRequest"
          },
          "env": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            }
          },
          "network": {
            "$ref": "#/components/schemas/SandboxNetwork"
          },
          "placement": {
            "$ref": "#/components/schemas/Placement"
          },
          "state": {
            "type": "string",
            "enum": [
              "Running",
              "Stopped"
            ]
          },
          "lifecycle": {
            "$ref": "#/components/schemas/Lifecycle"
          },
          "command": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "user": {
            "type": "string"
          },
          "connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SandboxStatus": {
        "type": "object",
        "properties": {
          "phase": {
            "$ref": "#/components/schemas/SandboxPhase"
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderReference"
          },
          "resources": {
            "$ref": "#/components/schemas/Resources"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantedCapability"
            }
          },
          "providerLabels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "usage": {
            "$ref": "#/components/schemas/SandboxUsageQuantities"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Condition"
            }
          }
        },
        "required": [
          "phase"
        ]
      },
      "SandboxUsageQuantities": {
        "type": "object",
        "properties": {
          "wallMs": {
            "type": "number"
          },
          "vcpuMs": {
            "type": "number"
          },
          "memoryGibMs": {
            "type": "number"
          },
          "diskGibMs": {
            "type": "number"
          },
          "egressBytes": {
            "type": "number"
          },
          "proxyEgressBytes": {
            "type": "number"
          }
        },
        "required": [
          "wallMs",
          "vcpuMs",
          "memoryGibMs",
          "diskGibMs",
          "egressBytes",
          "proxyEgressBytes"
        ]
      },
      "SavedSessionBody": {
        "type": "object",
        "properties": {
          "state": {
            "type": "object",
            "properties": {
              "cookies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "expires": {
                      "type": "number"
                    },
                    "httpOnly": {
                      "type": "boolean"
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "sameSite": {
                      "type": "string",
                      "enum": [
                        "Strict",
                        "Lax",
                        "None"
                      ]
                    },
                    "partitionKey": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "value",
                    "domain",
                    "path",
                    "expires",
                    "httpOnly",
                    "secure"
                  ]
                }
              },
              "origins": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "origin": {
                      "type": "string"
                    },
                    "localStorage": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ]
                      }
                    },
                    "indexedDB": {
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": [
                    "origin",
                    "localStorage"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "state"
        ]
      },
      "SavedSessionDeleted": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "deleted"
        ]
      },
      "SavedSessionUploaded": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "expired",
              "saved",
              "signed_out"
            ]
          },
          "savedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "savedFrom": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "live",
                  "sign_in",
                  "upload"
                ]
              },
              "sandbox": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ]
          },
          "domains": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "cookies": {
            "type": [
              "number",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "site",
              "person",
              null
            ]
          },
          "dropped": {
            "type": "number"
          }
        },
        "required": [
          "status",
          "savedAt",
          "savedFrom",
          "domains",
          "cookies",
          "expiresAt",
          "endedAt",
          "endedBy",
          "dropped"
        ]
      },
      "SavedSessionView": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "expired",
              "saved",
              "signed_out"
            ]
          },
          "savedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "savedFrom": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "live",
                  "sign_in",
                  "upload"
                ]
              },
              "sandbox": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ]
          },
          "domains": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "cookies": {
            "type": [
              "number",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "site",
              "person",
              null
            ]
          }
        },
        "required": [
          "status",
          "savedAt",
          "savedFrom",
          "domains",
          "cookies",
          "expiresAt",
          "endedAt",
          "endedBy"
        ]
      },
      "ScheduleChange": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string",
            "maxLength": 1024
          },
          "timeZone": {
            "type": "string"
          },
          "payload": {},
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "ScheduleCreateBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
          },
          "cron": {
            "type": "string",
            "maxLength": 1024
          },
          "timeZone": {
            "type": "string"
          },
          "payload": {},
          "enabled": {
            "type": "boolean"
          },
          "trigger": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
                  }
                },
                "required": [
                  "name"
                ]
              },
              "inputs": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/TriggerBinding"
                },
                "maxProperties": 32
              },
              "enabled": {
                "type": "boolean"
              }
            },
            "required": [
              "workflow"
            ]
          }
        },
        "required": [
          "name",
          "cron"
        ]
      },
      "ScheduleDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "firings": {
            "type": "number"
          },
          "triggers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "deleted",
          "firings",
          "triggers"
        ]
      },
      "ScheduleDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "when": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "nextAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "payloadBytes": {
            "type": "number"
          },
          "lastFiring": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduleFiring"
              },
              {
                "type": "null"
              }
            ]
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleTriggerView"
            }
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          },
          "payload": {},
          "upcoming": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "id",
          "name",
          "cron",
          "timeZone",
          "when",
          "enabled",
          "nextAt",
          "payloadBytes",
          "lastFiring",
          "triggers",
          "createdBy",
          "createdAt",
          "updatedAt",
          "payload",
          "upcoming"
        ]
      },
      "ScheduleFiring": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          },
          "scheduledAt": {
            "type": "number"
          },
          "firedAt": {
            "type": "number"
          },
          "missed": {
            "type": "number"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeliverySummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "schedule",
          "scheduledAt",
          "firedAt",
          "missed",
          "delivery"
        ]
      },
      "ScheduleFiringPage": {
        "type": "object",
        "properties": {
          "firings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleFiring"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "firings",
          "nextCursor"
        ]
      },
      "ScheduleList": {
        "type": "object",
        "properties": {
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleSummary"
            }
          }
        },
        "required": [
          "schedules"
        ]
      },
      "ScheduleRun": {
        "type": "object",
        "properties": {
          "schedule": {
            "type": "string"
          },
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "scheduledAt": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "scheduledAt"
            ]
          },
          "starts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "trigger": {
                  "type": "string"
                },
                "workflow": {
                  "type": "string"
                },
                "run": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "number": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "number"
                  ]
                },
                "error": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              },
              "required": [
                "trigger",
                "workflow",
                "run",
                "error"
              ]
            }
          }
        },
        "required": [
          "schedule",
          "event",
          "starts"
        ]
      },
      "ScheduleSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "when": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "nextAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "payloadBytes": {
            "type": "number"
          },
          "lastFiring": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduleFiring"
              },
              {
                "type": "null"
              }
            ]
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleTriggerView"
            }
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "cron",
          "timeZone",
          "when",
          "enabled",
          "nextAt",
          "payloadBytes",
          "lastFiring",
          "triggers",
          "createdBy",
          "createdAt",
          "updatedAt"
        ]
      },
      "ScheduleTriggerView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "workflow": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "workflow",
          "enabled"
        ]
      },
      "SizeClass": {
        "type": "object",
        "properties": {
          "cpu": {
            "type": "string"
          },
          "memory": {
            "type": "string"
          },
          "disk": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "cpu",
          "memory",
          "name"
        ]
      },
      "SizeMatch": {
        "type": "string",
        "enum": [
          "exact",
          "roundUp"
        ]
      },
      "Sizing": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "const": "fixed"
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SizeClass"
            }
          },
          "defaultSize": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "sizes"
        ]
      },
      "SnapshotRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                "maxLength": 63
              },
              {
                "type": "string",
                "pattern": "^s-[a-z2-7]{52}-[1-9][0-9]{0,15}$"
              }
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "SnapshotState": {
        "type": "string",
        "enum": [
          "Pending",
          "Failed",
          "Ready",
          "Inactive",
          "Expired"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "const": "sandboxrouter.io/v1"
          },
          "kind": {
            "type": "string",
            "const": "Status"
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Failure"
            ]
          },
          "code": {
            "type": "number"
          },
          "reason": {
            "$ref": "#/components/schemas/StatusReason"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "causes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/StatusCause"
                }
              },
              "code": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "apiVersion",
          "kind",
          "status",
          "code"
        ]
      },
      "StatusCause": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ]
      },
      "StatusReason": {
        "type": "string",
        "enum": [
          "NotFound",
          "AlreadyExists",
          "Conflict",
          "Invalid",
          "Forbidden",
          "Unauthorized",
          "Unschedulable",
          "Unsupported",
          "ProviderError",
          "InternalError"
        ]
      },
      "TopUp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "auto",
              "manual"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "card",
              "checkout"
            ]
          },
          "amountMicroUsd": {
            "type": "number"
          },
          "feeMicroUsd": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "canceled",
              "pending",
              "processing"
            ]
          },
          "receiptUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "failureMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "settledAt": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "method",
          "amountMicroUsd",
          "feeMicroUsd",
          "state",
          "receiptUrl",
          "failureMessage",
          "createdAt",
          "settledAt"
        ]
      },
      "TopUpBody": {
        "type": "object",
        "properties": {
          "amountMicroUsd": {
            "type": "integer",
            "minimum": 5000000,
            "maximum": 2000000000
          },
          "checkout": {
            "type": "boolean"
          }
        },
        "required": [
          "amountMicroUsd"
        ]
      },
      "TopUpResult": {
        "type": "object",
        "properties": {
          "topUp": {
            "$ref": "#/components/schemas/TopUp"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "topUp",
          "url"
        ]
      },
      "TriggerBinding": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              }
            },
            "required": [
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "pointer": {
                "type": "string"
              }
            },
            "required": [
              "pointer"
            ]
          },
          {
            "type": "object",
            "properties": {
              "event": {
                "type": "string",
                "enum": [
                  "id",
                  "type"
                ]
              }
            },
            "required": [
              "event"
            ]
          }
        ]
      },
      "TriggerChangeBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "minItems": 1,
            "maxItems": 64
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "maxLength": 256
            },
            "minItems": 1,
            "maxItems": 64
          },
          "senders": {
            "$ref": "#/components/schemas/TriggerSenders"
          },
          "workflow": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
              }
            },
            "required": [
              "name"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TriggerBinding"
            },
            "maxProperties": 32
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "TriggerCreateBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "minItems": 1,
            "maxItems": 64
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "maxLength": 256
            },
            "minItems": 1,
            "maxItems": 64
          },
          "senders": {
            "$ref": "#/components/schemas/TriggerSenders"
          },
          "workflow": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
              }
            },
            "required": [
              "name"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TriggerBinding"
            },
            "maxProperties": 32
          },
          "enabled": {
            "type": "boolean"
          },
          "connector": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
            "maxLength": 32
          }
        },
        "required": [
          "name",
          "events",
          "workflow",
          "connector"
        ]
      },
      "TriggerDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ]
      },
      "TriggerPage": {
        "type": "object",
        "properties": {
          "triggers": {
            "type": "array",
            "items": {}
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "triggers",
          "nextCursor"
        ]
      },
      "TriggerSenders": {
        "type": "string",
        "enum": [
          "collaborators",
          "anyone"
        ]
      },
      "TriggerStartState": {
        "type": "string",
        "enum": [
          "pending",
          "started",
          "refused"
        ]
      },
      "TriggerTestBody": {
        "type": "object",
        "properties": {
          "start": {
            "type": "boolean"
          },
          "delivery": {
            "type": "string",
            "pattern": "^dlv_[0-9a-f]{32}$"
          },
          "payload": {
            "type": "string"
          },
          "payloadBase64": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          }
        }
      },
      "TriggerTestResult": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean",
            "const": true
          },
          "matches": {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "event_not_listed",
                  "repository_not_listed",
                  "sender_not_collaborator",
                  null
                ]
              }
            },
            "required": [
              "ok",
              "reason"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          },
          "run": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "trigger": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/WorkflowRunTrigger"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attempt": {
                "type": "number"
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "digest": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "version": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "digest",
                  "version"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "succeeded",
                  "failed",
                  "canceled",
                  "queued",
                  "paused",
                  "canceling"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "timed_out",
                  "step_failed",
                  "halted",
                  "orchestrator_unresponsive",
                  "migrated",
                  null
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inputs": {
                "$ref": "#/components/schemas/BoundInputs"
              },
              "images": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "reservation": {
                "$ref": "#/components/schemas/Reservation"
              },
              "progress": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "number"
                  },
                  "pending": {
                    "type": "number"
                  },
                  "ready": {
                    "type": "number"
                  },
                  "running": {
                    "type": "number"
                  },
                  "succeeded": {
                    "type": "number"
                  },
                  "failed": {
                    "type": "number"
                  },
                  "skipped": {
                    "type": "number"
                  },
                  "canceled": {
                    "type": "number"
                  }
                },
                "required": [
                  "total",
                  "pending",
                  "ready",
                  "running",
                  "succeeded",
                  "failed",
                  "skipped",
                  "canceled"
                ]
              },
              "createdAt": {
                "type": "number"
              },
              "startedAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "endedAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "deadlineAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "costMicroUsd": {
                "type": "number"
              },
              "legacy": {
                "type": "boolean"
              },
              "steps": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowInstanceView"
                }
              }
            },
            "required": [
              "number",
              "trigger",
              "attempt",
              "id",
              "workflow",
              "status",
              "reason",
              "message",
              "inputs",
              "images",
              "reservation",
              "progress",
              "createdAt",
              "startedAt",
              "endedAt",
              "deadlineAt",
              "costMicroUsd",
              "legacy",
              "steps"
            ]
          },
          "hints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowHint"
            }
          }
        },
        "required": [
          "dryRun",
          "matches",
          "inputs",
          "run",
          "hints"
        ]
      },
      "TriggerView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "connector": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "senders": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "collaborators",
              "anyone",
              null
            ]
          },
          "workflow": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "version"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TriggerBinding"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "lastStart": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "at": {
                "type": "number"
              },
              "state": {
                "$ref": "#/components/schemas/TriggerStartState"
              },
              "run": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "number": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "at",
              "state",
              "run",
              "number",
              "reason"
            ]
          },
          "createdBy": {
            "$ref": "#/components/schemas/PrincipalActor"
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "connector",
          "events",
          "repositories",
          "senders",
          "workflow",
          "inputs",
          "enabled",
          "lastStart",
          "createdBy",
          "createdAt",
          "updatedAt"
        ]
      },
      "UsagePlanLine": {
        "type": "object",
        "properties": {
          "meter": {
            "type": "string",
            "enum": [
              "memory",
              "egress",
              "vcpu",
              "disk",
              "snapshotStorage",
              "gatewayRequests",
              "workflowSteps",
              "carriedFiles",
              "registryStorage",
              "registryPulls",
              "registryLists",
              "triggerEvents",
              "browserTime",
              "egressProxy"
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "quoted": {
            "type": "string"
          },
          "rateMicroUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountMicroUsd": {
            "type": "number"
          }
        },
        "required": [
          "meter",
          "quantity",
          "unit",
          "quoted",
          "rateMicroUsd",
          "amountMicroUsd"
        ]
      },
      "UsageReport": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string"
          },
          "pricing": {
            "type": "string",
            "enum": [
              "approved",
              "unpriced"
            ]
          },
          "planVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "periodStart": {
            "type": "number"
          },
          "periodEnd": {
            "type": "number"
          },
          "asOf": {
            "type": "number"
          },
          "closed": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "meter": {
                  "type": "string",
                  "enum": [
                    "memory",
                    "egress",
                    "vcpu",
                    "disk",
                    "snapshotStorage",
                    "gatewayRequests",
                    "workflowSteps",
                    "carriedFiles",
                    "registryStorage",
                    "registryPulls",
                    "registryLists",
                    "triggerEvents",
                    "browserTime",
                    "egressProxy"
                  ]
                },
                "quantity": {
                  "type": "number"
                },
                "unit": {
                  "type": "string"
                },
                "amountMicroUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "meter",
                "quantity",
                "unit",
                "amountMicroUsd"
              ]
            }
          },
          "plans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "string"
                },
                "from": {
                  "type": "number"
                },
                "to": {
                  "type": "number"
                },
                "vcpuBasis": {
                  "type": "string",
                  "enum": [
                    "active",
                    "allocated"
                  ]
                },
                "lines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UsagePlanLine"
                  }
                },
                "totalMicroUsd": {
                  "type": "number"
                }
              },
              "required": [
                "version",
                "from",
                "to",
                "vcpuBasis",
                "lines",
                "totalMicroUsd"
              ]
            }
          },
          "includedSnapshotOperations": {
            "type": "number"
          },
          "totalMicroUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string"
                },
                "totalMicroUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "day",
                "totalMicroUsd"
              ]
            }
          },
          "projection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "dailyMicroUsd": {
                "type": "number"
              },
              "monthMicroUsd": {
                "type": "number"
              }
            },
            "required": [
              "dailyMicroUsd",
              "monthMicroUsd"
            ]
          },
          "alert": {
            "type": "object",
            "properties": {
              "amountMicroUsd": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "amountMicroUsd"
            ]
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "enum": [
                    "cloudflare",
                    "maritime",
                    "daytona",
                    "freestyle",
                    "e2b"
                  ]
                },
                "account": {
                  "type": "string",
                  "enum": [
                    "sandboxrouter",
                    "own"
                  ]
                },
                "cpuUsec": {
                  "type": "number"
                },
                "vcpuUsec": {
                  "type": "number"
                },
                "memoryMibMs": {
                  "type": "number"
                },
                "diskGbMs": {
                  "type": "number"
                },
                "egressBytes": {
                  "type": "number"
                },
                "runningMs": {
                  "type": "number"
                }
              },
              "required": [
                "provider",
                "account",
                "cpuUsec",
                "memoryMibMs",
                "diskGbMs",
                "egressBytes"
              ]
            }
          }
        },
        "required": [
          "month",
          "pricing",
          "planVersion",
          "periodStart",
          "periodEnd",
          "asOf",
          "closed",
          "lines",
          "includedSnapshotOperations",
          "totalMicroUsd",
          "daily",
          "projection",
          "alert"
        ]
      },
      "WebhookSignature": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string"
          },
          "algorithm": {
            "type": "string",
            "enum": [
              "HMAC-SHA256",
              "HMAC-SHA384",
              "HMAC-SHA512"
            ]
          },
          "encoding": {
            "type": "string",
            "enum": [
              "hex",
              "base64"
            ]
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "signed": {
            "type": "string"
          },
          "timestamp": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "header": {
                "type": "string"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "s",
                  "ms"
                ]
              },
              "toleranceSeconds": {
                "type": "number"
              }
            },
            "required": [
              "header",
              "unit",
              "toleranceSeconds"
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "header": {
                    "type": "string"
                  }
                },
                "required": [
                  "header"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "pointer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "header": {
                    "type": "string"
                  }
                },
                "required": [
                  "header"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "pointer"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "header",
          "algorithm",
          "encoding",
          "prefix",
          "signed",
          "timestamp",
          "id",
          "type"
        ]
      },
      "WebhookSignatureBody": {
        "type": "object",
        "properties": {
          "header": {
            "type": "string"
          },
          "algorithm": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HMAC-SHA256",
              "HMAC-SHA384",
              "HMAC-SHA512",
              null
            ]
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "hex",
              "base64",
              null
            ]
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "signed": {
            "type": "string"
          },
          "timestamp": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "header": {
                "type": "string"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "s",
                  "ms"
                ]
              },
              "toleranceSeconds": {
                "type": "number"
              }
            },
            "required": [
              "header",
              "unit",
              "toleranceSeconds"
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "header": {
                    "type": "string"
                  }
                },
                "required": [
                  "header"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "pointer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "header": {
                    "type": "string"
                  }
                },
                "required": [
                  "header"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "pointer"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "header"
        ]
      },
      "WorkflowAttemptCreator": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/WorkflowCreator"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "trigger"
              },
              "id": {
                "type": "string"
              },
              "delivery": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "delivery"
            ]
          }
        ]
      },
      "WorkflowAttemptView": {
        "type": "object",
        "properties": {
          "attempt": {
            "type": "number"
          },
          "kind": {
            "type": "string",
            "enum": [
              "start",
              "rerun",
              "replay"
            ]
          },
          "steps": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "canceled",
              "queued",
              "paused",
              "canceling"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdBy": {
            "$ref": "#/components/schemas/WorkflowAttemptCreator"
          }
        },
        "required": [
          "attempt",
          "kind",
          "steps",
          "status",
          "reason",
          "createdAt",
          "endedAt",
          "createdBy"
        ]
      },
      "WorkflowCancelBody": {
        "type": "object",
        "properties": {
          "skipFinally": {
            "type": "boolean"
          }
        }
      },
      "WorkflowCheckpointView": {
        "type": "object",
        "properties": {
          "generation": {
            "type": "number"
          },
          "execution": {
            "type": "number"
          },
          "committedAt": {
            "type": "number"
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "digest": {
                  "type": "string"
                },
                "bytes": {
                  "type": "number"
                }
              },
              "required": [
                "name",
                "path",
                "digest",
                "bytes"
              ]
            }
          },
          "volumes": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "digest": {
                "type": "string"
              },
              "bytes": {
                "type": "number"
              }
            },
            "required": [
              "digest",
              "bytes"
            ]
          }
        },
        "required": [
          "generation",
          "execution",
          "committedAt",
          "expiresAt",
          "artifacts",
          "volumes"
        ]
      },
      "WorkflowCreator": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "api_key"
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "id"
        ]
      },
      "WorkflowDeleted": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "name",
          "deleted"
        ]
      },
      "WorkflowDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "yaml_syntax",
              "yaml_feature",
              "document_too_large",
              "unknown_field",
              "type_mismatch",
              "required",
              "out_of_range",
              "invalid_name",
              "duplicate_id",
              "unknown_step",
              "forward_reference",
              "unknown_sandbox",
              "unordered_sandbox_steps",
              "matrix_on_named_sandbox",
              "matrix_on_persistent_sandbox",
              "volumes_on_own_sandbox",
              "refused_sandbox_field",
              "work_required",
              "expression_in_run",
              "interpolation_in_if",
              "retries_not_idempotent",
              "unknown_artifact",
              "unknown_value",
              "fanned_out_reference",
              "path_required",
              "path_overlap",
              "invalid_path",
              "too_many_values",
              "too_many_instances",
              "expression_syntax",
              "expression_type",
              "expression_context",
              "too_long",
              "env_reserved",
              "input_required",
              "unknown_input",
              "input_type",
              "input_invalid",
              "no_eligible_provider",
              "event_required"
            ]
          },
          "path": {
            "type": "string"
          },
          "line": {
            "type": [
              "number",
              "null"
            ]
          },
          "column": {
            "type": [
              "number",
              "null"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "path",
          "line",
          "column",
          "message"
        ]
      },
      "WorkflowDetailView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "object",
            "properties": {
              "number": {
                "type": "number"
              },
              "digest": {
                "type": "string"
              },
              "createdAt": {
                "type": "number"
              }
            },
            "required": [
              "number",
              "digest",
              "createdAt"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/InputDeclaration"
            }
          },
          "steps": {
            "type": "number"
          },
          "lastRun": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "number": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "succeeded",
                  "failed",
                  "canceled",
                  "queued",
                  "paused",
                  "canceling"
                ]
              },
              "createdAt": {
                "type": "number"
              },
              "endedAt": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "status",
              "createdAt",
              "endedAt"
            ]
          },
          "runs": {
            "type": "number"
          },
          "activeRuns": {
            "type": "number"
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          },
          "createdBy": {
            "$ref": "#/components/schemas/WorkflowCreator"
          },
          "source": {
            "type": "string"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "number"
                },
                "digest": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "number"
                },
                "createdBy": {
                  "$ref": "#/components/schemas/WorkflowCreator"
                },
                "runs": {
                  "type": "number"
                }
              },
              "required": [
                "number",
                "digest",
                "createdAt",
                "createdBy",
                "runs"
              ]
            }
          }
        },
        "required": [
          "name",
          "description",
          "version",
          "inputs",
          "steps",
          "lastRun",
          "runs",
          "activeRuns",
          "createdAt",
          "updatedAt",
          "createdBy",
          "source",
          "versions"
        ]
      },
      "WorkflowDryRun": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean",
            "const": true
          },
          "run": {
            "type": "object",
            "properties": {
              "number": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "trigger": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/WorkflowRunTrigger"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attempt": {
                "type": "number"
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "digest": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "version": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "digest",
                  "version"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "succeeded",
                  "failed",
                  "canceled",
                  "queued",
                  "paused",
                  "canceling"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "timed_out",
                  "step_failed",
                  "halted",
                  "orchestrator_unresponsive",
                  "migrated",
                  null
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inputs": {
                "$ref": "#/components/schemas/BoundInputs"
              },
              "images": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "reservation": {
                "$ref": "#/components/schemas/Reservation"
              },
              "progress": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "number"
                  },
                  "pending": {
                    "type": "number"
                  },
                  "ready": {
                    "type": "number"
                  },
                  "running": {
                    "type": "number"
                  },
                  "succeeded": {
                    "type": "number"
                  },
                  "failed": {
                    "type": "number"
                  },
                  "skipped": {
                    "type": "number"
                  },
                  "canceled": {
                    "type": "number"
                  }
                },
                "required": [
                  "total",
                  "pending",
                  "ready",
                  "running",
                  "succeeded",
                  "failed",
                  "skipped",
                  "canceled"
                ]
              },
              "createdAt": {
                "type": "number"
              },
              "startedAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "endedAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "deadlineAt": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "costMicroUsd": {
                "type": "number"
              },
              "legacy": {
                "type": "boolean"
              },
              "steps": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowInstanceView"
                }
              },
              "hints": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowHint"
                }
              }
            },
            "required": [
              "number",
              "trigger",
              "attempt",
              "id",
              "workflow",
              "status",
              "reason",
              "message",
              "inputs",
              "images",
              "reservation",
              "progress",
              "createdAt",
              "startedAt",
              "endedAt",
              "deadlineAt",
              "costMicroUsd",
              "legacy",
              "steps",
              "hints"
            ]
          }
        },
        "required": [
          "dryRun",
          "run"
        ]
      },
      "WorkflowEventPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowEventView"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "events",
          "nextCursor"
        ]
      },
      "WorkflowEventView": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "number"
          },
          "at": {
            "type": "number"
          },
          "type": {
            "type": "string",
            "enum": [
              "attempt.started",
              "run.paused",
              "run.resumed",
              "run.canceling",
              "attempt.ended",
              "step.ready",
              "step.running",
              "step.succeeded",
              "step.failed",
              "step.skipped",
              "step.canceled",
              "capacity.requested",
              "capacity.granted",
              "capacity.returned",
              "execution.placing",
              "execution.preparing",
              "execution.started",
              "execution.lost",
              "execution.ended",
              "sandbox.deleted",
              "checkpoint.committed"
            ]
          },
          "attempt": {
            "type": "number"
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "execution": {
            "type": [
              "number",
              "null"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "seq",
          "at",
          "type",
          "attempt",
          "key",
          "execution",
          "data"
        ]
      },
      "WorkflowExecutionView": {
        "type": "object",
        "properties": {
          "number": {
            "type": "number"
          },
          "attempt": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "canceled",
              "lost",
              "placing",
              "preparing"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "exitCode": {
            "type": [
              "number",
              "null"
            ]
          },
          "signal": {
            "type": [
              "string",
              "null"
            ]
          },
          "currentProvider": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sandbox": {
            "type": "object",
            "properties": {
              "image": {
                "type": "string"
              },
              "size": {
                "$ref": "#/components/schemas/ApiSandboxSize"
              },
              "env": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "workdir": {
                "type": "string"
              },
              "volumes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path"
                  ]
                }
              },
              "egress": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "provider": {
                "type": "string"
              }
            },
            "required": [
              "image",
              "size",
              "env",
              "workdir",
              "volumes",
              "egress",
              "labels",
              "provider"
            ]
          },
          "placedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "startedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "deletedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "billed": {
            "type": "boolean"
          },
          "persistent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "template": {
                "type": "string"
              },
              "created": {
                "type": "boolean"
              },
              "differs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "sandbox": {},
                    "step": {}
                  },
                  "required": [
                    "field",
                    "sandbox",
                    "step"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "template",
              "created",
              "differs"
            ]
          }
        },
        "required": [
          "number",
          "attempt",
          "state",
          "reason",
          "exitCode",
          "signal",
          "currentProvider",
          "providerId",
          "sandbox",
          "placedAt",
          "startedAt",
          "endedAt",
          "deletedAt",
          "billed",
          "persistent"
        ]
      },
      "WorkflowHint": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "registry_only",
              "proxy_provider"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "step",
          "code",
          "message"
        ]
      },
      "WorkflowInstanceDetail": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "step": {
            "type": "string"
          },
          "phase": {
            "type": "string",
            "enum": [
              "main",
              "finally"
            ]
          },
          "index": {
            "type": [
              "number",
              "null"
            ]
          },
          "matrix": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "canceled",
              "pending",
              "ready",
              "skipped"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "waitingFor": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "paused",
              "capacity",
              "backoff",
              "sandbox",
              null
            ]
          },
          "waitingOn": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "sandbox": {
                "type": "string"
              },
              "run": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "number": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "step": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "sandbox",
              "run",
              "number",
              "step"
            ]
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sandbox": {
            "type": [
              "string",
              "null"
            ]
          },
          "keep": {
            "type": "string",
            "enum": [
              "run",
              "attempt"
            ]
          },
          "generation": {
            "type": "number"
          },
          "startedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "checkpoint": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowCheckpointView"
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": "number"
              }
            },
            "required": [
              "number"
            ]
          },
          "persistent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "template": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "template"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "executions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowExecutionView"
            }
          }
        },
        "required": [
          "key",
          "step",
          "phase",
          "index",
          "matrix",
          "state",
          "reason",
          "waitingFor",
          "waitingOn",
          "dependsOn",
          "sandbox",
          "keep",
          "generation",
          "startedAt",
          "endedAt",
          "values",
          "checkpoint",
          "execution",
          "persistent",
          "message",
          "executions"
        ]
      },
      "WorkflowInstanceView": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "step": {
            "type": "string"
          },
          "phase": {
            "type": "string",
            "enum": [
              "main",
              "finally"
            ]
          },
          "index": {
            "type": [
              "number",
              "null"
            ]
          },
          "matrix": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "canceled",
              "pending",
              "ready",
              "skipped"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "waitingFor": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "paused",
              "capacity",
              "backoff",
              "sandbox",
              null
            ]
          },
          "waitingOn": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "sandbox": {
                "type": "string"
              },
              "run": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "number": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "step": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "sandbox",
              "run",
              "number",
              "step"
            ]
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sandbox": {
            "type": [
              "string",
              "null"
            ]
          },
          "keep": {
            "type": "string",
            "enum": [
              "run",
              "attempt"
            ]
          },
          "generation": {
            "type": "number"
          },
          "startedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "checkpoint": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowCheckpointView"
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": "number"
              }
            },
            "required": [
              "number"
            ]
          },
          "persistent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "template": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "template"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "key",
          "step",
          "phase",
          "index",
          "matrix",
          "state",
          "reason",
          "waitingFor",
          "waitingOn",
          "dependsOn",
          "sandbox",
          "keep",
          "generation",
          "startedAt",
          "endedAt",
          "values",
          "checkpoint",
          "execution",
          "persistent",
          "message"
        ]
      },
      "WorkflowLogEntry": {
        "type": "object",
        "properties": {
          "at": {
            "type": "number"
          },
          "stream": {
            "type": "string",
            "enum": [
              "stdout",
              "stderr",
              "system"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "at",
          "stream",
          "message"
        ]
      },
      "WorkflowLogPage": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowLogEntry"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "entries",
          "nextCursor"
        ]
      },
      "WorkflowPage": {
        "type": "object",
        "properties": {
          "workflows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowView"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "workflows",
          "nextCursor"
        ]
      },
      "WorkflowRerunBody": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        }
      },
      "WorkflowRunDefinition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "digest": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "digest",
          "source"
        ]
      },
      "WorkflowRunDetailView": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": [
              "number",
              "null"
            ]
          },
          "workflow": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "digest": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "digest",
              "version"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "canceled",
              "queued",
              "paused",
              "canceling"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timed_out",
              "step_failed",
              "halted",
              "orchestrator_unresponsive",
              "migrated",
              null
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempt": {
            "type": "number"
          },
          "inputs": {
            "$ref": "#/components/schemas/BoundInputs"
          },
          "images": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "reservation": {
            "$ref": "#/components/schemas/Reservation"
          },
          "progress": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "pending": {
                "type": "number"
              },
              "ready": {
                "type": "number"
              },
              "running": {
                "type": "number"
              },
              "succeeded": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "skipped": {
                "type": "number"
              },
              "canceled": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "pending",
              "ready",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "canceled"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "startedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "deadlineAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "costMicroUsd": {
            "type": "number"
          },
          "legacy": {
            "type": "boolean"
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunTrigger"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowAttemptView"
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowInstanceView"
            }
          }
        },
        "required": [
          "id",
          "number",
          "workflow",
          "status",
          "reason",
          "message",
          "attempt",
          "inputs",
          "images",
          "reservation",
          "progress",
          "createdAt",
          "startedAt",
          "endedAt",
          "deadlineAt",
          "costMicroUsd",
          "legacy",
          "trigger",
          "attempts",
          "steps"
        ]
      },
      "WorkflowRunPage": {
        "type": "object",
        "properties": {
          "workflowRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRunView"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "workflowRuns",
          "nextCursor"
        ]
      },
      "WorkflowRunStartBody": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "workflow": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "inputs": {
            "$ref": "#/components/schemas/BoundInputs"
          }
        }
      },
      "WorkflowRunTrigger": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "connector": {
            "type": "string"
          },
          "delivery": {
            "type": [
              "string",
              "null"
            ]
          },
          "event": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "receivedAt": {
                "type": "number"
              }
            },
            "required": [
              "type",
              "id",
              "receivedAt"
            ]
          },
          "test": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "connector",
          "delivery",
          "event",
          "test"
        ]
      },
      "WorkflowRunView": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": [
              "number",
              "null"
            ]
          },
          "workflow": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "digest": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "digest",
              "version"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "canceled",
              "queued",
              "paused",
              "canceling"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timed_out",
              "step_failed",
              "halted",
              "orchestrator_unresponsive",
              "migrated",
              null
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempt": {
            "type": "number"
          },
          "inputs": {
            "$ref": "#/components/schemas/BoundInputs"
          },
          "images": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "reservation": {
            "$ref": "#/components/schemas/Reservation"
          },
          "progress": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "pending": {
                "type": "number"
              },
              "ready": {
                "type": "number"
              },
              "running": {
                "type": "number"
              },
              "succeeded": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "skipped": {
                "type": "number"
              },
              "canceled": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "pending",
              "ready",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "canceled"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "startedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "endedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "deadlineAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "costMicroUsd": {
            "type": "number"
          },
          "legacy": {
            "type": "boolean"
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunTrigger"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowAttemptView"
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowInstanceView"
            }
          }
        },
        "required": [
          "id",
          "number",
          "workflow",
          "status",
          "reason",
          "message",
          "attempt",
          "inputs",
          "images",
          "reservation",
          "progress",
          "createdAt",
          "startedAt",
          "endedAt",
          "deadlineAt",
          "costMicroUsd",
          "legacy",
          "trigger"
        ]
      },
      "WorkflowSaveBody": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          }
        },
        "required": [
          "source"
        ]
      },
      "WorkflowVersionView": {
        "type": "object",
        "properties": {
          "number": {
            "type": "number"
          },
          "digest": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "number"
          },
          "createdBy": {
            "$ref": "#/components/schemas/WorkflowCreator"
          }
        },
        "required": [
          "number",
          "digest",
          "source",
          "createdAt",
          "createdBy"
        ]
      },
      "WorkflowView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "object",
            "properties": {
              "number": {
                "type": "number"
              },
              "digest": {
                "type": "string"
              },
              "createdAt": {
                "type": "number"
              }
            },
            "required": [
              "number",
              "digest",
              "createdAt"
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/InputDeclaration"
            }
          },
          "steps": {
            "type": "number"
          },
          "lastRun": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "number": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "succeeded",
                  "failed",
                  "canceled",
                  "queued",
                  "paused",
                  "canceling"
                ]
              },
              "createdAt": {
                "type": "number"
              },
              "endedAt": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "status",
              "createdAt",
              "endedAt"
            ]
          },
          "runs": {
            "type": "number"
          },
          "activeRuns": {
            "type": "number"
          },
          "createdAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": "number"
          },
          "createdBy": {
            "$ref": "#/components/schemas/WorkflowCreator"
          }
        },
        "required": [
          "name",
          "description",
          "version",
          "inputs",
          "steps",
          "lastRun",
          "runs",
          "activeRuns",
          "createdAt",
          "updatedAt",
          "createdBy"
        ]
      },
      "WorkspaceAccountDeleted": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "connector",
          "deleted"
        ]
      },
      "WorkspaceAccountView": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "key",
              "device",
              "native",
              "sign_in",
              "install"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "unavailable",
              "expired",
              "pending",
              "ready",
              "renewing",
              "reauthentication_required"
            ]
          },
          "statusAt": {
            "type": "number"
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "connectedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "connectedAt": {
            "type": "number"
          },
          "updatedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "signIn": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeviceSignInView"
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "$ref": "#/components/schemas/AccountAction"
          }
        },
        "required": [
          "method",
          "status",
          "statusAt",
          "scopes",
          "expiresAt",
          "connectedBy",
          "connectedAt",
          "updatedAt",
          "signIn"
        ]
      },
      "WorkspaceSettings": {
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "timeZone"
        ]
      }
    },
    "parameters": {
      "path.namespace": {
        "name": "namespace",
        "in": "path",
        "required": true,
        "description": "The workspace's namespace: its slug.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
          "maxLength": 63
        },
        "example": "acme"
      },
      "path.sandbox": {
        "name": "sandbox",
        "in": "path",
        "required": true,
        "description": "A sandbox's name, or its uid (`u-…`).",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
          "maxLength": 63
        },
        "example": "build-agent"
      },
      "path.exec": {
        "name": "exec",
        "in": "path",
        "required": true,
        "description": "An exec's ID, as its run answered it (`execId`).",
        "schema": {
          "type": "string"
        },
        "example": "ex-1"
      },
      "path.path": {
        "name": "path",
        "in": "path",
        "required": true,
        "description": "A file's absolute path without its leading `/`, its segments separated by `/` and each percent-encoded.",
        "schema": {
          "type": "string"
        },
        "example": "workspace/app/main.py"
      },
      "path.port": {
        "name": "port",
        "in": "path",
        "required": true,
        "description": "A port the sandbox serves.",
        "schema": {
          "type": "integer",
          "minimum": 1024,
          "maximum": 65535
        },
        "example": 8080
      },
      "path.pool": {
        "name": "pool",
        "in": "path",
        "required": true,
        "description": "A pool's name.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
          "maxLength": 63
        },
        "example": "e2b"
      },
      "path.snapshot": {
        "name": "snapshot",
        "in": "path",
        "required": true,
        "description": "A snapshot's name, or its uid (`s-…`).",
        "schema": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
              "maxLength": 63
            },
            {
              "type": "string",
              "pattern": "^s-[a-z2-7]{52}-[1-9][0-9]{0,15}$"
            }
          ]
        },
        "example": "build-agent-nightly"
      },
      "path.image": {
        "name": "image",
        "in": "path",
        "required": true,
        "description": "A SandboxImage's name.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
          "maxLength": 63
        },
        "example": "python-tools"
      },
      "path.config": {
        "name": "config",
        "in": "path",
        "required": true,
        "description": "The name of an account of the workspace's own at a provider.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
          "maxLength": 63
        },
        "example": "e2b"
      },
      "path.provider": {
        "name": "provider",
        "in": "path",
        "required": true,
        "description": "A provider's name.",
        "schema": {
          "type": "string",
          "enum": [
            "cloudflare",
            "maritime",
            "daytona",
            "freestyle",
            "e2b"
          ]
        },
        "example": "e2b"
      },
      "path.server": {
        "name": "server",
        "in": "path",
        "required": true,
        "description": "An MCP server's ID or name.",
        "schema": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
              "maxLength": 63
            }
          ]
        },
        "example": "search-mcp"
      },
      "path.token": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "A client token's ID.",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "3f2b8c1e-6d4a-4b7f-9c2e-5a1d0e8f7b6c"
      },
      "path.repository": {
        "name": "repository",
        "in": "path",
        "required": true,
        "description": "A repository of the workspace's registry, by its name under the workspace (`tools/python`).",
        "schema": {
          "type": "string"
        },
        "example": "tools/python"
      },
      "path.tag": {
        "name": "tag",
        "in": "path",
        "required": true,
        "description": "One of the repository's tags.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$"
        },
        "example": "latest"
      },
      "path.digest": {
        "name": "digest",
        "in": "path",
        "required": true,
        "description": "One of the repository's images, by its digest.",
        "schema": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "example": "sha256:5f1e9a3c7b2d4e6f8a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f"
      },
      "path.workflow": {
        "name": "workflow",
        "in": "path",
        "required": true,
        "description": "A saved workflow's name.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "example": "build-and-test"
      },
      "path.version": {
        "name": "version",
        "in": "path",
        "required": true,
        "description": "One of the workflow's versions, from 1.",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1
      },
      "path.run": {
        "name": "run",
        "in": "path",
        "required": true,
        "description": "A run's ID.",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "0b9f3c2a-1d4e-4f6a-8b7c-9d0e1f2a3b4c"
      },
      "path.step": {
        "name": "step",
        "in": "path",
        "required": true,
        "description": "A step's instance, by its key: the step's ID, and `.` and its index for one of a matrix's instances.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{0,62}(?:\\.(?:0|[1-9]\\d{0,2}))?$"
        },
        "example": "test"
      },
      "path.execution": {
        "name": "execution",
        "in": "path",
        "required": true,
        "description": "One of the instance's executions, from 1.",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1
      },
      "path.artifact": {
        "name": "artifact",
        "in": "path",
        "required": true,
        "description": "One of the step's artifacts, by its name.",
        "schema": {
          "type": "string"
        },
        "example": "report"
      },
      "path.trigger": {
        "name": "trigger",
        "in": "path",
        "required": true,
        "description": "A trigger's ID or name.",
        "schema": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
            }
          ]
        },
        "example": "on-push"
      },
      "path.schedule": {
        "name": "schedule",
        "in": "path",
        "required": true,
        "description": "A schedule's ID or name.",
        "schema": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "string",
              "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
            }
          ]
        },
        "example": "nightly"
      },
      "path.connector": {
        "name": "connector",
        "in": "path",
        "required": true,
        "description": "A connector's ID.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
          "maxLength": 32
        },
        "example": "github"
      },
      "path.delivery": {
        "name": "delivery",
        "in": "path",
        "required": true,
        "description": "A delivery's ID.",
        "schema": {
          "type": "string",
          "pattern": "^dlv_[0-9a-f]{32}$"
        },
        "example": "dlv_0123456789abcdef0123456789abcdef"
      },
      "path.user": {
        "name": "user",
        "in": "path",
        "required": true,
        "description": "One of the workspace's own users, by its ID for them, percent-encoded.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "example": "user_123"
      },
      "path.login": {
        "name": "login",
        "in": "path",
        "required": true,
        "description": "A login's ID.",
        "schema": {
          "type": "string",
          "pattern": "^lg_[0-9a-f]{16}$"
        },
        "example": "lg_0123456789abcdef"
      },
      "path.passkey": {
        "name": "passkey",
        "in": "path",
        "required": true,
        "description": "A passkey's ID.",
        "schema": {
          "type": "string",
          "pattern": "^pk_[0-9a-f]{16}$"
        },
        "example": "pk_0123456789abcdef"
      },
      "query.waitMs": {
        "name": "waitMs",
        "in": "query",
        "description": "How long to hold the request, in milliseconds, for what it reads to settle; 0, the default, answers at once.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "default": 0
        }
      },
      "query.labelSelector": {
        "name": "labelSelector",
        "in": "query",
        "description": "Keeps the objects whose labels match: `key=value` (or `key==value`) requirements, comma-separated.",
        "schema": {
          "type": "string"
        }
      },
      "query.pageLimit": {
        "name": "limit",
        "in": "query",
        "description": "The most objects a page holds.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "query.continue": {
        "name": "continue",
        "in": "query",
        "description": "The previous page's `metadata.continue`, for the next page.",
        "schema": {
          "type": "string"
        }
      },
      "query.logSince": {
        "name": "since",
        "in": "query",
        "description": "Keeps the entries at or after this time: milliseconds since the Unix epoch, or an ISO 8601 time.",
        "schema": {
          "type": "string"
        }
      },
      "query.follow": {
        "name": "follow",
        "in": "query",
        "description": "`true` answers newline-delimited JSON (`application/x-ndjson`): each entry, then each new one as it comes.",
        "schema": {
          "type": "boolean"
        }
      },
      "query.execCommand": {
        "name": "command",
        "in": "query",
        "description": "A terminal's program (`Upgrade: websocket` alone): one argument of it per `command`, in order; without any, the sandbox's login shell.",
        "schema": {
          "type": "string"
        }
      },
      "query.execStdin": {
        "name": "stdin",
        "in": "query",
        "description": "A terminal (`Upgrade: websocket` alone) takes its client's input: `true`, which it needs.",
        "schema": {
          "type": "boolean"
        }
      },
      "query.execStdout": {
        "name": "stdout",
        "in": "query",
        "description": "A terminal (`Upgrade: websocket` alone) sends its output: `true` where named.",
        "schema": {
          "type": "boolean"
        }
      },
      "query.execStderr": {
        "name": "stderr",
        "in": "query",
        "description": "Read by no terminal: a pseudo-terminal sends its errors with its output.",
        "schema": {
          "type": "boolean"
        }
      },
      "query.execTty": {
        "name": "tty",
        "in": "query",
        "description": "A terminal (`Upgrade: websocket` alone) is a pseudo-terminal: `true`, which it needs.",
        "schema": {
          "type": "boolean"
        }
      },
      "query.metricsFrom": {
        "name": "from",
        "in": "query",
        "description": "The earliest sample's time; the sandbox's create without it.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "query.metricsTo": {
        "name": "to",
        "in": "query",
        "description": "The latest sample's time; now without it.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "query.limit": {
        "name": "limit",
        "in": "query",
        "description": "The most items a page holds.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "query.cursor": {
        "name": "cursor",
        "in": "query",
        "description": "The previous page's `nextCursor`, for the next page.",
        "schema": {
          "type": "string"
        }
      },
      "query.after": {
        "name": "after",
        "in": "query",
        "description": "The previous page's `next`, for the next page.",
        "schema": {
          "type": "string"
        }
      },
      "query.keepSandbox": {
        "name": "keepSandbox",
        "in": "query",
        "description": "`true` keeps the sandbox the server's create made.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "query.dryRun": {
        "name": "dryRun",
        "in": "query",
        "description": "`true` checks the run and answers it as it would start, starting nothing.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "query.runStatus": {
        "name": "status",
        "in": "query",
        "description": "Keeps the runs in this status.",
        "schema": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "paused",
            "canceling",
            "succeeded",
            "failed",
            "canceled"
          ]
        }
      },
      "query.runWorkflow": {
        "name": "workflow",
        "in": "query",
        "description": "Keeps the runs of this workflow.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
        }
      },
      "query.eventLimit": {
        "name": "limit",
        "in": "query",
        "description": "The most events a page holds.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "query.eventCursor": {
        "name": "cursor",
        "in": "query",
        "description": "The previous page's `nextCursor`, to read on from it.",
        "schema": {
          "type": "string"
        }
      },
      "query.triggerConnector": {
        "name": "connector",
        "in": "query",
        "description": "Keeps the triggers of this connector.",
        "schema": {
          "type": "string"
        }
      },
      "query.triggerWorkflow": {
        "name": "workflow",
        "in": "query",
        "description": "Keeps the triggers that run this workflow.",
        "schema": {
          "type": "string"
        }
      },
      "query.usageFrom": {
        "name": "from",
        "in": "query",
        "description": "The first day, UTC; the first of this month without it.",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "query.usageTo": {
        "name": "to",
        "in": "query",
        "description": "The last day, UTC; today without it.",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "query.loginSite": {
        "name": "site",
        "in": "query",
        "description": "Keeps the logins of this site and the sites under it.",
        "schema": {
          "type": "string"
        }
      },
      "query.auditAction": {
        "name": "action",
        "in": "query",
        "description": "Keeps the records of this action, or of every action of this group (the part before its first dot).",
        "schema": {
          "type": "string",
          "enum": [
            "sandbox.create",
            "sandbox.start",
            "sandbox.stop",
            "sandbox.delete",
            "sandbox.snapshot",
            "sandbox.snapshot.delete",
            "sandbox.restore",
            "sandbox.snapshot_schedule.update",
            "sandbox.url.update",
            "sandbox.url.disable",
            "sandbox.url_token.create",
            "command.exec",
            "command.cancel",
            "mcp_token.create",
            "mcp_token.revoke",
            "api_key.create",
            "api_key.revoke",
            "member.role.update",
            "member.remove",
            "invite.create",
            "invite.accept",
            "tenant.create",
            "tenant.settings.update",
            "tenant.suspend",
            "tenant.unsuspend",
            "tenant.plan.update",
            "tenant.constal_key.rotate",
            "billing.standing.change",
            "billing.spend_alert.update",
            "billing.top_up.create",
            "billing.auto_recharge.update",
            "workflow.run.start",
            "workflow.run.pause",
            "workflow.run.cancel",
            "workflow.run.resume",
            "workflow.run.restart",
            "workflow.run.replay",
            "workflow.run.rerun",
            "mcp_server.create",
            "mcp_server.update",
            "mcp_server.delete",
            "sandbox.file.write",
            "sandbox.file.delete",
            "sandbox.update",
            "sandbox.restart",
            "provider.key.set",
            "provider.key.delete",
            "provider.auto.set",
            "connector.create",
            "connector.update",
            "connector.delete",
            "workspace_account.connect",
            "workspace_account.disconnect",
            "connection.link",
            "connection.delete",
            "connection.sign_in",
            "end_user.delete",
            "image.delete",
            "sandbox_image.create",
            "sandbox_image.delete",
            "workflow.create",
            "workflow.update",
            "workflow.delete",
            "trigger.create",
            "trigger.update",
            "trigger.delete",
            "trigger.test",
            "connector_endpoint.set",
            "connector_endpoint.rotate",
            "connector_endpoint.delete",
            "mailbox.create",
            "mailbox.delete",
            "email.send",
            "email.sending.suspend",
            "email.sending.unsuspend",
            "schedule.create",
            "schedule.update",
            "schedule.delete",
            "schedule.run",
            "login.create",
            "login.update",
            "login.delete",
            "login.link",
            "login.sign_in",
            "login.fill",
            "login.read",
            "login.handoff",
            "login.check",
            "login.live.open",
            "login.live.done",
            "login.live.cancel",
            "login.session.save",
            "login.session.delete",
            "login.session.end",
            "passkey.create",
            "passkey.sign",
            "passkey.update",
            "passkey.delete",
            "sandbox",
            "command",
            "mcp_token",
            "api_key",
            "member",
            "invite",
            "tenant",
            "billing",
            "workflow",
            "mcp_server",
            "provider",
            "connector",
            "workspace_account",
            "connection",
            "end_user",
            "image",
            "sandbox_image",
            "trigger",
            "connector_endpoint",
            "mailbox",
            "email",
            "schedule",
            "login",
            "passkey"
          ]
        }
      },
      "query.auditActor": {
        "name": "actor",
        "in": "query",
        "description": "Keeps the records of this actor: a user's, API key's, sandbox's or your user's ID, `operator` or `system`.",
        "schema": {
          "type": "string"
        }
      },
      "query.auditTarget": {
        "name": "target",
        "in": "query",
        "description": "Keeps the records about this target, by its ID.",
        "schema": {
          "type": "string"
        }
      },
      "query.auditOutcome": {
        "name": "outcome",
        "in": "query",
        "description": "Keeps the records of this outcome.",
        "schema": {
          "type": "string",
          "enum": [
            "success",
            "failure"
          ]
        }
      },
      "query.auditSince": {
        "name": "since",
        "in": "query",
        "description": "Keeps the records at or after this time, in milliseconds since the Unix epoch.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "query.auditUntil": {
        "name": "until",
        "in": "query",
        "description": "Keeps the records before this time, in milliseconds since the Unix epoch.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "query.auditLimit": {
        "name": "limit",
        "in": "query",
        "description": "The most records a page holds.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "query.balanceCursor": {
        "name": "cursor",
        "in": "query",
        "description": "The previous page's `nextCursor`, for the balance's older entries.",
        "schema": {
          "type": "string"
        }
      },
      "query.month": {
        "name": "month",
        "in": "query",
        "description": "The month, `YYYY-MM`; the current UTC month without it.",
        "schema": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        }
      },
      "query.format": {
        "name": "format",
        "in": "query",
        "description": "`csv` answers the month as a CSV file.",
        "schema": {
          "type": "string",
          "enum": [
            "csv"
          ]
        }
      },
      "header.idempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "description": "Makes the request safe to repeat: a repeat with the same key and body answers what the first did, creating nothing twice; the same key with another body is refused.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{8,128}$"
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key of the workspace."
      }
    }
  }
}
