{
  "components": {
    "schemas": {
      "ActionAnswer": {
        "additionalProperties": false,
        "properties": {
          "option_ids": {
            "items": {
              "maxLength": 16,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 10,
            "title": "Option Ids",
            "type": "array"
          },
          "question_id": {
            "maxLength": 16,
            "minLength": 1,
            "title": "Question Id",
            "type": "string"
          },
          "text": {
            "anyOf": [
              {
                "maxLength": 4000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "question_id"
        ],
        "title": "ActionAnswer",
        "type": "object"
      },
      "ActionOption": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ],
        "title": "ActionOption",
        "type": "object"
      },
      "ActionQuestion": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "multi_select": {
            "title": "Multi Select",
            "type": "boolean"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/ActionOption"
            },
            "title": "Options",
            "type": "array"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text",
          "options",
          "multi_select"
        ],
        "title": "ActionQuestion",
        "type": "object"
      },
      "ActionReceipt": {
        "properties": {
          "action_id": {
            "format": "uuid",
            "title": "Action Id",
            "type": "string"
          },
          "idempotency_expires_at": {
            "format": "date-time",
            "title": "Idempotency Expires At",
            "type": "string"
          },
          "run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "run_status": {
            "anyOf": [
              {
                "enum": [
                  "QUEUED",
                  "RUNNING",
                  "REQUIRES_ACTION",
                  "CANCEL_REQUESTED",
                  "SUCCEEDED",
                  "PARTIALLY_SUCCEEDED",
                  "FAILED",
                  "CANCELED",
                  "EXPIRED"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Status"
          },
          "session_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "status": {
            "const": "RESOLVED",
            "title": "Status",
            "type": "string"
          },
          "status_url": {
            "title": "Status Url",
            "type": "string"
          },
          "turn_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Turn Id"
          },
          "turn_status": {
            "anyOf": [
              {
                "enum": [
                  "QUEUED",
                  "RUNNING",
                  "REQUIRES_ACTION",
                  "CANCEL_REQUESTED",
                  "SUCCEEDED",
                  "FAILED",
                  "CANCELED",
                  "EXPIRED"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Turn Status"
          }
        },
        "required": [
          "action_id",
          "status",
          "turn_id",
          "idempotency_expires_at",
          "status_url"
        ],
        "title": "ActionReceipt",
        "type": "object"
      },
      "ActionResolveInput": {
        "additionalProperties": false,
        "description": "Answer every question of a caller-resolvable QUESTION action exactly once.",
        "properties": {
          "answers": {
            "items": {
              "$ref": "#/components/schemas/ActionAnswer"
            },
            "maxItems": 4,
            "minItems": 1,
            "title": "Answers",
            "type": "array"
          }
        },
        "required": [
          "answers"
        ],
        "title": "ActionResolveInput",
        "type": "object"
      },
      "AnswerActor": {
        "additionalProperties": false,
        "properties": {
          "subject": {
            "description": "Opaque id of the person your service confirmed. Recorded apart from the key.",
            "maxLength": 256,
            "minLength": 1,
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "subject"
        ],
        "title": "AnswerActor",
        "type": "object"
      },
      "AnswerPreparationInput": {
        "additionalProperties": false,
        "description": "Answers applied in order and atomically. A scope confirmation is sent alone, with actor.",
        "properties": {
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnswerActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "answers": {
            "items": {
              "$ref": "#/components/schemas/PreparationAnswer"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Answers",
            "type": "array"
          },
          "expected_preparation_revision": {
            "minimum": 1.0,
            "title": "Expected Preparation Revision",
            "type": "integer"
          }
        },
        "required": [
          "expected_preparation_revision",
          "answers"
        ],
        "title": "AnswerPreparationInput",
        "type": "object"
      },
      "ApprovalActor": {
        "additionalProperties": false,
        "description": "Customer-authenticated person, attested by the delegated API client; not an UpServe user ID.",
        "properties": {
          "subject": {
            "maxLength": 200,
            "minLength": 1,
            "pattern": "^\\S(?:.*\\S)?$",
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "subject"
        ],
        "title": "ApprovalActor",
        "type": "object"
      },
      "ApprovalContent": {
        "properties": {
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "decisions": {
            "items": {
              "enum": [
                "APPROVE",
                "SKIP",
                "REJECT_JOB",
                "CONFIRM"
              ],
              "type": "string"
            },
            "title": "Decisions",
            "type": "array"
          },
          "detail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail Url"
          },
          "kind": {
            "enum": [
              "STAGE_HOLD",
              "RESULT_CONFIRMATION"
            ],
            "title": "Kind",
            "type": "string"
          },
          "proposed_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposed Status"
          },
          "reason": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "results": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Results",
            "type": "array"
          },
          "rows": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          },
          "stage_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Key"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "required": [
          "kind"
        ],
        "title": "ApprovalContent",
        "type": "object"
      },
      "ApprovalResolveInput": {
        "additionalProperties": false,
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/ApprovalActor"
          },
          "content_hash": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Content Hash",
            "type": "string"
          },
          "decision": {
            "enum": [
              "APPROVE",
              "SKIP",
              "REJECT_JOB",
              "CONFIRM"
            ],
            "title": "Decision",
            "type": "string"
          }
        },
        "required": [
          "decision",
          "content_hash",
          "actor"
        ],
        "title": "ApprovalResolveInput",
        "type": "object"
      },
      "Artifact": {
        "properties": {
          "kind": {
            "const": "ARTIFACT",
            "title": "Kind",
            "type": "string"
          },
          "output": {
            "$ref": "#/components/schemas/OutputReference"
          }
        },
        "required": [
          "kind",
          "output"
        ],
        "title": "Artifact",
        "type": "object"
      },
      "ArtifactDetail": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "file_id": {
            "format": "uuid",
            "title": "File Id",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Sha256",
            "type": "string"
          },
          "size_bytes": {
            "minimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "status": {
            "const": "READY",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "status",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256",
          "expires_at",
          "id"
        ],
        "title": "ArtifactDetail",
        "type": "object"
      },
      "CostCategoryUsage": {
        "properties": {
          "reserved_su": {
            "title": "Reserved Su",
            "type": "number"
          },
          "settled_su": {
            "title": "Settled Su",
            "type": "number"
          },
          "status": {
            "enum": [
              "PENDING",
              "FINAL"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_su": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Su"
          }
        },
        "required": [
          "status",
          "total_su",
          "settled_su",
          "reserved_su"
        ],
        "title": "CostCategoryUsage",
        "type": "object"
      },
      "DeploymentDocumented": {
        "description": "A published, immutable Deployment this API key may call. Timestamps are ISO 8601 strings.",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "files": {
            "items": {
              "type": "string"
            },
            "title": "Files",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_mime_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Mime Types"
          },
          "mcp_count": {
            "title": "Mcp Count",
            "type": "integer"
          },
          "model_tier": {
            "title": "Model Tier",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "outputs": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Outputs",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "rate_limits": {
            "$ref": "#/components/schemas/RateLimits"
          },
          "requests_per_minute": {
            "title": "Requests Per Minute",
            "type": "integer"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "sandbox_tier": {
            "title": "Sandbox Tier",
            "type": "string"
          },
          "skill_count": {
            "title": "Skill Count",
            "type": "integer"
          },
          "status": {
            "enum": [
              "ACTIVE",
              "RETIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "tools": {
            "items": {
              "type": "string"
            },
            "title": "Tools",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "version",
          "status",
          "digest",
          "model_tier",
          "sandbox_tier",
          "files",
          "skill_count",
          "tools",
          "mcp_count",
          "created_at",
          "revoked_at",
          "requests_per_minute",
          "rate_limits",
          "outputs",
          "input_mime_types"
        ],
        "title": "DeploymentDocumented",
        "type": "object"
      },
      "DeploymentListDocumented": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DeploymentDocumented"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "DeploymentListDocumented",
        "type": "object"
      },
      "DownloadReceipt": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "description": "Opaque one-use URL relative to the API origin. No charge until it is consumed.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "title": "DownloadReceipt",
        "type": "object"
      },
      "EmptyInput": {
        "additionalProperties": false,
        "description": "Cancel/close/delete accept no caller-controlled execution options.",
        "properties": {},
        "title": "EmptyInput",
        "type": "object"
      },
      "ExecutionLimits": {
        "additionalProperties": false,
        "properties": {
          "execution_seconds": {
            "default": 3600,
            "exclusiveMinimum": 0.0,
            "maximum": 3600.0,
            "title": "Execution Seconds",
            "type": "integer"
          },
          "max_su": {
            "default": 100,
            "exclusiveMinimum": 0.0,
            "maximum": 100.0,
            "title": "Max Su",
            "type": "number"
          },
          "queue_seconds": {
            "default": 600,
            "exclusiveMinimum": 0.0,
            "maximum": 600.0,
            "title": "Queue Seconds",
            "type": "integer"
          }
        },
        "title": "ExecutionLimits",
        "type": "object"
      },
      "FileInput": {
        "additionalProperties": false,
        "properties": {
          "file_id": {
            "description": "A READY input file uploaded to this Project or Session.",
            "format": "uuid",
            "title": "File Id",
            "type": "string"
          },
          "type": {
            "const": "FILE",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "file_id"
        ],
        "title": "FileInput",
        "type": "object"
      },
      "FileOutput": {
        "properties": {
          "artifact_id": {
            "format": "uuid",
            "title": "Artifact Id",
            "type": "string"
          },
          "availability": {
            "const": "READY",
            "title": "Availability",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Sha256",
            "type": "string"
          },
          "size_bytes": {
            "minimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "type": {
            "const": "FILE",
            "title": "Type",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "visibility",
          "availability",
          "type",
          "artifact_id",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256"
        ],
        "title": "FileOutput",
        "type": "object"
      },
      "FileReceipt": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "file_id": {
            "format": "uuid",
            "title": "File Id",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Sha256",
            "type": "string"
          },
          "size_bytes": {
            "minimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "status": {
            "const": "READY",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "status",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256",
          "expires_at"
        ],
        "title": "FileReceipt",
        "type": "object"
      },
      "ItemEnvelope": {
        "properties": {
          "content": {
            "discriminator": {
              "mapping": {
                "ARTIFACT": "#/components/schemas/Artifact",
                "MESSAGE": "#/components/schemas/Message",
                "OUTCOME": "#/components/schemas/Outcome",
                "PROGRESS": "#/components/schemas/Progress",
                "REQUIRED_ACTION": "#/components/schemas/RequiredAction",
                "STEP_OUTCOME": "#/components/schemas/StepOutcome",
                "TOOL_CALL": "#/components/schemas/ToolCall",
                "USAGE": "#/components/schemas/UsageUpdate"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "$ref": "#/components/schemas/ToolCall"
              },
              {
                "$ref": "#/components/schemas/Progress"
              },
              {
                "$ref": "#/components/schemas/RequiredAction"
              },
              {
                "$ref": "#/components/schemas/Artifact"
              },
              {
                "$ref": "#/components/schemas/Outcome"
              },
              {
                "$ref": "#/components/schemas/StepOutcome"
              },
              {
                "$ref": "#/components/schemas/UsageUpdate"
              }
            ],
            "title": "Content"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "sequence": {
            "title": "Sequence",
            "type": "integer"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "turn_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Turn Id"
          }
        },
        "required": [
          "id",
          "session_id",
          "turn_id",
          "sequence",
          "created_at",
          "content"
        ],
        "title": "ItemEnvelope",
        "type": "object"
      },
      "ItemPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemEnvelope"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ItemPage",
        "type": "object"
      },
      "JsonOutput": {
        "properties": {
          "artifact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifact Id"
          },
          "availability": {
            "const": "READY",
            "title": "Availability",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "mime_type": {
            "anyOf": [
              {
                "const": "application/json",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "schema_ref": {
            "title": "Schema Ref",
            "type": "string"
          },
          "size_bytes": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "type": {
            "const": "JSON",
            "title": "Type",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "visibility",
          "availability",
          "type",
          "schema_ref"
        ],
        "title": "JsonOutput",
        "type": "object"
      },
      "JsonValue": {},
      "Message": {
        "properties": {
          "kind": {
            "const": "MESSAGE",
            "title": "Kind",
            "type": "string"
          },
          "text": {
            "maxLength": 65536,
            "title": "Text",
            "type": "string"
          },
          "visibility": {
            "default": "FINAL",
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "text"
        ],
        "title": "Message",
        "type": "object"
      },
      "Outcome": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "title": "Item Ids",
            "type": "array"
          },
          "kind": {
            "const": "OUTCOME",
            "title": "Kind",
            "type": "string"
          },
          "status": {
            "enum": [
              "SUCCEEDED",
              "PARTIALLY_SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "kind",
          "status"
        ],
        "title": "Outcome",
        "type": "object"
      },
      "OutputReference": {
        "properties": {
          "artifact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifact Id"
          },
          "availability": {
            "enum": [
              "READY",
              "FAILED",
              "EXPIRED"
            ],
            "title": "Availability",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Id"
          },
          "key": {
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.-]+$",
            "title": "Key",
            "type": "string"
          },
          "type": {
            "enum": [
              "TEXT",
              "JSON",
              "FILE",
              "URL"
            ],
            "title": "Type",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "type",
          "visibility",
          "availability"
        ],
        "title": "OutputReference",
        "type": "object"
      },
      "PreparationAnswer": {
        "additionalProperties": false,
        "properties": {
          "question_id": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question Id",
            "type": "string"
          },
          "value": {
            "description": "The answer. A scope confirmation is {decision: APPLY or KEEP, package_hash}.",
            "title": "Value"
          }
        },
        "required": [
          "question_id",
          "value"
        ],
        "title": "PreparationAnswer",
        "type": "object"
      },
      "PreparationUsage": {
        "description": "Work preparation spend (POST /v1/works and its answers), counted apart from the execution fields of the usage summary.\n\nAn open preparation keeps this object PENDING without changing the execution status or total_su.",
        "properties": {
          "budget_reserved_su": {
            "title": "Budget Reserved Su",
            "type": "number"
          },
          "categories": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CostCategoryUsage"
            },
            "propertyNames": {
              "enum": [
                "LLM",
                "SEARCH",
                "SANDBOX",
                "STORAGE",
                "THIRD_PARTY"
              ]
            },
            "title": "Categories",
            "type": "object"
          },
          "reserved_su": {
            "title": "Reserved Su",
            "type": "number"
          },
          "settled_su": {
            "title": "Settled Su",
            "type": "number"
          },
          "status": {
            "enum": [
              "PENDING",
              "FINAL"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_su": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Su"
          }
        },
        "required": [
          "status",
          "total_su",
          "settled_su",
          "reserved_su",
          "budget_reserved_su",
          "categories"
        ],
        "title": "PreparationUsage",
        "type": "object"
      },
      "PrepareWorkInput": {
        "additionalProperties": false,
        "description": "A new work, or a revision of a work this Project created (work_id with the revision you read).",
        "properties": {
          "expected_revision": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Revision"
          },
          "spec": {
            "$ref": "#/components/schemas/WorkSpecIn"
          },
          "work_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Id"
          }
        },
        "required": [
          "spec"
        ],
        "title": "PrepareWorkInput",
        "type": "object"
      },
      "Progress": {
        "properties": {
          "completed": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed"
          },
          "kind": {
            "const": "PROGRESS",
            "title": "Kind",
            "type": "string"
          },
          "phase": {
            "enum": [
              "QUEUED",
              "RUNNING",
              "EXECUTING",
              "FINALIZING"
            ],
            "title": "Phase",
            "type": "string"
          },
          "step_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Id"
          },
          "total": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "kind",
          "phase"
        ],
        "title": "Progress",
        "type": "object"
      },
      "PublicError": {
        "properties": {
          "code": {
            "pattern": "^[A-Z][A-Z0-9_]{0,79}$",
            "title": "Code",
            "type": "string"
          },
          "retryable": {
            "default": false,
            "title": "Retryable",
            "type": "boolean"
          }
        },
        "required": [
          "code"
        ],
        "title": "PublicError",
        "type": "object"
      },
      "PublicEventData": {
        "discriminator": {
          "mapping": {
            "ARTIFACT": "#/components/schemas/Artifact",
            "MESSAGE": "#/components/schemas/Message",
            "OUTCOME": "#/components/schemas/Outcome",
            "PROGRESS": "#/components/schemas/Progress",
            "REQUIRED_ACTION": "#/components/schemas/RequiredAction",
            "STEP_OUTCOME": "#/components/schemas/StepOutcome",
            "TOOL_CALL": "#/components/schemas/ToolCall",
            "USAGE": "#/components/schemas/UsageUpdate"
          },
          "propertyName": "kind"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/Message"
          },
          {
            "$ref": "#/components/schemas/ToolCall"
          },
          {
            "$ref": "#/components/schemas/Progress"
          },
          {
            "$ref": "#/components/schemas/RequiredAction"
          },
          {
            "$ref": "#/components/schemas/Artifact"
          },
          {
            "$ref": "#/components/schemas/Outcome"
          },
          {
            "$ref": "#/components/schemas/StepOutcome"
          },
          {
            "$ref": "#/components/schemas/UsageUpdate"
          }
        ]
      },
      "QuestionContent": {
        "properties": {
          "lead": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/ActionQuestion"
            },
            "title": "Questions",
            "type": "array"
          }
        },
        "required": [
          "lead",
          "questions"
        ],
        "title": "QuestionContent",
        "type": "object"
      },
      "RateLimits": {
        "properties": {
          "accepts_per_minute": {
            "title": "Accepts Per Minute",
            "type": "integer"
          },
          "reads_per_minute": {
            "title": "Reads Per Minute",
            "type": "integer"
          }
        },
        "required": [
          "accepts_per_minute",
          "reads_per_minute"
        ],
        "title": "RateLimits",
        "type": "object"
      },
      "RequiredAction": {
        "properties": {
          "action_id": {
            "format": "uuid",
            "title": "Action Id",
            "type": "string"
          },
          "action_type": {
            "enum": [
              "QUESTION",
              "APPROVAL"
            ],
            "title": "Action Type",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "kind": {
            "const": "REQUIRED_ACTION",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "action_id",
          "action_type",
          "expires_at"
        ],
        "title": "RequiredAction",
        "type": "object"
      },
      "RequiredActionView": {
        "properties": {
          "allowed_resolvers": {
            "items": {
              "enum": [
                "CALLER",
                "OWNER"
              ],
              "type": "string"
            },
            "title": "Allowed Resolvers",
            "type": "array"
          },
          "approval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalContent"
              },
              {
                "type": "null"
              }
            ]
          },
          "can_resolve": {
            "description": "CALLER permission and actions:resolve (question) or actions:approve (approval).",
            "title": "Can Resolve",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "question": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QuestionContent"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "PENDING",
              "RESOLVED",
              "EXPIRED",
              "CANCELED"
            ],
            "title": "Status",
            "type": "string"
          },
          "turn_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Turn Id"
          },
          "type": {
            "enum": [
              "QUESTION",
              "APPROVAL"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "allowed_resolvers",
          "can_resolve",
          "turn_id",
          "created_at",
          "expires_at"
        ],
        "title": "RequiredActionView",
        "type": "object"
      },
      "RunDetail": {
        "properties": {
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "outputs": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextOutput"
                },
                {
                  "$ref": "#/components/schemas/JsonOutput"
                },
                {
                  "$ref": "#/components/schemas/FileOutput"
                },
                {
                  "$ref": "#/components/schemas/UrlOutput"
                },
                {
                  "$ref": "#/components/schemas/UnavailableOutput"
                }
              ]
            },
            "title": "Outputs",
            "type": "array"
          },
          "required_actions": {
            "items": {
              "$ref": "#/components/schemas/RequiredActionView"
            },
            "title": "Required Actions",
            "type": "array"
          },
          "run": {
            "$ref": "#/components/schemas/RunView"
          }
        },
        "required": [
          "run",
          "outputs",
          "next_cursor"
        ],
        "title": "RunDetail",
        "type": "object"
      },
      "RunInput": {
        "additionalProperties": false,
        "properties": {
          "file_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 20,
            "title": "File Ids",
            "type": "array"
          },
          "input": {
            "additionalProperties": true,
            "title": "Input",
            "type": "object"
          },
          "limits": {
            "$ref": "#/components/schemas/RunLimits"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "maxProperties": 16,
            "title": "Metadata",
            "type": "object"
          },
          "published_version": {
            "minimum": 1.0,
            "title": "Published Version",
            "type": "integer"
          }
        },
        "required": [
          "published_version",
          "input"
        ],
        "title": "RunInput",
        "type": "object"
      },
      "RunLimits": {
        "additionalProperties": false,
        "properties": {
          "execution_seconds": {
            "default": 3600,
            "exclusiveMinimum": 0.0,
            "maximum": 3600.0,
            "title": "Execution Seconds",
            "type": "integer"
          },
          "max_su": {
            "default": 100,
            "exclusiveMinimum": 0.0,
            "maximum": 100.0,
            "title": "Max Su",
            "type": "number"
          },
          "queue_seconds": {
            "default": 600,
            "exclusiveMinimum": 0.0,
            "maximum": 600.0,
            "title": "Queue Seconds",
            "type": "integer"
          },
          "retention_days": {
            "default": 30,
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Retention Days",
            "type": "integer"
          },
          "run_seconds": {
            "default": 43200,
            "maximum": 43200.0,
            "minimum": 1.0,
            "title": "Run Seconds",
            "type": "integer"
          }
        },
        "title": "RunLimits",
        "type": "object"
      },
      "RunProgress": {
        "properties": {
          "completed": {
            "title": "Completed",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "completed"
        ],
        "title": "RunProgress",
        "type": "object"
      },
      "RunReceipt": {
        "properties": {
          "events_url": {
            "title": "Events Url",
            "type": "string"
          },
          "idempotency_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotency Expires At"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "status_url": {
            "title": "Status Url",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "status_url",
          "events_url",
          "idempotency_expires_at"
        ],
        "title": "RunReceipt",
        "type": "object"
      },
      "RunView": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deadline": {
            "format": "date-time",
            "title": "Deadline",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Metadata",
            "type": "object"
          },
          "phase": {
            "anyOf": [
              {
                "enum": [
                  "EXECUTING",
                  "FINALIZING"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase"
          },
          "progress": {
            "$ref": "#/components/schemas/RunProgress"
          },
          "published_version": {
            "title": "Published Version",
            "type": "integer"
          },
          "status": {
            "enum": [
              "QUEUED",
              "RUNNING",
              "REQUIRES_ACTION",
              "CANCEL_REQUESTED",
              "SUCCEEDED",
              "PARTIALLY_SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "workflow_id": {
            "format": "uuid",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workflow_id",
          "published_version",
          "status",
          "phase",
          "usage",
          "error",
          "metadata",
          "created_at",
          "deadline",
          "completed_at",
          "expires_at",
          "progress"
        ],
        "title": "RunView",
        "type": "object"
      },
      "RuntimeErrorDetail": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "details": {
            "additionalProperties": true,
            "title": "Details",
            "type": "object"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "retryable",
          "request_id",
          "details"
        ],
        "title": "RuntimeErrorDetail",
        "type": "object"
      },
      "RuntimeErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/RuntimeErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "RuntimeErrorEnvelope",
        "type": "object"
      },
      "RuntimeEvent": {
        "properties": {
          "aggregate_id": {
            "format": "uuid",
            "title": "Aggregate Id",
            "type": "string"
          },
          "aggregate_kind": {
            "enum": [
              "SESSION",
              "RUN"
            ],
            "title": "Aggregate Kind",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PublicEventData"
          },
          "event_id": {
            "format": "uuid",
            "title": "Event Id",
            "type": "string"
          },
          "sequence": {
            "title": "Sequence",
            "type": "integer"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "aggregate_kind",
          "aggregate_id",
          "sequence",
          "type",
          "created_at",
          "data"
        ],
        "title": "EventEnvelope",
        "type": "object"
      },
      "SessionDetail": {
        "properties": {
          "active_turn_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Turn Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deployment_id": {
            "format": "uuid",
            "title": "Deployment Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "ACTIVE",
              "CLOSED"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "deployment_id",
          "status",
          "active_turn_id",
          "created_at",
          "updated_at"
        ],
        "title": "SessionDetail",
        "type": "object"
      },
      "SessionReceipt": {
        "properties": {
          "idempotency_expires_at": {
            "format": "date-time",
            "title": "Idempotency Expires At",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "CLOSED",
              "DELETING",
              "DELETED"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "status",
          "idempotency_expires_at"
        ],
        "title": "SessionReceipt",
        "type": "object"
      },
      "SpecDelivery": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Channel",
            "type": "string"
          },
          "target_ref": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Target Ref",
            "type": "string"
          }
        },
        "title": "SpecDelivery",
        "type": "object"
      },
      "SpecDeliveryV2": {
        "additionalProperties": false,
        "properties": {
          "attach": {
            "enum": [
              "RESULT_FILES",
              "NONE"
            ],
            "title": "Attach",
            "type": "string"
          },
          "mode": {
            "enum": [
              "NEW_MAIL",
              "REPLY",
              "CHAT",
              "FILE_ONLY"
            ],
            "title": "Mode",
            "type": "string"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/SpecRecipient"
            },
            "maxItems": 50,
            "title": "Recipients",
            "type": "array"
          },
          "reply_to": {
            "$ref": "#/components/schemas/SpecReplyTo"
          }
        },
        "title": "SpecDeliveryV2",
        "type": "object"
      },
      "SpecExample": {
        "additionalProperties": false,
        "properties": {
          "accepted_output": {
            "title": "Accepted Output"
          },
          "input": {
            "title": "Input"
          }
        },
        "title": "SpecExample",
        "type": "object"
      },
      "SpecInput": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "name": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "schema": {
            "additionalProperties": true,
            "title": "Schema",
            "type": "object"
          },
          "source": {
            "enum": [
              "REQUEST_TEXT",
              "REQUEST_ATTACHMENT",
              "TRIGGER_MESSAGE",
              "CONNECTION",
              "ASK_PERSON"
            ],
            "title": "Source",
            "type": "string"
          },
          "type": {
            "enum": [
              "TEXT",
              "NUMBER",
              "BOOLEAN",
              "OBJECT",
              "ARRAY",
              "FILE",
              "MAIL"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "required",
          "source"
        ],
        "title": "SpecInput",
        "type": "object"
      },
      "SpecKnowledge": {
        "additionalProperties": false,
        "properties": {
          "ref": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Ref",
            "type": "string"
          },
          "revision": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Revision",
            "type": "string"
          }
        },
        "required": [
          "ref"
        ],
        "title": "SpecKnowledge",
        "type": "object"
      },
      "SpecRecipient": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source": {
            "enum": [
              "CONSTANT",
              "INPUT",
              "REQUESTER"
            ],
            "title": "Source",
            "type": "string"
          },
          "value": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "source"
        ],
        "title": "SpecRecipient",
        "type": "object"
      },
      "SpecReference": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "ref": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Ref",
            "type": "string"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "revision": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Revision",
            "type": "string"
          }
        },
        "required": [
          "name",
          "ref",
          "required"
        ],
        "title": "SpecReference",
        "type": "object"
      },
      "SpecReplyTo": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source": {
            "enum": [
              "TRIGGER_MESSAGE",
              "INPUT"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source"
        ],
        "title": "SpecReplyTo",
        "type": "object"
      },
      "SpecSource": {
        "additionalProperties": false,
        "properties": {
          "ref": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Ref",
            "type": "string"
          },
          "revision": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Revision",
            "type": "string"
          }
        },
        "title": "SpecSource",
        "type": "object"
      },
      "SpecTrigger": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "kind": {
            "enum": [
              "MANUAL",
              "SCHEDULE",
              "EVENT"
            ],
            "title": "Kind",
            "type": "string"
          }
        },
        "title": "SpecTrigger",
        "type": "object"
      },
      "StepOutcome": {
        "properties": {
          "kind": {
            "const": "STEP_OUTCOME",
            "title": "Kind",
            "type": "string"
          },
          "status": {
            "enum": [
              "SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "step_id": {
            "format": "uuid",
            "title": "Step Id",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "step_id",
          "status"
        ],
        "title": "StepOutcome",
        "type": "object"
      },
      "TextInput": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "minLength": 1,
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "TEXT",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "title": "TextInput",
        "type": "object"
      },
      "TextOutput": {
        "properties": {
          "availability": {
            "const": "READY",
            "title": "Availability",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "TEXT",
            "title": "Type",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "visibility",
          "availability",
          "type",
          "item_id",
          "text"
        ],
        "title": "TextOutput",
        "type": "object"
      },
      "ToolCall": {
        "properties": {
          "call_id": {
            "maxLength": 200,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Call Id",
            "type": "string"
          },
          "kind": {
            "const": "TOOL_CALL",
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Name",
            "type": "string"
          },
          "status": {
            "enum": [
              "STARTED",
              "COMPLETED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "call_id",
          "name",
          "status"
        ],
        "title": "ToolCall",
        "type": "object"
      },
      "TurnDetail": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "next_cursor": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "outputs": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextOutput"
                },
                {
                  "$ref": "#/components/schemas/JsonOutput"
                },
                {
                  "$ref": "#/components/schemas/FileOutput"
                },
                {
                  "$ref": "#/components/schemas/UrlOutput"
                },
                {
                  "$ref": "#/components/schemas/UnavailableOutput"
                }
              ]
            },
            "title": "Outputs",
            "type": "array"
          },
          "required_actions": {
            "items": {
              "$ref": "#/components/schemas/RequiredActionView"
            },
            "title": "Required Actions",
            "type": "array"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "QUEUED",
              "RUNNING",
              "REQUIRES_ACTION",
              "CANCEL_REQUESTED",
              "SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "id",
          "session_id",
          "status",
          "usage",
          "error",
          "created_at",
          "started_at",
          "completed_at",
          "outputs",
          "next_cursor"
        ],
        "title": "TurnDetail",
        "type": "object"
      },
      "TurnEnvelope": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "QUEUED",
              "RUNNING",
              "REQUIRES_ACTION",
              "CANCEL_REQUESTED",
              "SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "id",
          "session_id",
          "status",
          "usage",
          "error",
          "created_at",
          "started_at",
          "completed_at"
        ],
        "title": "TurnEnvelope",
        "type": "object"
      },
      "TurnInput": {
        "additionalProperties": false,
        "properties": {
          "input": {
            "items": {
              "discriminator": {
                "mapping": {
                  "FILE": "#/components/schemas/FileInput",
                  "TEXT": "#/components/schemas/TextInput"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextInput"
                },
                {
                  "$ref": "#/components/schemas/FileInput"
                }
              ]
            },
            "minItems": 1,
            "title": "Input",
            "type": "array"
          },
          "limits": {
            "$ref": "#/components/schemas/ExecutionLimits"
          },
          "metadata": {
            "additionalProperties": {
              "maxLength": 512,
              "type": "string"
            },
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "title": "TurnInput",
        "type": "object"
      },
      "TurnPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TurnEnvelope"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "TurnPage",
        "type": "object"
      },
      "TurnReceipt": {
        "properties": {
          "events_url": {
            "title": "Events Url",
            "type": "string"
          },
          "idempotency_expires_at": {
            "format": "date-time",
            "title": "Idempotency Expires At",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "QUEUED",
              "RUNNING",
              "REQUIRES_ACTION",
              "CANCEL_REQUESTED",
              "SUCCEEDED",
              "FAILED",
              "CANCELED",
              "EXPIRED"
            ],
            "title": "Status",
            "type": "string"
          },
          "status_url": {
            "title": "Status Url",
            "type": "string"
          },
          "turn_id": {
            "format": "uuid",
            "title": "Turn Id",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "turn_id",
          "status",
          "idempotency_expires_at",
          "status_url",
          "events_url"
        ],
        "title": "TurnReceipt",
        "type": "object"
      },
      "UnavailableOutput": {
        "properties": {
          "availability": {
            "enum": [
              "FAILED",
              "EXPIRED"
            ],
            "title": "Availability",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/PublicError"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "type": {
            "enum": [
              "TEXT",
              "JSON",
              "FILE",
              "URL"
            ],
            "title": "Type",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "visibility",
          "availability",
          "error",
          "type"
        ],
        "title": "UnavailableOutput",
        "type": "object"
      },
      "UrlOutput": {
        "properties": {
          "access": {
            "enum": [
              "PUBLIC",
              "AUTHENTICATED",
              "UNKNOWN"
            ],
            "title": "Access",
            "type": "string"
          },
          "availability": {
            "const": "READY",
            "title": "Availability",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicError"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "type": {
            "const": "URL",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "INTERMEDIATE",
              "PARTIAL",
              "FINAL"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "visibility",
          "availability",
          "type",
          "url",
          "access",
          "expires_at"
        ],
        "title": "UrlOutput",
        "type": "object"
      },
      "Usage": {
        "properties": {
          "status": {
            "default": "PENDING",
            "enum": [
              "PENDING",
              "FINAL"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_su": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Su"
          }
        },
        "title": "Usage",
        "type": "object"
      },
      "UsageSummary": {
        "properties": {
          "budget_reserved_su": {
            "title": "Budget Reserved Su",
            "type": "number"
          },
          "categories": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CostCategoryUsage"
            },
            "propertyNames": {
              "enum": [
                "LLM",
                "SEARCH",
                "SANDBOX",
                "STORAGE",
                "THIRD_PARTY"
              ]
            },
            "title": "Categories",
            "type": "object"
          },
          "estimated_su": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Su"
          },
          "preparations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PreparationUsage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Work preparation spend in this Project, separate from the execution totals. With works:read it covers every preparation in the Project, otherwise only those this key accepted; key_id narrows it to preparations that key accepted. Null when deployment_id, session_id, turn_id or run_id is given, because a preparation belongs to none of them. For a key granted every Deployment and holding works:read, Project spend is the execution total plus this total."
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reserved_su": {
            "title": "Reserved Su",
            "type": "number"
          },
          "settled_su": {
            "title": "Settled Su",
            "type": "number"
          },
          "status": {
            "enum": [
              "PENDING",
              "FINAL"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_su": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Su"
          }
        },
        "required": [
          "project_id",
          "status",
          "total_su",
          "settled_su",
          "reserved_su",
          "budget_reserved_su",
          "estimated_su",
          "categories",
          "preparations"
        ],
        "title": "UsageSummary",
        "type": "object"
      },
      "UsageUpdate": {
        "properties": {
          "kind": {
            "const": "USAGE",
            "title": "Kind",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "kind",
          "usage"
        ],
        "title": "UsageUpdate",
        "type": "object"
      },
      "WorkPreparationDeliveryV1": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "minLength": 1,
            "type": "string"
          },
          "target_ref": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "WorkPreparationDeliveryV2": {
        "additionalProperties": false,
        "properties": {
          "attach": {
            "enum": [
              "RESULT_FILES",
              "NONE"
            ]
          },
          "mode": {
            "enum": [
              "NEW_MAIL",
              "REPLY",
              "CHAT",
              "FILE_ONLY"
            ]
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationRecipient"
            },
            "minItems": 0,
            "type": "array"
          },
          "reply_to": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "minLength": 1,
                "type": "string"
              },
              "source": {
                "enum": [
                  "TRIGGER_MESSAGE",
                  "INPUT"
                ]
              }
            },
            "required": [
              "source"
            ],
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "WorkPreparationExecutionRef": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "minLength": 1,
            "type": "string"
          },
          "kind": {
            "enum": [
              "API_TURN",
              "PORTAL_JOB",
              "TEAM_WORK_ITEM",
              "CHAT_JOB"
            ]
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "type": "object"
      },
      "WorkPreparationKnowledgeRef": {
        "additionalProperties": false,
        "properties": {
          "ref": {
            "minLength": 1,
            "type": "string"
          },
          "revision": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "ref"
        ],
        "type": "object"
      },
      "WorkPreparationOwner": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "USER",
              "ORGANIZATION"
            ]
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "type": "object"
      },
      "WorkPreparationPackageRef": {
        "additionalProperties": false,
        "properties": {
          "package_hash": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "recipe_hash": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "recipe_id": {
            "minLength": 1,
            "type": "string"
          },
          "recipe_version": {
            "minLength": 1,
            "type": "string"
          },
          "rule_hash": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "rule_revision": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "package_hash",
          "recipe_id",
          "recipe_version",
          "recipe_hash",
          "rule_revision",
          "rule_hash"
        ],
        "type": "object"
      },
      "WorkPreparationPolicy": {
        "additionalProperties": false,
        "properties": {
          "assembly_tier": {
            "enum": [
              "STANDARD",
              "ULTRA"
            ]
          },
          "execution_tier": {
            "enum": [
              "STANDARD",
              "ULTRA"
            ]
          },
          "initial_review_runs": {
            "minimum": 1,
            "type": "integer"
          },
          "max_repair_attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "model_test_repetitions": {
            "minimum": 1,
            "type": "integer"
          },
          "period": {
            "enum": [
              "DAY",
              "MONTH"
            ]
          },
          "period_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "preparation_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "preparation_timeout_seconds": {
            "minimum": 1,
            "type": "integer"
          },
          "run_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "run_timeout_seconds": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "assembly_tier",
          "execution_tier",
          "preparation_budget_su",
          "run_budget_su",
          "period_budget_su",
          "period",
          "max_repair_attempts",
          "model_test_repetitions",
          "preparation_timeout_seconds",
          "run_timeout_seconds",
          "initial_review_runs"
        ],
        "type": "object"
      },
      "WorkPreparationPolicyDraft": {
        "additionalProperties": false,
        "properties": {
          "assembly_tier": {
            "enum": [
              "STANDARD",
              "ULTRA"
            ]
          },
          "execution_tier": {
            "enum": [
              "STANDARD",
              "ULTRA"
            ]
          },
          "initial_review_runs": {
            "minimum": 1,
            "type": "integer"
          },
          "max_repair_attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "model_test_repetitions": {
            "minimum": 1,
            "type": "integer"
          },
          "period": {
            "enum": [
              "DAY",
              "MONTH"
            ]
          },
          "period_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "preparation_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "preparation_timeout_seconds": {
            "minimum": 1,
            "type": "integer"
          },
          "run_budget_su": {
            "not": {
              "pattern": "^0(?:\\.0+)?$"
            },
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
            "type": "string"
          },
          "run_timeout_seconds": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "WorkPreparationPreparationList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationPreparationView"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "type": "object"
      },
      "WorkPreparationPreparationView": {
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "initiated_by": {
                  "const": "CLIENT"
                },
                "preparation_kind": {
                  "const": "SPECIALIZE"
                },
                "spec": {
                  "not": {
                    "required": [
                      "spec_version"
                    ]
                  }
                },
                "status": {
                  "enum": [
                    "READY",
                    "QUEUED",
                    "RUNNING",
                    "SUCCEEDED"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "spec": {
                  "properties": {
                    "delivery": {
                      "required": [
                        "channel",
                        "target_ref"
                      ]
                    },
                    "examples": {
                      "items": {
                        "required": [
                          "input",
                          "accepted_output"
                        ]
                      }
                    },
                    "policy": {
                      "$ref": "#/components/schemas/WorkPreparationPolicy"
                    },
                    "sources": {
                      "items": {
                        "required": [
                          "ref",
                          "revision"
                        ]
                      }
                    },
                    "triggers": {
                      "items": {
                        "required": [
                          "kind",
                          "description"
                        ]
                      }
                    },
                    "unresolved": {
                      "maxItems": 0
                    }
                  },
                  "required": [
                    "purpose",
                    "success_criteria",
                    "input_schema",
                    "output_schema",
                    "examples",
                    "sources",
                    "connections",
                    "allowed_actions",
                    "triggers",
                    "delivery",
                    "human_decisions",
                    "facts",
                    "assumptions",
                    "unresolved",
                    "policy"
                  ]
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "initiated_by": {
                  "const": "CLIENT"
                },
                "preparation_kind": {
                  "const": "SPECIALIZE"
                },
                "spec": {
                  "required": [
                    "spec_version"
                  ]
                },
                "status": {
                  "enum": [
                    "READY",
                    "QUEUED",
                    "RUNNING",
                    "SUCCEEDED"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "spec": {
                  "properties": {
                    "delivery": {
                      "allOf": [
                        {
                          "if": {
                            "properties": {
                              "mode": {
                                "const": "NEW_MAIL"
                              }
                            }
                          },
                          "then": {
                            "properties": {
                              "recipients": {
                                "minItems": 1
                              }
                            },
                            "required": [
                              "recipients"
                            ]
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "mode": {
                                "const": "REPLY"
                              }
                            }
                          },
                          "then": {
                            "required": [
                              "reply_to"
                            ]
                          }
                        }
                      ],
                      "required": [
                        "mode"
                      ]
                    },
                    "examples": {
                      "items": {
                        "required": [
                          "input",
                          "accepted_output"
                        ]
                      }
                    },
                    "knowledge": {
                      "items": {
                        "required": [
                          "ref",
                          "revision"
                        ]
                      }
                    },
                    "pending_sources": {
                      "maxItems": 0
                    },
                    "policy": {
                      "$ref": "#/components/schemas/WorkPreparationPolicy"
                    },
                    "triggers": {
                      "items": {
                        "required": [
                          "kind",
                          "description"
                        ]
                      }
                    },
                    "unresolved": {
                      "maxItems": 0
                    }
                  },
                  "required": [
                    "spec_version",
                    "purpose",
                    "success_criteria",
                    "inputs",
                    "output_schema",
                    "examples",
                    "knowledge",
                    "references",
                    "connections",
                    "allowed_actions",
                    "triggers",
                    "delivery",
                    "human_decisions",
                    "facts",
                    "assumptions",
                    "unresolved",
                    "policy"
                  ]
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "preparation_kind": {
                  "const": "SPECIALIZE"
                },
                "status": {
                  "const": "SUCCEEDED"
                }
              }
            },
            "then": {
              "required": [
                "package"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "preparation_kind": {
                  "const": "INSTANT_START"
                },
                "status": {
                  "const": "SUCCEEDED"
                }
              }
            },
            "then": {
              "required": [
                "team_id"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "support": {
                  "enum": [
                    "NEEDS_INPUT",
                    "UNSUPPORTED"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "reason_codes": {
                  "minItems": 1
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "NEEDS_INPUT"
                }
              }
            },
            "then": {
              "anyOf": [
                {
                  "properties": {
                    "missing_fields": {
                      "minItems": 1
                    }
                  }
                },
                {
                  "properties": {
                    "questions": {
                      "minItems": 1
                    }
                  }
                }
              ],
              "properties": {
                "support": {
                  "const": "NEEDS_INPUT"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "enum": [
                    "SUCCEEDED",
                    "FAILED",
                    "CANCELED"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "next_actions": {
                  "items": {
                    "enum": [
                      "VIEW_RESULT",
                      "START_OPERATION",
                      "RETRY",
                      "PROVIDE_INPUT",
                      "CONNECT_ACCOUNT"
                    ]
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "enum": [
                    "READY",
                    "QUEUED",
                    "RUNNING"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "missing_fields": {
                  "maxItems": 0
                },
                "questions": {
                  "maxItems": 0
                },
                "support": {
                  "const": "SUPPORTED"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "next_actions": {
                  "contains": {
                    "const": "START_OPERATION"
                  }
                }
              }
            },
            "then": {
              "properties": {
                "missing_fields": {
                  "maxItems": 0
                },
                "questions": {
                  "maxItems": 0
                },
                "status": {
                  "const": "SUCCEEDED"
                },
                "support": {
                  "const": "SUPPORTED"
                }
              }
            }
          },
          {
            "else": {
              "properties": {
                "next_actions": {
                  "items": {
                    "not": {
                      "const": "START"
                    }
                  }
                }
              }
            },
            "if": {
              "properties": {
                "preparation_kind": {
                  "const": "INSTANT_START"
                }
              }
            },
            "then": {
              "properties": {
                "next_actions": {
                  "items": {
                    "not": {
                      "enum": [
                        "ASSEMBLE",
                        "TEST",
                        "PUBLISH",
                        "START_OPERATION"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "next_actions": {
                  "contains": {
                    "const": "START"
                  }
                }
              }
            },
            "then": {
              "properties": {
                "status": {
                  "const": "READY"
                },
                "support": {
                  "const": "SUPPORTED"
                }
              }
            }
          },
          {
            "if": {
              "required": [
                "unsupported_actions"
              ]
            },
            "then": {
              "properties": {
                "reason_codes": {
                  "contains": {
                    "const": "CAPABILITY_UNSUPPORTED"
                  }
                }
              }
            }
          }
        ],
        "properties": {
          "contract_version": {
            "const": 1
          },
          "current_setup": {
            "additionalProperties": false,
            "examples": [
              {
                "package_hash": "3f2a000000000000000000000000000000000000000000000000000000000000",
                "preparation_id": "6f1c2b3a-0d4e-4f5a-8b6c-7d8e9f0a1b2c",
                "published_at": "2026-10-15T09:00:00+00:00",
                "tier": "L0"
              },
              {
                "preparation_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                "published_at": "2026-10-20T03:30:00+00:00",
                "tier": "SPECIALIZED"
              }
            ],
            "properties": {
              "package_hash": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "preparation_id": {
                "format": "uuid",
                "type": "string"
              },
              "published_at": {
                "format": "date-time",
                "type": "string"
              },
              "tier": {
                "enum": [
                  "L0",
                  "SPECIALIZED"
                ]
              }
            },
            "required": [
              "preparation_id",
              "tier",
              "published_at"
            ],
            "type": "object"
          },
          "execution_refs": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationExecutionRef"
            },
            "minItems": 0,
            "type": "array"
          },
          "initiated_by": {
            "enum": [
              "CLIENT",
              "SERVER"
            ]
          },
          "kind": {
            "const": "PREPARATION_VIEW"
          },
          "missing_fields": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "next_actions": {
            "items": {
              "enum": [
                "PROVIDE_INPUT",
                "CONNECT_ACCOUNT",
                "ASSEMBLE",
                "START",
                "TEST",
                "PUBLISH",
                "RETRY",
                "CANCEL",
                "VIEW_RESULT",
                "START_OPERATION",
                "CONFIRM_SCOPE"
              ]
            },
            "minItems": 0,
            "type": "array"
          },
          "owner": {
            "$ref": "#/components/schemas/WorkPreparationOwner"
          },
          "package": {
            "$ref": "#/components/schemas/WorkPreparationPackageRef"
          },
          "preparation_id": {
            "format": "uuid",
            "type": "string"
          },
          "preparation_kind": {
            "enum": [
              "INSTANT_START",
              "SPECIALIZE"
            ]
          },
          "preparation_revision": {
            "minimum": 1,
            "type": "integer"
          },
          "questions": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "changes": {
                  "items": {
                    "enum": [
                      "NEW_TOOL",
                      "EXTERNAL_ACTION",
                      "HIGHER_COST"
                    ]
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "field": {
                  "minLength": 1,
                  "type": "string"
                },
                "id": {
                  "minLength": 1,
                  "type": "string"
                },
                "package_hash": {
                  "pattern": "^[0-9a-f]{64}$",
                  "type": "string"
                },
                "text": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "field",
                "text"
              ],
              "type": "object"
            },
            "minItems": 0,
            "type": "array"
          },
          "reason_codes": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "retryable": {
            "type": "boolean"
          },
          "revision": {
            "minimum": 1,
            "type": "integer"
          },
          "spec": {
            "$ref": "#/components/schemas/WorkPreparationWorkSpec"
          },
          "specialization_reset": {
            "additionalProperties": false,
            "properties": {
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "reason": {
                "enum": [
                  "SCOPE_WIDENED"
                ]
              }
            },
            "required": [
              "reason",
              "at"
            ],
            "type": "object"
          },
          "stage": {
            "enum": [
              "CLARIFY",
              "ASSEMBLE",
              "VALIDATE",
              "CREATE",
              "PUBLISH",
              "BIND"
            ]
          },
          "status": {
            "enum": [
              "NEEDS_INPUT",
              "READY",
              "QUEUED",
              "RUNNING",
              "REQUIRES_ACTION",
              "CANCEL_REQUESTED",
              "SUCCEEDED",
              "FAILED",
              "CANCELED"
            ]
          },
          "support": {
            "enum": [
              "SUPPORTED",
              "NEEDS_INPUT",
              "UNSUPPORTED"
            ]
          },
          "team_id": {
            "format": "uuid",
            "type": "string"
          },
          "unsupported_actions": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "usage": {
            "$ref": "#/components/schemas/WorkPreparationUsage"
          },
          "work_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "contract_version",
          "preparation_kind",
          "work_id",
          "revision",
          "preparation_id",
          "preparation_revision",
          "owner",
          "status",
          "stage",
          "support",
          "reason_codes",
          "missing_fields",
          "questions",
          "next_actions",
          "retryable",
          "spec",
          "usage"
        ],
        "type": "object"
      },
      "WorkPreparationRecipient": {
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "source": {
                  "const": "CONSTANT"
                }
              }
            },
            "then": {
              "not": {
                "required": [
                  "name"
                ]
              },
              "required": [
                "value"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "source": {
                  "const": "INPUT"
                }
              }
            },
            "then": {
              "not": {
                "required": [
                  "value"
                ]
              },
              "required": [
                "name"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "source": {
                  "const": "REQUESTER"
                }
              }
            },
            "then": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "value"
                    ]
                  }
                ]
              }
            }
          }
        ],
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "source": {
            "enum": [
              "CONSTANT",
              "INPUT",
              "REQUESTER"
            ]
          },
          "value": {
            "format": "email",
            "minLength": 3,
            "type": "string"
          }
        },
        "required": [
          "source"
        ],
        "type": "object"
      },
      "WorkPreparationReferenceResource": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "type": "string"
          },
          "ref": {
            "minLength": 1,
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "revision": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "ref",
          "required"
        ],
        "type": "object"
      },
      "WorkPreparationUsage": {
        "additionalProperties": false,
        "allOf": [
          {
            "else": {
              "properties": {
                "cost_su": {
                  "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
                  "type": "string"
                }
              }
            },
            "if": {
              "properties": {
                "status": {
                  "const": "PENDING"
                }
              }
            },
            "then": {
              "properties": {
                "cost_su": {
                  "type": "null"
                }
              }
            }
          }
        ],
        "properties": {
          "cost_su": {
            "anyOf": [
              {
                "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,8})?$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "PENDING",
              "SETTLED"
            ]
          }
        },
        "required": [
          "status",
          "cost_su"
        ],
        "type": "object"
      },
      "WorkPreparationWorkInput": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "schema": {
            "type": "object"
          },
          "source": {
            "enum": [
              "REQUEST_TEXT",
              "REQUEST_ATTACHMENT",
              "TRIGGER_MESSAGE",
              "CONNECTION",
              "ASK_PERSON"
            ]
          },
          "type": {
            "enum": [
              "TEXT",
              "NUMBER",
              "BOOLEAN",
              "OBJECT",
              "ARRAY",
              "FILE",
              "MAIL"
            ]
          }
        },
        "required": [
          "name",
          "type",
          "required",
          "source"
        ],
        "type": "object"
      },
      "WorkPreparationWorkSpec": {
        "additionalProperties": false,
        "allOf": [
          {
            "else": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "inputs"
                    ]
                  },
                  {
                    "required": [
                      "knowledge"
                    ]
                  },
                  {
                    "required": [
                      "references"
                    ]
                  },
                  {
                    "required": [
                      "pending_sources"
                    ]
                  }
                ]
              },
              "properties": {
                "delivery": {
                  "$ref": "#/components/schemas/WorkPreparationDeliveryV1"
                }
              }
            },
            "if": {
              "required": [
                "spec_version"
              ]
            },
            "then": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "input_schema"
                    ]
                  },
                  {
                    "required": [
                      "sources"
                    ]
                  }
                ]
              },
              "properties": {
                "delivery": {
                  "$ref": "#/components/schemas/WorkPreparationDeliveryV2"
                }
              }
            }
          }
        ],
        "properties": {
          "allowed_actions": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "assumptions": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "connections": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkPreparationDeliveryV1"
              },
              {
                "$ref": "#/components/schemas/WorkPreparationDeliveryV2"
              }
            ]
          },
          "examples": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "accepted_output": {},
                "input": {}
              },
              "required": [],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          },
          "facts": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "human_decisions": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          },
          "input_schema": {
            "type": "object"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationWorkInput"
            },
            "minItems": 0,
            "type": "array"
          },
          "knowledge": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationKnowledgeRef"
            },
            "minItems": 0,
            "type": "array"
          },
          "output_schema": {
            "type": "object"
          },
          "pending_sources": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationKnowledgeRef"
            },
            "minItems": 0,
            "type": "array"
          },
          "policy": {
            "$ref": "#/components/schemas/WorkPreparationPolicyDraft"
          },
          "purpose": {
            "minLength": 1,
            "type": "string"
          },
          "references": {
            "items": {
              "$ref": "#/components/schemas/WorkPreparationReferenceResource"
            },
            "minItems": 0,
            "type": "array"
          },
          "sources": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "ref": {
                  "minLength": 1,
                  "type": "string"
                },
                "revision": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "minItems": 0,
            "type": "array"
          },
          "spec_version": {
            "const": 2
          },
          "success_criteria": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "triggers": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "description": {
                  "minLength": 1,
                  "type": "string"
                },
                "kind": {
                  "enum": [
                    "MANUAL",
                    "SCHEDULE",
                    "EVENT"
                  ]
                }
              },
              "required": [],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          },
          "unresolved": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 0,
            "type": "array"
          }
        },
        "required": [
          "purpose"
        ],
        "type": "object"
      },
      "WorkSpecIn": {
        "additionalProperties": false,
        "properties": {
          "allowed_actions": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Allowed Actions",
            "type": "array"
          },
          "assumptions": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Assumptions",
            "type": "array"
          },
          "connections": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Connections",
            "type": "array"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SpecDelivery"
              },
              {
                "$ref": "#/components/schemas/SpecDeliveryV2"
              }
            ],
            "title": "Delivery"
          },
          "examples": {
            "items": {
              "$ref": "#/components/schemas/SpecExample"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Examples",
            "type": "array"
          },
          "facts": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Facts",
            "type": "array"
          },
          "human_decisions": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Human Decisions",
            "type": "array"
          },
          "input_schema": {
            "additionalProperties": true,
            "title": "Input Schema",
            "type": "object"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/SpecInput"
            },
            "maxItems": 50,
            "title": "Inputs",
            "type": "array"
          },
          "knowledge": {
            "items": {
              "$ref": "#/components/schemas/SpecKnowledge"
            },
            "maxItems": 50,
            "title": "Knowledge",
            "type": "array"
          },
          "output_schema": {
            "additionalProperties": true,
            "title": "Output Schema",
            "type": "object"
          },
          "pending_sources": {
            "items": {
              "$ref": "#/components/schemas/SpecKnowledge"
            },
            "maxItems": 50,
            "title": "Pending Sources",
            "type": "array"
          },
          "policy": {
            "additionalProperties": true,
            "title": "Policy",
            "type": "object"
          },
          "purpose": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Purpose",
            "type": "string"
          },
          "references": {
            "items": {
              "$ref": "#/components/schemas/SpecReference"
            },
            "maxItems": 50,
            "title": "References",
            "type": "array"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/SpecSource"
            },
            "maxItems": 50,
            "title": "Sources",
            "type": "array"
          },
          "spec_version": {
            "const": 2,
            "title": "Spec Version",
            "type": "integer"
          },
          "success_criteria": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Success Criteria",
            "type": "array"
          },
          "triggers": {
            "items": {
              "$ref": "#/components/schemas/SpecTrigger"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Triggers",
            "type": "array"
          },
          "unresolved": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Unresolved",
            "type": "array"
          }
        },
        "required": [
          "purpose"
        ],
        "title": "WorkSpecIn",
        "type": "object"
      }
    },
    "securitySchemes": {
      "RuntimeApiKey": {
        "bearerFormat": "up_...",
        "description": "Server-to-server Runtime API key; user JWTs are not accepted.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Server-to-server API for running UpServe agent deployments and workflows. This is not an OpenAI-compatible API. Private Beta: access is limited to approved Projects and the contract may still change.",
    "title": "UpServe Agent Runtime API",
    "version": "1.3.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/artifacts/{artifact_id}": {
      "get": {
        "operationId": "artifact_detail_v1_artifacts__artifact_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "artifact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Artifact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Artifact Detail",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/artifacts/{artifact_id}/content": {
      "get": {
        "description": "Consume a short-lived, one-use download receipt. The issuing API key must remain authorized. Authenticated by the `token` query parameter, not by an Authorization header.",
        "operationId": "artifact_content_v1_artifacts__artifact_id__content_get",
        "parameters": [
          {
            "in": "path",
            "name": "artifact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Artifact Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 40,
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [],
        "summary": "Artifact Content",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/artifacts/{artifact_id}/download": {
      "post": {
        "operationId": "artifact_download_v1_artifacts__artifact_id__download_post",
        "parameters": [
          {
            "in": "path",
            "name": "artifact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Artifact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Artifact Download",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/deployments": {
      "get": {
        "operationId": "list_deployments_v1_deployments_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentListDocumented"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "List Deployments",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/deployments/{deployment_id}": {
      "get": {
        "operationId": "detail_v1_deployments__deployment_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "deployment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Deployment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentDocumented"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Detail",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/deployments/{deployment_id}/sessions": {
      "post": {
        "description": "Atomically accept a new Session and first Turn, binding READY input files to this Session.",
        "operationId": "create_session_v1_deployments__deployment_id__sessions_post",
        "parameters": [
          {
            "in": "path",
            "name": "deployment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Deployment Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TurnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Create Session",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/files": {
      "post": {
        "description": "Upload one input file into Project staging for at most 24 hours. Requires files:write.",
        "operationId": "upload_staging_v1_files_post",
        "parameters": [
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Upload Staging",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/preparations": {
      "get": {
        "description": "This Project's preparations, newest first. Requires works:read.",
        "operationId": "list_preparations_v1_preparations_get",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "work_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkPreparationPreparationList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "List Preparations",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/preparations/{preparation_id}": {
      "get": {
        "description": "One preparation, with support, reason_codes and next_actions judged at read time. Requires works:read.",
        "operationId": "get_preparation_v1_preparations__preparation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "preparation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Preparation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkPreparationPreparationView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Get Preparation",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/preparations/{preparation_id}/answers": {
      "post": {
        "description": "Answer the preparation's questions (works:write). A scope confirmation (Q_SCOPE_EXPANSION) is an approval: it needs works:approve, actor.subject and the reviewed package_hash.",
        "operationId": "answer_preparation_v1_preparations__preparation_id__answers_post",
        "parameters": [
          {
            "in": "path",
            "name": "preparation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Preparation Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerPreparationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkPreparationPreparationView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Answer Preparation",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}": {
      "delete": {
        "operationId": "delete_v1_runs__run_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Delete",
        "tags": [
          "runtime-v1"
        ]
      },
      "get": {
        "operationId": "run_v1_runs__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Run",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}/actions/{action_id}": {
      "get": {
        "description": "Read a question or the bounded review content for a delegated approval.",
        "operationId": "action_detail_v1_runs__run_id__actions__action_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Action Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequiredActionView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Action Detail",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}/actions/{action_id}/resolve": {
      "post": {
        "description": "Answer a question (actions:resolve) or submit a customer's human decision (actions:approve).",
        "operationId": "resolve_action_v1_runs__run_id__actions__action_id__resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ActionResolveInput"
                  },
                  {
                    "$ref": "#/components/schemas/ApprovalResolveInput"
                  }
                ],
                "title": "Data"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Resolve Action",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}/cancel": {
      "post": {
        "operationId": "cancel_v1_runs__run_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Cancel",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}/events": {
      "get": {
        "operationId": "events_v1_runs__run_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "header",
            "name": "last-event-id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Last-Event-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "SSE frames; every data line is a RuntimeEvent.",
                  "type": "string",
                  "x-event-data-schema": {
                    "$ref": "#/components/schemas/RuntimeEvent"
                  }
                }
              }
            },
            "description": "Server-sent events for the Run. Each frame is `id: <event_id>`, `event: <type>` and `data: <RuntimeEvent JSON>`; a terminal `event: error` frame carries the standard error envelope."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Events",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/runs/{run_id}/outputs": {
      "get": {
        "operationId": "run_v1_runs__run_id__outputs_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Run",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}": {
      "delete": {
        "description": "Accept deletion: immediately block content access, request Turn cancellation and resource cleanup. 202 is a durable receipt, not confirmation of completed physical data deletion.",
        "operationId": "delete_session_v1_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EmptyInput"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Delete Session",
        "tags": [
          "runtime-v1"
        ]
      },
      "get": {
        "operationId": "get_session_v1_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/actions/{action_id}/resolve": {
      "post": {
        "description": "Answer a caller-resolvable RequiredAction (actions:resolve) and durably resume its Turn. OWNER actions are refused with 403; a stale, expired or canceled action returns 409.",
        "operationId": "resolve_action_v1_sessions__session_id__actions__action_id__resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionResolveInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Resolve Action",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/close": {
      "post": {
        "description": "Close an idle Session and durably request sandbox pause. Retained results remain readable.",
        "operationId": "close_session_v1_sessions__session_id__close_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EmptyInput"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Close Session",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/events": {
      "get": {
        "operationId": "session_events_v1_sessions__session_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "header",
            "name": "last-event-id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Last-Event-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "SSE frames; every data line is a RuntimeEvent.",
                  "type": "string",
                  "x-event-data-schema": {
                    "$ref": "#/components/schemas/RuntimeEvent"
                  }
                }
              }
            },
            "description": "Server-sent events for the Session. Each frame is `id: <event_id>`, `event: <type>` and `data: <RuntimeEvent JSON>`; a terminal `event: error` frame carries the standard error envelope."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Session Events",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/files": {
      "post": {
        "description": "Upload one private input file into an active Session. Requires files:write.",
        "operationId": "upload_session_file_v1_sessions__session_id__files_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Upload Session File",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/items": {
      "get": {
        "operationId": "list_session_items_v1_sessions__session_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "List Session Items",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/turns": {
      "get": {
        "operationId": "list_session_turns_v1_sessions__session_id__turns_get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "List Session Turns",
        "tags": [
          "runtime-v1"
        ]
      },
      "post": {
        "operationId": "create_turn_v1_sessions__session_id__turns_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TurnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Create Turn",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/turns/{turn_id}": {
      "get": {
        "description": "Requires turns:read and sessions:read. Missing sessions:read returns 403 before the Turn lookup. Reads public Items, never raw internal results. Returns TEXT/JSON/FILE/URL outputs after their result manifest is finalized.",
        "operationId": "get_turn_v1_sessions__session_id__turns__turn_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "turn_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Turn Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Get Turn",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/sessions/{session_id}/turns/{turn_id}/cancel": {
      "post": {
        "description": "Persist Turn-specific cancellation. An already terminal Turn returns 200 and its existing state.",
        "operationId": "cancel_v1_sessions__session_id__turns__turn_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "turn_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Turn Id",
              "type": "string"
            }
          },
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EmptyInput"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnReceipt"
                }
              }
            },
            "description": "OK"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Cancel",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "description": "Settled SU and outstanding reservations within the key's deployment grants. Work preparation spend is reported separately in preparations and never changes the execution status or total_su. Unknown usage has total_su=null. Requires usage:read.",
        "operationId": "usage_v1_usage_get",
        "parameters": [
          {
            "in": "query",
            "name": "key_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Key Id"
            }
          },
          {
            "in": "query",
            "name": "deployment_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Deployment Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "turn_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Turn Id"
            }
          },
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Usage",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/workflows/{workflow_id}": {
      "get": {
        "operationId": "detail_v1_workflows__workflow_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workflow Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Detail",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/workflows/{workflow_id}/runs": {
      "post": {
        "operationId": "submit_v1_workflows__workflow_id__runs_post",
        "parameters": [
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Submit",
        "tags": [
          "runtime-v1"
        ]
      }
    },
    "/v1/works": {
      "post": {
        "description": "Accept a work description for this Project's organization. The server creates an organization team and specializes it. 202 with QUEUED is acceptance, not readiness: poll the preparation until SUCCEEDED with team_id. Requires works:write. Personal-space Projects get 404.",
        "operationId": "prepare_work_v1_works_post",
        "parameters": [
          {
            "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "description": "Project-scoped retry key, at most 256 UTF-8 bytes. Reuse only for the same request.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareWorkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkPreparationPreparationView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Gone"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeErrorEnvelope"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "RuntimeApiKey": []
          }
        ],
        "summary": "Prepare Work",
        "tags": [
          "runtime-v1"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.upserve.app"
    }
  ]
}
